PageSourceSearch

https://transform.tools/_next/static/cba37845c60204d8200d.worker.js

js transform.tools collected 2026-10-03 21:43:47 UTC 2,459,780 bytes, 67,851 lines download raw bytes

vendor: 4,391 bytes, lines 1-109
1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		var threw = true;
21/******/ 		try {
22/******/ 			modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
23/******/ 			threw = false;
24/******/ 		} finally {
25/******/ 			if(threw) delete installedModules[moduleId];
26/******/ 		}
27/******/
28/******/ 		// Flag the module as loaded
29/******/ 		module.l = true;
30/******/
31/******/ 		// Return the exports of the module
32/******/ 		return module.exports;
33/******/ 	}
34/******/
35/******/
36/******/ 	// expose the modules object (__webpack_modules__)
37/******/ 	__webpack_require__.m = modules;
38/******/
39/******/ 	// expose the module cache
40/******/ 	__webpack_require__.c = installedModules;
41/******/
42/******/ 	// define getter function for harmony exports
43/******/ 	__webpack_require__.d = function(exports, name, getter) {
44/******/ 		if(!__webpack_require__.o(exports, name)) {
45/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
46/******/ 		}
47/******/ 	};
48/******/
49/******/ 	// define __esModule on exports
50/******/ 	__webpack_require__.r = function(exports) {
51/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
52/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
53/******/ 		}
54/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
55/******/ 	};
56/******/
57/******/ 	// create a fake namespace object
58/******/ 	// mode & 1: value is a module id, require it
59/******/ 	// mode & 2: merge all properties of value into the ns
60/******/ 	// mode & 4: return value when already ns object
61/******/ 	// mode & 8|1: behave like require
62/******/ 	__webpack_require__.t = function(value, mode) {
63/******/ 		if(mode & 1) value = __webpack_require__(value);
64/******/ 		if(mode & 8) return value;
65/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
66/******/ 		var ns = Object.create(null);
67/******/ 		__webpack_require__.r(ns);
68/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
69/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
70/******/ 		return ns;
71/******/ 	};
72/******/
73/******/ 	// getDefaultExport function for compatibility with non-harmony modules
74/******/ 	__webpack_require__.n = function(module) {
75/******/ 		var getter = module && module.__esModule ?
76/******/ 			function getDefault() { return module['default']; } :
77/******/ 			function getModuleExports() { return module; };
78/******/ 		__webpack_require__.d(getter, 'a', getter);
79/******/ 		return getter;
80/******/ 	};
81/******/
82/******/ 	// Object.prototype.hasOwnProperty.call
83/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
84/******/
85/******/ 	// __webpack_public_path__
86/******/ 	__webpack_require__.p = "";
87/******/
88/******/
89/******/ 	// Load entry module and return exports
90/******/ 	return __webpack_require__(__webpack_require__.s = "Ggmd");
91/******/ })
92/************************************************************************/
93/******/ ({
94
95/***/ "+dZ+":
96/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
97
98"use strict";
99/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return defineInspect; });
100/* harmony import */ var _invariant_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2C6G");
101/* harmony import */ var _nodejsCustomInspectSymbol_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("RKIb");
102
103
104/**
105 * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON`
106 */
107
108function defineInspect(classObject) {
109  var fn = classObject.prototype.toJSON;
110  typeof fn === 'function' || Object(_invariant_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(0);
111  classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')
112
113  if (_nodejsCustomInspectSymbol_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]) {
114    classObject.prototype[_nodejsCustomInspectSymbol_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]] = fn;
115  }
116}
117
118
119/***/ }),
120
121/***/ "/HjL":
122/***/ (function(module, exports, __webpack_require__) {
123
124"use strict";
125/**
126 * Copyright (c) Facebook, Inc. and its affiliates.
127 *
128 * This source code is licensed under the MIT license found in the
129 * LICENSE file in the root directory of this source tree.
130 *
131 * 
132 * @format
133 */
134// flowlint ambiguous-object-type:error
135
136
137var invariant = __webpack_require__("OUqe");
138
139var _require = __webpack_require__("sriv"),
140    DEFAULT_HANDLE_KEY = _require.DEFAULT_HANDLE_KEY;
141
142var INDENT = '  ';
143/**
144 * Converts an IR node into a GraphQL string. Custom Relay
145 * extensions (directives) are not supported; to print fragments with
146 * variables or fragment spreads with arguments, transform the node
147 * prior to printing.
148 */
149
150function print(schema, node) {
151  switch (node.kind) {
152    case 'Fragment':
153      return "fragment ".concat(node.name, " on ").concat(schema.getTypeString(node.type)) + printFragmentArgumentDefinitions(schema, node.argumentDefinitions) + printDirectives(schema, node.directives) + printSelections(schema, node, '', {}) + '\n';
154
155    case 'Root':
156      return "".concat(node.operation, " ").concat(node.name) + printArgumentDefinitions(schema, node.argumentDefinitions) + printDirectives(schema, node.directives) + printSelections(schema, node, '', {}) + '\n';
157
158    case 'SplitOperation':
159      return "SplitOperation ".concat(node.name, " on ").concat(schema.getTypeString(node.type)) + printSelections(schema, node, '', {}) + '\n';
160
161    default:
162      node;
163       true ?  false ? undefined : invariant(false) : undefined;
164  }
165}
166
167function printSelections(schema, node, indent, options) {
168  var selections = node.selections;
169
170  if (selections == null) {
171    return '';
172  }
173
174  var printed = selections.map(function (selection) {
175    return printSelection(schema, selection, indent, options);
176  });
177  return printed.length ? " {\n".concat(indent + INDENT).concat(printed.join('\n' + indent + INDENT), "\n").concat(indent).concat((options === null || options === void 0 ? void 0 : options.isClientExtension) === true ? '# ' : '', "}") : '';
178}
179/**
180 * Prints a field without subselections.
181 */
182
183
184function printField(schema, field, options) {
185  var _options$parentDirect;
186
187  var parentDirectives = (_options$parentDirect = options === null || options === void 0 ? void 0 : options.parentDirectives) !== null && _options$parentDirect !== void 0 ? _options$parentDirect : '';
188  var isClientExtension = (options === null || options === void 0 ? void 0 : options.isClientExtension) === true;
189  return (isClientExtension ? '# ' : '') + (field.alias === field.name ? field.name : field.alias + ': ' + field.name) + printArguments(schema, field.args) + parentDirectives + printDirectives(schema, field.directives) + printHandles(schema, field);
190}
191
192function printSelection(schema, selection, indent, options) {
193  var _options$parentDirect2;
194
195  var str;
196  var parentDirectives = (_options$parentDirect2 = options === null || options === void 0 ? void 0 : options.parentDirectives) !== null && _options$parentDirect2 !== void 0 ? _options$parentDirect2 : '';
197  var isClientExtension = (options === null || options === void 0 ? void 0 : options.isClientExtension) === true;
198
199  if (selection.kind === 'LinkedField') {
200    str = printField(schema, selection, {
201      parentDirectives: parentDirectives,
202      isClientExtension: isClientExtension
203    });
204    str += printSelections(schema, selection, indent + INDENT, {
205      isClientExtension: isClientExtension
206    });
207  } else if (selection.kind === 'ModuleImport') {
208    str = selection.selections.map(function (matchSelection) {
209      return printSelection(schema, matchSelection, indent, {
210        parentDirectives: parentDirectives,
211        isClientExtension: isClientExtension
212      });
213    }).join('\n' + indent + INDENT);
214  } else if (selection.kind === 'ScalarField') {
215    str = printField(schema, selection, {
216      parentDirectives: parentDirectives,
217      isClientExtension: isClientExtension
218    });
219  } else if (selection.kind === 'InlineFragment') {
220    str = '';
221
222    if (isClientExtension) {
223      str += '# ';
224    }
225
226    str += '... on ' + schema.getTypeString(selection.typeCondition);
227    str += parentDirectives;
228    str += printDirectives(schema, selection.directives);
229    str += printSelections(schema, selection, indent + INDENT, {
230      isClientExtension: isClientExtension
231    });
232  } else if (selection.kind === 'FragmentSpread') {
233    str = '';
234
235    if (isClientExtension) {
236      str += '# ';
237    }
238
239    str += '...' + selection.name;
240    str += parentDirectives;
241    str += printFragmentArguments(schema, selection.args);
242    str += printDirectives(schema, selection.directives);
243  } else if (selection.kind === 'InlineDataFragmentSpread') {
244    str = "# ".concat(selection.name, " @inline") + "\n".concat(indent).concat(INDENT, "...") + parentDirectives + printSelections(schema, selection, indent + INDENT, {});
245  } else if (selection.kind === 'Condition') {
246    var value = printValue(schema, selection.condition, null); // For Flow
247
248    !(value != null) ?  false ? undefined : invariant(false) : void 0;
249    var condStr = selection.passingValue ? ' @include' : ' @skip';
250    condStr += '(if: ' + value + ')';
251    condStr += parentDirectives; // For multi-selection conditions, pushes the condition down to each
252
253    var subSelections = selection.selections.map(function (sel) {
254      return printSelection(schema, sel, indent, {
255        parentDirectives: condStr,
256        isClientExtension: isClientExtension
257      });
258    });
259    str = subSelections.join('\n' + indent + INDENT);
260  } else if (selection.kind === 'Stream') {
261    var streamStr = parentDirectives;
262    streamStr += " @stream(label: \"".concat(selection.label, "\"");
263
264    if (selection["if"] !== null) {
265      var _printValue;
266
267      streamStr += ", if: ".concat((_printValue = printValue(schema, selection["if"], null)) !== null && _printValue !== void 0 ? _printValue : '');
268    }
269
270    if (selection.initialCount !== null) {
271      var _printValue2;
272
273      streamStr += ", initial_count: ".concat((_printValue2 = printValue(schema, selection.initialCount, null)) !== null && _printValue2 !== void 0 ? _printValue2 : '');
274    }
275
276    if (selection.useCustomizedBatch !== null) {
277      var _printValue3;
278
279      streamStr += ", use_customized_batch: ".concat((_printValue3 = printValue(schema, selection.useCustomizedBatch, null)) !== null && _printValue3 !== void 0 ? _printValue3 : 'false');
280    }
281
282    streamStr += ')';
283
284    var _subSelections = selection.selections.map(function (sel) {
285      return printSelection(schema, sel, indent, {
286        parentDirectives: streamStr,
287        isClientExtension: isClientExtension
288      });
289    });
290
291    str = _subSelections.join('\n' + INDENT);
292  } else if (selection.kind === 'Defer') {
293    var deferStr = parentDirectives;
294    deferStr += " @defer(label: \"".concat(selection.label, "\"");
295
296    if (selection["if"] !== null) {
297      var _printValue4;
298
299      deferStr += ", if: ".concat((_printValue4 = printValue(schema, selection["if"], null)) !== null && _printValue4 !== void 0 ? _printValue4 : '');
300    }
301
302    deferStr += ')';
303
304    if (selection.selections.every(function (subSelection) {
305      return subSelection.kind === 'InlineFragment' || subSelection.kind === 'FragmentSpread';
306    })) {
307      var _subSelections2 = selection.selections.map(function (sel) {
308        return printSelection(schema, sel, indent, {
309          parentDirectives: deferStr,
310          isClientExtension: isClientExtension
311        });
312      });
313
314      str = _subSelections2.join('\n' + INDENT);
315    } else {
316      str = '...' + deferStr;
317      str += printSelections(schema, selection, indent + INDENT, {
318        isClientExtension: isClientExtension
319      });
320    }
321  } else if (selection.kind === 'ClientExtension') {
322    !(isClientExtension === false) ?  false ? undefined : invariant(false) : void 0;
323    str = '# Client-only selections:\n' + indent + INDENT + selection.selections.map(function (sel) {
324      return printSelection(schema, sel, indent, {
325        parentDirectives: parentDirectives,
326        isClientExtension: true
327      });
328    }).join('\n' + indent + INDENT);
329  } else {
330    selection;
331     true ?  false ? undefined : invariant(false) : undefined;
332  }
333
334  return str;
335}
336
337function printArgumentDefinitions(schema, argumentDefinitions) {
338  var printed = argumentDefinitions.map(function (def) {
339    var str = "$".concat(def.name, ": ").concat(schema.getTypeString(def.type));
340
341    if (def.defaultValue != null) {
342      str += ' = ' + printLiteral(schema, def.defaultValue, def.type);
343    }
344
345    return str;
346  });
347  return printed.length ? "(\n".concat(INDENT).concat(printed.join('\n' + INDENT), "\n)") : '';
348}
349
350function printFragmentArgumentDefinitions(schema, argumentDefinitions) {
351  var printed;
352  argumentDefinitions.forEach(function (def) {
353    if (def.kind !== 'LocalArgumentDefinition') {
354      return;
355    }
356
357    printed = printed || [];
358    var str = "".concat(def.name, ": {type: \"").concat(schema.getTypeString(def.type), "\"");
359
360    if (def.defaultValue != null) {
361      str += ", defaultValue: ".concat(printLiteral(schema, def.defaultValue, def.type));
362    }
363
364    str += '}';
365    printed.push(str);
366  });
367  return printed && printed.length ? " @argumentDefinitions(\n".concat(INDENT).concat(printed.join('\n' + INDENT), "\n)") : '';
368}
369
370function printHandles(schema, field) {
371  if (!field.handles) {
372    return '';
373  }
374
375  var printed = field.handles.map(function (handle) {
376    // For backward compatibility.
377    var key = handle.key === DEFAULT_HANDLE_KEY ? '' : ", key: \"".concat(handle.key, "\"");
378    var filters = handle.filters == null ? '' : ", filters: ".concat(JSON.stringify(Array.from(handle.filters).sort()));
379    var handleArgs = handle.handleArgs == null ? '' : ", handleArgs: ".concat(printArguments(schema, handle.handleArgs));
380    return "@__clientField(handle: \"".concat(handle.name, "\"").concat(key).concat(filters).concat(handleArgs, ")");
381  });
382  return printed.length ? ' ' + printed.join(' ') : '';
383}
384
385function printDirectives(schema, directives) {
386  var printed = directives.map(function (directive) {
387    return '@' + directive.name + printArguments(schema, directive.args);
388  });
389  return printed.length ? ' ' + printed.join(' ') : '';
390}
391
392function printFragmentArguments(schema, args) {
393  var printedArgs = printArguments(schema, args);
394
395  if (!printedArgs.length) {
396    return '';
397  }
398
399  return " @arguments".concat(printedArgs);
400}
401
402function printArguments(schema, args) {
403  var printed = [];
404  args.forEach(function (arg) {
405    var printedValue = printValue(schema, arg.value, arg.type);
406
407    if (printedValue != null) {
408      printed.push(arg.name + ': ' + printedValue);
409    }
410  });
411  return printed.length ? '(' + printed.join(', ') + ')' : '';
412}
413
414function printValue(schema, value, type) {
415  if (type != null && schema.isNonNull(type)) {
416    type = schema.getNullableType(type);
417  }
418
419  if (value.kind === 'Variable') {
420    return '$' + value.variableName;
421  } else if (value.kind === 'ObjectValue') {
422    var inputType = type != null ? schema.asInputObjectType(type) : null;
423    var pairs = value.fields.map(function (field) {
424      var fieldConfig = inputType != null ? schema.hasField(inputType, field.name) ? schema.getFieldConfig(schema.expectField(inputType, field.name)) : null : null;
425      var innerValue = printValue(schema, field.value, fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.type);
426      return innerValue == null ? null : field.name + ': ' + innerValue;
427    }).filter(Boolean);
428    return '{' + pairs.join(', ') + '}';
429  } else if (value.kind === 'ListValue') {
430    !(type && schema.isList(type)) ?  false ? undefined : invariant(false) : void 0;
431    var innerType = schema.getListItemType(type);
432    return "[".concat(value.items.map(function (i) {
433      return printValue(schema, i, innerType);
434    }).join(', '), "]");
435  } else if (value.value != null) {
436    return printLiteral(schema, value.value, type);
437  } else {
438    return null;
439  }
440}
441
442function printLiteral(schema, value, type) {
443  if (value == null) {
444    var _JSON$stringify;
445
446    return (_JSON$stringify = JSON.stringify(value)) !== null && _JSON$stringify !== void 0 ? _JSON$stringify : 'null';
447  }
448
449  if (type != null && schema.isNonNull(type)) {
450    type = schema.getNullableType(type);
451  }
452
453  if (type && schema.isEnum(type)) {
454    var _JSON$stringify2;
455
456    var result = schema.serialize(schema.assertEnumType(type), value);
457
458    if (result == null && typeof value === 'string') {
459      // For backwards compatibility, print invalid input values as-is. This
460      // can occur with literals defined as an @argumentDefinitions
461      // defaultValue.
462      result = value;
463    }
464
465    !(typeof result === 'string') ?  false ? undefined : invariant(false) : void 0;
466    return result;
467  } else if (type && (schema.isId(type) || schema.isInt(type))) {
468    var _JSON$stringify3;
469
470    return (_JSON$stringify3 = JSON.stringify(value)) !== null && _JSON$stringify3 !== void 0 ? _JSON$stringify3 : '';
471  } else if (type && schema.isScalar(type)) {
472    var _JSON$stringify4;
473
474    var _result = schema.serialize(schema.assertScalarType(type), value);
475
476    return (_JSON$stringify4 = JSON.stringify(_result)) !== null && _JSON$stringify4 !== void 0 ? _JSON$stringify4 : '';
477  } else if (Array.isArray(value)) {
478    !(type && schema.isList(type)) ?  false ? undefined : invariant(false) : void 0;
479    var itemType = schema.getListItemType(type);
480    return '[' + value.map(function (item) {
481      return printLiteral(schema, item, itemType);
482    }).join(', ') + ']';
483  } else if (type && schema.isList(type) && value != null) {
484    // Not an array, but still a list. Treat as list-of-one as per spec 3.1.7:
485    // http://facebook.github.io/graphql/October2016/#sec-Lists
486    return printLiteral(schema, value, schema.getListItemType(type));
487  } else if (typeof value === 'object' && value != null) {
488    var fields = [];
489    !(type && schema.isInputObject(type)) ?  false ? undefined : invariant(false) : void 0;
490    var inputType = schema.assertInputObjectType(type);
491
492    for (var key in value) {
493      if (value.hasOwnProperty(key)) {
494        var fieldConfig = schema.getFieldConfig(schema.expectField(inputType, key));
495        fields.push(key + ': ' + printLiteral(schema, value[key], fieldConfig.type));
496      }
497    }
498
499    return '{' + fields.join(', ') + '}';
500  } else {
501    var _JSON$stringify5;
502
503    return (_JSON$stringify5 = JSON.stringify(value)) !== null && _JSON$stringify5 !== void 0 ? _JSON$stringify5 : 'null';
504  }
505}
506
507module.exports = {
508  print: print,
509  printField: printField,
510  printArguments: printArguments,
511  printDirectives: printDirectives
512};
513
514/***/ }),
515
516/***/ "/jXB":
517/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
518
519"use strict";
520/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Kind; });
521/**
522 * The set of allowed kind values for AST nodes.
523 */
524var Kind = Object.freeze({
525  // Name
526  NAME: 'Name',
527  // Document
528  DOCUMENT: 'Document',
529  OPERATION_DEFINITION: 'OperationDefinition',
530  VARIABLE_DEFINITION: 'VariableDefinition',
531  SELECTION_SET: 'SelectionSet',
532  FIELD: 'Field',
533  ARGUMENT: 'Argument',
534  // Fragments
535  FRAGMENT_SPREAD: 'FragmentSpread',
536  INLINE_FRAGMENT: 'InlineFragment',
537  FRAGMENT_DEFINITION: 'FragmentDefinition',
538  // Values
539  VARIABLE: 'Variable',
540  INT: 'IntValue',
541  FLOAT: 'FloatValue',
542  STRING: 'StringValue',
543  BOOLEAN: 'BooleanValue',
544  NULL: 'NullValue',
545  ENUM: 'EnumValue',
546  LIST: 'ListValue',
547  OBJECT: 'ObjectValue',
548  OBJECT_FIELD: 'ObjectField',
549  // Directives
550  DIRECTIVE: 'Directive',
551  // Types
552  NAMED_TYPE: 'NamedType',
553  LIST_TYPE: 'ListType',
554  NON_NULL_TYPE: 'NonNullType',
555  // Type System Definitions
556  SCHEMA_DEFINITION: 'SchemaDefinition',
557  OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition',
558  // Type Definitions
559  SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition',
560  OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition',
561  FIELD_DEFINITION: 'FieldDefinition',
562  INPUT_VALUE_DEFINITION: 'InputValueDefinition',
563  INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition',
564  UNION_TYPE_DEFINITION: 'UnionTypeDefinition',
565  ENUM_TYPE_DEFINITION: 'EnumTypeDefinition',
566  ENUM_VALUE_DEFINITION: 'EnumValueDefinition',
567  INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition',
568  // Directive Definitions
569  DIRECTIVE_DEFINITION: 'DirectiveDefinition',
570  // Type System Extensions
571  SCHEMA_EXTENSION: 'SchemaExtension',
572  // Type Extensions
573  SCALAR_TYPE_EXTENSION: 'ScalarTypeExtension',
574  OBJECT_TYPE_EXTENSION: 'ObjectTypeExtension',
575  INTERFACE_TYPE_EXTENSION: 'InterfaceTypeExtension',
576  UNION_TYPE_EXTENSION: 'UnionTypeExtension',
577  ENUM_TYPE_EXTENSION: 'EnumTypeExtension',
578  INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension'
579});
580/**
581 * The enum type representing the possible kind values of AST nodes.
582 */
583
584
585/***/ }),
586
587/***/ "/sVA":
588/***/ (function(module, exports, __webpack_require__) {
589
590"use strict";
591
592
593var toStr = Object.prototype.toString;
594var hasSymbols = __webpack_require__("UVaH")();
595
596if (hasSymbols) {
597	var symToStr = Symbol.prototype.toString;
598	var symStringRegex = /^Symbol\(.*\)$/;
599	var isSymbolObject = function isRealSymbolObject(value) {
600		if (typeof value.valueOf() !== 'symbol') {
601			return false;
602		}
603		return symStringRegex.test(symToStr.call(value));
604	};
605
606	module.exports = function isSymbol(value) {
607		if (typeof value === 'symbol') {
608			return true;
609		}
610		if (toStr.call(value) !== '[object Symbol]') {
611			return false;
612		}
613		try {
614			return isSymbolObject(value);
615		} catch (e) {
616			return false;
617		}
618	};
619} else {
620
621	module.exports = function isSymbol(value) {
622		// this environment does not support Symbols.
623		return  false && false;
624	};
625}
626
627
628/***/ }),
629
630/***/ "/vyT":
631/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
632
633"use strict";
634/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return KnownTypeNamesRule; });
635/* harmony import */ var _jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pv/G");
636/* harmony import */ var _jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("T95z");
637/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("dWS+");
638/* harmony import */ var _language_predicates_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Xizt");
639/* harmony import */ var _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("19Hc");
640/* harmony import */ var _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("LViu");
641
642
643
644
645
646
647
648/**
649 * Known type names
650 *
651 * A GraphQL document is only valid if referenced types (specifically
652 * variable definitions and fragment conditions) are defined by the type schema.
653 */
654function KnownTypeNamesRule(context) {
655  var schema = context.getSchema();
656  var existingTypesMap = schema ? schema.getTypeMap() : Object.create(null);
657  var definedTypes = Object.create(null);
658
659  for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) {
660    var def = _context$getDocument$2[_i2];
661
662    if (Object(_language_predicates_mjs__WEBPACK_IMPORTED_MODULE_3__[/* isTypeDefinitionNode */ "d"])(def)) {
663      definedTypes[def.name.value] = true;
664    }
665  }
666
667  var typeNames = Object.keys(existingTypesMap).concat(Object.keys(definedTypes));
668  return {
669    NamedType: function NamedType(node, _1, parent, _2, ancestors) {
670      var typeName = node.name.value;
671
672      if (!existingTypesMap[typeName] && !definedTypes[typeName]) {
673        var _ancestors$;
674
675        var definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent;
676        var isSDL = definitionNode != null && isSDLNode(definitionNode);
677
678        if (isSDL && isStandardTypeName(typeName)) {
679          return;
680        }
681
682        var suggestedTypes = Object(_jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(typeName, isSDL ? standardTypeNames.concat(typeNames) : typeNames);
683        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"]("Unknown type \"".concat(typeName, "\".") + Object(_jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(suggestedTypes), node));
684      }
685    }
686  };
687}
688var standardTypeNames = [].concat(_type_scalars_mjs__WEBPACK_IMPORTED_MODULE_4__[/* specifiedScalarTypes */ "g"], _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__[/* introspectionTypes */ "m"]).map(function (type) {
689  return type.name;
690});
691
692function isStandardTypeName(typeName) {
693  return standardTypeNames.indexOf(typeName) !== -1;
694}
695
696function isSDLNode(value) {
697  return !Array.isArray(value) && (Object(_language_predicates_mjs__WEBPACK_IMPORTED_MODULE_3__[/* isTypeSystemDefinitionNode */ "g"])(value) || Object(_language_predicates_mjs__WEBPACK_IMPORTED_MODULE_3__[/* isTypeSystemExtensionNode */ "h"])(value));
698}
699
700
701/***/ }),
702
703/***/ 0:
704/***/ (function(module, exports) {
705
706/* (ignored) */
707
708/***/ }),
709
710/***/ "1/U3":
711/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
712
713"use strict";
714/* eslint-disable no-redeclare */
715// $FlowFixMe[name-already-bound]
716var find = Array.prototype.find ? function (list, predicate) {
717  return Array.prototype.find.call(list, predicate);
718} : function (list, predicate) {
719  for (var _i2 = 0; _i2 < list.length; _i2++) {
720    var value = list[_i2];
721
722    if (predicate(value)) {
723      return value;
724    }
725  }
726};
727/* harmony default export */ __webpack_exports__["a"] = (find);
728
729
730/***/ }),
731
732/***/ "19Hc":
733/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
734
735"use strict";
736
737// EXPORTS
738__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ GraphQLInt; });
739__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ GraphQLFloat; });
740__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ GraphQLString; });
741__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ GraphQLBoolean; });
742__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ GraphQLID; });
743__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ specifiedScalarTypes; });
744__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ isSpecifiedScalarType; });
745
746// EXTERNAL MODULE: ./node_modules/graphql/polyfills/isFinite.mjs
747var polyfills_isFinite = __webpack_require__("lAJ0");
748
749// CONCATENATED MODULE: ./node_modules/graphql/polyfills/isInteger.mjs
750/* eslint-disable no-redeclare */
751// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441
752var isInteger = Number.isInteger || function (value) {
753  return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;
754};
755
756/* harmony default export */ var polyfills_isInteger = (isInteger);
757
758// EXTERNAL MODULE: ./node_modules/graphql/jsutils/inspect.mjs
759var inspect = __webpack_require__("rWdj");
760
761// EXTERNAL MODULE: ./node_modules/graphql/jsutils/isObjectLike.mjs
762var isObjectLike = __webpack_require__("zpYP");
763
764// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs
765var kinds = __webpack_require__("/jXB");
766
767// EXTERNAL MODULE: ./node_modules/graphql/language/printer.mjs
768var printer = __webpack_require__("dQau");
769
770// EXTERNAL MODULE: ./node_modules/graphql/error/GraphQLError.mjs
771var GraphQLError = __webpack_require__("dWS+");
772
773// EXTERNAL MODULE: ./node_modules/graphql/type/definition.mjs + 1 modules
774var definition = __webpack_require__("axIb");
775
776// CONCATENATED MODULE: ./node_modules/graphql/type/scalars.mjs
777
778
779
780
781
782
783
784 // As per the GraphQL Spec, Integers are only treated as valid when a valid
785// 32-bit signed integer, providing the broadest support across platforms.
786//
787// n.b. JavaScript's integers are safe between -(2^53 - 1) and 2^53 - 1 because
788// they are internally represented as IEEE 754 doubles.
789
790var MAX_INT = 2147483647;
791var MIN_INT = -2147483648;
792
793function serializeInt(outputValue) {
794  var coercedValue = serializeObject(outputValue);
795
796  if (typeof coercedValue === 'boolean') {
797    return coercedValue ? 1 : 0;
798  }
799
800  var num = coercedValue;
801
802  if (typeof coercedValue === 'string' && coercedValue !== '') {
803    num = Number(coercedValue);
804  }
805
806  if (!polyfills_isInteger(num)) {
807    throw new GraphQLError["a" /* GraphQLError */]("Int cannot represent non-integer value: ".concat(Object(inspect["a" /* default */])(coercedValue)));
808  }
809
810  if (num > MAX_INT || num < MIN_INT) {
811    throw new GraphQLError["a" /* GraphQLError */]('Int cannot represent non 32-bit signed integer value: ' + Object(inspect["a" /* default */])(coercedValue));
812  }
813
814  return num;
815}
816
817function coerceInt(inputValue) {
818  if (!polyfills_isInteger(inputValue)) {
819    throw new GraphQLError["a" /* GraphQLError */]("Int cannot represent non-integer value: ".concat(Object(inspect["a" /* default */])(inputValue)));
820  }
821
822  if (inputValue > MAX_INT || inputValue < MIN_INT) {
823    throw new GraphQLError["a" /* GraphQLError */]("Int cannot represent non 32-bit signed integer value: ".concat(inputValue));
824  }
825
826  return inputValue;
827}
828
829var GraphQLInt = new definition["g" /* GraphQLScalarType */]({
830  name: 'Int',
831  description: 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.',
832  serialize: serializeInt,
833  parseValue: coerceInt,
834  parseLiteral: function parseLiteral(valueNode) {
835    if (valueNode.kind !== kinds["a" /* Kind */].INT) {
836      throw new GraphQLError["a" /* GraphQLError */]("Int cannot represent non-integer value: ".concat(Object(printer["a" /* print */])(valueNode)), valueNode);
837    }
838
839    var num = parseInt(valueNode.value, 10);
840
841    if (num > MAX_INT || num < MIN_INT) {
842      throw new GraphQLError["a" /* GraphQLError */]("Int cannot represent non 32-bit signed integer value: ".concat(valueNode.value), valueNode);
843    }
844
845    return num;
846  }
847});
848
849function serializeFloat(outputValue) {
850  var coercedValue = serializeObject(outputValue);
851
852  if (typeof coercedValue === 'boolean') {
853    return coercedValue ? 1 : 0;
854  }
855
856  var num = coercedValue;
857
858  if (typeof coercedValue === 'string' && coercedValue !== '') {
859    num = Number(coercedValue);
860  }
861
862  if (!Object(polyfills_isFinite["a" /* default */])(num)) {
863    throw new GraphQLError["a" /* GraphQLError */]("Float cannot represent non numeric value: ".concat(Object(inspect["a" /* default */])(coercedValue)));
864  }
865
866  return num;
867}
868
869function coerceFloat(inputValue) {
870  if (!Object(polyfills_isFinite["a" /* default */])(inputValue)) {
871    throw new GraphQLError["a" /* GraphQLError */]("Float cannot represent non numeric value: ".concat(Object(inspect["a" /* default */])(inputValue)));
872  }
873
874  return inputValue;
875}
876
877var GraphQLFloat = new definition["g" /* GraphQLScalarType */]({
878  name: 'Float',
879  description: 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).',
880  serialize: serializeFloat,
881  parseValue: coerceFloat,
882  parseLiteral: function parseLiteral(valueNode) {
883    if (valueNode.kind !== kinds["a" /* Kind */].FLOAT && valueNode.kind !== kinds["a" /* Kind */].INT) {
884      throw new GraphQLError["a" /* GraphQLError */]("Float cannot represent non numeric value: ".concat(Object(printer["a" /* print */])(valueNode)), valueNode);
885    }
886
887    return parseFloat(valueNode.value);
888  }
889});
889 // Support serializing objects with custom valueOf() or toJSON() functions -
890// a common way to represent a complex value which can be represented as
891// a string (ex: MongoDB id objects).
892
893function serializeObject(outputValue) {
894  if (Object(isObjectLike["a" /* default */])(outputValue)) {
895    if (typeof outputValue.valueOf === 'function') {
896      var valueOfResult = outputValue.valueOf();
897
898      if (!Object(isObjectLike["a" /* default */])(valueOfResult)) {
899        return valueOfResult;
900      }
901    }
902
903    if (typeof outputValue.toJSON === 'function') {
904      // $FlowFixMe[incompatible-use]
905      return outputValue.toJSON();
906    }
907  }
908
909  return outputValue;
910}
911
912function serializeString(outputValue) {
913  var coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not
914  // attempt to coerce object, function, symbol, or other types as strings.
915
916  if (typeof coercedValue === 'string') {
917    return coercedValue;
918  }
919
920  if (typeof coercedValue === 'boolean') {
921    return coercedValue ? 'true' : 'false';
922  }
923
924  if (Object(polyfills_isFinite["a" /* default */])(coercedValue)) {
925    return coercedValue.toString();
926  }
927
928  throw new GraphQLError["a" /* GraphQLError */]("String cannot represent value: ".concat(Object(inspect["a" /* default */])(outputValue)));
929}
930
931function coerceString(inputValue) {
932  if (typeof inputValue !== 'string') {
933    throw new GraphQLError["a" /* GraphQLError */]("String cannot represent a non string value: ".concat(Object(inspect["a" /* default */])(inputValue)));
934  }
935
936  return inputValue;
937}
938
939var GraphQLString = new definition["g" /* GraphQLScalarType */]({
940  name: 'String',
941  description: 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.',
942  serialize: serializeString,
943  parseValue: coerceString,
944  parseLiteral: function parseLiteral(valueNode) {
945    if (valueNode.kind !== kinds["a" /* Kind */].STRING) {
946      throw new GraphQLError["a" /* GraphQLError */]("String cannot represent a non string value: ".concat(Object(printer["a" /* print */])(valueNode)), valueNode);
947    }
948
949    return valueNode.value;
950  }
951});
952
953function serializeBoolean(outputValue) {
954  var coercedValue = serializeObject(outputValue);
955
956  if (typeof coercedValue === 'boolean') {
957    return coercedValue;
958  }
959
960  if (Object(polyfills_isFinite["a" /* default */])(coercedValue)) {
961    return coercedValue !== 0;
962  }
963
964  throw new GraphQLError["a" /* GraphQLError */]("Boolean cannot represent a non boolean value: ".concat(Object(inspect["a" /* default */])(coercedValue)));
965}
966
967function coerceBoolean(inputValue) {
968  if (typeof inputValue !== 'boolean') {
969    throw new GraphQLError["a" /* GraphQLError */]("Boolean cannot represent a non boolean value: ".concat(Object(inspect["a" /* default */])(inputValue)));
970  }
971
972  return inputValue;
973}
974
975var GraphQLBoolean = new definition["g" /* GraphQLScalarType */]({
976  name: 'Boolean',
977  description: 'The `Boolean` scalar type represents `true` or `false`.',
978  serialize: serializeBoolean,
979  parseValue: coerceBoolean,
980  parseLiteral: function parseLiteral(valueNode) {
981    if (valueNode.kind !== kinds["a" /* Kind */].BOOLEAN) {
982      throw new GraphQLError["a" /* GraphQLError */]("Boolean cannot represent a non boolean value: ".concat(Object(printer["a" /* print */])(valueNode)), valueNode);
983    }
984
985    return valueNode.value;
986  }
987});
988
989function serializeID(outputValue) {
990  var coercedValue = serializeObject(outputValue);
991
992  if (typeof coercedValue === 'string') {
993    return coercedValue;
994  }
995
996  if (polyfills_isInteger(coercedValue)) {
997    return String(coercedValue);
998  }
999
1000  throw new GraphQLError["a" /* GraphQLError */]("ID cannot represent value: ".concat(Object(inspect["a" /* default */])(outputValue)));
1001}
1002
1003function coerceID(inputValue) {
1004  if (typeof inputValue === 'string') {
1005    return inputValue;
1006  }
1007
1008  if (polyfills_isInteger(inputValue)) {
1009    return inputValue.toString();
1010  }
1011
1012  throw new GraphQLError["a" /* GraphQLError */]("ID cannot represent value: ".concat(Object(inspect["a" /* default */])(inputValue)));
1013}
1014
1015var GraphQLID = new definition["g" /* GraphQLScalarType */]({
1016  name: 'ID',
1017  description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',
1018  serialize: serializeID,
1019  parseValue: coerceID,
1020  parseLiteral: function parseLiteral(valueNode) {
1021    if (valueNode.kind !== kinds["a" /* Kind */].STRING && valueNode.kind !== kinds["a" /* Kind */].INT) {
1022      throw new GraphQLError["a" /* GraphQLError */]('ID cannot represent a non-string and non-integer value: ' + Object(printer["a" /* print */])(valueNode), valueNode);
1023    }
1024
1025    return valueNode.value;
1026  }
1027});
1028var specifiedScalarTypes = Object.freeze([GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID]);
1029function isSpecifiedScalarType(type) {
1030  return specifiedScalarTypes.some(function (_ref) {
1031    var name = _ref.name;
1032    return type.name === name;
1033  });
1034}
1035
1036
1037/***/ }),
1038
1039/***/ "1KsK":
1040/***/ (function(module, exports, __webpack_require__) {
1041
1042"use strict";
1043
1044
1045var toStr = Object.prototype.toString;
1046
1047module.exports = function isArguments(value) {
1048	var str = toStr.call(value);
1049	var isArgs = str === '[object Arguments]';
1050	if (!isArgs) {
1051		isArgs = str !== '[object Array]' &&
1052			value !== null &&
1053			typeof value === 'object' &&
1054			typeof value.length === 'number' &&
1055			value.length >= 0 &&
1056			toStr.call(value.callee) === '[object Function]';
1057	}
1058	return isArgs;
1059};
1060
1061
1062/***/ }),
1063
1064/***/ "1QEH":
1065/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
1066
1067"use strict";
1068/* eslint-disable no-redeclare */
1069// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441
1070var objectValues = Object.values || function (obj) {
1071  return Object.keys(obj).map(function (key) {
1072    return obj[key];
1073  });
1074};
1075
1076/* harmony default export */ __webpack_exports__["a"] = (objectValues);
1077
1078
1079/***/ }),
1080
1081/***/ "1Wi7":
1082/***/ (function(module, __webpack_exports__, __webpack_require__) {
1083
1084"use strict";
1085__webpack_require__.r(__webpack_exports__);
1086/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "swapCase", function() { return swapCase; });
1087function swapCase(input) {
1088    var result = "";
1089    for (var i = 0; i < input.length; i++) {
1090        var lower = input[i].toLowerCase();
1091        result += input[i] === lower ? input[i].toUpperCase() : lower;
1092    }
1093    return result;
1094}
1095//# sourceMappingURL=index.js.map
1096
1097/***/ }),
1098
1099/***/ "1fn3":
1100/***/ (function(module, exports, __webpack_require__) {
1101
1102"use strict";
1103
1104
1105// http://262.ecma-international.org/5.1/#sec-9.1
1106
1107module.exports = __webpack_require__("Lxf3");
1108
1109
1110/***/ }),
1111
1112/***/ "1seS":
1113/***/ (function(module, exports, __webpack_require__) {
1114
1115"use strict";
1116
1117
1118var slice = Array.prototype.slice;
1119var isArgs = __webpack_require__("1KsK");
1120
1121var origKeys = Object.keys;
1122var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__("sYn3");
1123
1124var originalKeys = Object.keys;
1125
1126keysShim.shim = function shimObjectKeys() {
1127	if (Object.keys) {
1128		var keysWorksWithArguments = (function () {
1129			// Safari 5.0 bug
1130			var args = Object.keys(arguments);
1131			return args && args.length === arguments.length;
1132		}(1, 2));
1133		if (!keysWorksWithArguments) {
1134			Object.keys = function keys(object) { // eslint-disable-line func-name-matching
1135				if (isArgs(object)) {
1136					return originalKeys(slice.call(object));
1137				}
1138				return originalKeys(object);
1139			};
1140		}
1141	} else {
1142		Object.keys = keysShim;
1143	}
1144	return Object.keys || keysShim;
1145};
1146
1147module.exports = keysShim;
1148
1149
1150/***/ }),
1151
1152/***/ "2C6G":
1153/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
1154
1155"use strict";
1156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return invariant; });
1157function invariant(condition, message) {
1158  var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
1159
1160  if (!booleanCondition) {
1161    throw new Error(message != null ? message : 'Unexpected invariant triggered.');
1162  }
1163}
1164
1165
1166/***/ }),
1167
1168/***/ "2Fve":
1169/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
1170
1171"use strict";
1172/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SYMBOL_ITERATOR; });
1173/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SYMBOL_ASYNC_ITERATOR; });
1174/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SYMBOL_TO_STRING_TAG; });
1175// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator
1176// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
1177var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator
1178// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
1179
1180var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
1181
1182var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag';
1183
1184
1185/***/ }),
1186
1187/***/ "3HNt":
1188/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
1189
1190"use strict";
1191/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return astFromValue; });
1192/* harmony import */ var _polyfills_isFinite_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lAJ0");
1193/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("1QEH");
1194/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rWdj");
1195/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("2C6G");
1196/* harmony import */ var _jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("zpYP");
1197/* harmony import */ var _jsutils_safeArrayFrom_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("k9pe");
1198/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("/jXB");
1199/* harmony import */ var _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("19Hc");
1200/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("axIb");
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210/**
1211 * Produces a GraphQL Value AST given a JavaScript object.
1212 * Function will match JavaScript/JSON values to GraphQL AST schema format
1213 * by using suggested GraphQLInputType. For example:
1214 *
1215 *     astFromValue("value", GraphQLString)
1216 *
1217 * A GraphQL type must be provided, which will be used to interpret different
1218 * JavaScript values.
1219 *
1220 * | JSON Value    | GraphQL Value        |
1221 * | ------------- | -------------------- |
1222 * | Object        | Input Object         |
1223 * | Array         | List                 |
1224 * | Boolean       | Boolean              |
1225 * | String        | String / Enum Value  |
1226 * | Number        | Int / Float          |
1227 * | Mixed         | Enum Value           |
1228 * | null          | NullValue            |
1229 *
1230 */
1231
1232function astFromValue(value, type) {
1233  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isNonNullType */ "L"])(type)) {
1234    var astValue = astFromValue(value, type.ofType);
1235
1236    if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].NULL) {
1237      return null;
1238    }
1239
1240    return astValue;
1241  } // only explicit null, not undefined, NaN
1242
1243
1244  if (value === null) {
1245    return {
1246      kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].NULL
1247    };
1248  } // undefined
1249
1250
1251  if (value === undefined) {
1252    return null;
1253  } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but
1254  // the value is not an array, convert the value using the list's item type.
1255
1256
1257  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isListType */ "J"])(type)) {
1258    var itemType = type.ofType;
1259    var items = Object(_jsutils_safeArrayFrom_mjs__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(value);
1260
1261    if (items != null) {
1262      var valuesNodes = [];
1263
1264      for (var _i2 = 0; _i2 < items.length; _i2++) {
1265        var item = items[_i2];
1266        var itemNode = astFromValue(item, itemType);
1267
1268        if (itemNode != null) {
1269          valuesNodes.push(itemNode);
1270        }
1271      }
1272
1273      return {
1274        kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].LIST,
1275        values: valuesNodes
1276      };
1277    }
1278
1279    return astFromValue(value, itemType);
1280  } // Populate the fields of the input object by creating ASTs from each value
1281  // in the JavaScript object according to the fields in the input type.
1282
1283
1284  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isInputObjectType */ "F"])(type)) {
1285    if (!Object(_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(value)) {
1286      return null;
1287    }
1288
1289    var fieldNodes = [];
1290
1291    for (var _i4 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type.getFields()); _i4 < _objectValues2.length; _i4++) {
1292      var field = _objectValues2[_i4];
1293      var fieldValue = astFromValue(value[field.name], field.type);
1294
1295      if (fieldValue) {
1296        fieldNodes.push({
1297          kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].OBJECT_FIELD,
1298          name: {
1299            kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].NAME,
1300            value: field.name
1301          },
1302          value: fieldValue
1303        });
1304      }
1305    }
1306
1307    return {
1308      kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].OBJECT,
1309      fields: fieldNodes
1310    };
1311  } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
1312
1313
1314  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isLeafType */ "I"])(type)) {
1315    // Since value is an internally represented value, it must be serialized
1316    // to an externally represented value before converting into an AST.
1317    var serialized = type.serialize(value);
1318
1319    if (serialized == null) {
1320      return null;
1321    } // Others serialize based on their corresponding JavaScript scalar types.
1322
1323
1324    if (typeof serialized === 'boolean') {
1325      return {
1326        kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].BOOLEAN,
1327        value: serialized
1328      };
1329    } // JavaScript numbers can be Int or Float values.
1330
1331
1332    if (typeof serialized === 'number' && Object(_polyfills_isFinite_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(serialized)) {
1333      var stringNum = String(serialized);
1334      return integerStringRegExp.test(stringNum) ? {
1335        kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].INT,
1336        value: stringNum
1337      } : {
1338        kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].FLOAT,
1339        value: stringNum
1340      };
1341    }
1342
1343    if (typeof serialized === 'string') {
1344      // Enum types use Enum literals.
1345      if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isEnumType */ "E"])(type)) {
1346        return {
1347          kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].ENUM,
1348          value: serialized
1349        };
1350      } // ID types can use Int literals.
1351
1352
1353      if (type === _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLID */ "c"] && integerStringRegExp.test(serialized)) {
1354        return {
1355          kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].INT,
1356          value: serialized
1357        };
1358      }
1359
1360      return {
1361        kind: _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].STRING,
1362        value: serialized
1363      };
1364    }
1365
1366    throw new TypeError("Cannot convert value to AST: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(serialized), "."));
1367  } // istanbul ignore next (Not reachable. All possible input types have been considered)
1368
1369
1370   false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(0, 'Unexpected input type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type));
1371}
1372/**
1373 * IntValue:
1374 *   - NegativeSign? 0
1375 *   - NegativeSign? NonZeroDigit ( Digit+ )?
1376 */
1377
1378var integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;
1379
1380
1381/***/ }),
1382
1383/***/ "3SWA":
1384/***/ (function(module, exports, __webpack_require__) {
1385
1386"use strict";
1387
1388
1389var GetIntrinsic = __webpack_require__("AM7I");
1390
1391var $TypeError = GetIntrinsic('%TypeError%');
1392
1393// http://262.ecma-international.org/5.1/#sec-9.10
1394
1395module.exports = function CheckObjectCoercible(value, optMessage) {
1396	if (value == null) {
1397		throw new $TypeError(optMessage || ('Cannot call method on ' + value));
1398	}
1399	return value;
1400};
1401
1402
1403/***/ }),
1404
1405/***/ "3Tnt":
1406/***/ (function(module, exports, __webpack_require__) {
1407
1408"use strict";
1409
1410
1411var isRelative = __webpack_require__("WAOt");
1412var isWindows = __webpack_require__("Ndee");
1413
1414/**
1415 * Expose `isAbsolute`
1416 */
1417
1418module.exports = isAbsolute;
1419
1420/**
1421 * Returns true if a file path is absolute.
1422 *
1423 * @param  {String} `fp`
1424 * @return {Boolean}
1425 */
1426
1427function isAbsolute(fp) {
1428  if (typeof fp !== 'string') {
1429    throw new TypeError('isAbsolute expects a string.');
1430  }
1431  return isWindows() ? isAbsolute.win32(fp) : isAbsolute.posix(fp);
1432}
1433
1434/**
1435 * Test posix paths.
1436 */
1437
1438isAbsolute.posix = function posixPath(fp) {
1439  return fp.charAt(0) === '/';
1440};
1441
1442/**
1443 * Test windows paths.
1444 */
1445
1446isAbsolute.win32 = function win32(fp) {
1447  if (/[a-z]/i.test(fp.charAt(0)) && fp.charAt(1) === ':' && fp.charAt(2) === '\\') {
1448    return true;
1449  }
1450  // Microsoft Azure absolute filepath
1451  if (fp.slice(0, 2) === '\\\\') {
1452    return true;
1453  }
1454  return !isRelative(fp);
1455};
1456
1457
1458/***/ }),
1459
1460/***/ "3XYS":
1461/***/ (function(module, exports, __webpack_require__) {
1462
1463"use strict";
1464
1465Object.defineProperty(exports, "__esModule", { value: true });
1466exports.isLowerCase = exports.isUpperCase = exports.upperCaseFirst = exports.localeUpperCase = exports.upperCase = exports.titleCase = exports.swapCase = exports.spongeCase = exports.lowerCaseFirst = exports.localeLowerCase = exports.lowerCase = exports.snakeCase = exports.sentenceCase = exports.pathCase = exports.pascalCase = exports.paramCase = exports.noCase = exports.headerCase = exports.dotCase = exports.constantCase = exports.capitalCase = exports.camelCase = void 0;
1467var changeCase = __webpack_require__("8LIU");
1468var lowerCase1 = __webpack_require__("Wyu6");
1469var lowerCaseFirst1 = __webpack_require__("U/hW");
1470var spongeCase1 = __webpack_require__("QTt7");
1471var swapCase1 = __webpack_require__("1Wi7");
1472var titleCase1 = __webpack_require__("Mooo");
1473var upperCase1 = __webpack_require__("9bHt");
1474var upperCaseFirst1 = __webpack_require__("x3m3");
1475var isUpperCase1 = __webpack_require__("9hl7");
1476var isLowerCase1 = __webpack_require__("5lwn");
1477// Core
1478exports.camelCase = changeCase.camelCase;
1479exports.capitalCase = changeCase.capitalCase;
1480exports.constantCase = changeCase.constantCase;
1481exports.dotCase = changeCase.dotCase;
1482exports.headerCase = changeCase.headerCase;
1483exports.noCase = changeCase.noCase;
1484exports.paramCase = changeCase.paramCase;
1485exports.pascalCase = changeCase.pascalCase;
1486exports.pathCase = changeCase.pathCase;
1487exports.sentenceCase = changeCase.sentenceCase;
1488exports.snakeCase = changeCase.snakeCase;
1489// Extended
1490exports.lowerCase = lowerCase1.lowerCase;
1491exports.localeLowerCase = lowerCase1.localeLowerCase;
1492exports.lowerCaseFirst = lowerCaseFirst1.lowerCaseFirst;
1493exports.spongeCase = spongeCase1.spongeCase;
1494exports.swapCase = swapCase1.swapCase;
1495exports.titleCase = titleCase1.titleCase;
1496exports.upperCase = upperCase1.upperCase;
1497exports.localeUpperCase = upperCase1.localeUpperCase;
1498exports.upperCaseFirst = upperCaseFirst1.upperCaseFirst;
1499exports.isUpperCase = isUpperCase1.isUpperCase;
1500exports.isLowerCase = isLowerCase1.isLowerCase;
1501
1502
1503/***/ }),
1504
1505/***/ "3aNz":
1506/***/ (function(module, exports, __webpack_require__) {
1507
1508"use strict";
1509
1510
1511var define = __webpack_require__("82c2");
1512var callBind = __webpack_require__("PrET");
1513
1514var implementation = __webpack_require__("HYxC");
1515var getPolyfill = __webpack_require__("l1+S");
1516var polyfill = getPolyfill();
1517var shim = __webpack_require__("yCJC");
1518
1519var boundFlatMap = callBind(polyfill);
1520
1521define(boundFlatMap, {
1522	getPolyfill: getPolyfill,
1523	implementation: implementation,
1524	shim: shim
1525});
1526
1527module.exports = boundFlatMap;
1528
1529
1530/***/ }),
1531
1532/***/ "3lu9":
1533/***/ (function(module, exports, __webpack_require__) {
1534
1535"use strict";
1536
1537
1538var GetIntrinsic = __webpack_require__("AM7I");
1539var callBound = __webpack_require__("VF6F");
1540
1541var $TypeError = GetIntrinsic('%TypeError%');
1542
1543var IsArray = __webpack_require__("plxK");
1544
1545var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('%Function.prototype.apply%');
1546
1547// https://ecma-international.org/ecma-262/6.0/#sec-call
1548
1549module.exports = function Call(F, V) {
1550	var argumentsList = arguments.length > 2 ? arguments[2] : [];
1551	if (!IsArray(argumentsList)) {
1552		throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
1553	}
1554	return $apply(F, V, argumentsList);
1555};
1556
1557
1558/***/ }),
1559
1560/***/ "3vMM":
1561/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
1562
1563"use strict";
1564/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return printSchema; });
1565/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return printIntrospectionSchema; });
1566/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return printType; });
1567/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1QEH");
1568/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rWdj");
1569/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2C6G");
1570/* harmony import */ var _language_printer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("dQau");
1571/* harmony import */ var _language_blockString_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("BLR7");
1572/* harmony import */ var _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("LViu");
1573/* harmony import */ var _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("19Hc");
1574/* harmony import */ var _type_directives_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("4suF");
1575/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("axIb");
1576/* harmony import */ var _astFromValue_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("3HNt");
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588/**
1589 * Accepts options as a second argument:
1590 *
1591 *    - commentDescriptions:
1592 *        Provide true to use preceding comments as the description.
1593 *
1594 */
1595function printSchema(schema, options) {
1596  return printFilteredSchema(schema, function (n) {
1597    return !Object(_type_directives_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isSpecifiedDirective */ "i"])(n);
1598  }, isDefinedType, options);
1599}
1600function printIntrospectionSchema(schema, options) {
1601  return printFilteredSchema(schema, _type_directives_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isSpecifiedDirective */ "i"], _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isIntrospectionType */ "n"], options);
1602}
1603
1604function isDefinedType(type) {
1605  return !Object(_type_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isSpecifiedScalarType */ "f"])(type) && !Object(_type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isIntrospectionType */ "n"])(type);
1606}
1607
1608function printFilteredSchema(schema, directiveFilter, typeFilter, options) {
1609  var directives = schema.getDirectives().filter(directiveFilter);
1610  var types = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(schema.getTypeMap()).filter(typeFilter);
1611  return [printSchemaDefinition(schema)].concat(directives.map(function (directive) {
1612    return printDirective(directive, options);
1613  }), types.map(function (type) {
1614    return printType(type, options);
1615  }
1615)).filter(Boolean).join('\n\n') + '\n';
1616}
1617
1618function printSchemaDefinition(schema) {
1619  if (schema.description == null && isSchemaOfCommonNames(schema)) {
1620    return;
1621  }
1622
1623  var operationTypes = [];
1624  var queryType = schema.getQueryType();
1625
1626  if (queryType) {
1627    operationTypes.push("  query: ".concat(queryType.name));
1628  }
1629
1630  var mutationType = schema.getMutationType();
1631
1632  if (mutationType) {
1633    operationTypes.push("  mutation: ".concat(mutationType.name));
1634  }
1635
1636  var subscriptionType = schema.getSubscriptionType();
1637
1638  if (subscriptionType) {
1639    operationTypes.push("  subscription: ".concat(subscriptionType.name));
1640  }
1641
1642  return printDescription({}, schema) + "schema {\n".concat(operationTypes.join('\n'), "\n}");
1643}
1644/**
1645 * GraphQL schema define root types for each type of operation. These types are
1646 * the same as any other type and can be named in any manner, however there is
1647 * a common naming convention:
1648 *
1649 *   schema {
1650 *     query: Query
1651 *     mutation: Mutation
1652 *   }
1653 *
1654 * When using this naming convention, the schema description can be omitted.
1655 */
1656
1657
1658function isSchemaOfCommonNames(schema) {
1659  var queryType = schema.getQueryType();
1660
1661  if (queryType && queryType.name !== 'Query') {
1662    return false;
1663  }
1664
1665  var mutationType = schema.getMutationType();
1666
1667  if (mutationType && mutationType.name !== 'Mutation') {
1668    return false;
1669  }
1670
1671  var subscriptionType = schema.getSubscriptionType();
1672
1673  if (subscriptionType && subscriptionType.name !== 'Subscription') {
1674    return false;
1675  }
1676
1677  return true;
1678}
1679
1680function printType(type, options) {
1681  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isScalarType */ "R"])(type)) {
1682    return printScalar(type, options);
1683  }
1684
1685  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isObjectType */ "N"])(type)) {
1686    return printObject(type, options);
1687  }
1688
1689  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isInterfaceType */ "H"])(type)) {
1690    return printInterface(type, options);
1691  }
1692
1693  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isUnionType */ "T"])(type)) {
1694    return printUnion(type, options);
1695  }
1696
1697  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isEnumType */ "E"])(type)) {
1698    return printEnum(type, options);
1699  } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
1700
1701
1702  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isInputObjectType */ "F"])(type)) {
1703    return printInputObject(type, options);
1704  } // istanbul ignore next (Not reachable. All possible types have been considered)
1705
1706
1707   false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(0, 'Unexpected type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type));
1708}
1709
1710function printScalar(type, options) {
1711  return printDescription(options, type) + "scalar ".concat(type.name) + printSpecifiedByUrl(type);
1712}
1713
1714function printImplementedInterfaces(type) {
1715  var interfaces = type.getInterfaces();
1716  return interfaces.length ? ' implements ' + interfaces.map(function (i) {
1717    return i.name;
1718  }).join(' & ') : '';
1719}
1720
1721function printObject(type, options) {
1722  return printDescription(options, type) + "type ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);
1723}
1724
1725function printInterface(type, options) {
1726  return printDescription(options, type) + "interface ".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);
1727}
1728
1729function printUnion(type, options) {
1730  var types = type.getTypes();
1731  var possibleTypes = types.length ? ' = ' + types.join(' | ') : '';
1732  return printDescription(options, type) + 'union ' + type.name + possibleTypes;
1733}
1734
1735function printEnum(type, options) {
1736  var values = type.getValues().map(function (value, i) {
1737    return printDescription(options, value, '  ', !i) + '  ' + value.name + printDeprecated(value.deprecationReason);
1738  });
1739  return printDescription(options, type) + "enum ".concat(type.name) + printBlock(values);
1740}
1741
1742function printInputObject(type, options) {
1743  var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type.getFields()).map(function (f, i) {
1744    return printDescription(options, f, '  ', !i) + '  ' + printInputValue(f);
1745  });
1746  return printDescription(options, type) + "input ".concat(type.name) + printBlock(fields);
1747}
1748
1749function printFields(options, type) {
1750  var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type.getFields()).map(function (f, i) {
1751    return printDescription(options, f, '  ', !i) + '  ' + f.name + printArgs(options, f.args, '  ') + ': ' + String(f.type) + printDeprecated(f.deprecationReason);
1752  });
1753  return printBlock(fields);
1754}
1755
1756function printBlock(items) {
1757  return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : '';
1758}
1759
1760function printArgs(options, args) {
1761  var indentation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
1762
1763  if (args.length === 0) {
1764    return '';
1765  } // If every arg does not have a description, print them on one line.
1766
1767
1768  if (args.every(function (arg) {
1769    return !arg.description;
1770  })) {
1771    return '(' + args.map(printInputValue).join(', ') + ')';
1772  }
1773
1774  return '(\n' + args.map(function (arg, i) {
1775    return printDescription(options, arg, '  ' + indentation, !i) + '  ' + indentation + printInputValue(arg);
1776  }).join('\n') + '\n' + indentation + ')';
1777}
1778
1779function printInputValue(arg) {
1780  var defaultAST = Object(_astFromValue_mjs__WEBPACK_IMPORTED_MODULE_9__[/* astFromValue */ "a"])(arg.defaultValue, arg.type);
1781  var argDecl = arg.name + ': ' + String(arg.type);
1782
1783  if (defaultAST) {
1784    argDecl += " = ".concat(Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_3__[/* print */ "a"])(defaultAST));
1785  }
1786
1787  return argDecl + printDeprecated(arg.deprecationReason);
1788}
1789
1790function printDirective(directive, options) {
1791  return printDescription(options, directive) + 'directive @' + directive.name + printArgs(options, directive.args) + (directive.isRepeatable ? ' repeatable' : '') + ' on ' + directive.locations.join(' | ');
1792}
1793
1794function printDeprecated(reason) {
1795  if (reason == null) {
1796    return '';
1797  }
1798
1799  var reasonAST = Object(_astFromValue_mjs__WEBPACK_IMPORTED_MODULE_9__[/* astFromValue */ "a"])(reason, _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"]);
1800
1801  if (reasonAST && reason !== _type_directives_mjs__WEBPACK_IMPORTED_MODULE_7__[/* DEFAULT_DEPRECATION_REASON */ "a"]) {
1802    return ' @deprecated(reason: ' + Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_3__[/* print */ "a"])(reasonAST) + ')';
1803  }
1804
1805  return ' @deprecated';
1806}
1807
1808function printSpecifiedByUrl(scalar) {
1809  if (scalar.specifiedByUrl == null) {
1810    return '';
1811  }
1812
1813  var url = scalar.specifiedByUrl;
1814  var urlAST = Object(_astFromValue_mjs__WEBPACK_IMPORTED_MODULE_9__[/* astFromValue */ "a"])(url, _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"]);
1815  urlAST || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(0, 'Unexpected null value returned from `astFromValue` for specifiedByUrl');
1816  return ' @specifiedBy(url: ' + Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_3__[/* print */ "a"])(urlAST) + ')';
1817}
1818
1819function printDescription(options, def) {
1820  var indentation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
1821  var firstInBlock = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
1822  var description = def.description;
1823
1824  if (description == null) {
1825    return '';
1826  }
1827
1828  if ((options === null || options === void 0 ? void 0 : options.commentDescriptions) === true) {
1829    return printDescriptionWithComments(description, indentation, firstInBlock);
1830  }
1831
1832  var preferMultipleLines = description.length > 70;
1833  var blockString = Object(_language_blockString_mjs__WEBPACK_IMPORTED_MODULE_4__[/* printBlockString */ "c"])(description, '', preferMultipleLines);
1834  var prefix = indentation && !firstInBlock ? '\n' + indentation : indentation;
1835  return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n';
1836}
1837
1838function printDescriptionWithComments(description, indentation, firstInBlock) {
1839  var prefix = indentation && !firstInBlock ? '\n' : '';
1840  var comment = description.split('\n').map(function (line) {
1841    return indentation + (line !== '' ? '# ' + line : '#');
1842  }).join('\n');
1843  return prefix + comment + '\n';
1844}
1845
1846
1847/***/ }),
1848
1849/***/ "4RMZ":
1850/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
1851
1852"use strict";
1853/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TypeInfo; });
1854/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return visitWithTypeInfo; });
1855/* harmony import */ var _polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1/U3");
1856/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("/jXB");
1857/* harmony import */ var _language_ast_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("klf5");
1858/* harmony import */ var _language_visitor_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("L2ys");
1859/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("axIb");
1860/* harmony import */ var _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("LViu");
1861/* harmony import */ var _typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("umOc");
1862
1863
1864
1865
1866
1867
1868
1869/**
1870 * TypeInfo is a utility class which, given a GraphQL schema, can keep track
1871 * of the current field and type definitions at any point in a GraphQL document
1872 * AST during a recursive descent by calling `enter(node)` and `leave(node)`.
1873 */
1874
1875var TypeInfo = /*#__PURE__*/function () {
1876  function TypeInfo(schema, // NOTE: this experimental optional second parameter is only needed in order
1877  // to support non-spec-compliant code bases. You should never need to use it.
1878  // It may disappear in the future.
1879  getFieldDefFn, // Initial type may be provided in rare cases to facilitate traversals
1880  // beginning somewhere other than documents.
1881  initialType) {
1882    this._schema = schema;
1883    this._typeStack = [];
1884    this._parentTypeStack = [];
1885    this._inputTypeStack = [];
1886    this._fieldDefStack = [];
1887    this._defaultValueStack = [];
1888    this._directive = null;
1889    this._argument = null;
1890    this._enumValue = null;
1891    this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef;
1892
1893    if (initialType) {
1894      if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isInputType */ "G"])(initialType)) {
1895        this._inputTypeStack.push(initialType);
1896      }
1897
1898      if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isCompositeType */ "D"])(initialType)) {
1899        this._parentTypeStack.push(initialType);
1900      }
1901
1902      if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isOutputType */ "O"])(initialType)) {
1903        this._typeStack.push(initialType);
1904      }
1905    }
1906  }
1907
1908  var _proto = TypeInfo.prototype;
1909
1910  _proto.getType = function getType() {
1911    if (this._typeStack.length > 0) {
1912      return this._typeStack[this._typeStack.length - 1];
1913    }
1914  };
1915
1916  _proto.getParentType = function getParentType() {
1917    if (this._parentTypeStack.length > 0) {
1918      return this._parentTypeStack[this._parentTypeStack.length - 1];
1919    }
1920  };
1921
1922  _proto.getInputType = function getInputType() {
1923    if (this._inputTypeStack.length > 0) {
1924      return this._inputTypeStack[this._inputTypeStack.length - 1];
1925    }
1926  };
1927
1928  _proto.getParentInputType = function getParentInputType() {
1929    if (this._inputTypeStack.length > 1) {
1930      return this._inputTypeStack[this._inputTypeStack.length - 2];
1931    }
1932  };
1933
1934  _proto.getFieldDef = function getFieldDef() {
1935    if (this._fieldDefStack.length > 0) {
1936      return this._fieldDefStack[this._fieldDefStack.length - 1];
1937    }
1938  };
1939
1940  _proto.getDefaultValue = function getDefaultValue() {
1941    if (this._defaultValueStack.length > 0) {
1942      return this._defaultValueStack[this._defaultValueStack.length - 1];
1943    }
1944  };
1945
1946  _proto.getDirective = function getDirective() {
1947    return this._directive;
1948  };
1949
1950  _proto.getArgument = function getArgument() {
1951    return this._argument;
1952  };
1953
1954  _proto.getEnumValue = function getEnumValue() {
1955    return this._enumValue;
1956  };
1957
1958  _proto.enter = function enter(node) {
1959    var schema = this._schema; // Note: many of the types below are explicitly typed as "mixed" to drop
1960    // any assumptions of a valid schema to ensure runtime types are properly
1961    // checked before continuing since TypeInfo is used as part of validation
1962    // which occurs before guarantees of schema and document validity.
1963
1964    switch (node.kind) {
1965      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SELECTION_SET:
1966        {
1967          var namedType = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* getNamedType */ "A"])(this.getType());
1968
1969          this._parentTypeStack.push(Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isCompositeType */ "D"])(namedType) ? namedType : undefined);
1970
1971          break;
1972        }
1973
1974      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FIELD:
1975        {
1976          var parentType = this.getParentType();
1977          var fieldDef;
1978          var fieldType;
1979
1980          if (parentType) {
1981            fieldDef = this._getFieldDef(schema, parentType, node);
1982
1983            if (fieldDef) {
1984              fieldType = fieldDef.type;
1985            }
1986          }
1987
1988          this._fieldDefStack.push(fieldDef);
1989
1990          this._typeStack.push(Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isOutputType */ "O"])(fieldType) ? fieldType : undefined);
1991
1992          break;
1993        }
1994
1995      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].DIRECTIVE:
1996        this._directive = schema.getDirective(node.name.value);
1997        break;
1998
1999      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OPERATION_DEFINITION:
2000        {
2001          var type;
2002
2003          switch (node.operation) {
2004            case 'query':
2005              type = schema.getQueryType();
2006              break;
2007
2008            case 'mutation':
2009              type = schema.getMutationType();
2010              break;
2011
2012            case 'subscription':
2013              type = schema.getSubscriptionType();
2014              break;
2015          }
2016
2017          this._typeStack.push(Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isObjectType */ "N"])(type) ? type : undefined);
2018
2019          break;
2020        }
2021
2022      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].INLINE_FRAGMENT:
2023      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FRAGMENT_DEFINITION:
2024        {
2025          var typeConditionAST = node.typeCondition;
2026          var outputType = typeConditionAST ? Object(_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_6__[/* typeFromAST */ "a"])(schema, typeConditionAST) : Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* getNamedType */ "A"])(this.getType());
2027
2028          this._typeStack.push(Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isOutputType */ "O"])(outputType) ? outputType : undefined);
2029
2030          break;
2031        }
2032
2033      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].VARIABLE_DEFINITION:
2034        {
2035          var inputType = Object(_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_6__[/* typeFromAST */ "a"])(schema, node.type);
2036
2037          this._inputTypeStack.push(Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isInputType */ "G"])(inputType) ? inputType : undefined);
2038
2039          break;
2040        }
2041
2042      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ARGUMENT:
2043        {
2044          var _this$getDirective;
2045
2046          var argDef;
2047          var argType;
2048          var fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef();
2049
2050          if (fieldOrDirective) {
2051            argDef = Object(_polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(fieldOrDirective.args, function (arg) {
2052              return arg.name === node.name.value;
2053            });
2054
2055            if (argDef) {
2056              argType
2056 = argDef.type;
2057            }
2058          }
2059
2060          this._argument = argDef;
2061
2062          this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined);
2063
2064          this._inputTypeStack.push(Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isInputType */ "G"])(argType) ? argType : undefined);
2065
2066          break;
2067        }
2068
2069      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].LIST:
2070        {
2071          var listType = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* getNullableType */ "B"])(this.getInputType());
2072          var itemType = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isListType */ "J"])(listType) ? listType.ofType : listType; // List positions never have a default value.
2073
2074          this._defaultValueStack.push(undefined);
2075
2076          this._inputTypeStack.push(Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isInputType */ "G"])(itemType) ? itemType : undefined);
2077
2078          break;
2079        }
2080
2081      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OBJECT_FIELD:
2082        {
2083          var objectType = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* getNamedType */ "A"])(this.getInputType());
2084          var inputFieldType;
2085          var inputField;
2086
2087          if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isInputObjectType */ "F"])(objectType)) {
2088            inputField = objectType.getFields()[node.name.value];
2089
2090            if (inputField) {
2091              inputFieldType = inputField.type;
2092            }
2093          }
2094
2095          this._defaultValueStack.push(inputField ? inputField.defaultValue : undefined);
2096
2097          this._inputTypeStack.push(Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isInputType */ "G"])(inputFieldType) ? inputFieldType : undefined);
2098
2099          break;
2100        }
2101
2102      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ENUM:
2103        {
2104          var enumType = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* getNamedType */ "A"])(this.getInputType());
2105          var enumValue;
2106
2107          if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isEnumType */ "E"])(enumType)) {
2108            enumValue = enumType.getValue(node.value);
2109          }
2110
2111          this._enumValue = enumValue;
2112          break;
2113        }
2114    }
2115  };
2116
2117  _proto.leave = function leave(node) {
2118    switch (node.kind) {
2119      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SELECTION_SET:
2120        this._parentTypeStack.pop();
2121
2122        break;
2123
2124      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FIELD:
2125        this._fieldDefStack.pop();
2126
2127        this._typeStack.pop();
2128
2129        break;
2130
2131      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].DIRECTIVE:
2132        this._directive = null;
2133        break;
2134
2135      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OPERATION_DEFINITION:
2136      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].INLINE_FRAGMENT:
2137      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FRAGMENT_DEFINITION:
2138        this._typeStack.pop();
2139
2140        break;
2141
2142      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].VARIABLE_DEFINITION:
2143        this._inputTypeStack.pop();
2144
2145        break;
2146
2147      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ARGUMENT:
2148        this._argument = null;
2149
2150        this._defaultValueStack.pop();
2151
2152        this._inputTypeStack.pop();
2153
2154        break;
2155
2156      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].LIST:
2157      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OBJECT_FIELD:
2158        this._defaultValueStack.pop();
2159
2160        this._inputTypeStack.pop();
2161
2162        break;
2163
2164      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ENUM:
2165        this._enumValue = null;
2166        break;
2167    }
2168  };
2169
2170  return TypeInfo;
2171}();
2172/**
2173 * Not exactly the same as the executor's definition of getFieldDef, in this
2174 * statically evaluated environment we do not always have an Object type,
2175 * and need to handle Interface and Union types.
2176 */
2177
2178function getFieldDef(schema, parentType, fieldNode) {
2179  var name = fieldNode.name.value;
2180
2181  if (name === _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__[/* SchemaMetaFieldDef */ "a"].name && schema.getQueryType() === parentType) {
2182    return _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__[/* SchemaMetaFieldDef */ "a"];
2183  }
2184
2185  if (name === _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__[/* TypeMetaFieldDef */ "c"].name && schema.getQueryType() === parentType) {
2186    return _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__[/* TypeMetaFieldDef */ "c"];
2187  }
2188
2189  if (name === _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__[/* TypeNameMetaFieldDef */ "d"].name && Ob
2189ject(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isCompositeType */ "D"])(parentType)) {
2190    return _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_5__[/* TypeNameMetaFieldDef */ "d"];
2191  }
2192
2193  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isObjectType */ "N"])(parentType) || Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isInterfaceType */ "H"])(parentType)) {
2194    return parentType.getFields()[name];
2195  }
2196}
2197/**
2198 * Creates a new visitor instance which maintains a provided TypeInfo instance
2199 * along with visiting visitor.
2200 */
2201
2202
2203function visitWithTypeInfo(typeInfo, visitor) {
2204  return {
2205    enter: function enter(node) {
2206      typeInfo.enter(node);
2207      var fn = Object(_language_visitor_mjs__WEBPACK_IMPORTED_MODULE_3__[/* getVisitFn */ "b"])(visitor, node.kind,
2208      /* isLeaving */
2209      false);
2210
2211      if (fn) {
2212        var result = fn.apply(visitor, arguments);
2213
2214        if (result !== undefined) {
2215          typeInfo.leave(node);
2216
2217          if (Object(_language_ast_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isNode */ "c"])(result)) {
2218            typeInfo.enter(result);
2219          }
2220        }
2221
2222        return result;
2223      }
2224    },
2225    leave: function leave(node) {
2226      var fn = Object(_language_visitor_mjs__WEBPACK_IMPORTED_MODULE_3__[/* getVisitFn */ "b"])(visitor, node.kind,
2227      /* isLeaving */
2228      true);
2229      var result;
2230
2231      if (fn) {
2232        result = fn.apply(visitor, arguments);
2233      }
2234
2235      typeInfo.leave(node);
2236      return result;
2237    }
2238  };
2239}
2240
2241
2242/***/ }),
2243
2244/***/ "4suF":
2245/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
2246
2247"use strict";
2248/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return isDirective; });
2249/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return assertDirective; });
2250/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return GraphQLDirective; });
2251/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return GraphQLIncludeDirective; });
2252/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return GraphQLSkipDirective; });
2253/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_DEPRECATION_REASON; });
2254/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return GraphQLDeprecatedDirective; });
2255/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return GraphQLSpecifiedByDirective; });
2256/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return specifiedDirectives; });
2257/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return isSpecifiedDirective; });
2258/* harmony import */ var _polyfills_objectEntries_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Y/la");
2259/* harmony import */ var _polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2Fve");
2260/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rWdj");
2261/* harmony import */ var _jsutils_toObjMap_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("E9SJ");
2262/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("t3R0");
2263/* harmony import */ var _jsutils_instanceOf_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Mw0p");
2264/* harmony import */ var _jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("zpYP");
2265/* harmony import */ var _jsutils_defineInspect_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("+dZ+");
2266/* harmony import */ var _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("F8X2");
2267/* harmony import */ var _scalars_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("19Hc");
2268/* harmony import */ var _definition_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("axIb");
2269function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2270
2271function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284/**
2285 * Test if the given value is a GraphQL directive.
2286 */
2287
2288// eslint-disable-next-line no-redeclare
2289function isDirective(directive) {
2290  return Object(_jsutils_instanceOf_mjs__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(directive, GraphQLDirective);
2291}
2292function assertDirective(directive) {
2293  if (!isDirective(directive)) {
2294    throw new Error("Expected ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(directive), " to be a GraphQL directive."));
2295  }
2296
2297  return directive;
2298}
2299/**
2300 * Directives are used by the GraphQL runtime as a way of modifying execution
2301 * behavior. Type system creators will usually not create these directly.
2302 */
2303
2304var GraphQLDirective = /*#__PURE__*/function () {
2305  function GraphQLDirective(config) {
2306    var _config$isRepeatable, _config$args;
2307
2308    this.name = config.name;
2309    this.description = config.description;
2310    this.locations = config.locations;
2311    this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;
2312    this.extensions = config.extensions && Object(_jsutils_toObjMap_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(config.extensions);
2313    this.astNode = config.astNode;
2314    config.name || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Directive must be named.');
2315    Array.isArray(config.locations) || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "@".concat(config.name, " locations must be an Array."));
2316    var args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {};
2317    Object(_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(args) && !Array.isArray(args) || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, "@".concat(config.name, " args must be an object with argument names as keys."));
2318    this.args = Object(_polyfills_objectEntries_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(args).map(function (_ref) {
2319      var argName = _ref[0],
2320          argConfig = _ref[1];
2321      return {
2322        name: argName,
2323        description: argConfig.description,
2324        type: argConfig.type,
2325        defaultValue: argConfig.defaultValue,
2326        deprecationReason: argConfig.deprecationReason,
2327        extensions: argConfig.extensions && Object(_jsutils_toObjMap_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(argConfig.extensions),
2328        astNode: argConfig.astNode
2329      };
2330    });
2331  }
2332
2333  var _proto = GraphQLDirective.prototype;
2334
2335  _proto.toConfig = function toConfig() {
2336    return {
2337      name: this.name,
2338      description: this.description,
2339      locations: this.locations,
2340      args: Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* argsToArgsConfig */ "i"])(this.args),
2341      isRepeatable: this.isRepeatable,
2342      extensions: this.extensions,
2343      astNode: this.astNode
2344    };
2345  };
2346
2347  _proto.toString = function toString() {
2348    return '@' + this.name;
2349  };
2350
2351  _proto.toJSON = function toJSON() {
2352    return this.toString();
2353  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
2354  ;
2355
2356  _createClass(GraphQLDirective, [{
2357    key: _polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_1__[/* SYMBOL_TO_STRING_TAG */ "c"],
2358    get: function get() {
2359      return 'GraphQLDirective';
2360    }
2361  }]);
2362
2363  return GraphQLDirective;
2364}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
2365
2366Object(_jsutils_defineInspect_mjs__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(GraphQLDirective);
2367
2368/**
2369 * Used to conditionally include fields or fragments.
2370 */
2371var GraphQLIncludeDirective = new GraphQLDirective({
2372  name: 'include',
2373  description: 'Directs the executor to include this field or fragment only when the `if` argument is true.',
2374  locations: [_language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].FIELD, _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].FRAGMENT_SPREAD, _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].INLINE_FRAGMENT],
2375  args: {
2376    if: {
2377      type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLBoolean */ "a"]),
2378      description: 'Included when true.'
2379    }
2380  }
2381});
2382/**
2383 * Used to conditionally skip (exclude) fields or fragments.
2384 */
2385
2386var GraphQLSkipDirective = new GraphQLDirective({
2387  name: 'skip',
2388  description: 'Directs the executor to skip this field or fragment when the `if` argument is true.',
2389  locations: [_language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].FIELD, _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].FRAGMENT_SPREAD, _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].INLINE_FRAGMENT],
2390  args: {
2391    if: {
2392      type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLBoolean */ "a"]),
2393      description: 'Skipped when true.'
2394    }
2395  }
2396});
2397/**
2398 * Constant string used for default reason for a deprecation.
2399 */
2400
2401var DEFAULT_DEPRECATION_REASON = 'No longer supported';
2402/**
2403 * Used to declare element of a GraphQL schema as deprecated.
2404 */
2405
2406var GraphQLDeprecatedDirective = new GraphQLDirective({
2407  name: 'deprecated',
2408  description: 'Marks an element of a GraphQL schema as no longer supported.',
2409  locations: [_language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].FIELD_DEFINITION, _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].ARGUMENT_DEFINITION, _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].INPUT_FIELD_DEFINITION, _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].ENUM_VALUE],
2410  args: {
2411    reason: {
2412      type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLString */ "e"],
2413      description: 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',
2414      defaultValue: DEFAULT_DEPRECATION_REASON
2415    }
2416  }
2417});
2418/**
2419 * Used to provide a URL for specifying the behaviour of custom scalar definitions.
2420 */
2421
2422var GraphQLSpecifiedByDirective = new GraphQLDirective({
2423  name: 'specifiedBy',
2424  description: 'Exposes a URL that specifies the behaviour of this scalar.',
2425  locations: [_language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_8__[/* DirectiveLocation */ "a"].SCALAR],
2426  args: {
2427    url: {
2428      type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLString */ "e"]),
2429      description: 'The URL that specifies the behaviour of this scalar.'
2430    }
2431  }
2432});
2433/**
2434 * The full list of specified directives.
2435 */
2436
2437var specifiedDirectives = Object.freeze([GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective]);
2438function isSpecifiedDirective(directive) {
2439  return specifiedDirectives.some(function (_ref2) {
2440    var name = _ref2.name;
2441    return name === directive.name;
2442  });
2443}
2444
2445
2446/***/ }),
2447
2448/***/ "51nL":
2449/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
2450
2451"use strict";
2452/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isSchema; });
2453/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return assertSchema; });
2454/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GraphQLSchema; });
2455/* harmony import */ var _polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1/U3");
2456/* harmony import */ var _polyfills_arrayFrom_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Qx16");
2457/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("1QEH");
2458/* harmony import */ var _polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("2Fve");
2459/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("rWdj");
2460/* harmony import */ var _jsutils_toObjMap_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("E9SJ");
2461/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("t3R0");
2462/* harmony import */ var _jsutils_instanceOf_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("Mw0p");
2463/* harmony import */ var _jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("zpYP");
2464/* harmony import */ var _introspection_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("LViu");
2465/* harmony import */ var _directives_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("4suF");
2466/* harmony import */ var _definition_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("axIb");
2467function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2468
2469function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483/**
2484 * Test if the given value is a GraphQL schema.
2485 */
2486
2487// eslint-disable-next-line no-redeclare
2488function isSchema(schema) {
2489  return Object(_jsutils_instanceOf_mjs__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(schema, GraphQLSchema);
2490}
2491function assertSchema(schema) {
2492  if (!isSchema(schema)) {
2493    throw new Error("Expected ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(schema), " to be a GraphQL schema."));
2494  }
2495
2496  return schema;
2497}
2498/**
2499 * Schema Definition
2500 *
2501 * A Schema is created by supplying the root types of each type of operation,
2502 * query and mutation (optional). A schema definition is then supplied to the
2503 * validator and executor.
2504 *
2505 * Example:
2506 *
2507 *     const MyAppSchema = new GraphQLSchema({
2508 *       query: MyAppQueryRootType,
2509 *       mutation: MyAppMutationRootType,
2510 *     })
2511 *
2512 * Note: When the schema is constructed, by default only the types that are
2513 * reachable by traversing the root types are included, other types must be
2514 * explicitly referenced.
2515 *
2516 * Example:
2517 *
2518 *     const characterInterface = new GraphQLInterfaceType({
2519 *       name: 'Character',
2520 *       ...
2521 *     });
2522 *
2523 *     const humanType = new GraphQLObjectType({
2524 *       name: 'Human',
2525 *       interfaces: [characterInterface],
2526 *       ...
2527 *     });
2528 *
2529 *     const droidType = new GraphQLObjectType({
2530 *       name: 'Droid',
2531 *       interfaces: [characterInterface],
2532 *       ...
2533 *     });
2534 *
2535 *     const schema = new GraphQLSchema({
2536 *       query: new GraphQLObjectType({
2537 *         name: 'Query',
2538 *         fields: {
2539 *           hero: { type: characterInterface, ... },
2540 *         }
2541 *       }),
2542 *       ...
2543 *       // Since this schema references only the `Character` interface it's
2544 *       // necessary to explicitly list the types that implement it if
2545 *       // you want them to be included in the final schema.
2546 *       types: [humanType, droidType],
2547 *     })
2548 *
2549 * Note: If an array of `directives` are provided to GraphQLSchema, that will be
2550 * the exact list of directives represented and allowed. If `directives` is not
2551 * provided then a default set of the specified directives (e.g. @include and
2552 * @skip) will be used. If you wish to provide *additional* directives to these
2553 * specified directives, you must explicitly declare them. Example:
2554 *
2555 *     const MyAppSchema = new GraphQLSchema({
2556 *       ...
2557 *       directives: specifiedDirectives.concat([ myCustomDirective ]),
2558 *     })
2559 *
2560 */
2561
2562var GraphQLSchema = /*#__PURE__*/function () {
2563  // Used as a cache for validateSchema().
2564  function GraphQLSchema(config) {
2565    var _config$directives;
2566
2567    // If this schema was built from a source known to be valid, then it may be
2568    // marked with assumeValid to avoid an additional type system validation.
2569    this.__validationErrors = config.assumeValid === true ? [] : undefined;
2569 // Check for common mistakes during construction to produce early errors.
2570
2571    Object(_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(config) || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(0, 'Must provide configuration object.');
2572    !config.types || Array.isArray(config.types) || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(0, "\"types\" must be Array if provided but got: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(config.types), "."));
2573    !config.directives || Array.isArray(config.directives) || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(0, '"directives" must be Array if provided but got: ' + "".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(config.directives), "."));
2574    this.description = config.description;
2575    this.extensions = config.extensions && Object(_jsutils_toObjMap_mjs__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(config.extensions);
2576    this.astNode = config.astNode;
2577    this.extensionASTNodes = config.extensionASTNodes;
2578    this._queryType = config.query;
2579    this._mutationType = config.mutation;
2580    this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default.
2581
2582    this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : _directives_mjs__WEBPACK_IMPORTED_MODULE_10__[/* specifiedDirectives */ "j"]; // To preserve order of user-provided types, we add first to add them to
2583    // the set of "collected" types, so `collectReferencedTypes` ignore them.
2584
2585    var allReferencedTypes = new Set(config.types);
2586
2587    if (config.types != null) {
2588      for (var _i2 = 0, _config$types2 = config.types; _i2 < _config$types2.length; _i2++) {
2589        var type = _config$types2[_i2];
2590        // When we ready to process this type, we remove it from "collected" types
2591        // and then add it together with all dependent types in the correct position.
2592        allReferencedTypes.delete(type);
2593        collectReferencedTypes(type, allReferencedTypes);
2594      }
2595    }
2596
2597    if (this._queryType != null) {
2598      collectReferencedTypes(this._queryType, allReferencedTypes);
2599    }
2600
2601    if (this._mutationType != null) {
2602      collectReferencedTypes(this._mutationType, allReferencedTypes);
2603    }
2604
2605    if (this._subscriptionType != null) {
2606      collectReferencedTypes(this._subscriptionType, allReferencedTypes);
2607    }
2608
2609    for (var _i4 = 0, _this$_directives2 = this._directives; _i4 < _this$_directives2.length; _i4++) {
2610      var directive = _this$_directives2[_i4];
2611
2612      // Directives are not validated until validateSchema() is called.
2613      if (Object(_directives_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isDirective */ "h"])(directive)) {
2614        for (var _i6 = 0, _directive$args2 = directive.args; _i6 < _directive$args2.length; _i6++) {
2615          var arg = _directive$args2[_i6];
2616          collectReferencedTypes(arg.type, allReferencedTypes);
2617        }
2618      }
2619    }
2620
2621    collectReferencedTypes(_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* __Schema */ "j"], allReferencedTypes); // Storing the resulting map for reference by the schema.
2622
2623    this._typeMap = Object.create(null);
2624    this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name.
2625
2626    this._implementationsMap = Object.create(null);
2627
2628    for (var _i8 = 0, _arrayFrom2 = Object(_polyfills_arrayFrom_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(allReferencedTypes); _i8 < _arrayFrom2.length; _i8++) {
2629      var namedType = _arrayFrom2[_i8];
2630
2631      if (namedType == null) {
2632        continue;
2633      }
2634
2635      var typeName = namedType.name;
2636      typeName || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(0, 'One of the provided types for building the Schema is missing a name.');
2637
2638      if (this._typeMap[typeName] !== undefined) {
2639        throw new Error("Schema must contain uniquely named types but contains multiple types named \"".concat(typeName, "\"."));
2640      }
2641
2642      this._typeMap[typeName] = namedType;
2643
2644      if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isInterfaceType */ "H"])(namedType)) {
2645        // Store implementations by interface.
2646        for (var _i10 = 0, _namedType$getInterfa2 = namedType.getInterfaces(); _i10 < _namedType$getInterfa2.length; _i10++) {
2647          var iface = _namedType$getInterfa2[_i10];
2648
2649          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isInterfaceType */ "H"])(iface)) {
2650            var implementations = this._implementationsMap[iface.name];
2651
2652            if (implementations === undefined) {
2653              implementations = this._implementationsMap[iface.name] = {
2654                objects: [],
2655                interfaces: []
2656              };
2657            }
2658
2659            implementations.interfaces.push(namedType);
2660          }
2661        }
2662      } else if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isObjectType */ "N"])(namedType)) {
2663        // Store implementations by objects.
2664        for (var _i12 = 0, _namedType$getInterfa4 = namedType.getInterfaces(); _i12 < _namedType$getInterfa4.length; _i12++) {
2665          var _iface = _namedType$getInterfa4[_i12];
2666
2667          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isInterfaceType */ "H"])(_iface)) {
2668            var _implementations = this._implementationsMap[_iface.name];
2669
2670            if (_implementations === undefined) {
2671              _implementations = this._implementationsMap[_iface.name] = {
2672                objects: [],
2673                interfaces: []
2674              };
2675            }
2676
2677            _implementations.objects.push(namedType);
2678          }
2679        }
2680      }
2681    }
2682  }
2683
2684  var _proto = GraphQLSchema.prototype;
2685
2686  _proto.getQueryType = function getQueryType() {
2687    return this._queryType;
2688  };
2689
2690  _proto.getMutationType = function getMutationType() {
2691    return this._mutationType;
2692  };
2693
2694  _proto.getSubscriptionType = function getSubscriptionType() {
2695    return this._subscriptionType;
2696  };
2697
2698  _proto.getTypeMap = function getTypeMap() {
2699    return this._typeMap;
2700  };
2701
2702  _proto.getType = function getType(name) {
2703    return this.getTypeMap()[name];
2704  };
2705
2706  _proto.getPossibleTypes = function getPossibleTypes(abstractType) {
2707    return Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isUnionType */ "T"])(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects;
2708  };
2709
2710  _proto.getImplementations = function getImplementations(interfaceType) {
2711    var implementations = this._implementationsMap[interfaceType.name];
2712    return implementations !== null && implementations !== void 0 ? implementations : {
2713      objects: [],
2714      interfaces: []
2715    };
2716  } // @deprecated: use isSubType instead - will be removed in v16.
2717  ;
2718
2719  _proto.isPossibleType = function isPossibleType(abstractType, possibleType) {
2720    return this.isSubType(abstractType, possibleType);
2721  };
2722
2723  _proto.isSubType = function isSubType(abstractType, maybeSubType) {
2724    var map = this._subTypeMap[abstractType.name];
2725
2726    if (map === undefined) {
2727      map = Object.create(null);
2728
2729      if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isUnionType */ "T"])(abstractType)) {
2730        for (var _i14 = 0, _abstractType$getType2 = abstractType.getTypes(); _i14 < _abstractType$getType2.length; _i14++) {
2731          var type = _abstractType$getType2[_i14];
2732          map[type.name] = true;
2733        }
2734      } else {
2735        var implementations = this.getImplementations(abstractType);
2736
2737        for (var _i16 = 0, _implementations$obje2 = implementations.objects; _i16 < _implementations$obje2.length; _i16++) {
2738          var _type = _implementations$obje2[_i16];
2739          map[_type.name] = true;
2740        }
2741
2742        for (var _i18 = 0, _implementations$inte2 = implementations.interfaces; _i18 < _implementations$inte2.length; _i18++) {
2743          var _type2 = _implementations$inte2[_i18];
2744          map[_type2.name] = true;
2745        }
2746      }
2747
2748      this._subTypeMap[abstractType.name] = map;
2749    }
2750
2751    return map[maybeSubType.name] !== undefined;
2752  };
2753
2754  _proto.getDirectives = function getDirectives() {
2755    return this._directives;
2756  };
2757
2758  _proto.getDirective = function getDirective(name) {
2759    return Object(_polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this.getDirectives(), function (directive) {
2760      return directive.name === name;
2761    });
2762  };
2763
2764  _proto.toConfig = function toConfig() {
2765    var _this$extensionASTNod;
2766
2767    return {
2768      description: this.description,
2769      query: this.getQueryType(),
2770      mutation: this.getMutationType(),
2771      subscription: this.getSubscriptionType(),
2772      types: Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this.getTypeMap()),
2773      directives: this.getDirectives().slice(),
2774      extensions: this.extensions,
2775      astNode: this.astNode,
2776      extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : [],
2777      assumeValid: this.__validationErrors !== undefined
2778    };
2779  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
2780  ;
2781
2782  _createClass(GraphQLSchema, [{
2783    key: _polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_3__[/* SYMBOL_TO_STRING_TAG */ "c"],
2784    get: function get() {
2785      return 'GraphQLSchema';
2786    }
2787  }]);
2788
2789  return GraphQLSchema;
2790}();
2791
2792function collectReferencedTypes(type, typeSet) {
2793  var namedType = Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* getNamedType */ "A"])(type);
2794
2795  if (!typeSet.has(namedType)) {
2796    typeSet.add(namedType);
2797
2798    if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isUnionType */ "T"])(namedType)) {
2799      for (var _i20 = 0, _namedType$getTypes2 = namedType.getTypes(); _i20 < _namedType$getTypes2.length; _i20++) {
2800        var memberType = _namedType$getTypes2[_i20];
2801        collectReferencedTypes(memberType, typeSet);
2802      }
2803    } else if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isObjectType */ "N"])(namedType) || Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isInterfaceType */ "H"])(namedType)) {
2804      for (var _i22 = 0, _namedType$getInterfa6 = namedType.getInterfaces(); _i22 < _namedType$getInterfa6.length; _i22++) {
2805        var interfaceType = _namedType$getInterfa6[_i22];
2806        collectReferencedTypes(interfaceType, typeSet);
2807      }
2808
2809      for (var _i24 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(namedType.getFields()); _i24 < _objectValues2.length; _i24++) {
2810        var field = _objectValues2[_i24];
2811        collectReferencedTypes(field.type, typeSet);
2812
2813        for (var _i26 = 0, _field$args2 = field.args; _i26 < _field$args2.length; _i26++) {
2814          var arg = _field$args2[_i26];
2815          collectReferencedTypes(arg.type, typeSet);
2816        }
2817      }
2818    } else if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_11__[/* isInputObjectType */ "F"])(namedType)) {
2819      for (var _i28 = 0, _objectValues4 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(namedType.getFields()); _i28 < _objectValues4.length; _i28++) {
2820        var _field = _objectValues4[_i28];
2821        collectReferencedTypes(_field.type, typeSet);
2822      }
2823    }
2824  }
2825
2826  return typeSet;
2827}
2828
2829
2830/***/ }),
2831
2832/***/ "5CxI":
2833/***/ (function(module, exports, __webpack_require__) {
2834
2835"use strict";
2836
2837
2838// TODO: remove, semver-major
2839
2840module.exports = __webpack_require__("AM7I");
2841
2842
2843/***/ }),
2844
2845/***/ "5IOE":
2846/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
2847
2848"use strict";
2849/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ScalarLeafsRule; });
2850/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
2851/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dWS+");
2852/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("axIb");
2853
2854
2855
2856
2857/**
2858 * Scalar leafs
2859 *
2860 * A GraphQL document is valid only if all leaf fields (fields without
2861 * sub selections) are of scalar or enum types.
2862 */
2863function ScalarLeafsRule(context) {
2864  return {
2865    Field: function Field(node) {
2866      var type = context.getType();
2867      var selectionSet = node.selectionSet;
2868
2869      if (type) {
2870        if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isLeafType */ "I"])(Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[/* getNamedType */ "A"])(type))) {
2871          if (selectionSet) {
2872            var fieldName = node.name.value;
2873            var typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type);
2874            context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLError */ "a"]("Field \"".concat(fieldName, "\" must not have a selection since type \"").concat(typeStr, "\" has no subfields."), selectionSet));
2875          }
2876        } else if (!selectionSet) {
2877          var _fieldName = node.name.value;
2878
2879          var _typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type);
2880
2881          context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLError */ "a"]("Field \"".concat(_fieldName, "\" of type \"").concat(_typeStr, "\" must have a selection of subfields. Did you mean \"").concat(_fieldName, " { ... }\"?"), node));
2882        }
2883      }
2884    }
2885  };
2886}
2887
2888
2889/***/ }),
2890
2891/***/ "5PMP":
2892/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
2893
2894"use strict";
2895/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return assertValidName; });
2896/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isValidNameError; });
2897/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("t3R0");
2898/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dWS+");
2899
2900
2901var NAME_RX = /^[_a-zA-Z][_a-zA-Z0-9]*$/;
2902/**
2903 * Upholds the spec rules about naming.
2904 */
2905
2906function assertValidName(name) {
2907  var error = isValidNameError(name);
2908
2909  if (error) {
2910    throw error;
2911  }
2912
2913  return name;
2914}
2915/**
2916 * Returns an Error if a name is invalid.
2917 */
2918
2919function isValidNameError(name) {
2920  typeof name === 'string' || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(0, 'Expected name to be a string.');
2921
2922  if (name.length > 1 && name[0] === '_' && name[1] === '_') {
2923    return new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLError */ "a"]("Name \"".concat(name, "\" must not begin with \"__\", which is reserved by GraphQL introspection."));
2924  }
2925
2926  if (!NAME_RX.test(name)) {
2927    return new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLError */ "a"]("Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \"".concat(name, "\" does not."));
2928  }
2929}
2930
2931
2932/***/ }),
2933
2934/***/ "5XwX":
2935/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
2936
2937"use strict";
2938/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getVariableValues; });
2939/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getArgumentValues; });
2940/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getDirectiveValues; });
2941/* harmony import */ var _polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1/U3");
2942/* harmony import */ var _jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("kBjl");
2943/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rWdj");
2944/* harmony import */ var _jsutils_printPathArray_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("tzQD");
2945/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("dWS+");
2946/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("/jXB");
2947/* harmony import */ var _language_printer_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("dQau");
2948/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("axIb");
2949/* harmony import */ var _utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("umOc");
2950/* harmony import */ var _utilities_valueFromAST_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("Mbdf");
2951/* harmony import */ var _utilities_coerceInputValue_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("67eP");
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964/**
2965 * Prepares an object map of variableValues of the correct type based on the
2966 * provided variable definitions and arbitrary input. If the input cannot be
2967 * parsed to match the variable definitions, a GraphQLError will be thrown.
2968 *
2969 * Note: The returned value is a plain Object with a prototype, since it is
2970 * exposed to user code. Care should be taken to not pull values from the
2971 * Object prototype.
2972 *
2973 * @internal
2974 */
2975function getVariableValues(schema, varDefNodes, inputs, options) {
2976  var errors = [];
2977  var maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors;
2978
2979  try {
2980    var coerced = coerceVariableValues(schema, varDefNodes, inputs, function (error) {
2981      if (maxErrors != null && errors.length >= maxErrors) {
2982        throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]('Too many errors processing variables, error limit reached. Execution aborted.');
2983      }
2984
2985      errors.push(error);
2986    });
2987
2988    if (errors.length === 0) {
2989      return {
2990        coerced: coerced
2991      };
2992    }
2993  } catch (error) {
2994    errors.push(error);
2995  }
2996
2997  return {
2998    errors: errors
2999  };
3000}
3001
3002function coerceVariableValues(schema, varDefNodes, inputs, onError) {
3003  var coercedValues = {};
3004
3005  var _loop = function _loop(_i2) {
3006    var varDefNode = varDefNodes[_i2];
3007    var varName = varDefNode.variable.name.value;
3008    var varType = Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_8__[/* typeFromAST */ "a"])(schema, varDefNode.type);
3009
3010    if (!Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInputType */ "G"])(varType)) {
3011      // Must use input types for variables. This should be caught during
3012      // validation, however is checked again here for safety.
3013      var varTypeStr = Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_6__[/* print */ "a"])(varDefNode.type);
3014      onError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Variable \"$".concat(varName, "\" expected value of type \"").concat(varTypeStr, "\" which cannot be used as an input type."), varDefNode.type));
3015      return "continue";
3016    }
3017
3018    if (!hasOwnProperty(inputs, varName)) {
3019      if (varDefNode.defaultValue) {
3020        coercedValues[varName] = Object(_utilities_valueFromAST_mjs__WEBPACK_IMPORTED_MODULE_9__[/* valueFromAST */ "a"])(varDefNode.defaultValue, varType);
3021      } else if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isNonNullType */ "L"])(varType)) {
3022        var _varTypeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(varType);
3023
3024        onError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Variable \"$".concat(varName, "\" of required type \"").concat(_varTypeStr, "\" was not provided."), varDefNode));
3025      }
3026
3027      return "continue";
3028    }
3029
3030    var value = inputs[varName];
3031
3032    if (value === null && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isNonNullType */ "L"])(varType)) {
3033      var _varTypeStr2 = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(varType);
3034
3035      onError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Variable \"$".concat(varName, "\" of non-null type \"").concat(_varTypeStr2, "\" must not be null."), varDefNode));
3036      return "continue";
3037    }
3038
3039    coercedValues[varName] = Object(_utilities_coerceInputValue_mjs__WEBPACK_IMPORTED_MODULE_10__[/* coerceInputValue */ "a"])(value, varType, function (path, invalidValue, error) {
3040      var prefix = "Variable \"$".concat(varName, "\" got invalid value ") + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(invalidValue);
3041
3042      if (path.length > 0) {
3043        prefix += " at \"".concat(varName).concat(Object(_jsutils_printPathArray_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(path), "\"");
3044      }
3045
3046      onError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"](prefix + '; ' + error.message, varDefNode, undefined, undefined, undefined, error.originalError));
3047    });
3048  };
3049
3050  for (var _i2 = 0; _i2 < varDefNodes.length; _i2++) {
3051    var _ret = _loop(_i2);
3052
3053    if (_ret === "continue") continue;
3054  }
3055
3056  return coercedValues;
3057}
3058/**
3059 * Prepares an object map of argument values given a list of argument
3060 * definitions and list of argument AST nodes.
3061 *
3062 * Note: The returned value is a plain Object with a prototype, since it is
3063 * exposed to user code. Care should be taken to not pull values from the
3064 * Object prototype.
3065 *
3066 * @internal
3067 */
3068
3069
3070function getArgumentValues(def, node, variableValues) {
3071  var _node$arguments;
3072
3073  var coercedValues = {}; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
3074
3075  var argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : [];
3076  var argNodeMap = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(argumentNodes, function (arg) {
3077    return arg.name.value;
3078  });
3079
3080  for (var _i4 = 0, _def$args2 = def.args; _i4 < _def$args2.length; _i4++) {
3081    var argDef = _def$args2[_i4];
3082    var name = argDef.name;
3083    var argType = argDef.type;
3084    var argumentNode = argNodeMap[name];
3085
3086    if (!argumentNode) {
3087      if (argDef.defaultValue !== undefined) {
3088        coercedValues[name] = argDef.defaultValue;
3089      } else if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isNonNullType */ "L"])(argType)) {
3090        throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Argument \"".concat(name, "\" of required type \"").concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(argType), "\" ") + 'was not provided.', node);
3091      }
3092
3093      continue;
3094    }
3095
3096    var valueNode = argumentNode.value;
3097    var isNull = valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].NULL;
3098
3099    if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].VARIABLE) {
3100      var variableName = valueNode.name.value;
3101
3102      if (variableValues == null || !hasOwnProperty(variableValues, variableName)) {
3103        if (argDef.defaultValue !== undefined) {
3104          coercedValues[name] = argDef.defaultValue;
3105        } else if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isNonNullType */ "L"])(argType)) {
3106          throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Argument \"".concat(name, "\" of required type \"").concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(argType), "\" ") + "was provided the variable \"$".concat(variableName, "\" which was not provided a runtime value."), valueNode);
3107        }
3108
3109        continue;
3110      }
3111
3112      isNull = variableValues[variableName] == null;
3113    }
3114
3115    if (isNull && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isNonNullType */ "L"])(argType)) {
3116      throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Argument \"".concat(name, "\" of non-null type \"").concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(argType), "\" ") + 'must not be null.', valueNode);
3117    }
3118
3119    var coercedValue = Object(_utilities_valueFromAST_mjs__WEBPACK_IMPORTED_MODULE_9__[/* valueFromAST */ "a"])(valueNode, argType, variableValues);
3120
3121    if (coercedValue === undefined) {
3122      // Note: ValuesOfCorrectTypeRule validation should catch this before
3123      // execution. This is a runtime check to ensure execution does not
3124      // continue with an invalid argument value.
3125      throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Argument \"".concat(name, "\" has invalid value ").concat(Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_6__[/* print */ "a"])(valueNode), "."), valueNode);
3126    }
3127
3128    coercedValues[name] = coercedValue;
3129  }
3130
3131  return coercedValues;
3132}
3133/**
3134 * Prepares an object map of argument values given a directive definition
3135 * and a AST node which may contain directives. Optionally also accepts a map
3136 * of variable values.
3137 *
3138 * If the directive does not exist on the node, returns undefined.
3139 *
3140 * Note: The returned value is a plain Object with a prototype, since it is
3141 * exposed to user code. Care should be taken to not pull values from the
3142 * Object prototype.
3143 */
3144
3145function getDirectiveValues(directiveDef, node, variableValues) {
3146  var directiveNode = node.directives && Object(_polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(node.directives, function (directive) {
3147    return directive.name.value === directiveDef.name;
3148  });
3149
3150  if (directiveNode) {
3151    return getArgumentValues(directiveDef, directiveNode, variableValues);
3152  }
3153}
3154
3155function hasOwnProperty(obj, prop) {
3156  return Object.prototype.hasOwnProperty.call(obj, prop);
3157}
3158
3159
3160/***/ }),
3161
3162/***/ "5iWz":
3163/***/ (function(module, exports, __webpack_require__) {
3164
3165"use strict";
3166/* WEBPACK VAR INJECTION */(function(process) {/**
3167 * Copyright (c) Facebook, Inc. and its affiliates.
3168 *
3169 * This source code is licensed under the MIT license found in the
3170 * LICENSE file in the root directory of this source tree.
3171 *
3172 * 
3173 * @format
3174 */
3175// flowlint ambiguous-object-type:error
3176
3177
3178var Profiler = __webpack_require__("tNbq");
3179
3180var invariant = __webpack_require__("OUqe");
3181
3182var _require = __webpack_require__("VrDQ"),
3183    createUserError = _require.createUserError; // $FlowFixMe[untyped-import] - immutable.js is not flow-typed
3184
3185
3186var _require2 = __webpack_require__("r4ky"),
3187    ImmutableOrderedMap = _require2.OrderedMap;
3188
3189/**
3190 * An immutable representation of a corpus of documents being compiled together.
3191 * For each document, the context stores the IR and any validation errors.
3192 */
3193var CompilerContext = /*#__PURE__*/function () {
3194  // $FlowFixMe[value-as-type]
3195  function CompilerContext(schema) {
3196    this._isMutable = false;
3197    this._documents = new ImmutableOrderedMap();
3198    this._withTransform = new WeakMap();
3199    this._schema = schema;
3200  }
3201  /**
3202   * Returns the documents for the context in the order they were added.
3203   */
3204
3205
3206  var _proto = CompilerContext.prototype;
3207
3208  _proto.documents = function documents() {
3209    return this._documents.toArray();
3210  };
3211
3212  _proto.forEachDocument = function forEachDocument(fn) {
3213    this._documents.forEach(fn);
3214  };
3215
3216  _proto.replace = function replace(node) {
3217    return this._update(this._documents.update(node.name, function (existing) {
3218      !existing ?  false ? undefined : invariant(false) : void 0;
3219      return node;
3220    }));
3221  };
3222
3223  _proto.add = function add(node) {
3224    return this._update(this._documents.update(node.name, function (existing) {
3225      !!existing ?  false ? undefined : invariant(false) : void 0;
3226      return node;
3227    }));
3228  };
3229
3230  _proto.addAll = function addAll(nodes) {
3231    return this.withMutations(function (mutable) {
3232      return nodes.reduce(function (ctx, definition) {
3233        return ctx.add(definition);
3234      }, mutable);
3235    });
3236  }
3237  /**
3238   * Apply a list of compiler transforms and return a new compiler context.
3239   */
3240  ;
3241
3242  _proto.applyTransforms = function applyTransforms(transforms, reporter) {
3243    var _this = this;
3244
3245    return Profiler.run('applyTransforms', function () {
3246      return transforms.reduce(function (ctx, transform) {
3247        return ctx.applyTransform(transform, reporter);
3248      }, _this);
3249    });
3250  }
3251  /**
3252   * Applies a transform to this context, returning a new context.
3253   *
3254   * This is memoized such that applying the same sequence of transforms will
3255   * not result in duplicated work.
3256   */
3257  ;
3258
3259  _proto.applyTransform = function applyTransform(transform, reporter) {
3260    var transformed = this._withTransform.get(transform);
3261
3262    if (!transformed) {
3263      var start = process.hrtime();
3264      transformed = Profiler.instrument(transform)(this);
3265      var delta = process.hrtime(start);
3266      var deltaMs = Math.round((delta[0] * 1e9 + delta[1]) / 1e6);
3267      reporter && reporter.reportTime(transform.name, deltaMs);
3268
3269      this._withTransform.set(transform, transformed);
3270    }
3271
3272    return transformed;
3273  };
3274
3275  _proto.get = function get(name) {
3276    return this._documents.get(name);
3277  };
3278
3279  _proto.getFragment = function getFragment(name, referencedFrom) {
3280    var node = this._documents.get(name);
3281
3282    if (node == null) {
3283      throw createUserError("Cannot find fragment '".concat(name, "'."), referencedFrom != null ? [referencedFrom] : null);
3284    } else if (node.kind !== 'Fragment') {
3285      throw createUserError("Cannot find fragment '".concat(name, "', a document with this name exists ") + 'but is not a fragment.', [node.loc, referencedFrom].filter(
3285Boolean));
3286    }
3287
3288    return node;
3289  };
3290
3291  _proto.getRoot = function getRoot(name) {
3292    var node = this._documents.get(name);
3293
3294    if (node == null) {
3295      throw createUserError("Cannot find root '".concat(name, "'."));
3296    } else if (node.kind !== 'Root') {
3297      throw createUserError("Cannot find root '".concat(name, "', a document with this name exists but ") + 'is not a root.', [node.loc]);
3298    }
3299
3300    return node;
3301  };
3302
3303  _proto.remove = function remove(name) {
3304    return this._update(this._documents["delete"](name));
3305  };
3306
3307  _proto.withMutations = function withMutations(fn) {
3308    var mutableCopy = this._update(this._documents.asMutable());
3309
3310    mutableCopy._isMutable = true;
3311    var result = fn(mutableCopy);
3312    result._isMutable = false;
3313    result._documents = result._documents.asImmutable();
3314    return this._documents === result._documents ? this : result;
3315  };
3316
3317  _proto._update = function _update(documents) {
3318    var context = this._isMutable ? this : new CompilerContext(this.getSchema());
3319    context._documents = documents;
3320    return context;
3321  };
3322
3323  _proto.getSchema = function getSchema() {
3324    return this._schema;
3325  };
3326
3327  return CompilerContext;
3328}();
3329
3330module.exports = CompilerContext;
3331/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("8oxB")))
3332
3333/***/ }),
3334
3335/***/ "5lwn":
3336/***/ (function(module, __webpack_exports__, __webpack_require__) {
3337
3338"use strict";
3339__webpack_require__.r(__webpack_exports__);
3340/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLowerCase", function() { return isLowerCase; });
3341/**
3342 * Returns a boolean indicating whether the string is lower case.
3343 */
3344function isLowerCase(input) {
3345    return input.toLowerCase() === input && input.toUpperCase() !== input;
3346}
3347//# sourceMappingURL=index.js.map
3348
3349/***/ }),
3350
3351/***/ "67eP":
3352/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
3353
3354"use strict";
3355/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return coerceInputValue; });
3356/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1QEH");
3357/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rWdj");
3358/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2C6G");
3359/* harmony import */ var _jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("pv/G");
3360/* harmony import */ var _jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("zpYP");
3361/* harmony import */ var _jsutils_safeArrayFrom_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("k9pe");
3362/* harmony import */ var _jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("T95z");
3363/* harmony import */ var _jsutils_printPathArray_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("tzQD");
3364/* harmony import */ var _jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("fExb");
3365/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("dWS+");
3366/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("axIb");
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379/**
3380 * Coerces a JavaScript value given a GraphQL Input Type.
3381 */
3382function coerceInputValue(inputValue, type) {
3383  var onError = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOnError;
3384  return coerceInputValueImpl(inputValue, type, onError);
3385}
3386
3387function defaultOnError(path, invalidValue, error) {
3388  var errorPrefix = 'Invalid value ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(invalidValue);
3389
3390  if (path.length > 0) {
3391    errorPrefix += " at \"value".concat(Object(_jsutils_printPathArray_mjs__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(path), "\"");
3392  }
3393
3394  error.message = errorPrefix + ': ' + error.message;
3395  throw error;
3396}
3397
3398function coerceInputValueImpl(inputValue, type, onError, path) {
3399  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isNonNullType */ "L"])(type)) {
3400    if (inputValue != null) {
3401      return coerceInputValueImpl(inputValue, type.ofType, onError, path);
3402    }
3403
3404    onError(Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__[/* pathToArray */ "b"])(path), inputValue, new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLError */ "a"]("Expected non-nullable type \"".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type), "\" not to be null.")));
3405    return;
3406  }
3407
3408  if (inputValue == null) {
3409    // Explicitly return the value null.
3410    return null;
3411  }
3412
3413  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isListType */ "J"])(type)) {
3414    var itemType = type.ofType;
3415    var coercedList = Object(_jsutils_safeArrayFrom_mjs__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(inputValue, function (itemValue, index) {
3416      var itemPath = Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__[/* addPath */ "a"])(path, index, undefined);
3417      return coerceInputValueImpl(itemValue, itemType, onError, itemPath);
3418    });
3419
3420    if (coercedList != null) {
3421      return coercedList;
3422    } // Lists accept a non-list value as a list of one.
3423
3424
3425    return [coerceInputValueImpl(inputValue, itemType, onError, path)];
3426  }
3427
3428  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isInputObjectType */ "F"])(type)) {
3429    if (!Object(_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(inputValue)) {
3430      onError(Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__[/* pathToArray */ "b"])(path), inputValue, new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLError */ "a"]("Expected type \"".concat(type.name, "\" to be an object.")));
3431      return;
3432    }
3433
3434    var coercedValue = {};
3435    var fieldDefs = type.getFields();
3436
3437    for (var _i2 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(fieldDefs); _i2 < _objectValues2.length; _i2++) {
3438      var field = _objectValues2[_i2];
3439      var fieldValue = inputValue[field.name];
3440
3441      if (fieldValue === undefined) {
3442        if (field.defaultValue !== undefined) {
3443          coercedValue[field.name] = field.defaultValue;
3444        } else if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isNonNullType */ "L"])(field.type)) {
3445          var typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(field.type);
3446          onError(Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__[/* pathToArray */ "b"])(path), inputValue, new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLError */ "a"]("Field \"".concat(field.name, "\" of required type \"").concat(typeStr, "\" was not provided.")));
3447        }
3448
3449        continue;
3450      }
3451
3452      coercedValue[field.name] = coerceInputValueImpl(fieldValue, field.type, onError, Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__[/* addPath */ "a"])(path, field.name, type.name));
3453    } // Ensure every provided field is defined.
3454
3455
3456    for (var _i4 = 0, _Object$keys2 = Object.keys(inputValue); _i4 < _Object$keys2.length; _i4++) {
3457      var fieldName = _Object$keys2[_i4];
3458
3459      if (!fieldDefs[fieldName]) {
3460        var suggestions = Object(_jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(fieldName, Object.keys(type.getFields()));
3461        onError(Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__[/* pathToArray */ "b"])(path), inputValue, new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLError */ "a"]("Field \"".concat(fieldName, "\" is not defined by type \"").concat(type.name, "\".") + Object(_jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(suggestions)));
3462      }
3463    }
3464
3465    return coercedValue;
3466  } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
3467
3468
3469  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isLeafType */ "I"])(type)) {
3470    var parseResult; // Scalars and Enums determine if a input value is valid via parseValue(),
3471    // which can throw to indicate failure. If it throws, maintain a reference
3472    // to the original error.
3473
3474    try {
3475      parseResult = type.parseValue(inputValue);
3476    } catch (error) {
3477      if (error instanceof _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLError */ "a"]) {
3478        onError(Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__[/* pathToArray */ "b"])(path), inputValue, error);
3479      } else {
3480        onError(Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__[/* pathToArray */ "b"])(path), inputValue, new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLError */ "a"]("Expected type \"".concat(type.name, "\". ") + error.message, undefined, undefined, undefined, undefined, error));
3481      }
3482
3483      return;
3484    }
3485
3486    if (parseResult === undefined) {
3487      onError(Object(_jsutils_Path_mjs__WEBPACK_IMPORTED_MODULE_8__[/* pathToArray */ "b"])(path), inputValue, new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLError */ "a"]("Expected type \"".concat(type.name, "\".")));
3488    }
3489
3490    return parseResult;
3491  } // istanbul ignore next (Not reachable. All possible input types have been considered)
3492
3493
3494   false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(0, 'Unexpected input type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type));
3495}
3496
3497
3498/***/ }),
3499
3500/***/ "6gHg":
3501/***/ (function(module, exports, __webpack_require__) {
3502
3503"use strict";
3504
3505
3506var GetIntrinsic = __webpack_require__("AM7I");
3507
3508var $Object = GetIntrinsic('%Object%');
3509
3510var RequireObjectCoercible = __webpack_require__("oCqT");
3511
3512// https://ecma-international.org/ecma-262/6.0/#sec-toobject
3513
3514module.exports = function ToObject(value) {
3515	RequireObjectCoercible(value);
3516	return $Object(value);
3517};
3518
3519
3520/***/ }),
3521
3522/***/ "6s7a":
3523/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
3524
3525"use strict";
3526/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FragmentsOnCompositeTypesRule; });
3527/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
3528/* harmony import */ var _language_printer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dQau");
3529/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("axIb");
3530/* harmony import */ var _utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("umOc");
3531
3532
3533
3534
3535
3536/**
3537 * Fragments on composite type
3538 *
3539 * Fragments use a type condition to determine if they apply, since fragments
3540 * can only be spread into a composite type (object, interface, or union), the
3541 * type condition must also be a composite type.
3542 */
3543function FragmentsOnCompositeTypesRule(context) {
3544  return {
3545    InlineFragment: function InlineFragment(node) {
3546      var typeCondition = node.typeCondition;
3547
3548      if (typeCondition) {
3549        var type = Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_3__[/* typeFromAST */ "a"])(context.getSchema(), typeCondition);
3550
3551        if (type && !Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isCompositeType */ "D"])(type)) {
3552          var typeStr = Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_1__[/* print */ "a"])(typeCondition);
3553          context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Fragment cannot condition on non composite type \"".concat(typeStr, "\"."), typeCondition));
3554        }
3555      }
3556    },
3557    FragmentDefinition: function FragmentDefinition(node) {
3558      var type = Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_3__[/* typeFromAST */ "a"])(context.getSchema(), node.typeCondition);
3559
3560      if (type && !Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isCompositeType */ "D"])(type)) {
3561        var typeStr = Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_1__[/* print */ "a"])(node.typeCondition);
3562        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Fragment \"".concat(node.name.value, "\" cannot condition on non composite type \"").concat(typeStr, "\"."), node.typeCondition));
3563      }
3564    }
3565  };
3566}
3567
3568
3569/***/ }),
3570
3571/***/ "7alT":
3572/***/ (function(module, exports, __webpack_require__) {
3573
3574"use strict";
3575
3576
3577module.exports = function uncPathRegex() {
3578  return /^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/;
3579};
3580
3581
3582/***/ }),
3583
3584/***/ "7qPd":
3585/***/ (function(module, exports, __webpack_require__) {
3586
3587"use strict";
3588
3589
3590module.exports = Number.isNaN || function isNaN(a) {
3591	return a !== a;
3592};
3593
3594
3595/***/ }),
3596
3597/***/ "82c2":
3598/***/ (function(module, exports, __webpack_require__) {
3599
3600"use strict";
3601
3602
3603var keys = __webpack_require__("1seS");
3604var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
3605
3606var toStr = Object.prototype.toString;
3607var concat = Array.prototype.concat;
3608var origDefineProperty = Object.defineProperty;
3609
3610var isFunction = function (fn) {
3611	return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
3612};
3613
3614var arePropertyDescriptorsSupported = function () {
3615	var obj = {};
3616	try {
3617		origDefineProperty(obj, 'x', { enumerable: false, value: obj });
3618		// eslint-disable-next-line no-unused-vars, no-restricted-syntax
3619		for (var _ in obj) { // jscs:ignore disallowUnusedVariables
3620			return false;
3621		}
3622		return obj.x === obj;
3623	} catch (e) { /* this is IE 8. */
3624		return false;
3625	}
3626};
3627var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
3628
3629var defineProperty = function (object, name, value, predicate) {
3630	if (name in object && (!isFunction(predicate) || !predicate())) {
3631		return;
3632	}
3633	if (supportsDescriptors) {
3634		origDefineProperty(object, name, {
3635			configurable: true,
3636			enumerable: false,
3637			value: value,
3638			writable: true
3639		});
3640	} else {
3641		object[name] = value;
3642	}
3643};
3644
3645var defineProperties = function (object, map) {
3646	var predicates = arguments.length > 2 ? arguments[2] : {};
3647	var props = keys(map);
3648	if (hasSymbols) {
3649		props = concat.call(props, Object.getOwnPropertySymbols(map));
3650	}
3651	for (var i = 0; i < props.length; i += 1) {
3652		defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
3653	}
3654};
3655
3656defineProperties.supportsDescriptors = !!supportsDescriptors;
3657
3658module.exports = defineProperties;
3659
3660
3661/***/ }),
3662
3663/***/ "8JD9":
3664/***/ (function(module, exports, __webpack_require__) {
3665
3666"use strict";
3667
3668
3669// https://262.ecma-international.org/5.1/#sec-8
3670
3671module.exports = function Type(x) {
3672	if (x === null) {
3673		return 'Null';
3674	}
3675	if (typeof x === 'undefined') {
3676		return 'Undefined';
3677	}
3678	if (typeof x === 'function' || typeof x === 'object') {
3679		return 'Object';
3680	}
3681	if (typeof x === 'number') {
3682		return 'Number';
3683	}
3684	if (typeof x === 'boolean') {
3685		return 'Boolean';
3686	}
3687	if (typeof x === 'string') {
3688		return 'String';
3689	}
3690};
3691
3692
3693/***/ }),
3694
3695/***/ "8LIU":
3696/***/ (function(module, __webpack_exports__, __webpack_require__) {
3697
3698"use strict";
3699// ESM COMPAT FLAG
3700__webpack_require__.r(__webpack_exports__);
3701
3702// EXPORTS
3703__webpack_require__.d(__webpack_exports__, "camelCaseTransform", function() { return /* reexport */ dist_es2015["b" /* camelCaseTransform */]; });
3704__webpack_require__.d(__webpack_exports__, "camelCaseTransformMerge", function() { return /* reexport */ dist_es2015["c" /* camelCaseTransformMerge */]; });
3705__webpack_require__.d(__webpack_exports__, "camelCase", function() { return /* reexport */ dist_es2015["a" /* camelCase */]; });
3706__webpack_require__.d(__webpack_exports__, "capitalCaseTransform", function() { return /* reexport */ capitalCaseTransform; });
3707__webpack_require__.d(__webpack_exports__, "capitalCase", function() { return /* reexport */ capitalCase; });
3708__webpack_require__.d(__webpack_exports__, "constantCase", function() { return /* reexport */ constantCase; });
3709__webpack_require__.d(__webpack_exports__, "dotCase", function() { return /* reexport */ dotCase; });
3710__webpack_require__.d(__webpack_exports__, "headerCase", function() { return /* reexport */ headerCase; });
3711__webpack_require__.d(__webpack_exports__, "noCase", function() { return /* reexport */ no_case_dist_es2015["a" /* noCase */]; });
3712__webpack_require__.d(__webpack_exports__, "paramCase", function() { return /* reexport */ paramCase; });
3713__webpack_require__.d(__webpack_exports__, "pascalCaseTransform", function() { return /* reexport */ pascal_case_dist_es2015["b" /* pascalCaseTransform */]; });
3714__webpack_require__.d(__webpack_exports__, "pascalCaseTransformMerge", function() { return /* reexport */ pascal_case_dist_es2015["c" /* pascalCaseTransformMerge */]; });
3715__webpack_require__.d(__webpack_exports__, "pascalCase", function() { return /* reexport */ pascal_case_dist_es2015["a" /* pascalCase */]; });
3716__webpack_require__.d(__webpack_exports__, "pathCase", function() { return /* reexport */ pathCase; });
3717__webpack_require__.d(__webpack_exports__, "sentenceCaseTransform", function() { return /* reexport */ sentenceCaseTransform; });
3718__webpack_require__.d(__webpack_exports__, "sentenceCase", function() { return /* reexport */ sentenceCase; });
3719__webpack_require__.d(__webpack_exports__, "snakeCase", function() { return /* reexport */ snakeCase; });
3720
3721// EXTERNAL MODULE: ./node_modules/camel-case/dist.es2015/index.js
3722var dist_es2015 = __webpack_require__("h6tn");
3723
3724// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
3725var tslib_es6 = __webpack_require__("mrSG");
3726
3727// EXTERNAL MODULE: ./node_modules/no-case/dist.es2015/index.js
3728var no_case_dist_es2015 = __webpack_require__("Hb8o");
3729
3730// EXTERNAL MODULE: ./node_modules/upper-case-first/dist.es2015/index.js
3731var upper_case_first_dist_es2015 = __webpack_require__("x3m3");
3732
3733// CONCATENATED MODULE: ./node_modules/capital-case/dist.es2015/index.js
3734
3735
3736
3737function capitalCaseTransform(input) {
3738    return Object(upper_case_first_dist_es2015["upperCaseFirst"])(input.toLowerCase());
3739}
3740function capitalCase(input, options) {
3741    if (options === void 0) { options = {}; }
3742    return Object(no_case_dist_es2015["a" /* noCase */])(input, Object(tslib_es6["a" /* __assign */])({ delimiter: " ", transform: capitalCaseTransform }, options));
3743}
3744//# sourceMappingURL=index.js.map
3745// EXTERNAL MODULE: ./node_modules/upper-case/dist.es2015/index.js
3746var upper_case_dist_es2015 = __webpack_require__("9bHt");
3747
3748// CONCATENATED MODULE: ./node_modules/constant-case/dist.es2015/index.js
3749
3750
3751
3752function constantCase(input, options) {
3753    if (options === void 0) { options = {}; }
3754    return Object(no_case_dist_es2015["a" /* noCase */])(input, Object(tslib_es6["a" /* __assign */])({ delimiter: "_", transform: upper_case_dist_es2015["upperCase"] }, options));
3755}
3756//# sourceMappingURL=index.js.map
3757// CONCATENATED MODULE: ./node_modules/dot-case/dist.es2015/index.js
3758
3759
3760function dotCase(input, options) {
3761    if (options === void 0) { options = {}; }
3762    return Object(no_case_dist_es2015["a" /* noCase */])(input, Object(tslib_es6["a" /* __assign */])({ delimiter: "." }, options));
3763}
3764//# sourceMappingURL=index.js.map
3765// CONCATENATED MODULE: ./node_modules/header-case/dist.es2015/index.js
3766
3767
3768function headerCase(input, options) {
3769    if (options === void 0) { options = {}; }
3770    return capitalCase(input, Object(tslib_es6["a" /* __assign */])({ delimiter: "-" }, options));
3771}
3772//# sourceMappingURL=index.js.map
3773// CONCATENATED MODULE: ./node_modules/change-case/node_modules/param-case/dist.es2015/index.js
3774
3775
3776function paramCase(input, options) {
3777    if (options === void 0) { options = {}; }
3778    return dotCase(input, Object(tslib_es6["a" /* __assign */])({ delimiter: "-" }, options));
3779}
3780//# sourceMappingURL=index.js.map
3781// EXTERNAL MODULE: ./node_modules/pascal-case/dist.es2015/index.js
3782var pascal_case_dist_es2015 = __webpack_require__("YAvM");
3783
3784// CONCATENATED MODULE: ./node_modules/path-case/dist.es2015/index.js
3785
3786
3787function pathCase(input, options) {
3788    if (options === void 0) { options = {}; }
3789    return dotCase(input, Object(tslib_es6["a" /* __assign */])({ delimiter: "/" }, options));
3790}
3791//# sourceMappingURL=index.js.map
3792// CONCATENATED MODULE: ./node_modules/sentence-case/dist.es2015/index.js
3793
3794
3795
3796function sentenceCaseTransform(input, index) {
3797    var result = input.toLowerCase();
3798    if (index === 0)
3799        return Object(upper_case_first_dist_es2015["upperCaseFirst"])(result);
3800    return result;
3801}
3802function sentenceCase(input, options) {
3803    if (options === void 0) { options = {}; }
3804    return Object(no_case_dist_es2015["a" /* noCase */])(input, Object(tslib_es6["a" /* __assign */])({ delimiter: " ", transform: sentenceCaseTransform }, options));
3805}
3806//# sourceMappingURL=index.js.map
3807// CONCATENATED MODULE: ./node_modules/snake-case/dist.es2015/index.js
3808
3809
3810function snakeCase(input, options) {
3811    if (options === void 0) { options = {}; }
3812    return dotCase(input, Object(tslib_es6["a" /* __assign */])({ delimiter: "_" }, options));
3813}
3814//# sourceMappingURL=index.js.map
3815// CONCATENATED MODULE: ./node_modules/change-case/dist.es2015/index.js
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827//# sourceMappingURL=index.js.map
3828
3829/***/ }),
3830
3831/***/ "8cd+":
3832/***/ (function(module, exports, __webpack_require__) {
3833
3834"use strict";
3835
3836
3837// http://262.ecma-international.org/5.1/#sec-9.2
3838
3839module.exports = function ToBoolean(value) { return !!value; };
3840
3841
3842/***/ }),
3843
3844/***/ "8lxt":
3845/***/ (function(module, exports, __webpack_require__) {
3846
3847"use strict";
3848
3849
3850var GetIntrinsic = __webpack_require__("AM7I");
3851
3852var $match = GetIntrinsic('%Symbol.match%', true);
3853
3854var hasRegExpMatcher = __webpack_require__("AwSO");
3855
3856var ToBoolean = __webpack_require__("8cd+");
3857
3858// https://ecma-international.org/ecma-262/6.0/#sec-isregexp
3859
3860module.exports = function IsRegExp(argument) {
3861	if (!argument || typeof argument !== 'object') {
3862		return false;
3863	}
3864	if ($match) {
3865		var isRegExp = argument[$match];
3866		if (typeof isRegExp !== 'undefined') {
3867			return ToBoolean(isRegExp);
3868		}
3869	}
3870	return hasRegExpMatcher(argument);
3871};
3872
3873
3874/***/ }),
3875
3876/***/ "8ocz":
3877/***/ (function(module, exports, __webpack_require__) {
3878
3879/* WEBPACK VAR INJECTION */(function(process) {var isWin = process.platform === 'win32';
3880
3881module.exports = function (str) {
3882	var i = str.length - 1;
3883	if (i < 2) {
3884		return str;
3885	}
3886	while (isSeparator(str, i)) {
3887		i--;
3888	}
3889	return str.substr(0, i + 1);
3890};
3891
3892function isSeparator(str, i) {
3893	var char = str[i];
3894	return i > 0 && (char === '/' || (isWin && char === '\\'));
3895}
3896
3897/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("8oxB")))
3898
3899/***/ }),
3900
3901/***/ "8oxB":
3902/***/ (function(module, exports) {
3903
3904// shim for using process in browser
3905var process = module.exports = {};
3906
3907// cached from whatever global is present so that test runners that stub it
3908// don't break things.  But we need to wrap it in a try catch in case it is
3909// wrapped in strict mode code which doesn't define any globals.  It's inside a
3910// function because try/catches deoptimize in certain engines.
3911
3912var cachedSetTimeout;
3913var cachedClearTimeout;
3914
3915function defaultSetTimout() {
3916    throw new Error('setTimeout has not been defined');
3917}
3918function defaultClearTimeout () {
3919    throw new Error('clearTimeout has not been defined');
3920}
3921(function () {
3922    try {
3923        if (typeof setTimeout === 'function') {
3924            cachedSetTimeout = setTimeout;
3925        } else {
3926            cachedSetTimeout = defaultSetTimout;
3927        }
3928    } catch (e) {
3929        cachedSetTimeout = defaultSetTimout;
3930    }
3931    try {
3932        if (typeof clearTimeout === 'function') {
3933            cachedClearTimeout = clearTimeout;
3934        } else {
3935            cachedClearTimeout = defaultClearTimeout;
3936        }
3937    } catch (e) {
3938        cachedClearTimeout = defaultClearTimeout;
3939    }
3940} ())
3941function runTimeout(fun) {
3942    if (cachedSetTimeout === setTimeout) {
3943        //normal enviroments in sane situations
3944        return setTimeout(fun, 0);
3945    }
3946    // if setTimeout wasn't available but was latter defined
3947    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
3948        cachedSetTimeout = setTimeout;
3949        return setTimeout(fun, 0);
3950    }
3951    try {
3952        // when when somebody has screwed with setTimeout but no I.E. maddness
3953        return cachedSetTimeout(fun, 0);
3954    } catch(e){
3955        try {
3956            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
3957            return cachedSetTimeout.call(null, fun, 0);
3958        } catch(e){
3959            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
3960            return cachedSetTimeout.call(this, fun, 0);
3961        }
3962    }
3963
3964
3965}
3966function runClearTimeout(marker) {
3967    if (cachedClearTimeout === clearTimeout) {
3968        //normal enviroments in sane situations
3969        return clearTimeout(marker);
3970    }
3971    // if clearTimeout wasn't available but was latter defined
3972    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
3973        cachedClearTimeout = clearTimeout;
3974        return clearTimeout(marker);
3975    }
3976    try {
3977        // when when somebody has screwed with setTimeout but no I.E. maddness
3978        return cachedClearTimeout(marker);
3979    } catch (e){
3980        try {
3981            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
3982            return cachedClearTimeout.call(null, marker);
3983        } catch (e){
3984            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
3985            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
3986            return cachedClearTimeout.call(this, marker);
3987        }
3988    }
3989
3990
3991
3992}
3993var queue = [];
3994var draining = false;
3995var currentQueue;
3996var queueIndex = -1;
3997
3998function cleanUpNextTick() {
3999    if (!draining || !currentQueue) {
4000        return;
4001    }
4002    draining = false;
vendor: 4,393 bytes, lines 4003-4140
4003    if (currentQueue.length) {
4004        queue = currentQueue.concat(queue);
4005    } else {
4006        queueIndex = -1;
4007    }
4008    if (queue.length) {
4009        drainQueue();
4010    }
4011}
4012
4013function drainQueue() {
4014    if (draining) {
4015        return;
4016    }
4017    var timeout = runTimeout(cleanUpNextTick);
4018    draining = true;
4019
4020    var len = queue.length;
4021    while(len) {
4022        currentQueue = queue;
4023        queue = [];
4024        while (++queueIndex < len) {
4025            if (currentQueue) {
4026                currentQueue[queueIndex].run();
4027            }
4028        }
4029        queueIndex = -1;
4030        len = queue.length;
4031    }
4032    currentQueue = null;
4033    draining = false;
4034    runClearTimeout(timeout);
4035}
4036
4037process.nextTick = function (fun) {
4038    var args = new Array(arguments.length - 1);
4039    if (arguments.length > 1) {
4040        for (var i = 1; i < arguments.length; i++) {
4041            args[i - 1] = arguments[i];
4042        }
4043    }
4044    queue.push(new Item(fun, args));
4045    if (queue.length === 1 && !draining) {
4046        runTimeout(drainQueue);
4047    }
4048};
4049
4050// v8 likes predictible objects
4051function Item(fun, array) {
4052    this.fun = fun;
4053    this.array = array;
4054}
4055Item.prototype.run = function () {
4056    this.fun.apply(null, this.array);
4057};
4058process.title = 'browser';
4059process.browser = true;
4060process.env = {};
4061process.argv = [];
4062process.version = ''; // empty string to avoid regexp issues
4063process.versions = {};
4064
4065function noop() {}
4066
4067process.on = noop;
4068process.addListener = noop;
4069process.once = noop;
4070process.off = noop;
4071process.removeListener = noop;
4072process.removeAllListeners = noop;
4073process.emit = noop;
4074process.prependListener = noop;
4075process.prependOnceListener = noop;
4076
4077process.listeners = function (name) { return [] }
4078
4079process.binding = function (name) {
4080    throw new Error('process.binding is not supported');
4081};
4082
4083process.cwd = function () { return '/' };
4084process.chdir = function (dir) {
4085    throw new Error('process.chdir is not supported');
4086};
4087process.umask = function() { return 0; };
4088
4089
4090/***/ }),
4091
4092/***/ "93gR":
4093/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
4094
4095"use strict";
4096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return validateSchema; });
4097/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return assertValidSchema; });
4098/* harmony import */ var _polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1/U3");
4099/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("1QEH");
4100/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rWdj");
4101/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("dWS+");
4102/* harmony import */ var _error_locatedError_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("jI7m");
4103/* harmony import */ var _utilities_assertValidName_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("5PMP");
4104/* harmony import */ var _utilities_typeComparators_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("sJV+");
4105/* harmony import */ var _schema_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("51nL");
4106/* harmony import */ var _introspection_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("LViu");
4107/* harmony import */ var _directives_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("4suF");
4108/* harmony import */ var _definition_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("axIb");
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120/**
4121 * Implements the "Type Validation" sub-sections of the specification's
4122 * "Type System" section.
4123 *
4124 * Validation runs synchronously, returning an array of encountered errors, or
4125 * an empty array if no errors were encountered and the Schema is valid.
4126 */
4127
4128function validateSchema(schema) {
4129  // First check to ensure the provided value is in fact a GraphQLSchema.
4130  Object(_schema_mjs__WEBPACK_IMPORTED_MODULE_7__[/* assertSchema */ "b"])(schema); // If this Schema has already been validated, return the previous results.
4131
4132  if (schema.__validationErrors) {
4133    return schema.__validationErrors;
4134  } // Validate the schema, producing a list of errors.
4135
4136
4137  var context = new SchemaValidationContext(schema);
4138  validateRootTypes(context);
4139  validateDirectives(context);
4140  validateTypes(context); // Persist the results of validation before returning to ensure val
4140idation
4141  // does not run multiple times for this schema.
4142
4143  var errors = context.getErrors();
4144  schema.__validationErrors = errors;
4145  return errors;
4146}
4147/**
4148 * Utility function which asserts a schema is valid by throwing an error if
4149 * it is invalid.
4150 */
4151
4152function assertValidSchema(schema) {
4153  var errors = validateSchema(schema);
4154
4155  if (errors.length !== 0) {
4156    throw new Error(errors.map(function (error) {
4157      return error.message;
4158    }).join('\n\n'));
4159  }
4160}
4161
4162var SchemaValidationContext = /*#__PURE__*/function () {
4163  function SchemaValidationContext(schema) {
4164    this._errors = [];
4165    this.schema = schema;
4166  }
4167
4168  var _proto = SchemaValidationContext.prototype;
4169
4170  _proto.reportError = function reportError(message, nodes) {
4171    var _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes;
4172
4173    this.addError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_3__[/* GraphQLError */ "a"](message, _nodes));
4174  };
4175
4176  _proto.addError = function addError(error) {
4177    this._errors.push(error);
4178  };
4179
4180  _proto.getErrors = function getErrors() {
4181    return this._errors;
4182  };
4183
4184  return SchemaValidationContext;
4185}();
4186
4187function validateRootTypes(context) {
4188  var schema = context.schema;
4189  var queryType = schema.getQueryType();
4190
4191  if (!queryType) {
4192    context.reportError('Query root type must be provided.', schema.astNode);
4193  } else if (!Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isObjectType */ "N"])(queryType)) {
4194    var _getOperationTypeNode;
4195
4196    context.reportError("Query root type must be Object type, it cannot be ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(queryType), "."), (_getOperationTypeNode = getOperationTypeNode(schema, 'query')) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode);
4197  }
4198
4199  var mutationType = schema.getMutationType();
4200
4201  if (mutationType && !Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isObjectType */ "N"])(mutationType)) {
4202    var _getOperationTypeNode2;
4203
4204    context.reportError('Mutation root type must be Object type if provided, it cannot be ' + "".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(mutationType), "."), (_getOperationTypeNode2 = getOperationTypeNode(schema, 'mutation')) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode);
4205  }
4206
4207  var subscriptionType = schema.getSubscriptionType();
4208
4209  if (subscriptionType && !Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isObjectType */ "N"])(subscriptionType)) {
4210    var _getOperationTypeNode3;
4211
4212    context.reportError('Subscription root type must be Object type if provided, it cannot be ' + "".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(subscriptionType), "."), (_getOperationTypeNode3 = getOperationTypeNode(schema, 'subscription')) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode);
4213  }
4214}
4215
4216function getOperationTypeNode(schema, operation) {
4217  var operationNodes = getAllSubNodes(schema, function (node) {
4218    return node.operationTypes;
4219  });
4220
4221  for (var _i2 = 0; _i2 < operationNodes.length; _i2++) {
4222    var node = operationNodes[_i2];
4223
4224    if (node.operation === operation) {
4225      return node.type;
4226    }
4227  }
4228
4229  return undefined;
4230}
4231
4232function validateDirectives(context) {
4233  for (var _i4 = 0, _context$schema$getDi2 = context.schema.getDirectives(); _i4 < _context$schema$getDi2.length; _i4++) {
4234    var directive = _context$schema$getDi2[_i4];
4235
4236    // Ensure all directives are in fact GraphQL directives.
4237    if (!Object(_directives_mjs__WEBPACK_IMPORTED_MODULE_9__[/* isDirective */ "h"])(directive)) {
4238      context.reportError("Expected directive but got: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(directive), "."), directive === null || directive === void 0 ? void 0 : directive.astNode);
4239      continue;
4240    } // Ensure they are named correctly.
4241
4242
4243    validateName(context, directive); // TODO: Ensure proper locations.
4244    // Ensure the arguments are valid.
4245
4246    for (var _i6 = 0, _directive$args2 = directive.args; _i6 < _directive$args2.length; _i6++) {
4247      var arg = _directive$args2[_i6];
4248      // Ensure they are named correctly.
4249      validateName(context, arg); // Ensure the type is an input type.
4250
4251      if (!Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isInputType */ "G"])(arg.type)) {
4252        context.reportError("The type of @".concat(directive.name, "(").concat(arg.name, ":) must be Input Type ") + "but got: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(arg.type), "."), arg.astNode);
4253      }
4254
4255      if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isRequiredArgument */ "P"])(arg) && arg.deprecationReason != null) {
4256        var _arg$astNode;
4257
4258        context.reportError("Required argument @".concat(directive.name, "(").concat(arg.name, ":) cannot be deprecated."), [getDeprecatedDirectiveNode(arg.astNode), // istanbul ignore next (TODO need to write coverage tests)
4259        (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type]);
4260      }
4261    }
4262  }
4263}
4264
4265function validateName(context, node) {
4266  // Ensure names are valid, however introspection types opt out.
4267  var error = Object(_utilities_assertValidName_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isValidNameError */ "b"])(node.name);
4268
4269  if (error) {
4270    context.addError(Object(_error_locatedError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* locatedError */ "a"])(error, node.astNode));
4271  }
4272}
4273
4274function validateTypes(context) {
4275  var validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context);
4276  var typeMap = context.schema.getTypeMap();
4277
4278  for (var _i8 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(typeMap); _i8 < _objectValues2.length; _i8++) {
4279    var type = _objectValues2[_i8];
4280
4281    // Ensure all provided types are in fact GraphQL type.
4282    if (!Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isNamedType */ "K"])(type)) {
4283      context.reportError("Expected GraphQL named type but got: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type), "."), type.astNode);
4284      continue;
4285    } // Ensure it is named correctly (excluding introspection types).
4286
4287
4288    if (!Object(_introspection_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isIntrospectionType */ "n"])(type)) {
4289      validateName(context, type);
4290    }
4291
4292    if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isObjectType */ "N"])(type)) {
4293      // Ensure fields are valid
4294      validateFields(context, type); // Ensure objects implement the interfaces they claim to.
4295
4296      validateInterfaces(context, type);
4297    } else if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isInterfaceType */ "H"])(type)) {
4298      // Ensure fields are valid.
4299      validateFields(context, type); // Ensure interfaces implement the interfaces they claim to.
4300
4301      validateInterfaces(context, type);
4302    } else if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isUnionType */ "T"])(type)) {
4303      // Ensure Unions include valid member types.
4304      validateUnionMembers(context, type);
4305    } else if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isEnumType */ "E"])(type)) {
4306      // Ensure Enums have valid values.
4307      validateEnumValues(context, type);
4308    } else if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isInputObjectType */ "F"])(type)) {
4309      // Ensure Input Object fields are valid.
4310      validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references
4311
4312      validateInputObjectCircularRefs(type);
4313    }
4314  }
4315}
4316
4317function validateFields(context, type) {
4318  var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type.getFields()); // Objects and Interfaces both must define one or more fields.
4319
4320  if (fields.length === 0) {
4321    context.reportError("Type ".concat(type.name, " must define one or more fields."), getAllNodes(type));
4322  }
4323
4324  for (var _i10 = 0; _i10 < fields.length; _i10++) {
4325    var field = fields[_i10];
4326    // Ensure they are named correctly.
4327    validateName(context, field); // Ensure the type is an output type
4328
4329    if (!Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isOutputType */ "O"])(field.type)) {
4330      var _field$astNode;
4331
4332      context.reportError("The type of ".concat(type.name, ".").concat(field.name, " must be Output Type ") + "but got: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(field.type), "."), (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type);
4333    } // Ensure the arguments are valid
4334
4335
4336    for (var _i12 = 0, _field$args2 = field.args; _i12 < _field$args2.length; _i12++) {
4337      var arg = _field$args2[_i12];
4338      var argName = arg.name; // Ensure they are named correctly.
4339
4340      validateName(context, arg); // Ensure the type is an input type
4341
4342      if (!Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isInputType */ "G"])(arg.type)) {
4343        var _arg$astNode2;
4344
4345        context.reportError("The type of ".concat(type.name, ".").concat(field.name, "(").concat(argName, ":) must be Input ") + "Type but got: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(arg.type), "."), (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type);
4346      }
4347
4348      if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isRequiredArgument */ "P"])(arg) && arg.deprecationReason != null) {
4349        var _arg$astNode3;
4350
4351        context.reportError("Required argument ".concat(type.name, ".").concat(field.name, "(").concat(argName, ":) cannot be deprecated."), [getDeprecatedDirectiveNode(arg.astNode), // istanbul ignore next (TODO need to write coverage tests)
4352        (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type]);
4353      }
4354    }
4355  }
4356}
4357
4358function validateInterfaces(context, type) {
4359  var ifaceTypeNames = Object.create(null);
4360
4361  for (var _i14 = 0, _type$getInterfaces2 = type.getInterfaces(); _i14 < _type$getInterfaces2.length; _i14++) {
4362    var iface = _type$getInterfaces2[_i14];
4363
4364    if (!Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isInterfaceType */ "H"])(iface)) {
4365      context.reportError("Type ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type), " must only implement Interface types, ") + "it cannot implement ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(iface), "."), getAllImplementsInterfaceNodes(type, iface));
4366      continue;
4367    }
4368
4369    if (type === iface) {
4370      context.reportError("Type ".concat(type.name, " cannot implement itself because it would create a circular reference."), getAllImplementsInterfaceNodes(type, iface));
4371      continue;
4372    }
4373
4374    if (ifaceTypeNames[iface.name]) {
4375      context.reportError("Type ".concat(type.name, " can only implement ").concat(iface.name, " once."), getAllImplementsInterfaceNodes(type, iface));
4376      continue;
4377    }
4378
4379    ifaceTypeNames[iface.name] = true;
4380    validateTypeImplementsAncestors(context, type, iface);
4381    validateTypeImplementsInterface(context, type, iface);
4382  }
4383}
4384
4385function validateTypeImplementsInterface(context, type, iface) {
4386  var typeFieldMap = type.getFields(); // Assert each interface field is implemented.
4387
4388  for (var _i16 = 0, _objectValues4 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(iface.getFields()); _i16 < _objectValues4.length; _i16++) {
4389    var ifaceField = _objectValues4[_i16];
4390    var fieldName = ifaceField.name;
4391    var typeField = typeFieldMap[fieldName]; // Assert interface field exists on type.
4392
4393    if (!typeField) {
4394      context.reportError("Interface field ".concat(iface.name, ".").concat(fieldName, " expected but ").concat(type.name, " does not provide it."), [ifaceField.astNode].concat(getAllNodes(type)));
4395      continue;
4396    } // Assert interface field type is satisfied by type field type, by being
4397    // a valid subtype. (covariant)
4398
4399
4400    if (!Object(_utilities_typeComparators_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isTypeSubTypeOf */ "c"])(context.schema, typeField.type, ifaceField.type)) {
4401      var _ifaceField$astNode, _typeField$astNode;
4402
4403      context.reportError("Interface field ".concat(iface.name, ".").concat(fieldName, " expects type ") + "".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ifaceField.type), " but ").concat(type.name, ".").concat(fieldName, " ") + "is type ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(typeField.type), "."), [// istanbul ignore next (TODO need to write coverage tests)
4404      (_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, // istanbul ignore next (TODO need to write coverage tests)
4405      (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type]);
4406    } // Assert each interface field arg is implemented.
4407
4408
4409    var _loop = function _loop(_i18, _ifaceField$args2) {
4410      var ifaceArg = _ifaceField$args2[_i18];
4411      var argName = ifaceArg.name;
4412      var typeArg = Object(_polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(typeField.args, function (arg) {
4413        return arg.name === argName;
4414      }); // Assert interface field arg exists on object field.
4415
4416      if (!typeArg) {
4417        context.reportError("Interface field argument ".concat(iface.name, ".").concat(fieldName, "(").concat(argName, ":) expected but ").concat(type.name, ".").concat(fieldName, " does not provide it."), [ifaceArg.astNode, typeField.astNode]);
4418        return "continue";
4419      } // Assert interface field arg type matches object field arg type.
4420      // (invariant)
4421      // TODO: change to contravariant?
4422
4423
4424      if (!Object(_utilities_typeComparators_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isEqualType */ "b"])(ifaceArg.type, typeArg.type)) {
4425        var _ifaceArg$astNode, _typeArg$astNode;
4426
4427        context.reportError("Interface field argument ".concat(iface.name, ".").concat(fieldName, "(").concat(argName, ":) ") + "expects type ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(ifaceArg.type), " but ") + "".concat(type.name, ".").concat(fieldName, "(").concat(argName, ":) is type ") + "".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(typeArg.type), "."), [// istanbul ignore next (TODO need to write coverage tests)
4428        (_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, // istanbul ignore next (TODO need to write coverage tests)
4429        (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type]);
4430      } // TODO: validate default values?
4431
4432    };
4433
4434    for (var _i18 = 0, _ifaceField$args2 = ifaceField.args; _i18 < _ifaceField$args2.length; _i18++) {
4435      var _ret = _loop(_i18, _ifaceField$args2);
4436
4437      if (_ret === "continue") continue;
4438    } // Assert additional arguments must not be required.
4439
4440
4441    var _loop2 = function _loop2(_i20, _typeField$args2) {
4442      var typeArg = _typeField$args2[_i20];
4443      var argName = typeArg.name;
4444      var ifaceArg = Object(_polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(ifaceField.args, function (arg) {
4445        return arg.name === argName;
4446      });
4447
4448      if (!ifaceArg && Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isRequiredArgument */ "P"])(typeArg)) {
4449        context.reportError("Object field ".concat(type.name, ".").concat(fieldName, " includes required argument ").concat(argName, " that is missing from the Interface field ").concat(iface.name, ".").concat(fieldName, "."), [typeArg.astNode, ifaceField.astNode]);
4450      }
4451    };
4452
4453    for (var _i20 = 0, _typeField$args2 = typeField.args; _i20 < _typeField$args2.length; _i20++) {
4454      _loop2(_i20, _typeField$args2);
4455    }
4456  }
4457}
4458
4459function validateTypeImplementsAncestors(context, type, iface) {
4460  var ifaceInterfaces = type.getInterfaces();
4461
4462  for (var _i22 = 0, _iface$getInterfaces2 = iface.getInterfaces(); _i22 < _iface$getInterfaces2.length; _i22++) {
4463    var transitive = _iface$getInterfaces2[_i22];
4464
4465    if (ifaceInterfaces.indexOf(transitive) === -1) {
4466      context.reportError(transitive === type ? "Type ".concat(type.name, " cannot implement ").concat(iface.name, " because it would create a circular reference.") : "Type ".concat(type.name, " must implement ").concat(transitive.name, " because it is implemented by ").concat(iface.name, "."), [].concat(getAllImplementsInterfaceNodes(iface, transitive), getAllImplementsInterfaceNodes(type, iface)));
4467    }
4468  }
4469}
4470
4471function validateUnionMembers(context, union) {
4472  var memberTypes = union.getTypes();
4473
4474  if (memberTypes.length === 0) {
4475    context.reportError("Union type ".concat(union.name, " must define one or more member types."), getAllNodes(union));
4476  }
4477
4478  var includedTypeNames = Object.create(null);
4479
4480  for (var _i24 = 0; _i24 < memberTypes.length; _i24++) {
4481    var memberType = memberTypes[_i24];
4482
4483    if (includedTypeNames[memberType.name]) {
4484      context.reportError("Union type ".concat(union.name, " can only include type ").concat(memberType.name, " once."), getUnionMemberTypeNodes(union, memberType.name));
4485      continue;
4486    }
4487
4488    includedTypeNames[memberType.name] = true;
4489
4490    if (!Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isObjectType */ "N"])(memberType)) {
4491      context.reportError("Union type ".concat(union.name, " can only include Object types, ") + "it cannot include ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(memberType), "."), getUnionMemberTypeNodes(union, String(memberType)));
4492    }
4493  }
4494}
4495
4496function validateEnumValues(context, enumType) {
4497  var enumValues = enumType.getValues();
4498
4499  if (enumValues.length === 0) {
4500    context.reportError("Enum type ".concat(enumType.name, " must define one or more values."), getAllNodes(enumType));
4501  }
4502
4503  for (var _i26 = 0; _i26 < enumValues.length; _i26++) {
4504    var enumValue = enumValues[_i26];
4505    var valueName = enumValue.name; // Ensure valid name.
4506
4507    validateName(context, enumValue);
4508
4509    if (valueName === 'true' || valueName === 'false' || valueName === 'null') {
4510      context.reportError("Enum type ".concat(enumType.name, " cannot include value: ").concat(valueName, "."), enumValue.astNode);
4511    }
4512  }
4513}
4514
4515function validateInputFields(context, inputObj) {
4516  var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(inputObj.getFields());
4517
4518  if (fields.length === 0) {
4519    context.reportError("Input Object type ".concat(inputObj.name, " must define one or more fields."), getAllNodes(inputObj));
4520  } // Ensure the arguments are valid
4521
4522
4523  for (var _i28 = 0; _i28 < fields.length; _i28++) {
4524    var field = fields[_i28];
4525    // Ensure they are named correctly.
4526    validateName(context, field); // Ensure the type is an input type
4527
4528    if (!Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isInputType */ "G"])(field.type)) {
4529      var _field$astNode2;
4530
4531      context.reportError("The type of ".concat(inputObj.name, ".").concat(field.name, " must be Input Type ") + "but got: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(field.type), "."), (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type);
4532    }
4533
4534    if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isRequiredInputField */ "Q"])(field) && field.deprecationReason != null) {
4535      var _field$astNode3;
4536
4537      context.reportError("Required input field ".concat(inputObj.name, ".").concat(field.name, " cannot be deprecated."), [getDeprecatedDirectiveNode(field.astNode), // istanbul ignore next (TODO need to write coverage tests)
4538      (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type]);
4539    }
4540  }
4541}
4542
4543function createInputObjectCircularRefsValidator(context) {
4544  // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'.
4545  // Tracks already visited types to maintain O(N) and to ensure that cycles
4546  // are not redundantly reported.
4547  var visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors
4548
4549  var fieldPath = []; // Position in the type path
4550
4551  var fieldPathIndexByTypeName = Object.create(null);
4552  return detectCycleRecursive; // This does a straight-forward DFS to find cycles.
4553  // It does not terminate when a cycle was found but continues to explore
4554  // the graph to find all possible cycles.
4555
4556  function detectCycleRecursive(inputObj) {
4557    if (visitedTypes[inputObj.name]) {
4558      return;
4559    }
4560
4561    visitedTypes[inputObj.name] = true;
4562    fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;
4563    var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(inputObj.getFields());
4564
4565    for (var _i30 = 0; _i30 < fields.length; _i30++) {
4566      var field = fields[_i30];
4567
4568      if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isNonNullType */ "L"])(field.type) && Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isInputObjectType */ "F"])(field.type.ofType)) {
4569        var fieldType = field.type.ofType;
4570        var cycleIndex = fieldPathIndexByTypeName[fieldType.name];
4571        fieldPath.push(field);
4572
4573        if (cycleIndex === undefined) {
4574          detectCycleRecursive(fieldType);
4575        } else {
4576          var cyclePath = fieldPath.slice(cycleIndex);
4577          var pathStr = cyclePath.map(function (fieldObj) {
4578            return fieldObj.name;
4579          }).join('.');
4580          context.reportError("Cannot reference Input Object \"".concat(fieldType.name, "\" within itself through a series of non-null fields: \"").concat(pathStr, "\"."), cyclePath.map(function (fieldObj) {
4581            return fieldObj.astNode;
4582          }));
4583        }
4584
4585        fieldPath.pop();
4586      }
4587    }
4588
4589    fieldPathIndexByTypeName[inputObj.name] = undefined;
4590  }
4591}
4592
4593function getAllNodes(object) {
4594  var astNode = object.astNode,
4595      extensionASTNodes = object.extensionASTNodes;
4596  return astNode ? extensionASTNodes ? [astNode].concat(extensionASTNodes) : [astNode] : extensionASTNodes !== null && extensionASTNodes !== void 0 ? extensionASTNodes : [];
4597}
4598
4599function getAllSubNodes(object, getter) {
4600  var subNodes = [];
4601
4602  for (var _i32 = 0, _getAllNodes2 = getAllNodes(object); _i32 < _getAllNodes2.length; _i32++) {
4603    var _getter;
4604
4605    var node = _getAllNodes2[_i32];
4606    // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
4607    subNodes = subNodes.concat((_getter = getter(node)) !== null && _getter !== void 0 ? _getter : []);
4608  }
4609
4610  return subNodes;
4611}
4612
4613function getAllImplementsInterfaceNodes(type, iface) {
4614  return getAllSubNodes(type, function (typeNode) {
4615    return typeNode.interfaces;
4616  }).filter(function (ifaceNode) {
4617    return ifaceNode.name.value === iface.name;
4618  });
4619}
4620
4621function getUnionMemberTypeNodes(union, typeName) {
4622  return getAllSubNodes(union, function (unionNode) {
4623    return unionNode.types;
4624  }).filter(function (typeNode) {
4625    return typeNode.name.value === typeName;
4626  });
4627}
4628
4629function getDeprecatedDirectiveNode(definitionNode) {
4630  var _definitionNode$direc;
4631
4632  // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
4633  return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find(function (node) {
4634    return node.name.value === _directives_mjs__WEBPACK_IMPORTED_MODULE_9__[/* GraphQLDeprecatedDirective */ "b"].name;
4635  });
4636}
4637
4638
4639/***/ }),
4640
4641/***/ "9PYa":
4642/***/ (function(module, exports, __webpack_require__) {
4643
4644"use strict";
4645/**
4646 * Copyright (c) Facebook, Inc. and its affiliates.
4647 *
4648 * This source code is licensed under the MIT license found in the
4649 * LICENSE file in the root directory of this source tree.
4650 *
4651 * @format
4652 * 
4653 */
4654// flowlint ambiguous-object-type:error
4655
4656
4657var _interopRequireDefault = __webpack_require__("TqRt");
4658
4659var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA"));
4660
4661function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
4662
4663function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4664
4665var IRTransformer = __webpack_require__("OHCT");
4666
4667var areEqual = __webpack_require__("Y/4B");
4668
4669var getIdentifierForSelection = __webpack_require__("EQxW");
4670
4671var _require = __webpack_require__("VrDQ"),
4672    createCompilerError = _require.createCompilerError,
4673    createUserError = _require.createUserError;
4674
4675/**
4676 * Transform that flattens inline fragments, fragment spreads, and conditionals.
4677 *
4678 * Inline fragments are inlined (replaced with their selections) when:
4679 * - The fragment type matches the type of its parent, and its `isForCodegen`,
4680 *   or if it's for printing, there is no directive on the inline fragment.
4681 */
4682function flattenTransformImpl(context, options) {
4683  var state = {
4684    isForCodegen: !!(options && options.isForCodegen),
4685    parentType: null
4686  };
4687  var visitorFn = memoizedFlattenSelection(new Map());
4688  return IRTransformer.transform(context, {
4689    Condition: visitorFn,
4690    Defer: visitorFn,
4691    Fragment: visitorFn,
4692    InlineDataFragmentSpread: visitorFn,
4693    InlineFragment: visitorFn,
4694    LinkedField: visitorFn,
4695    ModuleImport: visitorFn,
4696    Root: visitorFn,
4697    SplitOperation: visitorFn
4698  }, function () {
4699    return state;
4700  });
4701}
4702
4703function memoizedFlattenSelection(cache) {
4704  return function flattenSelectionsFn(node, state) {
4705    var context = this.getContext();
4706    var nodeCache = cache.get(node);
4707
4708    if (nodeCache == null) {
4709      nodeCache = new Map();
4710      cache.set(node, nodeCache);
4711    } // Determine the current type.
4712
4713
4714    var parentType = state.parentType;
4715    var result = nodeCache.get(parentType);
4716
4717    if (result != null) {
4718      return result;
4719    }
4720
4721    var type = node.kind === 'LinkedField' || node.kind === 'Fragment' || node.kind === 'Root' || node.kind === 'SplitOperation' ? node.type : node.kind === 'InlineFragment' ? node.typeCondition : parentType;
4722
4723    if (type == null) {
4724      throw createCompilerError('FlattenTransform: Expected a parent type.', [node.loc]);
4725    } // Flatten the selections in this node, creating a new node with flattened
4726    // selections if possible, then deeply traverse the flattened node, while
4727    // keeping track of the parent type.
4728
4729
4730    var nextSelections = new Map();
4731    var hasFlattened = flattenSelectionsInto(context.getSchema(), nextSelections, node, state, type);
4732    var flattenedNode = hasFlattened ? _objectSpread(_objectSpread({}, node), {}, {
4733      selections: Array.from(nextSelections.values())
4734    }) : node;
4735    state.parentType = type;
4736    var deeplyFlattenedNode = this.traverse(flattenedNode, state);
4737    state.parentType = parentType;
4738    nodeCache.set(parentType, deeplyFlattenedNode);
4739    return deeplyFlattenedNode;
4740  };
4741}
4742/**
4743 * @private
4744 */
4745
4746
4747function flattenSelectionsInto(schema, flattenedSelections, node, state, type) {
4748  var hasFlattened = false;
4749  node.selections.forEach(function (selection) {
4750    if (selection.kind === 'InlineFragment' && shouldFlattenInlineFragment(schema, selection, state, type)) {
4751      hasFlattened = true;
4752      flattenSelectionsInto(schema, flattenedSelections, selection, state, type);
4753      return;
4754    }
4755
4756    var nodeIdentifier = getIdentifierForSelection(schema, selection);
4757    var flattenedSelection = flattenedSelections.get(nodeIdentifier); // If this selection hasn't been seen before, keep track of it.
4758
4759    if (!flattenedSelection) {
4760      flattenedSelections.set(nodeIdentifier, selection);
4761      return;
4762    } // Otherwise a similar selection exists which should be merged.
4763
4764
4765    hasFlattened = true;
4766
4767    if (flattenedSelection.kind === 'InlineFragment') {
4768      if (selection.kind !== 'InlineFragment') {
4769        throw createCompilerError("FlattenTransform: Expected an InlineFragment, got a '".concat(selection.kind, "'"), [selection.loc]);
4770      }
4771
4772      flattenedSelections.set(nodeIdentifier, _objectSpread(_objectSpread({}, flattenedSelection), {}, {
4773        selections: mergeSelections(schema, flattenedSelection, selection, state, selection.typeCondition)
4774      }));
4775    } else if (flattenedSelection.kind === 'Condition') {
4776      if (selection.kind !== 'Condition') {
4777        throw createCompilerError("FlattenTransform: Expected a Condition, got a '".concat(selection.kind, "'"), [selection.loc]);
4778      }
4779
4780      flattenedSelections.set(nodeIdentifier, _objectSpread(_objectSpread({}, flattenedSelection), {}, {
4781        selections: mergeSelections(schema, flattenedSelection, selection, state, type)
4782      }));
4783    } else if (flattenedSelection.kind === 'ClientExtension') {
4784      if (selection.kind !== 'ClientExtension') {
4785        throw createCompilerError("FlattenTransform: Expected a ClientExtension, got a '".concat(selection.kind, "'"), [selection.loc]);
4786      }
4787
4788      flattenedSelections.set(nodeIdentifier, _objectSpread(_objectSpread({}, flattenedSelection), {}, {
4789        selections: mergeSelections(schema, flattenedSelection, selection, state, type)
4790      }));
4791    } else if (flattenedSelection.kind === 'FragmentSpread') {// Ignore duplicate fragment spreads.
4792    } else if (flattenedSelection.kind === 'ModuleImport') {
4793      if (selection.kind !== 'ModuleImport') {
4794        throw createCompilerError("FlattenTransform: Expected a ModuleImport, got a '".concat(selection.kind, "'"), [selection.loc]);
4795      }
4796
4797      if (selection.name !== flattenedSelection.name || selection.module !== flattenedSelection.module || selection.key !== flattenedSelection.key) {
4798        throw createUserError('Found conflicting @module selections: use a unique alias on the ' + 'parent fields.', [selection.loc, flattenedSelection.loc]);
4799      }
4800
4801      flattenedSelections.set(nodeIdentifier, _objectSpread(_objectSpread({}, flattenedSelection), {}, {
4802        selections: mergeSelections(schema, flattenedSelection, selection, state, type)
4803      }));
4804    } else if (flattenedSelection.kind === 'Defer') {
4805      if (selection.kind !== 'Defer') {
4806        throw createCompilerError("FlattenTransform: Expected a Defer, got a '".concat(selection.kind, "'"), [selection.loc]);
4807      }
4808
4809      flattenedSelections.set(nodeIdentifier, _objectSpread(_objectSpread({
4810        kind: 'Defer'
4811      }, flattenedSelection), {}, {
4812        selections: mergeSelections(schema, flattenedSelection, selection, state, type)
4813      }));
4814    } else if (flattenedSelection.kind === 'Stream') {
4815      if (selection.kind !== 'Stream') {
4816        throw createCompilerError("FlattenTransform: Expected a Stream, got a '".concat(selection.kind, "'"), [selection.loc]);
4817      }
4818
4819      flattenedSelections.set(nodeIdentifier, _objectSpread(_objectSpread({
4820        kind: 'Stream'
4821      }, flattenedSelection), {}, {
4822        selections: mergeSelections(schema, flattenedSelection, selection, state, type)
4823      }));
4824    } else if (flattenedSelection.kind === 'LinkedField') {
4825      if (selection.kind !== 'LinkedField') {
4826        throw createCompilerError("FlattenTransform: Expected a LinkedField, got a '".concat(selection.kind, "'"), [selection.loc]);
4827      }
4828
4829      assertUniqueArgsForAlias(selection, flattenedSelection); // NOTE: not using object spread here as this code is pretty hot
4830
4831      flattenedSelections.set(nodeIdentifier, {
4832        kind: 'LinkedField',
4833        alias: flattenedSelection.alias,
4834        args: flattenedSelection.args,
4835        connection: flattenedSelection.connection || selection.connection,
4836        directives: flattenedSelection.directives,
4837        handles: mergeHandles(flattenedSelection, selection),
4838        loc: flattenedSelection.loc,
4839        metadata: flattenedSelection.metadata,
4840        name: flattenedSelection.name,
4841        selections: mergeSelections(schema, flattenedSelection, selection, state, selection.type),
4842        type: flattenedSelection.type
4843      });
4844    } else if (flattenedSelection.kind === 'ScalarField') {
4845      if (selection.kind !== 'ScalarField') {
4846        throw createCompilerError("FlattenTransform: Expected a ScalarField, got a '".concat(selection.kind, "'"), [selection.loc]);
4847      }
4848
4849      assertUniqueArgsForAlias(selection, flattenedSelection);
4850
4851      if (selection.handles && selection.handles.length > 0) {
4852        flattenedSelections.set(nodeIdentifier, _objectSpread(_objectSpread({
4853          kind: 'ScalarField'
4854        }, flattenedSelection), {}, {
4855          handles: mergeHandles(selection, flattenedSelection)
4856        }));
4857      }
4858    } else if (flattenedSelection.kind === 'InlineDataFragmentSpread') {
4859      throw createCompilerError('FlattenTransform: did not expect an InlineDataFragmentSpread node. ' + 'Only expecting InlineDataFragmentSpread in reader ASTs and this ' + 'transform to run only on normalization ASTs.', [selection.loc]);
4860    } else {
4861      flattenedSelection.kind;
4862      throw createCompilerError("FlattenTransform: Unknown kind '".concat(flattenedSelection.kind, "'"));
4863    }
4864  });
4865  return hasFlattened;
4866}
4867/**
4868 * @private
4869 */
4870
4871
4872function mergeSelections(schema, nodeA, nodeB, state, type) {
4873  var flattenedSelections = new Map();
4874  flattenSelectionsInto(schema, flattenedSelections, nodeA, state, type);
4875  flattenSelectionsInto(schema, flattenedSelections, nodeB, state, type);
4876  return Array.from(flattenedSelections.values());
4877}
4878/**
4879 * @private
4880 * TODO(T19327202) This is redundant with OverlappingFieldsCanBeMergedRule once
4881 * it can be enabled.
4882 */
4883
4884
4885function assertUniqueArgsForAlias(field, otherField) {
4886  if (!areEqualFields(field, otherField)) {
4887    throw createUserError('Expected all fields on the same parent with the name or alias ' + "'".concat(field.alias, "' to have the same name and arguments."), [field.loc, otherField.loc]);
4888  }
4889}
4890/**
4891 * @private
4892 */
4893
4894
4895function shouldFlattenInlineFragment(schema, fragment, state, type) {
4896  return schema.areEqualTypes(fragment.typeCondition, schema.getRawType(type)) && (state.isForCodegen || fragment.directives.length === 0);
4897}
4898/**
4899 * @private
4900 *
4901 * Verify that two fields are equal in all properties other than their
4902 * selections.
4903 */
4904
4905
4906function areEqualFields(thisField, thatField) {
4907  return thisField.kind === thatField.kind && thisField.name === thatField.name && thisField.alias === thatField.alias && areEqualArgs(thisField.args, thatField.args
4907);
4908}
4909/**
4910 * Verify that two sets of arguments are equivalent - same argument names
4911 * and values. Notably this ignores the types of arguments and values, which
4912 * may not always be inferred identically.
4913 */
4914
4915
4916function areEqualArgs(thisArgs, thatArgs) {
4917  return thisArgs.length === thatArgs.length && thisArgs.every(function (thisArg, index) {
4918    var thatArg = thatArgs[index];
4919    return thisArg.name === thatArg.name && thisArg.value.kind === thatArg.value.kind && thisArg.value.variableName === thatArg.value.variableName && areEqual(thisArg.value.value, thatArg.value.value);
4920  });
4921}
4922/**
4923 * @private
4924 */
4925
4926
4927function mergeHandles(nodeA, nodeB) {
4928  if (!nodeA.handles) {
4929    return nodeB.handles;
4930  }
4931
4932  if (!nodeB.handles) {
4933    return nodeA.handles;
4934  }
4935
4936  var uniqueItems = new Map();
4937  nodeA.handles.concat(nodeB.handles).forEach(function (item) {
4938    return uniqueItems.set(item.name + item.key, item);
4939  });
4940  return Array.from(uniqueItems.values());
4941}
4942
4943function transformWithOptions(options) {
4944  return function flattenTransform(context) {
4945    return flattenTransformImpl(context, options);
4946  };
4947}
4948
4949module.exports = {
4950  transformWithOptions: transformWithOptions
4951};
4952
4953/***/ }),
4954
4955/***/ "9bHt":
4956/***/ (function(module, __webpack_exports__, __webpack_require__) {
4957
4958"use strict";
4959__webpack_require__.r(__webpack_exports__);
4960/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "localeUpperCase", function() { return localeUpperCase; });
4961/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "upperCase", function() { return upperCase; });
4962/**
4963 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
4964 */
vendor: 14,527 bytes, lines 4965-5348
4965var SUPPORTED_LOCALE = {
4966    tr: {
4967        regexp: /[\u0069]/g,
4968        map: {
4969            i: "\u0130",
4970        },
4971    },
4972    az: {
4973        regexp: /[\u0069]/g,
4974        map: {
4975            i: "\u0130",
4976        },
4977    },
4978    lt: {
4979        regexp: /[\u0069\u006A\u012F]\u0307|\u0069\u0307[\u0300\u0301\u0303]/g,
4980        map: {
4981            i̇: "\u0049",
4982            j̇: "\u004A",
4983            į̇: "\u012E",
4984            i̇̀: "\u00CC",
4985            i̇́: "\u00CD",
4986            i̇̃: "\u0128",
4987        },
4988    },
4989};
4990/**
4991 * Localized upper case.
4992 */
4993function localeUpperCase(str, locale) {
4994    var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
4995    if (lang)
4996        return upperCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
4997    return upperCase(str);
4998}
4999/**
5000 * Upper case as a function.
5001 */
5002function upperCase(str) {
5003    return str.toUpperCase();
5004}
5005//# sourceMappingURL=index.js.map
5006
5007/***/ }),
5008
5009/***/ "9dO7":
5010/***/ (function(module, exports, __webpack_require__) {
5011
5012"use strict";
5013
5014
5015module.exports = function isPrimitive(value) {
5016	return value === null || (typeof value !== 'function' && typeof value !== 'object');
5017};
5018
5019
5020/***/ }),
5021
5022/***/ "9hl7":
5023/***/ (function(module, __webpack_exports__, __webpack_require__) {
5024
5025"use strict";
5026__webpack_require__.r(__webpack_exports__);
5027/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUpperCase", function() { return isUpperCase; });
5028/**
5029 * Returns a boolean indicating whether the string is upper case.
5030 */
5031function isUpperCase(input) {
5032    return input.toUpperCase() === input && input.toLowerCase() !== input;
5033}
5034//# sourceMappingURL=index.js.map
5035
5036/***/ }),
5037
5038/***/ "ADFt":
5039/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
5040
5041"use strict";
5042/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return valueFromASTUntyped; });
5043/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
5044/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2C6G");
5045/* harmony import */ var _jsutils_keyValMap_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("WXJZ");
5046/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("/jXB");
5047
5048
5049
5050
5051
5052/**
5053 * Produces a JavaScript value given a GraphQL Value AST.
5054 *
5055 * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value
5056 * will reflect the provided GraphQL value AST.
5057 *
5058 * | GraphQL Value        | JavaScript Value |
5059 * | -------------------- | ---------------- |
5060 * | Input Object         | Object           |
5061 * | List                 | Array            |
5062 * | Boolean              | Boolean          |
5063 * | String / Enum        | String           |
5064 * | Int / Float          | Number           |
5065 * | Null                 | null             |
5066 *
5067 */
5068function valueFromASTUntyped(valueNode, variables) {
5069  switch (valueNode.kind) {
5070    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NULL:
5071      return null;
5072
5073    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INT:
5074      return parseInt(valueNode.value, 10);
5075
5076    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FLOAT:
5077      return parseFloat(valueNode.value);
5078
5079    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING:
5080    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ENUM:
5081    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].BOOLEAN:
5082      return valueNode.value;
5083
5084    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].LIST:
5085      return valueNode.values.map(function (node) {
5086        return valueFromASTUntyped(node, variables);
5087      });
5088
5089    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OBJECT:
5090      return Object(_jsutils_keyValMap_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(valueNode.fields, function (field) {
5091        return field.name.value;
5092      }, function (field) {
5093        return valueFromASTUntyped(field.value, variables);
5094      });
5095
5096    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].VARIABLE:
5097      return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value];
5098  } // istanbul ignore next (Not reachable. All possible value nodes have been considered)
5099
5100
5101   false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(0, 'Unexpected value node: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(valueNode));
5102}
5103
5104
5105/***/ }),
5106
5107/***/ "AM7I":
5108/***/ (function(module, exports, __webpack_require__) {
5109
5110"use strict";
5111
5112
5113var undefined;
5114
5115var $SyntaxError = SyntaxError;
5116var $Function = Function;
5117var $TypeError = TypeError;
5118
5119// eslint-disable-next-line consistent-return
5120var getEvalledConstructor = function (expressionSyntax) {
5121	try {
5122		return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
5123	} catch (e) {}
5124};
5125
5126var $gOPD = Object.getOwnPropertyDescriptor;
5127if ($gOPD) {
5128	try {
5129		$gOPD({}, '');
5130	} catch (e) {
5131		$gOPD = null; // this is IE 8, which has a broken gOPD
5132	}
5133}
5134
5135var throwTypeError = function () {
5136	throw new $TypeError();
5137};
5138var ThrowTypeError = $gOPD
5139	? (function () {
5140		try {
5141			// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
5142			arguments.callee; // IE 8 does not throw here
5143			return throwTypeError;
5144		} catch (calleeThrows) {
5145			try {
5146				// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
5147				return $gOPD(arguments, 'callee').get;
5148			} catch (gOPDthrows) {
5149				return throwTypeError;
5150			}
5151		}
5152	}())
5153	: throwTypeError;
5154
5155var hasSymbols = __webpack_require__("UVaH")();
5156
5157var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
5158
5159var needsEval = {};
5160
5161var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
5162
5163var INTRINSICS = {
5164	'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
5165	'%Array%': Array,
5166	'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
5167	'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
5168	'%AsyncFromSyncIteratorPrototype%': undefined,
5169	'%AsyncFunction%': needsEval,
5170	'%AsyncGenerator%': needsEval,
5171	'%AsyncGeneratorFunction%': needsEval,
5172	'%AsyncIteratorPrototype%': needsEval,
5173	'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
5174	'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
5175	'%Boolean%': Boolean,
5176	'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
5177	'%Date%': Date,
5178	'%decodeURI%': decodeURI,
5179	'%decodeURIComponent%': decodeURIComponent,
5180	'%encodeURI%': encodeURI,
5181	'%encodeURIComponent%': encodeURIComponent,
5182	'%Error%': Error,
5183	'%eval%': eval, // eslint-disable-line no-eval
5184	'%EvalError%': EvalError,
5185	'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
5186	'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
5187	'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
5188	'%Function%': $Function,
5189	'%GeneratorFunction%': needsEval,
5190	'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
5191	'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
5192	'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
5193	'%isFinite%': isFinite,
5194	'%isNaN%': isNaN,
5195	'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
5196	'%JSON%': typeof JSON === 'object' ? JSON : undefined,
5197	'%Map%': typeof Map === 'undefined' ? undefined : Map,
5198	'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
5199	'%Math%': Math,
5200	'%Number%': Number,
5201	'%Object%': Object,
5202	'%parseFloat%': parseFloat,
5203	'%parseInt%': parseInt,
5204	'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
5205	'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
5206	'%RangeError%': RangeError,
5207	'%ReferenceError%': ReferenceError,
5208	'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
5209	'%RegExp%': RegExp,
5210	'%Set%': typeof Set === 'undefined' ? undefined : Set,
5211	'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
5212	'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
5213	'%String%': String,
5214	'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
5215	'%Symbol%': hasSymbols ? Symbol : undefined,
5216	'%SyntaxError%': $SyntaxError,
5217	'%ThrowTypeError%': ThrowTypeError,
5218	'%TypedArray%': TypedArray,
5219	'%TypeError%': $TypeError,
5220	'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
5221	'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
5222	'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
5223	'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
5224	'%URIError%': URIError,
5225	'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
5226	'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
5227	'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
5228};
5229
5230var doEval = function doEval(name) {
5231	var value;
5232	if (name === '%AsyncFunction%') {
5233		value = getEvalledConstructor('async function () {}');
5234	} else if (name === '%GeneratorFunction%') {
5235		value = getEvalledConstructor('function* () {}');
5236	} else if (name === '%AsyncGeneratorFunction%') {
5237		value = getEvalledConstructor('async function* () {}');
5238	} else if (name === '%AsyncGenerator%') {
5239		var fn = doEval('%AsyncGeneratorFunction%');
5240		if (fn) {
5241			value = fn.prototype;
5242		}
5243	} else if (name === '%AsyncIteratorPrototype%') {
5244		var gen = doEval('%AsyncGenerator%');
5245		if (gen) {
5246			value = getProto(gen.prototype);
5247		}
5248	}
5249
5250	INTRINSICS[name] = value;
5251
5252	return value;
5253};
5254
5255var LEGACY_ALIASES = {
5256	'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
5257	'%ArrayPrototype%': ['Array', 'prototype'],
5258	'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
5259	'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
5260	'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
5261	'%ArrayProto_values%': ['Array', 'prototype', 'values'],
5262	'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
5263	'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
5264	'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
5265	'%BooleanPrototype%': ['Boolean', 'prototype'],
5266	'%DataViewPrototype%': ['DataView', 'prototype'],
5267	'%DatePrototype%': ['Date', 'prototype'],
5268	'%ErrorPrototype%': ['Error', 'prototype'],
5269	'%EvalErrorPrototype%': ['EvalError', 'prototype'],
5270	'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
5271	'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
5272	'%FunctionPrototype%': ['Function', 'prototype'],
5273	'%Generator%': ['GeneratorFunction', 'prototype'],
5274	'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
5275	'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
5276	'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
5277	'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
5278	'%JSONParse%': ['JSON', 'parse'],
5279	'%JSONStringify%': ['JSON', 'stringify'],
5280	'%MapPrototype%': ['Map', 'prototype'],
5281	'%NumberPrototype%': ['Number', 'prototype'],
5282	'%ObjectPrototype%': ['Object', 'prototype'],
5283	'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
5284	'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
5285	'%PromisePrototype%': ['Promise', 'prototype'],
5286	'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
5287	'%Promise_all%': ['Promise', 'all'],
5288	'%Promise_reject%': ['Promise', 'reject'],
5289	'%Promise_resolve%': ['Promise', 'resolve'],
5290	'%RangeErrorPrototype%': ['RangeError', 'prototype'],
5291	'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
5292	'%RegExpPrototype%': ['RegExp', 'prototype'],
5293	'%SetPrototype%': ['Set', 'prototype'],
5294	'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
5295	'%StringPrototype%': ['String', 'prototype'],
5296	'%SymbolPrototype%': ['Symbol', 'prototype'],
5297	'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
5298	'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
5299	'%TypeErrorPrototype%': ['TypeError', 'prototype'],
5300	'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
5301	'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
5302	'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
5303	'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
5304	'%URIErrorPrototype%': ['URIError', 'prototype'],
5305	'%WeakMapPrototype%': ['WeakMap', 'prototype'],
5306	'%WeakSetPrototype%': ['WeakSet', 'prototype']
5307};
5308
5309var bind = __webpack_require__("D3zA");
5310var hasOwn = __webpack_require__("oNNP");
5311var $concat = bind.call(Function.call, Array.prototype.concat);
5312var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
5313var $replace = bind.call(Function.call, String.prototype.replace);
5314var $strSlice = bind.call(Function.call, String.prototype.slice);
5315
5316/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
5317var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
5318var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
5319var stringToPath = function stringToPath(string) {
5320	var first = $strSlice(string, 0, 1);
5321	var last = $strSlice(string, -1);
5322	if (first === '%' && last !== '%') {
5323		throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
5324	} else if (last === '%' && first !== '%') {
5325		throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
5326	}
5327	var result = [];
5328	$replace(string, rePropName, function (match, number, quote, subString) {
5329		result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
5330	});
5331	return result;
5332};
5333/* end adaptation */
5334
5335var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
5336	var intrinsicName = name;
5337	var alias;
5338	if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
5339		alias = LEGACY_ALIASES[intrinsicName];
5340		intrinsicName = '%' + alias[0] + '%';
5341	}
5342
5343	if (hasOwn(INTRINSICS, intrinsicName)) {
5344		var value = INTRINSICS[intrinsicName];
5345		if (value === needsEval) {
5346			value = doEval(intrinsicName);
5347		}
5348		if (typeof value === 'undefined' && !allowMissing) {
5349			throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
5350		}
5351
5352		return {
5353			alias: alias,
5354			name: intrinsicName,
5355			value: value
5356		};
5357	}
5358
5359	throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
5360};
5361
5362module.exports = function GetIntrinsic(name, allowMissing) {
5363	if (typeof name !== 'string' || name.length === 0) {
5364		throw new $TypeError('intrinsic name must be a non-empty string');
5365	}
5366	if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
5367		throw new $TypeError('"allowMissing" argument must be a boolean');
5368	}
5369
5370	var parts = stringToPath(name);
5371	var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
5372
5373	var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
5374	var intrinsicRealName = intrinsic.name;
5375	var value = intrinsic.value;
5376	var skipFurtherCaching = false;
5377
5378	var alias = intrinsic.alias;
5379	if (alias) {
5380		intrinsicBaseName = alias[0];
5381		$spliceApply(parts, $concat([0, 1], alias));
5382	}
5383
5384	for (var i = 1, isOwn = true; i < parts.length; i += 1) {
5385		var part = parts[i];
5386		var first = $strSlice(part, 0, 1);
5387		var last = $strSlice(part, -1);
5388		if (
5389			(
5390				(first === '"' || first === "'" || first === '`')
5391				|| (last === '"' || last === "'" || last === '`')
5392			)
5393			&& first !== last
5394		) {
5395			throw new $SyntaxError('property names with quotes must have matching quotes');
5396		}
5397		if (part === 'constructor' || !isOwn) {
5398			skipFurtherCaching = true;
5399		}
5400
5401		intrinsicBaseName += '.' + part;
5402		intrinsicRealName = '%' + intrinsicBaseName + '%';
5403
5404		if (hasOwn(INTRINSICS, intrinsicRealName)) {
5405			value = INTRINSICS[intrinsicRealName];
5406		} else if (value != null) {
5407			if (!(part in value)) {
5408				if (!allowMissing) {
5409					throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
5410				}
5411				return void undefined;
5412			}
5413			if ($gOPD && (i + 1) >= parts.length) {
5414				var desc = $gOPD(value, part);
5415				isOwn = !!desc;
5416
5417				// By convention, when a data property is converted to an accessor
5418				// property to emulate a data property that does not suffer from
5419				// the override mistake, that accessor's getter is marked with
5420				// an `originalValue` property. Here, when we detect this, we
5421				// uphold the illusion by pretending to see that original data
5422				// property, i.e., returning the value rather than the getter
5423				// itself.
5424				if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
5425					value = desc.get;
5426				} else {
5427					value = value[part];
5428				}
5429			} else {
5430				isOwn = hasOwn(value, part);
5431				value = value[part];
5432			}
5433
5434			if (isOwn && !skipFurtherCaching) {
5435				INTRINSICS[intrinsicRealName] = value;
5436			}
5437		}
5438	}
5439	return value;
5440};
5441
5442
5443/***/ }),
5444
5445/***/ "AwSO":
5446/***/ (function(module, exports, __webpack_require__) {
5447
5448"use strict";
5449
5450
5451var callBound = __webpack_require__("VF6F");
5452var hasSymbols = __webpack_require__("kCea")();
5453var hasToStringTag = hasSymbols && !!Symbol.toStringTag;
5454var has;
5455var $exec;
5456var isRegexMarker;
5457var badStringifier;
5458
5459if (hasToStringTag) {
5460	has = callBound('Object.prototype.hasOwnProperty');
5461	$exec = callBound('RegExp.prototype.exec');
5462	isRegexMarker = {};
5463
5464	var throwRegexMarker = function () {
5465		throw isRegexMarker;
5466	};
5467	badStringifier = {
5468		toString: throwRegexMarker,
5469		valueOf: throwRegexMarker
5470	};
5471
5472	if (typeof Symbol.toPrimitive === 'symbol') {
5473		badStringifier[Symbol.toPrimitive] = throwRegexMarker;
5474	}
5475}
5476
5477var $toString = callBound('Object.prototype.toString');
5478var gOPD = Object.getOwnPropertyDescriptor;
5479var regexClass = '[object RegExp]';
5480
5481module.exports = hasToStringTag
5482	// eslint-disable-next-line consistent-return
5483	? function isRegex(value) {
5484		if (!value || typeof value !== 'object') {
5485			return false;
5486		}
5487
5488		var descriptor = gOPD(value, 'lastIndex');
5489		var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
5490		if (!hasLastIndexDataProperty) {
5491			return false;
5492		}
5493
5494		try {
5495			$exec(value, badStringifier);
5496		} catch (e) {
5497			return e === isRegexMarker;
5498		}
5499	}
5500	: function isRegex(value) {
5501		// In older browsers, typeof regex incorrectly returns 'function'
5502		if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
5503			return false;
vendor: 4,084 bytes, lines 5504-5660
5504		}
5505
5506		return $toString(value) === regexClass;
5507	};
5508
5509
5510/***/ }),
5511
5512/***/ "BLR7":
5513/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
5514
5515"use strict";
5516/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dedentBlockStringValue; });
5517/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getBlockStringIndentation; });
5518/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return printBlockString; });
5519/**
5520 * Produces the value of a block string from its parsed raw value, similar to
5521 * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.
5522 *
5523 * This implements the GraphQL spec's BlockStringValue() static algorithm.
5524 *
5525 * @internal
5526 */
5527function dedentBlockStringValue(rawString) {
5528  // Expand a block string's raw value into independent lines.
5529  var lines = rawString.split(/\r\n|[\n\r]/g); // Remove common indentation from all lines but first.
5530
5531  var commonIndent = getBlockStringIndentation(rawString);
5532
5533  if (commonIndent !== 0) {
5534    for (var i = 1; i < lines.length; i++) {
5535      lines[i] = lines[i].slice(commonIndent);
5536    }
5537  } // Remove leading and trailing blank lines.
5538
5539
5540  var startLine = 0;
5541
5542  while (startLine < lines.length && isBlank(lines[startLine])) {
5543    ++startLine;
5544  }
5545
5546  var endLine = lines.length;
5547
5548  while (endLine > startLine && isBlank(lines[endLine - 1])) {
5549    --endLine;
5550  } // Return a string of the lines joined with U+000A.
5551
5552
5553  return lines.slice(startLine, endLine).join('\n');
5554}
5555
5556function isBlank(str) {
5557  for (var i = 0; i < str.length; ++i) {
5558    if (str[i] !== ' ' && str[i] !== '\t') {
5559      return false;
5560    }
5561  }
5562
5563  return true;
5564}
5565/**
5566 * @internal
5567 */
5568
5569
5570function getBlockStringIndentation(value) {
5571  var _commonIndent;
5572
5573  var isFirstLine = true;
5574  var isEmptyLine = true;
5575  var indent = 0;
5576  var commonIndent = null;
5577
5578  for (var i = 0; i < value.length; ++i) {
5579    switch (value.charCodeAt(i)) {
5580      case 13:
5581        //  \r
5582        if (value.charCodeAt(i + 1) === 10) {
5583          ++i; // skip \r\n as one symbol
5584        }
5585
5586      // falls through
5587
5588      case 10:
5589        //  \n
5590        isFirstLine = false;
5591        isEmptyLine = true;
5592        indent = 0;
5593        break;
5594
5595      case 9: //   \t
5596
5597      case 32:
5598        //  <space>
5599        ++indent;
5600        break;
5601
5602      default:
5603        if (isEmptyLine && !isFirstLine && (commonIndent === null || indent < commonIndent)) {
5604          commonIndent = indent;
5605        }
5606
5607        isEmptyLine = false;
5608    }
5609  }
5610
5611  return (_commonIndent = commonIndent) !== null && _commonIndent !== void 0 ? _commonIndent : 0;
5612}
5613/**
5614 * Print a block string in the indented block form by adding a leading and
5615 * trailing blank line. However, if a block string starts with whitespace and is
5616 * a single-line, adding a leading blank line would strip that whitespace.
5617 *
5618 * @internal
5619 */
5620
5621function printBlockString(value) {
5622  var indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
5623  var preferMultipleLines = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
5624  var isSingleLine = value.indexOf('\n') === -1;
5625  var hasLeadingSpace = value[0] === ' ' || value[0] === '\t';
5626  var hasTrailingQuote = value[value.length - 1] === '"';
5627  var hasTrailingSlash = value[value.length - 1] === '\\';
5628  var printAsMultipleLines = !isSingleLine || hasTrailingQuote || hasTrailingSlash || preferMultipleLines;
5629  var result = ''; // Format a multi-line block quote to account for leading space.
5630
5631  if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) {
5632    result += '\n' + indentation;
5633  }
5634
5635  result += indentation ? value.replace(/\n/g, '\n' + indentation) : value;
5636
5637  if (printAsMultipleLines) {
5638    result += '\n';
5639  }
5640
5641  return '"""' + result.replace(/"""/g, '\\"""') + '"""';
5642}
5643
5644
5645/***/ }),
5646
5647/***/ "Bgkv":
5648/***/ (function(module, exports, __webpack_require__) {
5649
5650"use strict";
5651
5652
5653module.exports = function sign(number) {
5654	return number >= 0 ? 1 : -1;
5655};
5656
5657
5658/***/ }),
5659
5660/***/ "Bnag":
5661/***/ (function(module, exports) {
5662
5663function _nonIterableSpread() {
5664  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5665}
5666
5667module.exports = _nonIterableSpread;
5668
5669/***/ }),
5670
5671/***/ "BwaV":
5672/***/ (function(module, exports, __webpack_require__) {
5673
5674"use strict";
5675
5676
5677var GetIntrinsic = __webpack_require__("AM7I");
5678
5679var $TypeError = GetIntrinsic('%TypeError%');
5680
5681var CreateDataProperty = __webpack_require__("RWgL");
5682var IsPropertyKey = __webpack_require__("ml7t");
5683var Type = __webpack_require__("zOLO");
5684
5685// // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow
5686
5687module.exports = function CreateDataPropertyOrThrow(O, P, V) {
5688	if (Type(O) !== 'Object') {
5689		throw new $TypeError('Assertion failed: Type(O) is not Object');
5690	}
5691	if (!IsPropertyKey(P)) {
5692		throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
5693	}
5694	var success = CreateDataProperty(O, P, V);
5695	if (!success) {
5696		throw new $TypeError('unable to create data property');
5697	}
5698	return success;
5699};
5700
5701
5702/***/ }),
5703
5704/***/ "C8Kj":
5705/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
5706
5707"use strict";
5708/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return KnownArgumentNamesRule; });
5709/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return KnownArgumentNamesOnDirectivesRule; });
5710/* harmony import */ var _jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pv/G");
5711/* harmony import */ var _jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("T95z");
5712/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("dWS+");
5713/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("/jXB");
5714/* harmony import */ var _type_directives_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("4suF");
5715function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
5716
5717function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5718
5719function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5720
5721
5722
5723
5724
5725
5726
5727/**
5728 * Known argument names
5729 *
5730 * A GraphQL field is only valid if all supplied arguments are defined by
5731 * that field.
5732 */
5733function KnownArgumentNamesRule(context) {
5734  return _objectSpread(_objectSpread({}, KnownArgumentNamesOnDirectivesRule(context)), {}, {
5735    Argument: function Argument(argNode) {
5736      var argDef = context.getArgument();
5737      var fieldDef = context.getFieldDef();
5738      var parentType = context.getParentType();
5739
5740      if (!argDef && fieldDef && parentType) {
5741        var argName = argNode.name.value;
5742        var knownArgsNames = fieldDef.args.map(function (arg) {
5743          return arg.name;
5744        });
5745        var suggestions = Object(_jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(argName, knownArgsNames);
5746        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"]("Unknown argument \"".concat(argName, "\" on field \"").concat(parentType.name, ".").concat(fieldDef.name, "\".") + Object(_jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(suggestions), argNode));
5747      }
5748    }
5749  });
5750}
5751/**
5752 * @internal
5753 */
5754
5755function KnownArgumentNamesOnDirectivesRule(context) {
5756  var directiveArgs = Object.create(null);
5757  var schema = context.getSchema();
5758  var definedDirectives = schema ? schema.getDirectives() : _type_directives_mjs__WEBPACK_IMPORTED_MODULE_4__[/* specifiedDirectives */ "j"];
5759
5760  for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {
5761    var directive = definedDirectives[_i2];
5762    directiveArgs[directive.name] = directive.args.map(function (arg) {
5763      return arg.name;
5764    });
5765  }
5766
5767  var astDefinitions = context.getDocument().definitions;
5768
5769  for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {
5770    var def = astDefinitions[_i4];
5771
5772    if (def.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].DIRECTIVE_DEFINITION) {
5773      var _def$arguments;
5774
5775      // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
5776      var argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
5777      directiveArgs[def.name.value] = argsNodes.map(function (arg) {
5778        return arg.name.value;
5779      });
5780    }
5781  }
5782
5783  return {
5784    Directive: function Directive(directiveNode) {
5785      var directiveName = directiveNode.name.value;
5786      var knownArgs = directiveArgs[directiveName];
5787
5788      if (directiveNode.arguments && knownArgs) {
5789        for (var _i6 = 0, _directiveNode$argume2 = directiveNode.arguments; _i6 < _directiveNode$argume2.length; _i6++) {
5790          var argNode = _directiveNode$argume2[_i6];
5791          var argName = argNode.name.value;
5792
5793          if (knownArgs.indexOf(argName) === -1) {
5794            var suggestions = Object(_jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(argName, knownArgs);
5795            context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"]("Unknown argument \"".concat(argName, "\" on directive \"@").concat(directiveName, "\".") + Object(_jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(suggestions), argNode));
5796          }
5797        }
5798      }
5799
5800      return false;
vendor: 19,212 bytes, lines 5801-6439
5801    }
5802  };
5803}
5804
5805
5806/***/ }),
5807
5808/***/ "CbW8":
5809/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
5810
5811"use strict";
5812/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Lexer; });
5813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isPunctuatorTokenKind; });
5814/* harmony import */ var _error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("oycr");
5815/* harmony import */ var _ast_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("klf5");
5816/* harmony import */ var _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("JvOi");
5817/* harmony import */ var _blockString_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("BLR7");
5818
5819
5820
5821
5822/**
5823 * Given a Source object, creates a Lexer for that source.
5824 * A Lexer is a stateful stream generator in that every time
5825 * it is advanced, it returns the next token in the Source. Assuming the
5826 * source lexes, the final Token emitted by the lexer will be of kind
5827 * EOF, after which the lexer will repeatedly return the same EOF token
5828 * whenever called.
5829 */
5830
5831var Lexer = /*#__PURE__*/function () {
5832  /**
5833   * The previously focused non-ignored token.
5834   */
5835
5836  /**
5837   * The currently focused non-ignored token.
5838   */
5839
5840  /**
5841   * The (1-indexed) line containing the current token.
5842   */
5843
5844  /**
5845   * The character offset at which the current line begins.
5846   */
5847  function Lexer(source) {
5848    var startOfFileToken = new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].SOF, 0, 0, 0, 0, null);
5849    this.source = source;
5850    this.lastToken = startOfFileToken;
5851    this.token = startOfFileToken;
5852    this.line = 1;
5853    this.lineStart = 0;
5854  }
5855  /**
5856   * Advances the token stream to the next non-ignored token.
5857   */
5858
5859
5860  var _proto = Lexer.prototype;
5861
5862  _proto.advance = function advance() {
5863    this.lastToken = this.token;
5864    var token = this.token = this.lookahead();
5865    return token;
5866  }
5867  /**
5868   * Looks ahead and returns the next non-ignored token, but does not change
5869   * the state of Lexer.
5870   */
5871  ;
5872
5873  _proto.lookahead = function lookahead() {
5874    var token = this.token;
5875
5876    if (token.kind !== _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].EOF) {
5877      do {
5878        var _token$next;
5879
5880        // Note: next is only mutable during parsing, so we cast to allow this.
5881        token = (_token$next = token.next) !== null && _token$next !== void 0 ? _token$next : token.next = readToken(this, token);
5882      } while (token.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].COMMENT);
5883    }
5884
5885    return token;
5886  };
5887
5888  return Lexer;
5889}();
5890/**
5891 * @internal
5892 */
5893
5894function isPunctuatorTokenKind(kind) {
5895  return kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BANG || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].DOLLAR || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].AMP || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].PAREN_L || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].PAREN_R || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].SPREAD || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].COLON || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].EQUALS || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].AT || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BRACKET_L || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BRACKET_R || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BRACE_L || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].PIPE || kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BRACE_R;
5896}
5897
5898function printCharCode(code) {
5899  return (// NaN/undefined represents access beyond the end of the file.
5900    isNaN(code) ? _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].EOF : // Trust JSON for ASCII.
5901    code < 0x007f ? JSON.stringify(String.fromCharCode(code)) : // Otherwise print the escaped form.
5902    "\"\\u".concat(('00' + code.toString(16).toUpperCase()).slice(-4), "\"")
5903  );
5904}
5905/**
5906 * Gets the next token from the source starting at the given position.
5907 *
5908 * This skips over whitespace until it finds the next lexable token, then lexes
5909 * punctuators immediately or calls the appropriate helper function for more
5910 * complicated tokens.
5911 */
5912
5913
5914function readToken(lexer, prev) {
5915  var source = lexer.source;
5916  var body = source.body;
5917  var bodyLength = body.length;
5918  var pos = prev.end;
5919
5920  while (pos < bodyLength) {
5921    var code = body.charCodeAt(pos);
5922    var _line = lexer.line;
5923
5924    var _col = 1 + pos - lexer.lineStart; // SourceCharacter
5925
5926
5927    switch (code) {
5928      case 0xfeff: // <BOM>
5929
5930      case 9: //   \t
5931
5932      case 32: //  <space>
5933
5934      case 44:
5935        //  ,
5936        ++pos;
5937        continue;
5938
5939      case 10:
5940        //  \n
5941        ++pos;
5942        ++lexer.line;
5943        lexer.lineStart = pos;
5944        continue;
5945
5946      case 13:
5947        //  \r
5948        if (body.charCodeAt(pos + 1) === 10) {
5949          pos += 2;
5950        } else {
5951          ++pos;
5952        }
5953
5954        ++lexer.line;
5955        lexer.lineStart = pos;
5956        continue;
5957
5958      case 33:
5959        //  !
5960        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BANG, pos, pos + 1, _line, _col, prev);
5961
5962      case 35:
5963        //  #
5964        return readComment(source, pos, _line, _col, prev);
5965
5966      case 36:
5967        //  $
5968        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].DOLLAR, pos, pos + 1, _line, _col, prev);
5969
5970      case 38:
5971        //  &
5972        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].AMP, pos, pos + 1, _line, _col, prev);
5973
5974      case 40:
5975        //  (
5976        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].PAREN_L, pos, pos + 1, _line, _col, prev);
5977
5978      case 41:
5979        //  )
5980        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].PAREN_R, pos, pos + 1, _line, _col, prev);
5981
5982      case 46:
5983        //  .
5984        if (body.charCodeAt(pos + 1) === 46 && body.charCodeAt(pos + 2) === 46) {
5985          return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].SPREAD, pos, pos + 3, _line, _col, prev);
5986        }
5987
5988        break;
5989
5990      case 58:
5991        //  :
5992        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].COLON, pos, pos + 1, _line, _col, prev);
5993
5994      case 61:
5995        //  =
5996        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].EQUALS, pos, pos + 1, _line, _col, prev);
5997
5998      case 64:
5999        //  @
6000        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].AT, pos, pos + 1, _line, _col, prev);
6001
6002      case 91:
6003        //  [
6004        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BRACKET_L, pos, pos + 1, _line, _col, prev);
6005
6006      case 93:
6007        //  ]
6008        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BRACKET_R, pos, pos + 1, _line, _col, prev);
6009
6010      case 123:
6011        // {
6012        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BRACE_L, pos, pos + 1, _line, _col, prev);
6013
6014      case 124:
6015        // |
6016        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].PIPE, pos, pos + 1, _line, _col, prev);
6017
6018      case 125:
6019        // }
6020        return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BRACE_R, pos, pos + 1, _line, _col, prev);
6021
6022      case 34:
6023        //  "
6024        if (body.charCodeAt(pos + 1) === 34 && body.charCodeAt(pos + 2) === 34) {
6025          return readBlockString(source, pos, _line, _col, prev, lexer);
6026        }
6027
6028        return readString(source, pos, _line, _col, prev);
6029
6030      case 45: //  -
6031
6032      case 48: //  0
6033
6034      case 49: //  1
6035
6036      case 50: //  2
6037
6038      case 51: //  3
6039
6040      case 52: //  4
6041
6042      case 53: //  5
6043
6044      case 54: //  6
6045
6046      case 55: //  7
6047
6048      case 56: //  8
6049
6050      case 57:
6051        //  9
6052        return readNumber(source, pos, code, _line, _col, prev);
6053
6054      case 65: //  A
6055
6056      case 66: //  B
6057
6058      case 67: //  C
6059
6060      case 68: //  D
6061
6062      case 69: //  E
6063
6064      case 70: //  F
6065
6066      case 71: //  G
6067
6068      case 72: //  H
6069
6070      case 73: //  I
6071
6072      case 74: //  J
6073
6074      case 75: //  K
6075
6076      case 76: //  L
6077
6078      case 77: //  M
6079
6080      case 78: //  N
6081
6082      case 79: //  O
6083
6084      case 80: //  P
6085
6086      case 81: //  Q
6087
6088      case 82: //  R
6089
6090      case 83: //  S
6091
6092      case 84: //  T
6093
6094      case 85: //  U
6095
6096      case 86: //  V
6097
6098      case 87: //  W
6099
6100      case 88: //  X
6101
6102      case 89: //  Y
6103
6104      case 90: //  Z
6105
6106      case 95: //  _
6107
6108      case 97: //  a
6109
6110      case 98: //  b
6111
6112      case 99: //  c
6113
6114      case 100: // d
6115
6116      case 101: // e
6117
6118      case 102: // f
6119
6120      case 103: // g
6121
6122      case 104: // h
6123
6124      case 105: // i
6125
6126      case 106: // j
6127
6128      case 107: // k
6129
6130      case 108: // l
6131
6132      case 109: // m
6133
6134      case 110: // n
6135
6136      case 111: // o
6137
6138      case 112: // p
6139
6140      case 113: // q
6141
6142      case 114: // r
6143
6144      case 115: // s
6145
6146      case 116: // t
6147
6148      case 117: // u
6149
6150      case 118: // v
6151
6152      case 119: // w
6153
6154      case 120: // x
6155
6156      case 121: // y
6157
6158      case 122:
6159        // z
6160        return readName(source, pos, _line, _col, prev);
6161    }
6162
6163    throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, pos, unexpectedCharacterMessage(code));
6164  }
6165
6166  var line = lexer.line;
6167  var col = 1 + pos - lexer.lineStart;
6168  return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].EOF, bodyLength, bodyLength, line, col, prev);
6169}
6170/**
6171 * Report a message that an unexpected character was encountered.
6172 */
6173
6174
6175function unexpectedCharacterMessage(code) {
6176  if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {
6177    return "Cannot contain the invalid character ".concat(printCharCode(code), ".");
6178  }
6179
6180  if (code === 39) {
6181    // '
6182    return 'Unexpected single quote character (\'), did you mean to use a double quote (")?';
6183  }
6184
6185  return "Cannot parse the unexpected character ".concat(printCharCode(code), ".");
6186}
6187/**
6188 * Reads a comment token from the source file.
6189 *
6190 * #[\u0009\u0020-\uFFFF]*
6191 */
6192
6193
6194function readComment(source, start, line, col, prev) {
6195  var body = source.body;
6196  var code;
6197  var position = start;
6198
6199  do {
6200    code = body.charCodeAt(++position);
6201  } while (!isNaN(code) && ( // SourceCharacter but not LineTerminator
6202  code > 0x001f || code === 0x0009));
6203
6204  return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].COMMENT, start, position, line, col, prev, body.slice(start + 1, position));
6205}
6206/**
6207 * Reads a number token from the source file, either a float
6208 * or an int depending on whether a decimal point appears.
6209 *
6210 * Int:   -?(0|[1-9][0-9]*)
6211 * Float: -?(0|[1-9][0-9]*)(\.[0-9]+)?((E|e)(+|-)?[0-9]+)?
6212 */
6213
6214
6215function readNumber(source, start, firstCode, line, col, prev) {
6216  var body = source.body;
6217  var code = firstCode;
6218  var position = start;
6219  var isFloat = false;
6220
6221  if (code === 45) {
6222    // -
6223    code = body.charCodeAt(++position);
6224  }
6225
6226  if (code === 48) {
6227    // 0
6228    code = body.charCodeAt(++position);
6229
6230    if (code >= 48 && code <= 57) {
6231      throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, position, "Invalid number, unexpected digit after 0: ".concat(printCharCode(code), "."));
6232    }
6233  } else {
6234    position = readDigits(source, position, code);
6235    code = body.charCodeAt(position);
6236  }
6237
6238  if (code === 46) {
6239    // .
6240    isFloat = true;
6241    code = body.charCodeAt(++position);
6242    position = readDigits(source, position, code);
6243    code = body.charCodeAt(position);
6244  }
6245
6246  if (code === 69 || code === 101) {
6247    // E e
6248    isFloat = true;
6249    code = body.charCodeAt(++position);
6250
6251    if (code === 43 || code === 45) {
6252      // + -
6253      code = body.charCodeAt(++position);
6254    }
6255
6256    position = readDigits(source, position, code);
6257    code = body.charCodeAt(position);
6258  } // Numbers cannot be followed by . or NameStart
6259
6260
6261  if (code === 46 || isNameStart(code)) {
6262    throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, position, "Invalid number, expected digit but got: ".concat(printCharCode(code), "."));
6263  }
6264
6265  return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](isFloat ? _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].FLOAT : _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].INT, start, position, line, col, prev, body.slice(start, position));
6266}
6267/**
6268 * Returns the new position in the source after reading digits.
6269 */
6270
6271
6272function readDigits(source, start, firstCode) {
6273  var body = source.body;
6274  var position = start;
6275  var code = firstCode;
6276
6277  if (code >= 48 && code <= 57) {
6278    // 0 - 9
6279    do {
6280      code = body.charCodeAt(++position);
6281    } while (code >= 48 && code <= 57); // 0 - 9
6282
6283
6284    return position;
6285  }
6286
6287  throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, position, "Invalid number, expected digit but got: ".concat(printCharCode(code), "."));
6288}
6289/**
6290 * Reads a string token from the source file.
6291 *
6292 * "([^"\\\u000A\u000D]|(\\(u[0-9a-fA-F]{4}|["\\/bfnrt])))*"
6293 */
6294
6295
6296function readString(source, start, line, col, prev) {
6297  var body = source.body;
6298  var position = start + 1;
6299  var chunkStart = position;
6300  var code = 0;
6301  var value = '';
6302
6303  while (position < body.length && !isNaN(code = body.charCodeAt(position)) && // not LineTerminator
6304  code !== 0x000a && code !== 0x000d) {
6305    // Closing Quote (")
6306    if (code === 34) {
6307      value += body.slice(chunkStart, position);
6308      return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].STRING, start, position + 1, line, col, prev, value);
6309    } // SourceCharacter
6310
6311
6312    if (code < 0x0020 && code !== 0x0009) {
6313      throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, position, "Invalid character within String: ".concat(printCharCode(code), "."));
6314    }
6315
6316    ++position;
6317
6318    if (code === 92) {
6319      // \
6320      value += body.slice(chunkStart, position - 1);
6321      code = body.charCodeAt(position);
6322
6323      switch (code) {
6324        case 34:
6325          value += '"';
6326          break;
6327
6328        case 47:
6329          value += '/';
6330          break;
6331
6332        case 92:
6333          value += '\\';
6334          break;
6335
6336        case 98:
6337          value += '\b';
6338          break;
6339
6340        case 102:
6341          value += '\f';
6342          break;
6343
6344        case 110:
6345          value += '\n';
6346          break;
6347
6348        case 114:
6349          value += '\r';
6350          break;
6351
6352        case 116:
6353          value += '\t';
6354          break;
6355
6356        case 117:
6357          {
6358            // uXXXX
6359            var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
6360
6361            if (charCode < 0) {
6362              var invalidSequence = body.slice(position + 1, position + 5);
6363              throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, position, "Invalid character escape sequence: \\u".concat(invalidSequence, "."));
6364            }
6365
6366            value += String.fromCharCode(charCode);
6367            position += 4;
6368            break;
6369          }
6370
6371        default:
6372          throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, position, "Invalid character escape sequence: \\".concat(String.fromCharCode(code), "."));
6373      }
6374
6375      ++position;
6376      chunkStart = position;
6377    }
6378  }
6379
6380  throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, position, 'Unterminated string.');
6381}
6382/**
6383 * Reads a block string token from the source file.
6384 *
6385 * """("?"?(\\"""|\\(?!=""")|[^"\\]))*"""
6386 */
6387
6388
6389function readBlockString(source, start, line, col, prev, lexer) {
6390  var body = source.body;
6391  var position = start + 3;
6392  var chunkStart = position;
6393  var code = 0;
6394  var rawValue = '';
6395
6396  while (position < body.length && !isNaN(code = body.charCodeAt(position))) {
6397    // Closing Triple-Quote (""")
6398    if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) {
6399      rawValue += body.slice(chunkStart, position);
6400      return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].BLOCK_STRING, start, position + 3, line, col, prev, Object(_blockString_mjs__WEBPACK_IMPORTED_MODULE_3__[/* dedentBlockStringValue */ "a"])(rawValue));
6401    } // SourceCharacter
6402
6403
6404    if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {
6405      throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, position, "Invalid character within String: ".concat(printCharCode(code), "."));
6406    }
6407
6408    if (code === 10) {
6409      // new line
6410      ++position;
6411      ++lexer.line;
6412      lexer.lineStart = position;
6413    } else if (code === 13) {
6414      // carriage return
6415      if (body.charCodeAt(position + 1) === 10) {
6416        position += 2;
6417      } else {
6418        ++position;
6419      }
6420
6421      ++lexer.line;
6422      lexer.lineStart = position;
6423    } else if ( // Escape Triple-Quote (\""")
6424    code === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) {
6425      rawValue += body.slice(chunkStart, position) + '"""';
6426      position += 4;
6427      chunkStart = position;
6428    } else {
6429      ++position;
6430    }
6431  }
6432
6433  throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(source, position, 'Unterminated string.');
6434}
6435/**
6436 * Converts four hexadecimal chars to the integer that the
6437 * string represents. For example, uniCharCode('0','0','0','f')
6438 * will return 15, and uniCharCode('0','0','f','f') returns 255.
6439 *
6440 * Returns a negative number on error, if a char was invalid.
6441 *
6442 * This is implemented by noting that char2hex() returns -1 on error,
6443 * which means the result of ORing the char2hex() will also be negative.
6444 */
6445
6446
6447function uniCharCode(a, b, c, d) {
6448  return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);
6449}
6450/**
6451 * Converts a hex character to its integer value.
6452 * '0' becomes 0, '9' becomes 9
6453 * 'A' becomes 10, 'F' becomes 15
6454 * 'a' becomes 10, 'f' becomes 15
6455 *
6456 * Returns -1 on error.
6457 */
6458
6459
6460function char2hex(a) {
6461  return a >= 48 && a <= 57 ? a - 48 // 0-9
6462  : a >= 65 && a <= 70 ? a - 55 // A-F
6463  : a >= 97 && a <= 102 ? a - 87 // a-f
6464  : -1;
6465}
6466/**
6467 * Reads an alphanumeric + underscore name from the source.
6468 *
6469 * [_A-Za-z][_0-9A-Za-z]*
6470 */
6471
6472
6473function readName(source, start, line, col, prev) {
6474  var body = source.body;
6475  var bodyLength = body.length;
6476  var position = start + 1;
6477  var code = 0;
6478
6479  while (position !== bodyLength && !isNaN(code = body.charCodeAt(position)) && (code === 95 || // _
6480  code >= 48 && code <= 57 || // 0-9
6481  code >= 65 && code <= 90 || // A-Z
6482  code >= 97 && code <= 122) // a-z
6483  ) {
6484    ++position;
6485  }
6486
6487  return new _ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Token */ "b"](_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TokenKind */ "a"].NAME, start, position, line, col, prev, body.slice(start, position));
6488} // _ A-Z a-z
6489
6490
6491function isNameStart(code) {
6492  return code === 95 || code >= 65 && code <= 90 || code >= 97 && code <= 122;
6493}
6494
6495
6496/***/ }),
6497
6498/***/ "D3zA":
6499/***/ (function(module, exports, __webpack_require__) {
6500
6501"use strict";
6502
6503
6504var implementation = __webpack_require__("aI7X");
6505
6506module.exports = Function.prototype.bind || implementation;
6507
6508
6509/***/ }),
6510
6511/***/ "D4qp":
6512/***/ (function(module, exports, __webpack_require__) {
6513
6514"use strict";
6515
6516
6517var GetIntrinsic = __webpack_require__("AM7I");
6518
6519var $abs = GetIntrinsic('%Math.abs%');
6520
6521// http://262.ecma-international.org/5.1/#sec-5.2
6522
6523module.exports = function abs(x) {
6524	return $abs(x);
6525};
6526
6527
6528/***/ }),
6529
6530/***/ "DELC":
6531/***/ (function(module, exports, __webpack_require__) {
6532
6533"use strict";
6534
6535
6536var GetIntrinsic = __webpack_require__("AM7I");
6537
6538var $TypeError = GetIntrinsic('%TypeError%');
6539var $SyntaxError = GetIntrinsic('%SyntaxError%');
6540
6541var has = __webpack_require__("oNNP");
6542
6543var predicates = {
6544	// https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type
6545	'Property Descriptor': function isPropertyDescriptor(Type, Desc) {
6546		if (Type(Desc) !== 'Object') {
6547			return false;
6548		}
6549		var allowed = {
6550			'[[Configurable]]': true,
6551			'[[Enumerable]]': true,
6552			'[[Get]]': true,
6553			'[[Set]]': true,
6554			'[[Value]]': true,
6555			'[[Writable]]': true
6556		};
6557
6558		for (var key in Desc) { // eslint-disable-line
6559			if (has(Desc, key) && !allowed[key]) {
6560				return false;
6561			}
6562		}
6563
6564		var isData = has(Desc, '[[Value]]');
6565		var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');
6566		if (isData && IsAccessor) {
6567			throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');
6568		}
6569		return true;
6570	}
6571};
6572
6573module.exports = function assertRecord(Type, recordType, argumentName, value) {
6574	var predicate = predicates[recordType];
6575	if (typeof predicate !== 'function') {
6576		throw new $SyntaxError('unknown record type: ' + recordType);
6577	}
6578	if (!predicate(Type, value)) {
6579		throw new $TypeError(argumentName + ' must be a ' + recordType);
6580	}
6581};
6582
6583
6584/***/ }),
6585
6586/***/ "DmXP":
6587/***/ (function(module, exports, __webpack_require__) {
6588
6589"use strict";
6590
6591
6592var getDay = Date.prototype.getDay;
6593var tryDateObject = function tryDateGetDayCall(value) {
6594	try {
6595		getDay.call(value);
6596		return true;
6597	} catch (e) {
6598		return false;
6599	}
6600};
6601
6602var toStr = Object.prototype.toString;
6603var dateClass = '[object Date]';
6604var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
6605
6606module.exports = function isDateObject(value) {
6607	if (typeof value !== 'object' || value === null) {
6608		return false;
6609	}
6610	return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
6611};
6612
6613
6614/***/ }),
6615
6616/***/ "E690":
6617/***/ (function(module, exports, __webpack_require__) {
6618
6619"use strict";
6620/**
6621 * Copyright (c) Facebook, Inc. and its affiliates.
6622 *
6623 * This source code is licensed under the MIT license found in the
6624 * LICENSE file in the root directory of this source tree.
6625 *
6626 * 
6627 * @format
6628 */
6629// flowlint ambiguous-object-type:error
6630
6631/**
6632 * Partitions an array given a predicate. All elements satisfying the predicate
6633 * are part of the first returned array, and all elements that don't are in the
6634 * second.
6635 */
6636
6637function partitionArray(array, predicate) {
6638  var first = [];
6639  var second = [];
6640
6641  for (var i = 0; i < array.length; i++) {
6642    var item = array[i];
6643
6644    if (predicate(item)) {
6645      first.push(item);
6646    } else {
6647      second.push(item);
6648    }
6649  }
6650
6651  return [first, second];
6652}
6653
6654module.exports = partitionArray;
6655
6656/***/ }),
6657
6658/***/ "E9SJ":
6659/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
6660
6661"use strict";
6662/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return toObjMap; });
6663/* harmony import */ var _polyfills_objectEntries_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Y/la");
6664
6665function toObjMap(obj) {
6666  /* eslint-enable no-redeclare */
6667  if (Object.getPrototypeOf(obj) === null) {
6668    return obj;
6669  }
6670
6671  var map = Object.create(null);
6672
6673  for (var _i2 = 0, _objectEntries2 = Object(_polyfills_objectEntries_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(obj); _i2 < _objectEntries2.length; _i2++) {
6674    var _ref2 = _objectEntries2[_i2];
6675    var key = _ref2[0];
6676    var value = _ref2[1];
6677    map[key] = value;
6678  }
6679
6680  return map;
6681}
6682
6683
6684/***/ }),
6685
6686/***/ "EMzn":
6687/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
6688
6689"use strict";
6690__webpack_require__.r(__webpack_exports__);
6691/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; });
6692/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseValue", function() { return parseValue; });
6693/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseType", function() { return parseType; });
6694/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; });
6695/* harmony import */ var _error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("oycr");
6696/* harmony import */ var _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("/jXB");
6697/* harmony import */ var _ast_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("klf5");
6698/* harmony import */ var _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("JvOi");
6699/* harmony import */ var _source_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("neE4");
6700/* harmony import */ var _directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("F8X2");
6701/* harmony import */ var _lexer_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("CbW8");
6702
6703
6704
6705
6706
6707
6708
6709/**
6710 * Configuration options to control parser behavior
6711 */
6712
6713/**
6714 * Given a GraphQL source, parses it into a Document.
6715 * Throws GraphQLError if a syntax error is encountered.
6716 */
6717function parse(source, options) {
6718  var parser = new Parser(source, options);
6719  return parser.parseDocument();
6720}
6721/**
6722 * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for
6723 * that value.
6724 * Throws GraphQLError if a syntax error is encountered.
6725 *
6726 * This is useful within tools that operate upon GraphQL Values directly and
6727 * in isolation of complete GraphQL documents.
6728 *
6729 * Consider providing the results to the utility function: valueFromAST().
6730 */
6731
6732function parseValue(source, options) {
6733  var parser = new Parser(source, options);
6734  parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].SOF);
6735  var value = parser.parseValueLiteral(false);
6736  parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].EOF);
6737  return value;
6738}
6739/**
6740 * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for
6741 * that type.
6742 * Throws GraphQLError if a syntax error is encountered.
6743 *
6744 * This is useful within tools that operate upon GraphQL Types directly and
6745 * in isolation of complete GraphQL documents.
6746 *
6747 * Consider providing the results to the utility function: typeFromAST().
6748 */
6749
6750function parseType(source, options) {
6751  var parser = new Parser(source, options);
6752  parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].SOF);
6753  var type = parser.parseTypeReference();
6754  parser.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].EOF);
6755  return type;
6756}
6757/**
6758 * This class is exported only to assist people in implementing their own parsers
6759 * without duplicating too much code and should be used only as last resort for cases
6760 * such as experimental syntax or if certain features could not be contributed upstream.
6761 *
6762 * It is still part of the internal API and is versioned, so any changes to it are never
6763 * considered breaking changes. If you still need to support multiple versions of the
6764 * library, please use the `versionInfo` variable for version detection.
6765 *
6766 * @internal
6767 */
6768
6769var Parser = /*#__PURE__*/function () {
6770  function Parser(source, options) {
6771    var sourceObj = Object(_source_mjs__WEBPACK_IMPORTED_MODULE_4__[/* isSource */ "b"])(source) ? source : new _source_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Source */ "a"](source);
6772    this._lexer = new _lexer_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Lexer */ "a"](sourceObj);
6773    this._options = options;
6774  }
6775  /**
6776   * Converts a name lex token into a name parse node.
6777   */
6778
6779
6780  var _proto = Parser.prototype;
6781
6782  _proto.parseName = function parseName() {
6783    var token = this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME);
6784    return {
6785      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].NAME,
6786      value: token.value,
6787      loc: this.loc(token)
6788    };
6789  } // Implements the parsing rules in the Document section.
6790
6791  /**
6792   * Document : Definition+
6793   */
6794  ;
6795
6796  _proto.parseDocument = function parseDocument() {
6797    var start = this._lexer.token;
6798    return {
6799      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].DOCUMENT,
6800      definitions: this.many(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].SOF, this.parseDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].EOF),
6801      loc: this.loc(start)
6802    };
6803  }
6804  /**
6805   * Definition :
6806   *   - ExecutableDefinition
6807   *   - TypeSystemDefinition
6808   *   - TypeSystemExtension
6809   *
6810   * ExecutableDefinition :
6811   *   - OperationDefinition
6812   *   - FragmentDefinition
6813   */
6814  ;
6815
6816  _proto.parseDefinition = function parseDefinition() {
6817    if (this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME)) {
6818      switch (this._lexer.token.value) {
6819        case 'query':
6820        case 'mutation':
6821        case 'subscription':
6822          return this.parseOperationDefinition();
6823
6824        case 'fragment':
6825          return this.parseFragmentDefinition();
6826
6827        case 'schema':
6828        case 'scalar':
6829        case 'type':
6830        case 'interface':
6831        case 'union':
6832        case 'enum':
6833        case 'input':
6834        case 'directive':
6835          return this.parseTypeSystemDefinition();
6836
6837        case 'extend':
6838          return this.parseTypeSystemExtension();
6839      }
6840    } else if (this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L)) {
6841      return this.parseOperationDefinition();
6842    } else if (this.peekDescription()) {
6843      return this.parseTypeSystemDefinition();
6844    }
6845
6846    throw this.unexpected();
6847  } // Implements the parsing rules in the Operations section.
6848
6849  /**
6850   * OperationDefinition :
6851   *  - SelectionSet
6852   *  - OperationType Name? VariableDefinitions? Directives? SelectionSet
6853   */
6854  ;
6855
6856  _proto.parseOperationDefinition = function parseOperationDefinition() {
6857    var start = this._lexer.token;
6858
6859    if (this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L)) {
6860      return {
6861        kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OPERATION_DEFINITION,
6862        operation: 'query',
6863        name: undefined,
6864        variableDefinitions: [],
6865        directives: [],
6866        selectionSet: this.parseSelectionSet(),
6867        loc: this.loc(start)
6868      };
6869    }
6870
6871    var operation = this.parseOperationType();
6872    var name;
6873
6874    if (this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME)) {
6875      name = this.parseName();
6876    }
6877
6878    return {
6879      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OPERATION_DEFINITION,
6880      operation: operation,
6881      name: name,
6882      variableDefinitions: this.parseVariableDefinitions(),
6883      directives: this.parseDirectives(false),
6884      selectionSet: this.parseSelectionSet(),
6885      loc: this.loc(start)
6886    };
6887  }
6888  /**
6889   * OperationType : one of query mutation subscription
6890   */
6891  ;
6892
6893  _proto.parseOperationType = function parseOperationType() {
6894    var operationToken = this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME);
6895
6896    switch (operationToken.value) {
6897      case 'query':
6898        return 'query';
6899
6900      case 'mutation':
6901        return 'mutation';
6902
6903      case 'subscription':
6904        return 'subscription';
6905    }
6906
6907    throw this.unexpected(operationToken);
6908  }
6909  /**
6910   * VariableDefinitions : ( VariableDefinition+ )
6911   */
6912  ;
6913
6914  _proto.parseVariableDefinitions = function parseVariableDefinitions() {
6915    return this.optionalMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].PAREN_L, this.parseVariableDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].PAREN_R);
6916  }
6917  /**
6918   * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
6919   */
6920  ;
6921
6922  _proto.parseVariableDefinition = function parseVariableDefinition() {
6923    var start = this._lexer.token;
6924    return {
6925      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].VARIABLE_DEFINITION,
6926      variable: this.parseVariable(),
6927      type: (this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].COLON), this.parseTypeReference()),
6928      defaultValue: this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].EQUALS) ? this.parseValueLiteral(true) : undefined,
6929      directives: this.parseDirectives(true),
6930      loc: this.loc(start)
6931    };
6932  }
6933  /**
6934   * Variable : $ Name
6935   */
6936  ;
6937
6938  _proto.parseVariable = function parseVariable() {
6939    var start = this._lexer.token;
6940    this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].DOLLAR);
6941    return {
6942      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].VARIABLE,
6943      name: this.parseName(),
6944      loc: this.loc(start)
6945    };
6946  }
6947  /**
6948   * SelectionSet : { Selection+ }
6949   */
6950  ;
6951
6952  _proto.parseSelectionSet = function parseSelectionSet() {
6953    var start = this._lexer.token;
6954    return {
6955      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SELECTION_SET,
6956      selections: this.many(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L, this.parseSelection, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_R),
6957      loc: this.loc(start)
6958    };
6959  }
6960  /**
6961   * Selection :
6962   *   - Field
6963   *   - FragmentSpread
6964   *   - InlineFragment
6965   */
6966  ;
6967
6968  _proto.parseSelection = function parseSelection() {
6969    return this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].SPREAD) ? this.parseFragment() : this.parseField();
6970  }
6971  /**
6972   * Field : Alias? Name Arguments? Directives? SelectionSet?
6973   *
6974   * Alias : Name :
6975   */
6976  ;
6977
6978  _proto.parseField = function parseField() {
6979    var start = this._lexer.token;
6980    var nameOrAlias = this.parseName();
6981    var alias;
6982    var name;
6983
6984    if (this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].COLON)) {
6985      alias = nameOrAlias;
6986      name = this.parseName();
6987    } else {
6988      name = nameOrAlias;
6989    }
6990
6991    return {
6992      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FIELD,
6993      alias: alias,
6994      name: name,
6995      arguments: this.parseArguments(false),
6996      directives: this.parseDirectives(false),
6997      selectionSet: this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L) ? this.parseSelectionSet() : undefined,
6998      loc: this.loc(start)
6999    };
7000  }
7001  /**
7002   * Arguments[Const] : ( Argument[?Const]+ )
7003   */
7004  ;
7005
7006  _proto.parseArguments = function parseArguments(isConst) {
7007    var item = isConst ? this.parseConstArgument : this.parseArgument;
7008    return this.optionalMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].PAREN_L, item, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].PAREN_R);
7009  }
7010  /**
7011   * Argument[Const] : Name : Value[?Const]
7012   */
7013  ;
7014
7015  _proto.parseArgument = function parseArgument() {
7016    var start = this._lexer.token;
7017    var name = this.parseName();
7018    this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].COLON);
7019    return {
7020      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ARGUMENT,
7021      name: name,
7022      value: this.parseValueLiteral(false),
7023      loc: this.loc(start)
7024    };
7025  };
7026
7027  _proto.parseConstArgument = function parseConstArgument() {
7028    var start = this._lexer.token;
7029    return {
7030      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ARGUMENT,
7031      name: this.parseName(),
7032      value: (this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].COLON), this.parseValueLiteral(true)),
7033      loc: this.loc(start)
7034    };
7035  } // Implements the parsing rules in the Fragments section.
7036
7037  /**
7038   * Corresponds to both FragmentSpread and InlineFragment in the spec.
7039   *
7040   * FragmentSpread : ... FragmentName Directives?
7041   *
7042   * InlineFragment : ... TypeCondition? Directives? SelectionSet
7043   */
7044  ;
7045
7046  _proto.parseFragment = function parseFragment() {
7047    var start = this._lexer.token;
7048    this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].SPREAD);
7049    var hasTypeCondition = this.expectOptionalKeyword('on');
7050
7051    if (!hasTypeCondition && this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME)) {
7052      return {
7053        kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FRAGMENT_SPREAD,
7054        name: this.parseFragmentName(),
7055        directives: this.parseDirectives(false),
7056        loc: this.loc(start)
7057      };
7058    }
7059
7060    return {
7061      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].INLINE_FRAGMENT,
7062      typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,
7063      directives: this.parseDirectives(false),
7064      selectionSet: this.parseSelectionSet(),
7065      loc: this.loc(start)
7066    };
7067  }
7068  /**
7069   * FragmentDefinition :
7070   *   - fragment FragmentName on TypeCondition Directives? SelectionSet
7071   *
7072   * TypeCondition : NamedType
7073   */
7074  ;
7075
7076  _proto.parseFragmentDefinition = function parseFragmentDefinition() {
7077    var _this$_options;
7078
7079    var start = this._lexer.token;
7080    this.expectKeyword('fragment'); // Experimental support for defining variables within fragments changes
7081    // the grammar of FragmentDefinition:
7082    //   - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet
7083
7084    if (((_this$_options = this._options) === null || _this$_options === void 0 ? void 0 : _this$_options.experimentalFragmentVariables) === true) {
7085      return {
7086        kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FRAGMENT_DEFINITION,
7087        name: this.parseFragmentName(),
7088        variableDefinitions: this.parseVariableDefinitions(),
7089        typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
7090        directives: this.parseDirectives(false),
7091        selectionSet: this.parseSelectionSet(),
7092        loc: this.loc(start)
7093      };
7094    }
7095
7096    return {
7097      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FRAGMENT_DEFINITION,
7098      name: this.parseFragmentName(),
7099      typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
7100      directives: this.parseDirectives(false),
7101      selectionSet: this.parseSelectionSet(),
7102      loc: this.loc(start)
7103    };
7104  }
7105  /**
7106   * FragmentName : Name but not `on`
7107   */
7108  ;
7109
7110  _proto.parseFragmentName = function parseFragmentName() {
7111    if (this._lexer.token.value === 'on') {
7112      throw this.unexpected();
7113    }
7114
7115    return this.parseName();
7116  } // Implements the parsing rules in the Values section.
7117
7118  /**
7119   * Value[Const] :
7120   *   - [~Const] Variable
7121   *   - IntValue
7122   *   - FloatValue
7123   *   - StringValue
7124   *   - BooleanValue
7125   *   - NullValue
7126   *   - EnumValue
7127   *   - ListValue[?Const]
7128   *   - ObjectValue[?Const]
7129   *
7130   * BooleanValue : one of `true` `false`
7131   *
7132   * NullValue : `null`
7133   *
7134   * EnumValue : Name but not `true`, `false` or `null`
7135   */
7136  ;
7137
7138  _proto.parseValueLiteral = function parseValueLiteral(isConst) {
7139    var token = this._lexer.token;
7140
7141    switch (token.kind) {
7142      case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACKET_L:
7143        return this.parseList(isConst);
7144
7145      case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L:
7146        return this.parseObject(isConst);
7147
7148      case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].INT:
7149        this._lexer.advance();
7150
7151        return {
7152          kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].INT,
7153          value: token.value,
7154          loc: this.loc(token)
7155        };
7156
7157      case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].FLOAT:
7158        this._lexer.advance();
7159
7160        return {
7161          kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FLOAT,
7162          value: token.value,
7163          loc: this.loc(token)
7164        };
7165
7166      case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].STRING:
7167      case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BLOCK_STRING:
7168        return this.parseStringLiteral();
7169
7170      case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME:
7171        this._lexer.advance();
7172
7173        switch (token.value) {
7174          case 'true':
7175            return {
7176              kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].BOOLEAN,
7177              value: true,
7178              loc: this.loc(token)
7179            };
7180
7181          case 'false':
7182            return {
7183              kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].BOOLEAN,
7184              value: false,
7185              loc: this.loc(token)
7186            };
7187
7188          case 'null':
7189            return {
7190              kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].NULL,
7191              loc: this.loc(token)
7192            };
7193
7194          default:
7195            return {
7196              kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ENUM,
7197              value: token.value,
7198              loc: this.loc(token)
7199            };
7200        }
7201
7202      case _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].DOLLAR:
7203        if (!isConst) {
7204          return this.parseVariable();
7205        }
7206
7207        break;
7208    }
7209
7210    throw this.unexpected();
7211  };
7212
7213  _proto.parseStringLiteral = function parseStringLiteral() {
7214    var token = this._lexer.token;
7215
7216    this._lexer.advance();
7217
7218    return {
7219      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].STRING,
7220      value: token.value,
7221      block: token.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BLOCK_STRING,
7222      loc: this.loc(token)
7223    };
7224  }
7225  /**
7226   * ListValue[Const] :
7227   *   - [ ]
7228   *   - [ Value[?Const]+ ]
7229   */
7230  ;
7231
7232  _proto.parseList = function parseList(isConst) {
7233    var _this = this;
7234
7235    var start = this._lexer.token;
7236
7237    var item = function item() {
7238      return _this.parseValueLiteral(isConst);
7239    };
7240
7241    return {
7242      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].LIST,
7243      values: this.any(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACKET_L, item, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACKET_R),
7244      loc: this.loc(start)
7245    };
7246  }
7247  /**
7248   * ObjectValue[Const] :
7249   *   - { }
7250   *   - { ObjectField[?Const]+ }
7251   */
7252  ;
7253
7254  _proto.parseObject = function parseObject(isConst) {
7255    var _this2 = this;
7256
7257    var start = this._lexer.token;
7258
7259    var item = function item() {
7260      return _this2.parseObjectField(isConst);
7261    };
7262
7263    return {
7264      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OBJECT,
7265      fields: this.any(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L, item, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_R),
7266      loc: this.loc(start)
7267    };
7268  }
7269  /**
7270   * ObjectField[Const] : Name : Value[?Const]
7271   */
7272  ;
7273
7274  _proto.parseObjectField = function parseObjectField(isConst) {
7275    var start = this._lexer.token;
7276    var name = this.parseName();
7277    this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].COLON);
7278    return {
7279      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OBJECT_FIELD,
7280      name: name,
7281      value: this.parseValueLiteral(isConst),
7282      loc: this.loc(start)
7283    };
7284  } // Implements the parsing rules in the Directives section.
7285
7286  /**
7287   * Directives[Const] : Directive[?Const]+
7288   */
7289  ;
7290
7291  _proto.parseDirectives = function parseDirectives(isConst) {
7292    var directives = [];
7293
7294    while (this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].AT)) {
7295      directives.push(this.parseDirective(isConst));
7296    }
7297
7298    return directives;
7299  }
7300  /**
7301   * Directive[Const] : @ Name Arguments[?Const]?
7302   */
7303  ;
7304
7305  _proto.parseDirective = function parseDirective(isConst) {
7306    var start = this._lexer.token;
7307    this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].AT);
7308    return {
7309      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].DIRECTIVE,
7310      name: this.parseName(),
7311      arguments: this.parseArguments(isConst),
7312      loc: this.loc(start)
7313    };
7314  } // Implements the parsing rules in the Types section.
7315
7316  /**
7317   * Type :
7318   *   - NamedType
7319   *   - ListType
7320   *   - NonNullType
7321   */
7322  ;
7323
7324  _proto.parseTypeReference = function parseTypeReference() {
7325    var start = this._lexer.token;
7326    var type;
7327
7328    if (this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACKET_L)) {
7329      type = this.parseTypeReference();
7330      this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACKET_R);
7331      type = {
7332        kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].LIST_TYPE,
7333        type: type,
7334        loc: this.loc(start)
7335      };
7336    } else {
7337      type = this.parseNamedType();
7338    }
7339
7340    if (this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BANG)) {
7341      return {
7342        kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].NON_NULL_TYPE,
7343        type: type,
7344        loc: this.loc(start)
7345      };
7346    }
7347
7348    return type;
7349  }
7350  /**
7351   * NamedType : Name
7352   */
7353  ;
7354
7355  _proto.parseNamedType = function parseNamedType() {
7356    var start = this._lexer.token;
7357    return {
7358      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].NAMED_TYPE,
7359      name: this.parseName(),
7360      loc: this.loc(start)
7361    };
7362  } // Implements the parsing rules in the Type Definition section.
7363
7364  /**
7365   * TypeSystemDefinition :
7366   *   - SchemaDefinition
7367   *   - TypeDefinition
7368   *   - DirectiveDefinition
7369   *
7370   * TypeDefinition :
7371   *   - ScalarTypeDefinition
7372   *   - ObjectTypeDefinition
7373   *   - InterfaceTypeDefinition
7374   *   - UnionTypeDefinition
7375   *   - EnumTypeDefinition
7376   *   - InputObjectTypeDefinition
7377   */
7378  ;
7379
7380  _proto.parseTypeSystemDefinition = function parseTypeSystemDefinition() {
7381    // Many definitions begin with a description and require a lookahead.
7382    var keywordToken = this.peekDescription() ? this._lexer.lookahead() : this._lexer.token;
7383
7384    if (keywordToken.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME) {
7385      switch (keywordToken.value) {
7386        case 'schema':
7387          return this.parseSchemaDefinition();
7388
7389        case 'scalar':
7390          return this.parseScalarTypeDefinition();
7391
7392        case 'type':
7393          return this.parseObjectTypeDefinition();
7394
7395        case 'interface':
7396          return this.parseInterfaceTypeDefinition();
7397
7398        case 'union':
7399          return this.parseUnionTypeDefinition();
7400
7401        case 'enum':
7402          return this.parseEnumTypeDefinition();
7403
7404        case 'input':
7405          return this.parseInputObjectTypeDefinition();
7406
7407        case 'directive':
7408          return this.parseDirectiveDefinition();
7409      }
7410    }
7411
7412    throw this.unexpected(keywordToken);
7413  };
7414
7415  _proto.peekDescription = function peekDescription() {
7416    return this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].STRING) || this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BLOCK_STRING);
7417  }
7418  /**
7419   * Description : StringValue
7420   */
7421  ;
7422
7423  _proto.parseDescription = function parseDescription() {
7424    if (this.peekDescription()) {
7425      return this.parseStringLiteral();
7426    }
7427  }
7428  /**
7429   * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
7430   */
7431  ;
7432
7433  _proto.parseSchemaDefinition = function parseSchemaDefinition() {
7434    var start = this._lexer.token;
7435    var description = this.parseDescription();
7436    this.expectKeyword('schema');
7437    var directives = this.parseDirectives(true);
7438    var operationTypes = this.many(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L, this.parseOperationTypeDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_R);
7439    return {
7440      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SCHEMA_DEFINITION,
7441      description: description,
7442      directives: directives,
7443      operationTypes: operationTypes,
7444      loc: this.loc(start)
7445    };
7446  }
7447  /**
7448   * OperationTypeDefinition : OperationType : NamedType
7449   */
7450  ;
7451
7452  _proto.parseOperationTypeDefinition = function parseOperationTypeDefinition() {
7453    var start = this._lexer.token;
7454    var operation = this.parseOperationType();
7455    this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].COLON);
7456    var type = this.parseNamedType();
7457    return {
7458      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OPERATION_TYPE_DEFINITION,
7459      operation: operation,
7460      type: type,
7461      loc: this.loc(start)
7462    };
7463  }
7464  /**
7465   * Scala
7465rTypeDefinition : Description? scalar Name Directives[Const]?
7466   */
7467  ;
7468
7469  _proto.parseScalarTypeDefinition = function parseScalarTypeDefinition() {
7470    var start = this._lexer.token;
7471    var description = this.parseDescription();
7472    this.expectKeyword('scalar');
7473    var name = this.parseName();
7474    var directives = this.parseDirectives(true);
7475    return {
7476      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SCALAR_TYPE_DEFINITION,
7477      description: description,
7478      name: name,
7479      directives: directives,
7480      loc: this.loc(start)
7481    };
7482  }
7483  /**
7484   * ObjectTypeDefinition :
7485   *   Description?
7486   *   type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
7487   */
7488  ;
7489
7490  _proto.parseObjectTypeDefinition = function parseObjectTypeDefinition() {
7491    var start = this._lexer.token;
7492    var description = this.parseDescription();
7493    this.expectKeyword('type');
7494    var name = this.parseName();
7495    var interfaces = this.parseImplementsInterfaces();
7496    var directives = this.parseDirectives(true);
7497    var fields = this.parseFieldsDefinition();
7498    return {
7499      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OBJECT_TYPE_DEFINITION,
7500      description: description,
7501      name: name,
7502      interfaces: interfaces,
7503      directives: directives,
7504      fields: fields,
7505      loc: this.loc(start)
7506    };
7507  }
7508  /**
7509   * ImplementsInterfaces :
7510   *   - implements `&`? NamedType
7511   *   - ImplementsInterfaces & NamedType
7512   */
7513  ;
7514
7515  _proto.parseImplementsInterfaces = function parseImplementsInterfaces() {
7516    var _this$_options2;
7517
7518    if (!this.expectOptionalKeyword('implements')) {
7519      return [];
7520    }
7521
7522    if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {
7523      var types = []; // Optional leading ampersand
7524
7525      this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].AMP);
7526
7527      do {
7528        types.push(this.parseNamedType());
7529      } while (this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].AMP) || this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME));
7530
7531      return types;
7532    }
7533
7534    return this.delimitedMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].AMP, this.parseNamedType);
7535  }
7536  /**
7537   * FieldsDefinition : { FieldDefinition+ }
7538   */
7539  ;
7540
7541  _proto.parseFieldsDefinition = function parseFieldsDefinition() {
7542    var _this$_options3;
7543
7544    // Legacy support for the SDL?
7545    if (((_this$_options3 = this._options) === null || _this$_options3 === void 0 ? void 0 : _this$_options3.allowLegacySDLEmptyFields) === true && this.peek(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L) && this._lexer.lookahead().kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_R) {
7546      this._lexer.advance();
7547
7548      this._lexer.advance();
7549
7550      return [];
7551    }
7552
7553    return this.optionalMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L, this.parseFieldDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_R);
7554  }
7555  /**
7556   * FieldDefinition :
7557   *   - Description? Name ArgumentsDefinition? : Type Directives[Const]?
7558   */
7559  ;
7560
7561  _proto.parseFieldDefinition = function parseFieldDefinition() {
7562    var start = this._lexer.token;
7563    var description = this.parseDescription();
7564    var name = this.parseName();
7565    var args = this.parseArgumentDefs();
7566    this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].COLON);
7567    var type = this.parseTypeReference();
7568    var directives = this.parseDirectives(true);
7569    return {
7570      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].FIELD_DEFINITION,
7571      description: description,
7572      name: name,
7573      arguments: args,
7574      type: type,
7575      directives: directives,
7576      loc: this.loc(start)
7577    };
7578  }
7579  /**
7580   * ArgumentsDefinition : ( InputValueDefinition+ )
7581   */
7582  ;
7583
7584  _proto.parseArgumentDefs = function parseArgumentDefs() {
7585    return this.optionalMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].PAREN_L, this.parseInputValueDef, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].PAREN_R);
7586  }
7587  /**
7588   * InputValueDefinition :
7589   *   - Description? Name : Type DefaultValue? Directives[Const]?
7590   */
7591  ;
7592
7593  _proto.parseInputValueDef = function parseInputValueDef() {
7594    var start = this._lexer.token;
7595    var description = this.parseDescription();
7596    var name = this.parseName();
7597    this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].COLON);
7598    var type = this.parseTypeReference();
7599    var defaultValue;
7600
7601    if (this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].EQUALS)) {
7602      defaultValue = this.parseValueLiteral(true);
7603    }
7604
7605    var directives = this.parseDirectives(true);
7606    return {
7607      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].INPUT_VALUE_DEFINITION,
7608      description: description,
7609      name: name,
7610      type: type,
7611      defaultValue: defaultValue,
7612      directives: directives,
7613      loc: this.loc(start)
7614    };
7615  }
7616  /**
7617   * InterfaceTypeDefinition :
7618   *   - Description? interface Name Directives[Const]? FieldsDefinition?
7619   */
7620  ;
7621
7622  _proto.parseInterfaceTypeDefinition = function parseInterfaceTypeDefinition() {
7623    var start = this._lexer.token;
7624    var description = this.parseDescription();
7625    this.expectKeyword('interface');
7626    var name = this.parseName();
7627    var interfaces = this.parseImplementsInterfaces();
7628    var directives = this.parseDirectives(true);
7629    var fields = this.parseFieldsDefinition();
7630    return {
7631      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].INTERFACE_TYPE_DEFINITION,
7632      description: description,
7633      name: name,
7634      interfaces: interfaces,
7635      directives: directives,
7636      fields: fields,
7637      loc: this.loc(start)
7638    };
7639  }
7640  /**
7641   * UnionTypeDefinition :
7642   *   - Description? union Name Directives[Const]? UnionMemberTypes?
7643   */
7644  ;
7645
7646  _proto.parseUnionTypeDefinition = function parseUnionTypeDefinition() {
7647    var start = this._lexer.token;
7648    var description = this.parseDescription();
7649    this.expectKeyword('union');
7650    var name = this.parseName();
7651    var directives = this.parseDirectives(true);
7652    var types = this.parseUnionMemberTypes();
7653    return {
7654      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].UNION_TYPE_DEFINITION,
7655      description: description,
7656      name: name,
7657      directives: directives,
7658      types: types,
7659      loc: this.loc(start)
7660    };
7661  }
7662  /**
7663   * UnionMemberTypes :
7664   *   - = `|`? NamedType
7665   *   - UnionMemberTypes | NamedType
7666   */
7667  ;
7668
7669  _proto.parseUnionMemberTypes = function parseUnionMemberTypes() {
7670    return this.expectOptionalToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].EQUALS) ? this.delimitedMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].PIPE, this.parseNamedType) : [];
7671  }
7672  /**
7673   * EnumTypeDefinition :
7674   *   - Description? enum Name Directives[Const]? EnumValuesDefinition?
7675   */
7676  ;
7677
7678  _proto.parseEnumTypeDefinition = function parseEnumTypeDefinition() {
7679    var start = this._lexer.token;
7680    var description = this.parseDescription();
7681    this.expectKeyword('enum');
7682    var name = this.parseName();
7683    var directives = this.parseDirectives(true);
7684    var values = this.parseEnumValuesDefinition();
7685    return {
7686      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ENUM_TYPE_DEFINITION,
7687      description: description,
7688      name: name,
7689      directives: directives,
7690      values: values,
7691      loc: this.loc(start)
7692    };
7693  }
7694  /**
7695   * EnumValuesDefinition : { EnumValueDefinition+ }
7696   */
7697  ;
7698
7699  _proto.parseEnumValuesDefinition = function parseEnumValuesDefinition() {
7700    return this.optionalMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L, this.parseEnumValueDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_R);
7701  }
7702  /**
7703   * EnumValueDefinition : Description? EnumValue Directives[Const]?
7704   *
7705   * EnumValue : Name
7706   */
7707  ;
7708
7709  _proto.parseEnumValueDefinition = function parseEnumValueDefinition() {
7710    var start = this._lexer.token;
7711    var description = this.parseDescription();
7712    var name = this.parseName();
7713    var directives = this.parseDirectives(true);
7714    return {
7715      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ENUM_VALUE_DEFINITION,
7716      description: description,
7717      name: name,
7718      directives: directives,
7719      loc: this.loc(start)
7720    };
7721  }
7722  /**
7723   * InputObjectTypeDefinition :
7724   *   - Description? input Name Directives[Const]? InputFieldsDefinition?
7725   */
7726  ;
7727
7728  _proto.parseInputObjectTypeDefinition = function parseInputObjectTypeDefinition() {
7729    var start = this._lexer.token;
7730    var description = this.parseDescription();
7731    this.expectKeyword('input');
7732    var name = this.parseName();
7733    var directives = this.parseDirectives(true);
7734    var fields = this.parseInputFieldsDefinition();
7735    return {
7736      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].INPUT_OBJECT_TYPE_DEFINITION,
7737      description: description,
7738      name: name,
7739      directives: directives,
7740      fields: fields,
7741      loc: this.loc(start)
7742    };
7743  }
7744  /**
7745   * InputFieldsDefinition : { InputValueDefinition+ }
7746   */
7747  ;
7748
7749  _proto.parseInputFieldsDefinition = function parseInputFieldsDefinition() {
7750    return this.optionalMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L, this.parseInputValueDef, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_R);
7751  }
7752  /**
7753   * TypeSystemExtension :
7754   *   - SchemaExtension
7755   *   - TypeExtension
7756   *
7757   * TypeExtension :
7758   *   - ScalarTypeExtension
7759   *   - ObjectTypeExtension
7760   *   - InterfaceTypeExtension
7761   *   - UnionTypeExtension
7762   *   - EnumTypeExtension
7763   *   - InputObjectTypeDefinition
7764   */
7765  ;
7766
7767  _proto.parseTypeSystemExtension = function parseTypeSystemExtension() {
7768    var keywordToken = this._lexer.lookahead();
7769
7770    if (keywordToken.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME) {
7771      switch (keywordToken.value) {
7772        case 'schema':
7773          return this.parseSchemaExtension();
7774
7775        case 'scalar':
7776          return this.parseScalarTypeExtension();
7777
7778        case 'type':
7779          return this.parseObjectTypeExtension();
7780
7781        case 'interface':
7782          return this.parseInterfaceTypeExtension();
7783
7784        case 'union':
7785          return this.parseUnionTypeExtension();
7786
7787        case 'enum':
7788          return this.parseEnumTypeExtension();
7789
7790        case 'input':
7791          return this.parseInputObjectTypeExtension();
7792      }
7793    }
7794
7795    throw this.unexpected(keywordToken);
7796  }
7797  /**
7798   * SchemaExtension :
7799   *  - extend schema Directives[Const]? { OperationTypeDefinition+ }
7800   *  - extend schema Directives[Const]
7801   */
7802  ;
7803
7804  _proto.parseSchemaExtension = function parseSchemaExtension() {
7805    var start = this._lexer.token;
7806    this.expectKeyword('extend');
7807    this.expectKeyword('schema');
7808    var directives = this.parseDirectives(true);
7809    var operationTypes = this.optionalMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_L, this.parseOperationTypeDefinition, _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].BRACE_R);
7810
7811    if (directives.length === 0 && operationTypes.length === 0) {
7812      throw this.unexpected();
7813    }
7814
7815    return {
7816      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SCHEMA_EXTENSION,
7817      directives: directives,
7818      operationTypes: operationTypes,
7819      loc: this.loc(start)
7820    };
7821  }
7822  /**
7823   * ScalarTypeExtension :
7824   *   - extend scalar Name Directives[Const]
7825   */
7826  ;
7827
7828  _proto.parseScalarTypeExtension = function parseScalarTypeExtension() {
7829    var start = this._lexer.token;
7830    this.expectKeyword('extend');
7831    this.expectKeyword('scalar');
7832    var name = this.parseName();
7833    var directives = this.parseDirectives(true);
7834
7835    if (directives.length === 0) {
7836      throw this.unexpected();
7837    }
7838
7839    return {
7840      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SCALAR_TYPE_EXTENSION,
7841      name: name,
7842      directives: directives,
7843      loc: this.loc(start)
7844    };
7845  }
7846  /**
7847   * ObjectTypeExtension :
7848   *  - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
7849   *  - extend type Name ImplementsInterfaces? Directives[Const]
7850   *  - extend type Name ImplementsInterfaces
7851   */
7852  ;
7853
7854  _proto.parseObjectTypeExtension = function parseObjectTypeExtension() {
7855    var start = this._lexer.token;
7856    this.expectKeyword('extend');
7857    this.expectKeyword('type');
7858    var name = this.parseName();
7859    var interfaces = this.parseImplementsInterfaces();
7860    var directives = this.parseDirectives(true);
7861    var fields = this.parseFieldsDefinition();
7862
7863    if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
7864      throw this.unexpected();
7865    }
7866
7867    return {
7868      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OBJECT_TYPE_EXTENSION,
7869      name: name,
7870      interfaces: interfaces,
7871      directives: directives,
7872      fields: fields,
7873      loc: this.loc(start)
7874    };
7875  }
7876  /**
7877   * InterfaceTypeExtension :
7878   *  - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
7879   *  - extend interface Name ImplementsInterfaces? Directives[Const]
7880   *  - extend interface Name ImplementsInterfaces
7881   */
7882  ;
7883
7884  _proto.parseInterfaceTypeExtension = function parseInterfaceTypeExtension() {
7885    var start = this._lexer.token;
7886    this.expectKeyword('extend');
7887    this.expectKeyword('interface');
7888    var name = this.parseName();
7889    var interfaces = this.parseImplementsInterfaces();
7890    var directives = this.parseDirectives(true);
7891    var fields = this.parseFieldsDefinition();
7892
7893    if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
7894      throw this.unexpected();
7895    }
7896
7897    return {
7898      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].INTERFACE_TYPE_EXTENSION,
7899      name: name,
7900      interfaces: interfaces,
7901      directives: directives,
7902      fields: fields,
7903      loc: this.loc(start)
7904    };
7905  }
7906  /**
7907   * UnionTypeExtension :
7908   *   - extend union Name Directives[Const]? UnionMemberTypes
7909   *   - extend union Name Directives[Const]
7910   */
7911  ;
7912
7913  _proto.parseUnionTypeExtension = function parseUnionTypeExtension() {
7914    var start = this._lexer.token;
7915    this.expectKeyword('extend');
7916    this.expectKeyword('union');
7917    var name = this.parseName();
7918    var directives = this.parseDirectives(true);
7919    var types = this.parseUnionMemberTypes();
7920
7921    if (directives.length === 0 && types.length === 0) {
7922      throw this.unexpected();
7923    }
7924
7925    return {
7926      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].UNION_TYPE_EXTENSION,
7927      name: name,
7928      directives: directives,
7929      types: types,
7930      loc: this.loc(start)
7931    };
7932  }
7933  /**
7934   * EnumTypeExtension :
7935   *   - extend enum Name Directives[Const]? EnumValuesDefinition
7936   *   - extend enum Name Directives[Const]
7937   */
7938  ;
7939
7940  _proto.parseEnumTypeExtension = function parseEnumTypeExtension() {
7941    var start = this._lexer.token;
7942    this.expectKeyword('extend');
7943    this.expectKeyword('enum');
7944    var name = this.parseName();
7945    var directives = this.parseDirectives(true);
7946    var values = this.parseEnumValuesDefinition();
7947
7948    if (directives.length === 0 && values.length === 0) {
7949      throw this.unexpected();
7950    }
7951
7952    return {
7953      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].ENUM_TYPE_EXTENSION,
7954      name: name,
7955      directives: directives,
7956      values: values,
7957      loc: this.loc(start)
7958    };
7959  }
7960  /**
7961   * InputObjectTypeExtension :
7962   *   - extend input Name Directives[Const]? InputFieldsDefinition
7963   *   - extend input Name Directives[Const]
7964   */
7965  ;
7966
7967  _proto.parseInputObjectTypeExtension = function parseInputObjectTypeExtension() {
7968    var start = this._lexer.token;
7969    this.expectKeyword('extend');
7970    this.expectKeyword('input');
7971    var name = this.parseName();
7972    var directives = this.parseDirectives(true);
7973    var fields = thi
7973s.parseInputFieldsDefinition();
7974
7975    if (directives.length === 0 && fields.length === 0) {
7976      throw this.unexpected();
7977    }
7978
7979    return {
7980      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].INPUT_OBJECT_TYPE_EXTENSION,
7981      name: name,
7982      directives: directives,
7983      fields: fields,
7984      loc: this.loc(start)
7985    };
7986  }
7987  /**
7988   * DirectiveDefinition :
7989   *   - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
7990   */
7991  ;
7992
7993  _proto.parseDirectiveDefinition = function parseDirectiveDefinition() {
7994    var start = this._lexer.token;
7995    var description = this.parseDescription();
7996    this.expectKeyword('directive');
7997    this.expectToken(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].AT);
7998    var name = this.parseName();
7999    var args = this.parseArgumentDefs();
8000    var repeatable = this.expectOptionalKeyword('repeatable');
8001    this.expectKeyword('on');
8002    var locations = this.parseDirectiveLocations();
8003    return {
8004      kind: _kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].DIRECTIVE_DEFINITION,
8005      description: description,
8006      name: name,
8007      arguments: args,
8008      repeatable: repeatable,
8009      locations: locations,
8010      loc: this.loc(start)
8011    };
8012  }
8013  /**
8014   * DirectiveLocations :
8015   *   - `|`? DirectiveLocation
8016   *   - DirectiveLocations | DirectiveLocation
8017   */
8018  ;
8019
8020  _proto.parseDirectiveLocations = function parseDirectiveLocations() {
8021    return this.delimitedMany(_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].PIPE, this.parseDirectiveLocation);
8022  }
8023  /*
8024   * DirectiveLocation :
8025   *   - ExecutableDirectiveLocation
8026   *   - TypeSystemDirectiveLocation
8027   *
8028   * ExecutableDirectiveLocation : one of
8029   *   `QUERY`
8030   *   `MUTATION`
8031   *   `SUBSCRIPTION`
8032   *   `FIELD`
8033   *   `FRAGMENT_DEFINITION`
8034   *   `FRAGMENT_SPREAD`
8035   *   `INLINE_FRAGMENT`
8036   *
8037   * TypeSystemDirectiveLocation : one of
8038   *   `SCHEMA`
8039   *   `SCALAR`
8040   *   `OBJECT`
8041   *   `FIELD_DEFINITION`
8042   *   `ARGUMENT_DEFINITION`
8043   *   `INTERFACE`
8044   *   `UNION`
8045   *   `ENUM`
8046   *   `ENUM_VALUE`
8047   *   `INPUT_OBJECT`
8048   *   `INPUT_FIELD_DEFINITION`
8049   */
8050  ;
8051
8052  _proto.parseDirectiveLocation = function parseDirectiveLocation() {
8053    var start = this._lexer.token;
8054    var name = this.parseName();
8055
8056    if (_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_5__[/* DirectiveLocation */ "a"][name.value] !== undefined) {
8057      return name;
8058    }
8059
8060    throw this.unexpected(start);
8061  } // Core parsing utility functions
8062
8063  /**
8064   * Returns a location object, used to identify the place in the source that created a given parsed object.
8065   */
8066  ;
8067
8068  _proto.loc = function loc(startToken) {
8069    var _this$_options4;
8070
8071    if (((_this$_options4 = this._options) === null || _this$_options4 === void 0 ? void 0 : _this$_options4.noLocation) !== true) {
8072      return new _ast_mjs__WEBPACK_IMPORTED_MODULE_2__[/* Location */ "a"](startToken, this._lexer.lastToken, this._lexer.source);
8073    }
8074  }
8075  /**
8076   * Determines if the next token is of a given kind
8077   */
8078  ;
8079
8080  _proto.peek = function peek(kind) {
8081    return this._lexer.token.kind === kind;
8082  }
8083  /**
8084   * If the next token is of the given kind, return that token after advancing the lexer.
8085   * Otherwise, do not change the parser state and throw an error.
8086   */
8087  ;
8088
8089  _proto.expectToken = function expectToken(kind) {
8090    var token = this._lexer.token;
8091
8092    if (token.kind === kind) {
8093      this._lexer.advance();
8094
8095      return token;
8096    }
8097
8098    throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(this._lexer.source, token.start, "Expected ".concat(getTokenKindDesc(kind), ", found ").concat(getTokenDesc(token), "."));
8099  }
8100  /**
8101   * If the next token is of the given kind, return that token after advancing the lexer.
8102   * Otherwise, do not change the parser state and return undefined.
8103   */
8104  ;
8105
8106  _proto.expectOptionalToken = function expectOptionalToken(kind) {
8107    var token = this._lexer.token;
8108
8109    if (token.kind === kind) {
8110      this._lexer.advance();
8111
8112      return token;
8113    }
8114
8115    return undefined;
8116  }
8117  /**
8118   * If the next token is a given keyword, advance the lexer.
8119   * Otherwise, do not change the parser state and throw an error.
8120   */
8121  ;
8122
8123  _proto.expectKeyword = function expectKeyword(value) {
8124    var token = this._lexer.token;
8125
8126    if (token.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME && token.value === value) {
8127      this._lexer.advance();
8128    } else {
8129      throw Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(this._lexer.source, token.start, "Expected \"".concat(value, "\", found ").concat(getTokenDesc(token), "."));
8130    }
8131  }
8132  /**
8133   * If the next token is a given keyword, return "true" after advancing the lexer.
8134   * Otherwise, do not change the parser state and return "false".
8135   */
8136  ;
8137
8138  _proto.expectOptionalKeyword = function expectOptionalKeyword(value) {
8139    var token = this._lexer.token;
8140
8141    if (token.kind === _tokenKind_mjs__WEBPACK_IMPORTED_MODULE_3__[/* TokenKind */ "a"].NAME && token.value === value) {
8142      this._lexer.advance();
8143
8144      return true;
8145    }
8146
8147    return false;
8148  }
8149  /**
8150   * Helper function for creating an error when an unexpected lexed token is encountered.
8151   */
8152  ;
8153
8154  _proto.unexpected = function unexpected(atToken) {
8155    var token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;
8156    return Object(_error_syntaxError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* syntaxError */ "a"])(this._lexer.source, token.start, "Unexpected ".concat(getTokenDesc(token), "."));
8157  }
8158  /**
8159   * Returns a possibly empty list of parse nodes, determined by the parseFn.
8160   * This list begins with a lex token of openKind and ends with a lex token of closeKind.
8161   * Advances the parser to the next lex token after the closing token.
8162   */
8163  ;
8164
8165  _proto.any = function any(openKind, parseFn, closeKind) {
8166    this.expectToken(openKind);
8167    var nodes = [];
8168
8169    while (!this.expectOptionalToken(closeKind)) {
8170      nodes.push(parseFn.call(this));
8171    }
8172
8173    return nodes;
8174  }
8175  /**
8176   * Returns a list of parse nodes, determined by the parseFn.
8177   * It can be empty only if open token is missing otherwise it will always return non-empty list
8178   * that begins with a lex token of openKind and ends with a lex token of closeKind.
8179   * Advances the parser to the next lex token after the closing token.
8180   */
8181  ;
8182
8183  _proto.optionalMany = function optionalMany(openKind, parseFn, closeKind) {
8184    if (this.expectOptionalToken(openKind)) {
8185      var nodes = [];
8186
8187      do {
8188        nodes.push(parseFn.call(this));
8189      } while (!this.expectOptionalToken(closeKind));
8190
8191      return nodes;
8192    }
8193
8194    return [];
8195  }
8196  /**
8197   * Returns a non-empty list of parse nodes, determined by the parseFn.
8198   * This list begins with a lex token of openKind and ends with a lex token of closeKind.
8199   * Advances the parser to the next lex token after the closing token.
8200   */
8201  ;
8202
8203  _proto.many = function many(openKind, parseFn, closeKind) {
8204    this.expectToken(openKind);
8205    var nodes = [];
8206
8207    do {
8208      nodes.push(parseFn.call(this));
8209    } while (!this.expectOptionalToken(closeKind));
8210
8211    return nodes;
8212  }
8213  /**
8214   * Returns a non-empty list of parse nodes, determined by the parseFn.
8215   * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
8216   * Advances the parser to the next lex token after last item in the list.
8217   */
8218  ;
8219
8220  _proto.delimitedMany = function delimitedMany(delimiterKind, parseFn) {
8221    this.expectOptionalToken(delimiterKind);
8222    var nodes = [];
8223
8224    do {
8225      nodes.push(parseFn.call(this));
8226    } while (this.expectOptionalToken(delimiterKind));
8227
8228    return nodes;
8229  };
8230
8231  return Parser;
8232}();
8233/**
8234 * A helper function to describe a token as a string for debugging.
8235 */
8236
8237function getTokenDesc(token) {
8238  var value = token.value;
8239  return getTokenKindDesc(token.kind) + (value != null ? " \"".concat(value, "\"") : '');
8240}
8241/**
8242 * A helper function to describe a token kind as a string for debugging.
8243 */
8244
8245
8246function getTokenKindDesc(kind) {
8247  return Object(_lexer_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isPunctuatorTokenKind */ "b"])(kind) ? "\"".concat(kind, "\"") : kind;
8248}
8249
8250
8251/***/ }),
8252
8253/***/ "EQxW":
8254/***/ (function(module, exports, __webpack_require__) {
8255
8256"use strict";
8257/**
8258 * Copyright (c) Facebook, Inc. and its affiliates.
8259 *
8260 * This source code is licensed under the MIT license found in the
8261 * LICENSE file in the root directory of this source tree.
8262 *
8263 * 
8264 * @format
8265 */
8266// flowlint ambiguous-object-type:error
8267
8268
8269var invariant = __webpack_require__("OUqe");
8270
8271var _require = __webpack_require__("/HjL"),
8272    printArguments = _require.printArguments,
8273    printDirectives = _require.printDirectives;
8274
8275/**
8276 * Generates an identifier that is unique to a given selection: the alias for
8277 * fields, the type for inline fragments, and a summary of the condition
8278 * variable and passing value for conditions.
8279 */
8280function getIdentifierForSelection(schema, node) {
8281  if (node.kind === 'LinkedField' || node.kind === 'ScalarField') {
8282    return 'Field: ' + node.directives.length === 0 ? node.alias : node.alias + printDirectives(schema, node.directives);
8283  } else if (node.kind === 'FragmentSpread') {
8284    return 'FragmentSpread:' + node.args.length === 0 ? node.name : node.name + printArguments(schema, node.args);
8285  } else if (node.kind === 'ModuleImport') {
8286    return 'ModuleImport:';
8287  } else if (node.kind === 'Defer') {
8288    return 'Defer:' + node.label;
8289  } else if (node.kind === 'Stream') {
8290    return 'Stream:' + node.label;
8291  } else if (node.kind === 'InlineFragment') {
8292    return 'InlineFragment:' + schema.getTypeString(node.typeCondition) + printDirectives(schema, node.directives);
8293  } else if (node.kind === 'ClientExtension') {
8294    return 'ClientExtension:';
8295  } else if (node.kind === 'InlineDataFragmentSpread') {
8296    return 'InlineDataFragment:' + node.name;
8297  } else if (node.kind === 'Condition') {
8298    return 'Condition:' + (node.condition.kind === 'Variable' ? '$' + node.condition.variableName : String(node.condition.value)) + 
8298String(node.passingValue);
8299  } else {
8300     true ?  false ? undefined : invariant(false) : undefined;
8301  }
8302}
8303
8304module.exports = getIdentifierForSelection;
8305
8306/***/ }),
8307
8308/***/ "EZ6x":
8309/***/ (function(module, exports, __webpack_require__) {
8310
8311"use strict";
8312
8313
8314var GetIntrinsic = __webpack_require__("AM7I");
8315
8316var $gOPD = __webpack_require__("me4n");
8317var $TypeError = GetIntrinsic('%TypeError%');
8318
8319var callBound = __webpack_require__("VF6F");
8320
8321var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
8322
8323var has = __webpack_require__("oNNP");
8324
8325var IsArray = __webpack_require__("plxK");
8326var IsPropertyKey = __webpack_require__("ml7t");
8327var IsRegExp = __webpack_require__("8lxt");
8328var ToPropertyDescriptor = __webpack_require__("FiDd");
8329var Type = __webpack_require__("zOLO");
8330
8331// https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
8332
8333module.exports = function OrdinaryGetOwnProperty(O, P) {
8334	if (Type(O) !== 'Object') {
8335		throw new $TypeError('Assertion failed: O must be an Object');
8336	}
8337	if (!IsPropertyKey(P)) {
8338		throw new $TypeError('Assertion failed: P must be a Property Key');
8339	}
8340	if (!has(O, P)) {
8341		return void 0;
8342	}
8343	if (!$gOPD) {
8344		// ES3 / IE 8 fallback
8345		var arrayLength = IsArray(O) && P === 'length';
8346		var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
8347		return {
8348			'[[Configurable]]': !(arrayLength || regexLastIndex),
8349			'[[Enumerable]]': $isEnumerable(O, P),
8350			'[[Value]]': O[P],
8351			'[[Writable]]': true
8352		};
8353	}
8354	return ToPropertyDescriptor($gOPD(O, P));
8355};
8356
8357
8358/***/ }),
8359
8360/***/ "EbDI":
8361/***/ (function(module, exports) {
8362
8363function _iterableToArray(iter) {
8364  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
8365}
8366
8367module.exports = _iterableToArray;
8368
8369/***/ }),
8370
8371/***/ "EkME":
8372/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
8373
8374"use strict";
8375/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return validate; });
8376/* unused harmony export validateSDL */
8377/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return assertValidSDL; });
8378/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return assertValidSDLExtension; });
8379/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("t3R0");
8380/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dWS+");
8381/* harmony import */ var _language_visitor_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("L2ys");
8382/* harmony import */ var _type_validate_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("93gR");
8383/* harmony import */ var _utilities_TypeInfo_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("4RMZ");
8384/* harmony import */ var _specifiedRules_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("FQ53");
8385/* harmony import */ var _ValidationContext_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("jOXf");
8386
8387
8388
8389
8390
8391
8392
8393/**
8394 * Implements the "Validation" section of the spec.
8395 *
8396 * Validation runs synchronously, returning an array of encountered errors, or
8397 * an empty array if no errors were encountered and the document is valid.
8398 *
8399 * A list of specific validation rules may be provided. If not provided, the
8400 * default list of rules defined by the GraphQL specification will be used.
8401 *
8402 * Each validation rules is a function which returns a visitor
8403 * (see the language/visitor API). Visitor methods are expected to return
8404 * GraphQLErrors, or Arrays of GraphQLErrors when invalid.
8405 *
8406 * Optionally a custom TypeInfo instance may be provided. If not provided, one
8407 * will be created from the provided schema.
8408 */
8409
8410function validate(schema, documentAST) {
8411  var rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _specifiedRules_mjs__WEBPACK_IMPORTED_MODULE_5__[/* specifiedRules */ "a"];
8412  var typeInfo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new _utilities_TypeInfo_mjs__WEBPACK_IMPORTED_MODULE_4__[/* TypeInfo */ "a"](schema);
8413  var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
8414    maxErrors: undefined
8415  };
8416  documentAST || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(0, 'Must provide document.');
8416 // If the schema used for validation is invalid, throw an error.
8417
8418  Object(_type_validate_mjs__WEBPACK_IMPORTED_MODULE_3__[/* assertValidSchema */ "a"])(schema);
8419  var abortObj = Object.freeze({});
8420  var errors = [];
8421  var context = new _ValidationContext_mjs__WEBPACK_IMPORTED_MODULE_6__[/* ValidationContext */ "b"](schema, documentAST, typeInfo, function (error) {
8422    if (options.maxErrors != null && errors.length >= options.maxErrors) {
8423      errors.push(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLError */ "a"]('Too many validation errors, error limit reached. Validation aborted.'));
8424      throw abortObj;
8425    }
8426
8427    errors.push(error);
8428  }); // This uses a specialized visitor which runs multiple visitors in parallel,
8429  // while maintaining the visitor skip and break API.
8430
8431  var visitor = Object(_language_visitor_mjs__WEBPACK_IMPORTED_MODULE_2__[/* visitInParallel */ "d"])(rules.map(function (rule) {
8432    return rule(context);
8433  })); // Visit the whole document with each instance of all provided rules.
8434
8435  try {
8436    Object(_language_visitor_mjs__WEBPACK_IMPORTED_MODULE_2__[/* visit */ "c"])(documentAST, Object(_utilities_TypeInfo_mjs__WEBPACK_IMPORTED_MODULE_4__[/* visitWithTypeInfo */ "b"])(typeInfo, visitor));
8437  } catch (e) {
8438    if (e !== abortObj) {
8439      throw e;
8440    }
8441  }
8442
8443  return errors;
8444}
8445/**
8446 * @internal
8447 */
8448
8449function validateSDL(documentAST, schemaToExtend) {
8450  var rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _specifiedRules_mjs__WEBPACK_IMPORTED_MODULE_5__[/* specifiedSDLRules */ "b"];
8451  var errors = [];
8452  var context = new _ValidationContext_mjs__WEBPACK_IMPORTED_MODULE_6__[/* SDLValidationContext */ "a"](documentAST, schemaToExtend, function (error) {
8453    errors.push(error);
8454  });
8455  var visitors = rules.map(function (rule) {
8456    return rule(context);
8457  });
8458  Object(_language_visitor_mjs__WEBPACK_IMPORTED_MODULE_2__[/* visit */ "c"])(documentAST, Object(_language_visitor_mjs__WEBPACK_IMPORTED_MODULE_2__[/* visitInParallel */ "d"])(visitors));
8459  return errors;
8460}
8461/**
8462 * Utility function which asserts a SDL document is valid by throwing an error
8463 * if it is invalid.
8464 *
8465 * @internal
8466 */
8467
8468function assertValidSDL(documentAST) {
8469  var errors = validateSDL(documentAST);
8470
8471  if (errors.length !== 0) {
8472    throw new Error(errors.map(function (error) {
8473      return error.message;
8474    }).join('\n\n'));
8475  }
8476}
8477/**
8478 * Utility function which asserts a SDL document is valid by throwing an error
8479 * if it is invalid.
8480 *
8481 * @internal
8482 */
8483
8484function assertValidSDLExtension(documentAST, schema) {
8485  var errors = validateSDL(documentAST, schema);
8486
8487  if (errors.length !== 0) {
8488    throw new Error(errors.map(function (error) {
8489      return error.message;
8490    }).join('\n\n'));
8491  }
8492}
8493
8494
8495/***/ }),
8496
8497/***/ "F8X2":
8498/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
8499
8500"use strict";
8501/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DirectiveLocation; });
8502/**
8503 * The set of allowed directive location values.
8504 */
8505var DirectiveLocation = Object.freeze({
8506  // Request Definitions
8507  QUERY: 'QUERY',
8508  MUTATION: 'MUTATION',
8509  SUBSCRIPTION: 'SUBSCRIPTION',
8510  FIELD: 'FIELD',
8511  FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION',
8512  FRAGMENT_SPREAD: 'FRAGMENT_SPREAD',
8513  INLINE_FRAGMENT: 'INLINE_FRAGMENT',
8514  VARIABLE_DEFINITION: 'VARIABLE_DEFINITION',
8515  // Type System Definitions
8516  SCHEMA: 'SCHEMA',
8517  SCALAR: 'SCALAR',
8518  OBJECT: 'OBJECT',
8519  FIELD_DEFINITION: 'FIELD_DEFINITION',
8520  ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION',
8521  INTERFACE: 'INTERFACE',
8522  UNION: 'UNION',
8523  ENUM: 'ENUM',
8524  ENUM_VALUE: 'ENUM_VALUE',
8525  INPUT_OBJECT: 'INPUT_OBJECT',
8526  INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION'
8527});
8528/**
8529 * The enum type representing the directive location values.
8530 */
8531
8532
8533/***/ }),
8534
8535/***/ "FAQy":
8536/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
8537
8538"use strict";
8539/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return introspectionFromSchema; });
8540/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2C6G");
8541/* harmony import */ var _language_parser_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("EMzn");
8542/* harmony import */ var _execution_execute_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("yRpE");
8543/* harmony import */ var _getIntrospectionQuery_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("hRS1");
8544function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
8545
8546function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); }
8546 else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
8547
8548function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8549
8550
8551
8552
8553
8554/**
8555 * Build an IntrospectionQuery from a GraphQLSchema
8556 *
8557 * IntrospectionQuery is useful for utilities that care about type and field
8558 * relationships, but do not need to traverse through those relationships.
8559 *
8560 * This is the inverse of buildClientSchema. The primary use case is outside
8561 * of the server context, for instance when doing schema comparisons.
8562 */
8563
8564function introspectionFromSchema(schema, options) {
8565  var optionsWithDefaults = _objectSpread({
8566    specifiedByUrl: true,
8567    directiveIsRepeatable: true,
8568    schemaDescription: true,
8569    inputValueDeprecation: true
8570  }, options);
8571
8572  var document = Object(_language_parser_mjs__WEBPACK_IMPORTED_MODULE_1__["parse"])(Object(_getIntrospectionQuery_mjs__WEBPACK_IMPORTED_MODULE_3__[/* getIntrospectionQuery */ "a"])(optionsWithDefaults));
8573  var result = Object(_execution_execute_mjs__WEBPACK_IMPORTED_MODULE_2__[/* executeSync */ "h"])({
8574    schema: schema,
8575    document: document
8576  });
8577  !result.errors && result.data || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(0);
8578  return result.data;
8579}
8580
8581
8582/***/ }),
8583
8584/***/ "FFNC":
8585/***/ (function(module, exports, __webpack_require__) {
8586
8587"use strict";
8588/**
8589 * Copyright (c) Facebook, Inc. and its affiliates.
8590 *
8591 * This source code is licensed under the MIT license found in the
8592 * LICENSE file in the root directory of this source tree.
8593 *
8594 * 
8595 * @format
8596 */
8597// flowlint ambiguous-object-type:error
8598
8599
8600var _require = __webpack_require__("VrDQ"),
8601    createCompilerError = _require.createCompilerError;
8602
8603var ID = 'id';
8604/**
8605 * @public
8606 *
8607 * Determine if an AST node contains a fragment/operation definition.
8608 */
8609
8610function isExecutableDefinitionAST(ast) {
8611  return ast.kind === 'FragmentDefinition' || ast.kind === 'OperationDefinition';
8612}
8613/**
8614 * @public
8615 *
8616 * Determine if an AST node contains a schema definition.
8617 */
8618
8619
8620function isSchemaDefinitionAST(ast) {
8621  return ast.kind === 'SchemaDefinition' || ast.kind === 'ScalarTypeDefinition' || ast.kind === 'ObjectTypeDefinition' || ast.kind === 'InterfaceTypeDefinition' || ast.kind === 'UnionTypeDefinition' || ast.kind === 'EnumTypeDefinition' || ast.kind === 'InputObjectTypeDefinition' || ast.kind === 'DirectiveDefinition' || ast.kind === 'ScalarTypeExtension' || ast.kind === 'ObjectTypeExtension' || ast.kind === 'InterfaceTypeExtension' || ast.kind === 'UnionTypeExtension' || ast.kind === 'EnumTypeExtension' || ast.kind === 'InputObjectTypeExtension';
8622}
8623/**
8624 * Generates an id field on the given type.
8625 */
8626
8627
8628function generateIDField(schema, type) {
8629  var idField = schema.getFieldByName(type, 'id');
8630
8631  if (idField == null) {
8632    throw new createCompilerError("Expected an 'id' field on type '".concat(schema.getTypeString(type), "'."));
8633  }
8634
8635  var idType = schema.assertScalarFieldType(schema.getFieldType(idField));
8636  return {
8637    kind: 'ScalarField',
8638    alias: ID,
8639    args: [],
8640    directives: [],
8641    handles: null,
8642    loc: {
8643      kind: 'Generated'
8644    },
8645    metadata: null,
8646    name: ID,
8647    type: idType
8648  };
8649}
8650
8651function getNullableBooleanInput(schema) {
8652  return schema.assertInputType(schema.expectBooleanType());
8653}
8654
8655function getNonNullBooleanInput(schema) {
8656  return schema.assertInputType(schema.getNonNullType(schema.expectBooleanType()));
8657}
8658
8659function getNullableStringInput(schema) {
8660  return schema.assertInputType(schema.expectStringType());
8661}
8662
8663function getNonNullStringInput(schema) {
8664  return schema.assertInputType(schema.getNonNullType(schema.expectStringType()));
8665}
8666
8667function getNullableIdInput(schema) {
8668  return schema.assertInputType(schema.expectIdType());
8669}
8670
8671function getNonNullIdInput(schema) {
8672  return schema.assertInputType(schema.getNonNullType(schema.expectIdType()));
8673}
8674
8675module.exports = {
8676  generateIDField: generateIDField,
8677  isExecutableDefinitionAST: isExecutableDefinitionAST,
8678  isSchemaDefinitionAST: isSchemaDefinitionAST,
8679  getNullableBooleanInput: getNullableBooleanInput,
8680  getNonNullBooleanInput: getNonNullBooleanInput,
8681  getNullableStringInput: getNullableStringInput,
8682  getNonNullStringInput: getNonNullStringInput,
8683  getNullableIdInput: getNullableIdInput,
8684  getNonNullIdInput: getNonNullIdInput
8685};
8686
8687/***/ }),
8688
8689/***/ "FQ53":
8690/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
8691
8692"use strict";
8693/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return specifiedRules; });
8694/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return specifiedSDLRules; });
8695/* harmony import */ var _rules_ExecutableDefinitionsRule_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("tXcb");
8696/* harmony import */ var _rules_UniqueOperationNamesRule_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("q5gm");
8697/* harmony import */ var _rules_LoneAnonymousOperationRule_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("SrQE");
8698/* harmony import */ var _rules_SingleFieldSubscriptionsRule_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Kg2h");
8699/* harmony import */ var _rules_KnownTypeNamesRule_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("/vyT");
8700/* harmony import */ var _rules_FragmentsOnCompositeTypesRule_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("6s7a");
8701/* harmony import */ var _rules_VariablesAreInputTypesRule_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("JW+s");
8702/* harmony import */ var _rules_ScalarLeafsRule_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("5IOE");
8703/* harmony import */ var _rules_FieldsOnCorrectTypeRule_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("dpSA");
8704/* harmony import */ var _rules_UniqueFragmentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("YF83");
8705/* harmony import */ var _rules_KnownFragmentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("pRhh");
8706/* harmony import */ var _rules_NoUnusedFragmentsRule_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("fqV+");
8707/* harmony import */ var _rules_PossibleFragmentSpreadsRule_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("wIKA");
8708/* harmony import */ var _rules_NoFragmentCyclesRule_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("izjK");
8709/* harmony import */ var _rules_UniqueVariableNamesRule_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("O05/");
8710/* harmony import */ var _rules_NoUndefinedVariablesRule_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("tFdq");
8711/* harmony import */ var _rules_NoUnusedVariablesRule_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("dtAw");
8712/* harmony import */ var _rules_KnownDirectivesRule_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("vSWR");
8713/* harmony import */ var _rules_UniqueDirectivesPerLocationRule_mjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("XucM");
8714/* harmony import */ var _rules_KnownArgumentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("C8Kj");
8715/* harmony import */ var _rules_UniqueArgumentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("awoc");
8716/* harmony import */ var _rules_ValuesOfCorrectTypeRule_mjs__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("b0Ie");
8717/* harmony import */ var _rules_ProvidedRequiredArgumentsRule_mjs__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("S0S6");
8718/* harmony import */ var _rules_VariablesInAllowedPositionRule_mjs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("K7U/");
8719/* harmony import */ var _rules_OverlappingFieldsCanBeMergedRule_mjs__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("lb3J");
8720/* harmony import */ var _rules_UniqueInputFieldNamesRule_mjs__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("LOfW");
8721/* harmony import */ var _rules_LoneSchemaDefinitionRule_mjs__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("w6G1");
8722/* harmony import */ var _rules_UniqueOperationTypesRule_mjs__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("tjI6");
8723/* harmony import */ var _rules_UniqueTypeNamesRule_mjs__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("WHoc");
8724/* harmony import */ var _rules_UniqueEnumValueNamesRule_mjs__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__("nIiE");
8725/* harmony import */ var _rules_UniqueFieldDefinitionNamesRule_mjs__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__("QqNk");
8726/* harmony import */ var _rules_UniqueDirectiveNamesRule_mjs__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__("gig5");
8727/* harmony import */ var _rules_PossibleTypeExtensionsRule_mjs__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__("R/MH");
8728// Spec Section: "Executable Definitions"
8729 // Spec Section: "Operation Name Uniqueness"
8730
8731 // Spec Section: "Lone Anonymous Operation"
8732
8733 // Spec Section: "Subscriptions with Single Root Field"
8734
8735 // Spec Section: "Fragment Spread Type Existence"
8736
8737 // Spec Section: "Fragments on Composite Types"
8738
8739 // Spec Section: "Variables are Input Types"
8740
8741 // Spec Section: "Leaf Field Selections"
8742
8743 // Spec Section: "Field Selections on Objects, Interfaces, and Unions Types"
8744
8745 // Spec Section: "Fragment Name Uniqueness"
8746
8747 // Spec Section: "Fragment spread target defined"
8748
8749 // Spec Section: "Fragments must be used"
8750
8751 // Spec Section: "Fragment spread is possible"
8752
8753 // Spec Section: "Fragments must not form cycles"
8754
8755 // Spec Section: "Variable Uniqueness"
8756
8757 // Spec Section: "All Variable Used Defined"
8758
8759 // Spec Section: "All Variables Used"
8760
8761 // Spec Section: "Directives Are Defined"
8762
8763 // Spec Section: "Directives Are Unique Per Location"
8764
8765 // Spec Section: "Argument Names"
8766
8767 // Spec Section: "Argument Uniqueness"
8768
8769 // Spec Section: "Value Type Correctness"
8770
8771 // Spec Section: "Argument Optionality"
8772
8773 // Spec Section: "All Variable Usages Are Allowed"
8774
8775 // Spec Section: "Field Selection Merging"
8776
8777 // Spec Section: "Input Object Field Uniqueness"
8778
8779 // SDL-specific validation rules
8780
8781
8782
8783
8784
8785
8786
8787
8788/**
8789 * This set includes all validation rules defined by the GraphQL spec.
8790 *
8791 * The order of the rules in this list has been adjusted to lead to the
8792 * most clear output when encountering multiple validation errors.
8793 */
8794
8795var specifiedRules = Object.freeze([_rules_ExecutableDefinitionsRule_mjs__WEBPACK_IMPORTED_MODULE_0__[/* ExecutableDefinitionsRule */ "a"], _rules_UniqueOperationNamesRule_mjs__WEBPACK_IMPORTED_MODULE_1__[/* UniqueOperationNamesRule */ "a"], _rules_LoneAnonymousOperationRule_mjs__WEBPACK_IMPORTED_MODULE_2__[/* LoneAnonymousOperationRule */ "a"], _rules_SingleFieldSubscriptionsRule_mjs__WEBPACK_IMPORTED_MODULE_3__[/* SingleFieldSubscriptionsRule */ "a"], _rules_KnownTypeNamesRule_mjs__WEBPACK_IMPORTED_MODULE_4__[/* KnownTypeNamesRule */ "a"], _rules_FragmentsOnCompositeTypesRule_mjs__WEBPACK_IMPORTED_MODULE_5__[/* FragmentsOnCompositeTypesRule */ "a"], _rules_VariablesAreInputTypesRule_mjs__WEBPACK_IMPORTED_MODULE_6__[/* VariablesAreInputTypesRule */ "a"], _rules_ScalarLeafsRule_mjs__WEBPACK_IMPORTED_MODULE_7__[/* ScalarLeafsRule */ "a"], _rules_FieldsOnCorrectTypeRule_mjs__WEBPACK_IMPORTED_MODULE_8__[/* FieldsOnCorrectTypeRule */ "a"], _rules_UniqueFragmentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_9__[/* UniqueFragmentNamesRule */ "a"], _rules_KnownFragmentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_10__[/* KnownFragmentNamesRule */ "a"], _rules_NoUnusedFragmentsRule_mjs__WEBPACK_IMPORTED_MODULE_11__[/* NoUnusedFragmentsRule */ "a"], _rules_PossibleFragmentSpreadsRule_mjs__WEBPACK_IMPORTED_MODULE_12__[/* PossibleFragmentSpreadsRule */ "a"], _rules_NoFragmentCyclesRule_mjs__WEBPACK_IMPORTED_MODULE_13__[/* NoFragmentCyclesRule */ "a"], _rules_UniqueVariableNamesRule_mjs__WEBPACK_IMPORTED_MODULE_14__[/* UniqueVariableNamesRule */ "a"], _rules_NoUndefinedVariablesRule_mjs__WEBPACK_IMPORTED_MODULE_15__[/* NoUndefinedVariablesRule */ "a"], _rules_NoUnusedVariablesRule_mjs__WEBPACK_IMPORTED_MODULE_16__[/* NoUnusedVariablesRule */ "a"], _rules_KnownDirectivesRule_mjs__WEBPACK_IMPORTED_MODULE_17__[/* KnownDirectivesRule */ "a"], _rules_UniqueDirectivesPerLocationRule_mjs__WEBPACK_IMPORTED_MODULE_18__[/* UniqueDirectivesPerLocationRule */ "a"], _rules_KnownArgumentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_19__[/* KnownArgumentNamesRule */ "b"], _rules_UniqueArgumentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_20__[/* UniqueArgumentNamesRule */ "a"], _rules_ValuesOfCorrectTypeRule_mjs__WEBPACK_IMPORTED_MODULE_21__[/* ValuesOfCorrectTypeRule */ "a"], _rules_ProvidedRequiredArgumentsRule_mjs__WEBPACK_IMPORTED_MODULE_22__[/* ProvidedRequiredArgumentsRule */ "b"], _rules_VariablesInAllowedPositionRule_mjs__WEBPACK_IMPORTED_MODULE_23__[/* VariablesInAllowedPositionRule */ "a"], _rules_OverlappingFieldsCanBeMergedRule_mjs__WEBPACK_IMPORTED_MODULE_24__[/* OverlappingFieldsCanBeMergedRule */ "a"], _rules_UniqueInputFieldNamesRule_mjs__WEBPACK_IMPORTED_MODULE_25__[/* UniqueInputFieldNamesRule */ "a"]]);
8796/**
8797 * @internal
8798 */
8799
8800var specifiedSDLRules = Object.freeze([_rules_LoneSchemaDefinitionRule_mjs__WEBPACK_IMPORTED_MODULE_26__[/* LoneSchemaDefinitionRule */ "a"], _rules_UniqueOperationTypesRule_mjs__WEBPACK_IMPORTED_MODULE_27__[/* UniqueOperationTypesRule */ "a"], _rules_UniqueTypeNamesRule_mjs__WEBPACK_IMPORTED_MODULE_28__[/* UniqueTypeNamesRule */ "a"], _rules_UniqueEnumValueNamesRule_mjs__WEBPACK_IMPORTED_MODULE_29__[/* UniqueEnumValueNamesRule */ "a"], _rules_UniqueFieldDefinitionNamesRule_mjs__WEBPACK_IMPORTED_MODULE_30__[/* UniqueFieldDefinitionNamesRule */ "a"], _rules_UniqueDirectiveNamesRule_mjs__WEBPACK_IMPORTED_MODULE_31__[/* UniqueDirectiveNamesRule */ "a"], _rules_KnownTypeNamesRule_mjs__WEBPACK_IMPORTED_MODULE_4__[/* KnownTypeNamesRule */ "a"], _rules_KnownDirectivesRule_mjs__WEBPACK_IMPORTED_MODULE_17__[/* KnownDirectivesRule */ "a"], _rules_UniqueDirectivesPerLocationRule_mjs__WEBPACK_IMPORTED_MODULE_18__[/* UniqueDirectivesPerLocationRule */ "a"], _rules_PossibleTypeExtensionsRule_mjs__WEBPACK_IMPORTED_MODULE_32__[/* PossibleTypeExtensionsRule */ "a"], _rules_KnownArgumentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_19__[/* KnownArgumentNamesOnDirectivesRule */ "a"], _rules_UniqueArgumentNamesRule_mjs__WEBPACK_IMPORTED_MODULE_20__[/* UniqueArgumentNamesRule */ "a"], _rules_UniqueInputFieldNamesRule_mjs__WEBPACK_IMPORTED_MODULE_25__[/* UniqueInputFieldNamesRule */ "a"], _rules_ProvidedRequiredArgumentsRule_mjs__WEBPACK_IMPORTED_MODULE_22__[/* ProvidedRequiredArgumentsOnDirectivesRule */ "a"]]);
8801
8802
8803/***/ }),
8804
8805/***/ "FiDd":
8806/***/ (function(module, exports, __webpack_require__) {
8807
8808"use strict";
8809
8810
8811var has = __webpack_require__("oNNP");
8812
8813var GetIntrinsic = __webpack_require__("AM7I");
8814
8815var $TypeError = GetIntrinsic('%TypeError%');
8816
8817var Type = __webpack_require__("zOLO");
8818var ToBoolean = __webpack_require__("8cd+");
8819var IsCallable = __webpack_require__("K4mF");
8820
8821// https://262.ecma-international.org/5.1/#sec-8.10.5
8822
8823module.exports = function ToPropertyDescriptor(Obj) {
8824	if (Type(Obj) !== 'Object') {
8825		throw new $TypeError('ToPropertyDescriptor requires an object');
8826	}
8827
8828	var desc = {};
8829	if (has(Obj, 'enumerable')) {
8830		desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable);
8831	}
8832	if (has(Obj, 'configurable')) {
8833		desc['[[Configurable]]'] = ToBoolean(Obj.configurable);
8834	}
8835	if (has(Obj, 'value')) {
8836		desc['[[Value]]'] = Obj.value;
8837	}
8838	if (has(Obj, 'writable')) {
8839		desc['[[Writable]]'] = ToBoolean(Obj.writable);
8840	}
8841	if (has(Obj, 'get')) {
8842		var getter = Obj.get;
8843		if (typeof getter !== 'undefined' && !IsCallable(getter)) {
8844			throw new $TypeError('getter must be a function');
8845		}
8846		desc['[[Get]]'] = getter;
8847	}
8848	if (has(Obj, 'set')) {
8849		var setter = Obj.set;
vendor: 2,891 bytes, lines 8850-8943
8850		if (typeof setter !== 'undefined' && !IsCallable(setter)) {
8851			throw new $TypeError('setter must be a function');
8852		}
8853		desc['[[Set]]'] = setter;
8854	}
8855
8856	if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {
8857		throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
8858	}
8859	return desc;
8860};
8861
8862
8863/***/ }),
8864
8865/***/ "Fo5y":
8866/***/ (function(module, exports, __webpack_require__) {
8867
8868"use strict";
8869
8870
8871var abs = __webpack_require__("D4qp");
8872var floor = __webpack_require__("OM4Y");
8873
8874var $isNaN = __webpack_require__("7qPd");
8875var $isFinite = __webpack_require__("QO3R");
8876
8877// https://ecma-international.org/ecma-262/6.0/#sec-isinteger
8878
8879module.exports = function IsInteger(argument) {
8880	if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
8881		return false;
8882	}
8883	var absValue = abs(argument);
8884	return floor(absValue) === absValue;
8885};
8886
8887
8888/***/ }),
8889
8890/***/ "FpZJ":
8891/***/ (function(module, exports, __webpack_require__) {
8892
8893"use strict";
8894
8895
8896/* eslint complexity: [2, 18], max-statements: [2, 33] */
8897module.exports = function hasSymbols() {
8898	if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
8899	if (typeof Symbol.iterator === 'symbol') { return true; }
8900
8901	var obj = {};
8902	var sym = Symbol('test');
8903	var symObj = Object(sym);
8904	if (typeof sym === 'string') { return false; }
8905
8906	if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
8907	if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
8908
8909	// temp disabled per https://github.com/ljharb/object.assign/issues/17
8910	// if (sym instanceof Symbol) { return false; }
8911	// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
8912	// if (!(symObj instanceof Symbol)) { return false; }
8913
8914	// if (typeof Symbol.prototype.toString !== 'function') { return false; }
8915	// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
8916
8917	var symVal = 42;
8918	obj[sym] = symVal;
8919	for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
8920	if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
8921
8922	if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
8923
8924	var syms = Object.getOwnPropertySymbols(obj);
8925	if (syms.length !== 1 || syms[0] !== sym) { return false; }
8926
8927	if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
8928
8929	if (typeof Object.getOwnPropertyDescriptor === 'function') {
8930		var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
8931		if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
8932	}
8933
8934	return true;
8935};
8936
8937
8938/***/ }),
8939
8940/***/ "Ggmd":
8941/***/ (function(module, __webpack_exports__, __webpack_require__) {
8942
8943"use strict";
8944// ESM COMPAT FLAG
8945__webpack_require__.r(__webpack_exports__);
8946
8947// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/typescript/index.esm.js
8948var typescript_index_esm_namespaceObject = {};
8949__webpack_require__.r(typescript_index_esm_namespaceObject);
8950__webpack_require__.d(typescript_index_esm_namespaceObject, "EXACT_SIGNATURE", function() { return EXACT_SIGNATURE; });
8951__webpack_require__.d(typescript_index_esm_namespaceObject, "MAKE_MAYBE_SIGNATURE", function() { return MAKE_MAYBE_SIGNATURE; });
8952__webpack_require__.d(typescript_index_esm_namespaceObject, "MAKE_OPTIONAL_SIGNATURE", function() { return MAKE_OPTIONAL_SIGNATURE; });
8953__webpack_require__.d(typescript_index_esm_namespaceObject, "TsIntrospectionVisitor", function() { return index_esm_TsIntrospectionVisitor; });
8954__webpack_require__.d(typescript_index_esm_namespaceObject, "TsVisitor", function() { return index_esm_TsVisitor; });
8955__webpack_require__.d(typescript_index_esm_namespaceObject, "TypeScriptOperationVariablesToObject", function() { return index_esm_TypeScriptOperationVariablesToObject; });
8956__webpack_require__.d(typescript_index_esm_namespaceObject, "includeIntrospectionDefinitions", function() { return includeIntrospectionDefinitions; });
8957__webpack_require__.d(typescript_index_esm_namespaceObject, "plugin", function() { return index_esm_plugin; });
8958
8959// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/typescript-operations/index.esm.js
8960var typescript_operations_index_esm_namespaceObject = {};
8961__webpack_require__.r(typescript_operations_index_esm_namespaceObject);
8962__webpack_require__.d(typescript_operations_index_esm_namespaceObject, "TypeScriptDocumentsVisitor", function() { return index_esm_TypeScriptDocumentsVisitor; });
8963__webpack_require__.d(typescript_operations_index_esm_namespaceObject, "plugin", function() { return typescript_operations_index_esm_plugin; });
8964
8965// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/flow/index.esm.js
8966var flow_index_esm_namespaceObject = {};
8967__webpack_require__.r(flow_index_esm_namespaceObject);
8968__webpack_require__.d(flow_index_esm_namespaceObject, "FlowOperationVariablesToObject", function() { return index_esm_FlowOperationVariablesToObject; });
8969__webpack_require__.d(flow_index_esm_namespaceObject, "FlowVisitor", function() { return index_esm_FlowVisitor; });
8970__webpack_require__.d(flow_index_esm_namespaceObject, "plugin", function() { return flow_index_esm_plugin; });
8971
8972// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/flow-operations/index.esm.js
8973var flow_operations_index_esm_namespaceObject = {};
8974__webpack_require__.r(flow_operations_index_esm_namespaceObject);
8975__webpack_require__.d(flow_operations_index_esm_namespaceObject, "plugin", function() { return flow_operations_index_esm_plugin; });
8976
8977// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/introspection/index.esm.js
8978var introspection_index_esm_namespaceObject = {};
8979__webpack_require__.r(introspection_index_esm_namespaceObject);
8980__webpack_require__.d(introspection_index_esm_namespaceObject, "plugin", function() { return introspection_index_esm_plugin; });
8981__webpack_require__.d(introspection_index_esm_namespaceObject, "validate", function() { return validate; });
8982
8983// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/fragment-matcher/index.esm.js
8984var fragment_matcher_index_esm_namespaceObject = {};
8985__webpack_require__.r(fragment_matcher_index_esm_namespaceObject);
8986__webpack_require__.d(fragment_matcher_index_esm_namespaceObject, "plugin", function() { return fragment_matcher_index_esm_plugin; });
8987__webpack_require__.d(fragment_matcher_index_esm_namespaceObject, "validate", function() { return index_esm_validate; });
8988
8989// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/schema-ast/index.esm.js
8990var schema_ast_index_esm_namespaceObject = {};
8991__webpack_require__.r(schema_ast_index_esm_namespaceObject);
8992__webpack_require__.d(schema_ast_index_esm_namespaceObject, "plugin", function() { return schema_ast_index_esm_plugin; });
8993__webpack_require__.d(schema_ast_index_esm_namespaceObject, "transformSchemaAST", function() { return index_esm_transformSchemaAST; });
8994__webpack_require__.d(schema_ast_index_esm_namespaceObject, "validate", function() { return schema_ast_index_esm_validate; });
8995
8996// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/java/index.esm.js
8997var java_index_esm_namespaceObject = {};
8998__webpack_require__.r(java_index_esm_namespaceObject);
8999__webpack_require__.d(java_index_esm_namespaceObject, "plugin", function() { return java_index_esm_plugin; });
9000
9001// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/typescript-apollo-angular/index.esm.js
9002var typescript_apollo_angular_index_esm_namespaceObject = {};
9003__webpack_require__.r(typescript_apollo_angular_index_esm_namespaceObject);
9004__webpack_require__.d(typescript_apollo_angular_index_esm_namespaceObject, "ApolloAngularVisitor", function() { return index_esm_ApolloAngularVisitor; });
9005__webpack_require__.d(typescript_apollo_angular_index_esm_namespaceObject, "addToSchema", function() { return index_esm_addToSchema; });
9006__webpack_require__.d(typescript_apollo_angular_index_esm_namespaceObject, "plugin", function() { return typescript_apollo_angular_index_esm_plugin; });
9007__webpack_require__.d(typescript_apollo_angular_index_esm_namespaceObject, "validate", function() { return typescript_apollo_angular_index_esm_validate; });
9008
9009// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/typescript-react-apollo/index.esm.js
9010var typescript_react_apollo_index_esm_namespaceObject = {};
9011__webpack_require__.r(typescript_react_apollo_index_esm_namespaceObject);
9012__webpack_require__.d(typescript_react_apollo_index_esm_namespaceObject, "ReactApolloVisitor", function() { return index_esm_ReactApolloVisitor; });
9013__webpack_require__.d(typescript_react_apollo_index_esm_namespaceObject, "plugin", function() { return typescript_react_apollo_index_esm_plugin; });
9014__webpack_require__.d(typescript_react_apollo_index_esm_namespaceObject, "validate", function() { return typescript_react_apollo_index_esm_validate; });
9015
9016// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/typescript-stencil-apollo/index.esm.js
9017var typescript_stencil_apollo_index_esm_namespaceObject = {};
9018__webpack_require__.r(typescript_stencil_apollo_index_esm_namespaceObject);
9019__webpack_require__.d(typescript_stencil_apollo_index_esm_namespaceObject, "StencilApolloVisitor", function() { return index_esm_StencilApolloVisitor; });
9020__webpack_require__.d(typescript_stencil_apollo_index_esm_namespaceObject, "plugin", function() { return typescript_stencil_apollo_index_esm_plugin; });
9021__webpack_require__.d(typescript_stencil_apollo_index_esm_namespaceObject, "validate", function() { return typescript_stencil_apollo_index_esm_validate; });
9022
9023// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/typescript-resolvers/index.esm.js
9024var typescript_resolvers_index_esm_namespaceObject = {};
9025__webpack_require__.r(typescript_resolvers_index_esm_namespaceObject);
9026__webpack_require__.d(typescript_resolvers_index_esm_namespaceObject, "TypeScriptResolversVisitor", function() { return index_esm_TypeScriptResolversVisitor; });
9027__webpack_require__.d(typescript_resolvers_index_esm_namespaceObject, "plugin", function() { return typescript_resolvers_index_esm_plugin; });
9028
9029// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/flow-resolvers/index.esm.js
9030var flow_resolvers_index_esm_namespaceObject = {};
9031__webpack_require__.r(flow_resolvers_index_esm_namespaceObject);
9032__webpack_require__.d(flow_resolvers_index_esm_namespaceObject, "plugin", function() { return flow_resolvers_index_esm_plugin; });
9033
9034// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/java-resolvers/index.esm.js
9035var java_resolvers_index_esm_namespaceObject = {};
9036__webpack_require__.r(java_resolvers_index_esm_namespaceObject);
9037__webpack_require__.d(java_resolvers_index_esm_namespaceObject, "plugin", function() { return java_resolvers_index_esm_plugin; });
9038
9039// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/typescript-mongodb/index.esm.js
9040var typescript_mongodb_index_esm_namespaceObject = {};
9041__webpack_require__.r(typescript_mongodb_index_esm_namespaceObject);
9042__webpack_require__.d(typescript_mongodb_index_esm_namespaceObject, "DIRECTIVES", function() { return DIRECTIVES; });
9043__webpack_require__.d(typescript_mongodb_index_esm_namespaceObject, "addToSchema", function() { return typescript_mongodb_index_esm_addToSchema; });
9044__webpack_require__.d(typescript_mongodb_index_esm_namespaceObject, "plugin", function() { return typescript_mongodb_index_esm_plugin; });
9045__webpack_require__.d(typescript_mongodb_index_esm_namespaceObject, "validate", function() { return typescript_mongodb_index_esm_validate; });
9046
9047// NAMESPACE OBJECT: ./node_modules/@graphql-codegen/typescript-urql/index.esm.js
9048var typescript_urql_index_esm_namespaceObject = {};
9049__webpack_require__.r(typescript_urql_index_esm_namespaceObject);
9050__webpack_require__.d(typescript_urql_index_esm_namespaceObject, "UrqlVisitor", function() { return index_esm_UrqlVisitor; });
9051__webpack_require__.d(typescript_urql_index_esm_namespaceObject, "plugin", function() { return typescript_urql_index_esm_plugin; });
9052__webpack_require__.d(typescript_urql_index_esm_namespaceObject, "validate", function() { return typescript_urql_index_esm_validate; });
9053
9054// EXTERNAL MODULE: ./node_modules/next/node_modules/@babel/runtime/regenerator/index.js
9055var regenerator = __webpack_require__("vJKn");
9056var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
9057
9058// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/defineProperty.js
9059function _defineProperty(obj, key, value) {
9060  if (key in obj) {
9061    Object.defineProperty(obj, key, {
9062      value: value,
9063      enumerable: true,
9064      configurable: true,
9065      writable: true
9066    });
9067  } else {
9068    obj[key] = value;
9069  }
9070
9071  return obj;
9072}
9073// CONCATENATED MODULE: ./node_modules/next/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
9074function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
9075  try {
9076    var info = gen[key](arg);
9077    var value = info.value;
9078  } catch (error) {
9079    reject(error);
9080    return;
9081  }
9082
9083  if (info.done) {
9084    resolve(value);
9085  } else {
9086    Promise.resolve(value).then(_next, _throw);
9087  }
9088}
9089
9090function _asyncToGenerator(fn) {
9091  return function () {
9092    var self = this,
9093        args = arguments;
9094    return new Promise(function (resolve, reject) {
9095      var gen = fn.apply(self, args);
9096
9097      function _next(value) {
9098        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
9099      }
9100
9101      function _throw(err) {
9102        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
9103      }
9104
9105      _next(undefined);
9106    });
9107  };
9108}
9109// EXTERNAL MODULE: ./node_modules/@graphql-codegen/plugin-helpers/index.esm.js
9110var index_esm = __webpack_require__("RDGc");
9111
9112// EXTERNAL MODULE: ./node_modules/graphql/utilities/buildASTSchema.mjs
9113var buildASTSchema = __webpack_require__("Yen0");
9114
9115// EXTERNAL MODULE: ./node_modules/graphql/language/parser.mjs
9116var parser = __webpack_require__("EMzn");
9117
9118// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs
9119var language_kinds = __webpack_require__("/jXB");
9120
9121// EXTERNAL MODULE: ./node_modules/graphql/language/printer.mjs
9122var printer = __webpack_require__("dQau");
9123
9124// EXTERNAL MODULE: ./node_modules/graphql/language/visitor.mjs
9125var language_visitor = __webpack_require__("L2ys");
9126
9127// EXTERNAL MODULE: ./node_modules/@graphql-tools/utils/index.esm.js
9128var utils_index_esm = __webpack_require__("O2xy");
9129
9130// EXTERNAL MODULE: ./node_modules/graphql/utilities/extendSchema.mjs
9131var extendSchema = __webpack_require__("cbkQ");
9132
9133// EXTERNAL MODULE: ./node_modules/graphql/language/source.mjs
9134var source = __webpack_require__("neE4");
9135
9136// EXTERNAL MODULE: ./node_modules/graphql/type/schema.mjs
9137var type_schema = __webpack_require__("51nL");
9138
9139// EXTERNAL MODULE: ./node_modules/graphql/language/predicates.mjs
9140var predicates = __webpack_require__("Xizt");
9141
9142// EXTERNAL MODULE: ./node_modules/graphql/type/definition.mjs + 1 modules
9143var definition = __webpack_require__("axIb");
9144
9145// EXTERNAL MODULE: ./node_modules/graphql/type/scalars.mjs + 1 modules
9146var type_scalars = __webpack_require__("19Hc");
9147
9148// EXTERNAL MODULE: ./node_modules/graphql/type/introspection.mjs
9149var type_introspection = __webpack_require__("LViu");
9150
9151// EXTERNAL MODULE: ./node_modules/graphql/execution/execute.mjs + 3 modules
9152var execute = __webpack_require__("yRpE");
9153
9154// CONCATENATED MODULE: ./node_modules/value-or-promise/build/module/ValueOrPromise.js
9155function isPromiseLike(object) {
9156    return object != null && typeof object.then === 'function';
9157}
9158const defaultOnRejectedFn = (reason) => {
9159    throw reason;
9160};
9161class ValueOrPromise {
9162    constructor(executor) {
9163        let value;
9164        try {
9165            value = executor();
9166        }
9167        catch (reason) {
9168            this.state = { status: 'rejected', value: reason };
9169            return;
9170        }
9171        if (isPromiseLike(value)) {
9172            this.state = { status: 'pending', value };
9173            return;
9174        }
9175        this.state = { status: 'fulfilled', value };
9176    }
9177    then(onFulfilled, onRejected) {
9178        const state = this.state;
9179        if (state.status === 'pending') {
9180            return new ValueOrPromise(() => state.value.then(onFulfilled, onRejected));
9181        }
9182        const onRejectedFn = typeof onRejected === 'function' ? onRejected : defaultOnRejectedFn;
9183        if (state.status === 'rejected') {
9184            return new ValueOrPromise(() => onRejectedFn(state.value));
9185        }
9186        try {
9187            const onFulfilledFn = typeof onFulfilled === 'function' ? onFulfilled : undefined;
9188            return onFulfilledFn === undefined
9189                ? new ValueOrPromise(() => state.value)
9190                : new ValueOrPromise(() => onFulfilledFn(state.value));
9191        }
9192        catch (e) {
9193            return new ValueOrPromise(() => onRejectedFn(e));
9194        }
9195    }
9196    catch(onRejected) {
9197        return this.then(undefined, onRejected);
9198    }
9199    resolve() {
9200        const state = this.state;
9201        if (state.status === 'pending') {
9202            return state.value;
9203        }
9204        if (state.status === 'rejected') {
9205            throw state.value;
9206        }
9207        return state.value;
9208    }
9209    static all(valueOrPromises) {
9210        const values = [];
9211        for (let i = 0; i < valueOrPromises.length; i++) {
9212            const valueOrPromise = valueOrPromises[i];
9213            const state = valueOrPromise.state;
9214            if (state.status === 'rejected') {
9215                return new ValueOrPromise(() => {
9216                    throw state.value;
9217                });
9218            }
9219            if (state.status === 'pending') {
9220                return new ValueOrPromise(() => Promise.all(valueOrPromises.slice(i)).then((resolvedPromises) => values.concat(resolvedPromises)));
9221            }
9222            values.push(state.value);
9223        }
9224        return new ValueOrPromise(() => values);
9225    }
9226}
9227//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmFsdWVPclByb21pc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvVmFsdWVPclByb21pc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUyxhQUFhLENBQUksTUFBZTtJQUN2QyxPQUFPLE1BQU0sSUFBSSxJQUFJLElBQUksT0FBUSxNQUFxQixDQUFDLElBQUksS0FBSyxVQUFVLENBQUM7QUFDN0UsQ0FBQztBQW1CRCxNQUFNLG1CQUFtQixHQUFHLENBQUMsTUFBZSxFQUFFLEVBQUU7SUFDOUMsTUFBTSxNQUFNLENBQUM7QUFDZixDQUFDLENBQUM7QUFFRixNQUFNLE9BQU8sY0FBYztJQUd6QixZQUFZLFFBQXFEO1FBQy9ELElBQUksS0FBNEMsQ0FBQztRQUVqRCxJQUFJO1lBQ0YsS0FBSyxHQUFHLFFBQVEsRUFBRSxDQUFDO1NBQ3BCO1FBQUMsT0FBTyxNQUFNLEVBQUU7WUFDZixJQUFJLENBQUMsS0FBSyxHQUFHLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLENBQUM7WUFDbkQsT0FBTztTQUNSO1FBRUQsSUFBSSxhQUFhLENBQUMsS0FBSyxDQUFDLEVBQUU7WUFDeEIsSUFBSSxDQUFDLEtBQUssR0FBRyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLENBQUM7WUFDMUMsT0FBTztTQUNSO1FBRUQsSUFBSSxDQUFDLEtBQUssR0FBRyxFQUFFLE1BQU0sRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFFLENBQUM7SUFDOUMsQ0FBQztJQUVNLElBQUksQ0FDVCxXQUdRLEVBQ1IsVUFHUTtRQUVSLE1BQU0sS0FBSyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUM7UUFFekIsSUFBSSxLQUFLLENBQUMsTUFBTSxLQUFLLFNBQVMsRUFBRTtZQUM5QixPQUFPLElBQUksY0FBYyxDQUFDLEdBQUcsRUFBRSxDQUM3QixLQUFLLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsVUFBVSxDQUFDLENBQzFDLENBQUM7U0FDSDtRQUVELE1BQU0sWUFBWSxHQUNoQixPQUFPLFVBQVUsS0FBSyxVQUFVLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsbUJBQW1CLENBQUM7UUFFdEUsSUFBSSxLQUFLLENBQUMsTUFBTSxLQUFLLFVBQVUsRUFBRTtZQUMvQixPQUFPLElBQUksY0FBYyxDQUFDLEdBQUcsRUFBRSxDQUFDLFlBQVksQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztTQUM1RDtRQUVELElBQUk7WUFDRixNQUFNLGFBQWEsR0FDakIsT0FBTyxXQUFXLEtBQUssVUFBVSxDQUFDLENBQUMsQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLFNBQVMsQ0FBQztZQUU5RCxPQUFPLGFBQWEsS0FBSyxTQUFTO2dCQUNoQyxDQUFDLENBQUMsSUFBSSxjQUFjLENBQUMsR0FBRyxFQUFFLENBQUUsS0FBSyxDQUFDLEtBQTZCLENBQUM7Z0JBQ2hFLENBQUMsQ0FBQyxJQUFJLGNBQWMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxhQUFhLENBQUMsS0FBSyxDQUFDLEtBQVUsQ0FBQyxDQUFDLENBQUM7U0FDL0Q7UUFBQyxPQUFPLENBQUMsRUFBRTtZQUNWLE9BQU8sSUFBSSxjQUFjLENBQUMsR0FBRyxFQUFFLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7U0FDbEQ7SUFDSCxDQUFDO0lBRU0sS0FBSyxDQUNWLFVBR1E7UUFFUixPQUFPLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLFVBQVUsQ0FBQyxDQUFDO0lBQzFDLENBQUM7SUFFTSxPQUFPO1FBQ1osTUFBTSxLQUFLLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQztRQUV6QixJQUFJLEtBQUssQ0FBQyxNQUFNLEtBQUssU0FBUyxFQUFFO1lBQzlCLE9BQU8sS0FBSyxDQUFDLEtBQUssQ0FBQztTQUNwQjtRQUVELElBQUksS0FBSyxDQUFDLE1BQU0sS0FBSyxVQUFVLEVBQUU7WUFDL0IsTUFBTSxLQUFLLENBQUMsS0FBSyxDQUFDO1NBQ25CO1FBRUQsT0FBTyxLQUFLLENBQUMsS0FBSyxDQUFDO0lBQ3JCLENBQUM7SUFFTSxNQUFNLENBQUMsR0FBRyxDQUNmLGVBQWlEO1FBRWpELE1BQU0sTUFBTSxHQUFnQyxFQUFFLENBQUM7UUFFL0MsS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLGVBQWUsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxFQUFFLEVBQUU7WUFDL0MsTUFBTSxjQUFjLEdBQUcsZUFBZSxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBRTFDLE1BQU0sS0FBSyxHQUFHLGNBQWMsQ0FBQyxLQUFLLENBQUM7WUFFbkMsSUFBSSxLQUFLLENBQUMsTUFBTSxLQUFLLFVBQVUsRUFBRTtnQkFDL0IsT0FBTyxJQUFJLGNBQWMsQ0FBQyxHQUFHLEVBQUU7b0JBQzdCLE1BQU0sS0FBSyxDQUFDLEtBQUssQ0FBQztnQkFDcEIsQ0FBQyxDQUFDLENBQUM7YUFDSjtZQUVELElBQUksS0FBSyxDQUFDLE1BQU0sS0FBSyxTQUFTLEVBQUU7Z0JBQzlCLE9BQU8sSUFBSSxjQUFjLENBQUMsR0FBRyxFQUFFLENBQzdCLE9BQU8sQ0FBQyxHQUFHLENBQUMsZUFBZSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLGdCQUFnQixFQUFFLEVBQUUsQ0FDOUQsTUFBTSxDQUFDLE1BQU0sQ0FBQyxnQkFBZ0IsQ0FBQyxDQUNoQyxDQUNGLENBQUM7YUFDSDtZQUVELE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDO1NBQzFCO1FBRUQsT0FBTyxJQUFJLGNBQWMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxNQUFNLENBQUMsQ0FBQztJQUMxQyxDQUFDO0NBQ0YifQ==
9228// CONCATENATED MODULE: ./node_modules/value-or-promise/build/module/index.js
9229
9230//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQkFBa0IsQ0FBQyJ9
9231// CONCATENATED MODULE: ./node_modules/@graphql-tools/schema/index.esm.js
9232
9233
9234
9235
9236// wraps all resolvers of query, mutation or subscription fields
9237// with the provided function to simulate a root schema level resolver
9238function addSchemaLevelResolver(schema, fn) {
9239    // TODO test that schema is a schema, fn is a function
9240    const fnToRunOnlyOnce = runAtMostOncePerRequest(fn);
9241    return Object(utils_index_esm["n" /* mapSchema */])(schema, {
9242        [utils_index_esm["a" /* MapperKind */].ROOT_FIELD]: (fieldConfig, _fieldName, typeName, schema) => {
9243            // XXX this should run at most once per request to simulate a true root resolver
9244            // for graphql-js this is an approximation that works with queries but not mutations
9245            // XXX if the type is a subscription, a same query AST will be ran multiple times so we
9246            // deactivate here the runOnce if it's a subscription. This may not be optimal though...
9247            const subscription = schema.getSubscriptionType();
9248            if (subscription != null && subscription.name === typeName) {
9249                return {
9250                    ...fieldConfig,
9251                    resolve: wrapResolver(fieldConfig.resolve, fn),
9252                };
9253            }
9254            return {
9255                ...fieldConfig,
9256                resolve: wrapResolver(fieldConfig.resolve, fnToRunOnlyOnce),
9257            };
9258        },
9259    });
9260}
9261// XXX badly named function. this doesn't really wrap, it just chains resolvers...
9262function wrapResolver(innerResolver, outerResolver) {
9263    return (obj, args, ctx, info) => {
9264        return new ValueOrPromise(() => outerResolver(obj, args, ctx, info))
9265            .then(root => {
9266            if (innerResolver != null) {
9267                return innerResolver(root, args, ctx, info);
9268            }
9269            return Object(execute["e" /* defaultFieldResolver */])(root, args, ctx, info);
9270        })
9271            .resolve();
9272    };
9273}
9274// XXX this function only works for resolvers
9275// XXX very hacky way to remember if the function
9276// already ran for this request. This will only work
9277// if people don't actually cache the operation.
9278// if they do cache the operation, they will have to
9279// manually remove the __runAtMostOnce before every request.
9280function runAtMostOncePerRequest(fn) {
9281    let value;
9282    const randomNumber = Math.random();
9283    return (root, args, ctx, info) => {
9284        if (!info.operation['__runAtMostOnce']) {
9285            info.operation['__runAtMostOnce'] = {};
9286        }
9287        if (!info.operation['__runAtMostOnce'][randomNumber]) {
9288            info.operation['__runAtMostOnce'][randomNumber] = true;
9289            value = fn(root, args, ctx, info);
9290        }
9291        return value;
9292    };
9293}
9294
9295function assertResolversPresent(schema, resolverValidationOptions = {}) {
9296    const { requireResolversForArgs, requireResolversForNonScalar, requireResolversForAllFields, } = resolverValidationOptions;
9297    if (requireResolversForAllFields && (requireResolversForArgs || requireResolversForNonScalar)) {
9298        throw new TypeError('requireResolversForAllFields takes precedence over the more specific assertions. ' +
9299            'Please configure either requireResolversForAllFields or requireResolversForArgs / ' +
9300            'requireResolversForNonScalar, but not a combination of them.');
9301    }
9302    Object(utils_index_esm["g" /* forEachField */])(schema, (field, typeName, fieldName) => {
9303        // requires a resolver for *every* field.
9304        if (requireResolversForAllFields) {
9305            expectResolver('requireResolversForAllFields', requireResolversForAllFields, field, typeName, fieldName);
9306        }
9307        // requires a resolver on every field that has arguments
9308        if (requireResolversForArgs && field.args.length > 0) {
9309            expectResolver('requireResolversForArgs', requireResolversForArgs, field, typeName, fieldName);
9310        }
9311        // requires a resolver on every field that returns a non-scalar type
9312        if (requireResolversForNonScalar !== 'ignore' && !Object(definition["R" /* isScalarType */])(Object(definition["A" /* getNamedType */])(field.type))) {
9313            expectResolver('requireResolversForNonScalar', requireResolversForNonScalar, field, typeName, fieldName);
9314        }
9315    });
9316}
9317function expectResolver(validator, behavior, field, typeName, fieldName) {
9318    if (!field.resolve) {
9319        const message = `Resolver missing for "${typeName}.${fieldName}".
9320To disable this validator, use:
9321  resolverValidationOptions: {
9322    ${validator}: 'ignore'
9323  }`;
9324        if (behavior === 'error') {
9325            throw new Error(message);
9326        }
9327        if (behavior === 'warn') {
9328            // eslint-disable-next-line no-console
9329            console.warn(message);
9330        }
9331        return;
9332    }
9333    if (typeof field.resolve !== 'function') {
9334        throw new Error(`Resolver "${typeName}.${fieldName}" must be a function`);
9335    }
9336}
9337
9338function attachDirectiveResolvers(schema, directiveResolvers) {
9339    if (typeof directiveResolvers !== 'object') {
9340        throw new Error(`Expected directiveResolvers to be of type object, got ${typeof directiveResolvers}`);
9341    }
9342    if (Array.isArray(directiveResolvers)) {
9343        throw new Error('Expected directiveResolvers to be of type object, got Array');
9344    }
9345    return Object(utils_index_esm["n" /* mapSchema */])(schema, {
9346        [utils_index_esm["a" /* MapperKind */].OBJECT_FIELD]: fieldConfig => {
9347            const newFieldConfig = { ...fieldConfig };
9348            const directives = Object(utils_index_esm["h" /* getDirectives */])(schema, fieldConfig);
9349            Object.keys(directives).forEach(directiveName => {
9350                if (directiveResolvers[directiveName]) {
9351                    const resolver = directiveResolvers[directiveName];
9352                    const originalResolver = newFieldConfig.resolve != null ? newFieldConfig.resolve : execute["e" /* defaultFieldResolver */];
9353                    const directiveArgs = directives[directiveName];
9354                    newFieldConfig.resolve = (source, originalArgs, context, info) => {
9355                        return resolver(() => new Promise((resolve, reject) => {
9356                            const result = originalResolver(source, originalArgs, context, info);
9357                            if (result instanceof Error) {
9358                                reject(result);
9359                            }
9360                            resolve(result);
9361                        }), source, directiveArgs, context, info);
9362                    };
9363                }
9364            });
9365            return newFieldConfig;
9366        },
9367    });
9368}
9369
9370const isExtensionNode = (def) => def.kind === language_kinds["a" /* Kind */].OBJECT_TYPE_EXTENSION ||
9371    def.kind === language_kinds["a" /* Kind */].INTERFACE_TYPE_EXTENSION ||
9372    def.kind === language_kinds["a" /* Kind */].INPUT_OBJECT_TYPE_EXTENSION ||
9373    def.kind === language_kinds["a" /* Kind */].UNION_TYPE_EXTENSION ||
9374    def.kind === language_kinds["a" /* Kind */].ENUM_TYPE_EXTENSION ||
9375    def.kind === language_kinds["a" /* Kind */].SCALAR_TYPE_EXTENSION ||
9376    def.kind === language_kinds["a" /* Kind */].SCHEMA_EXTENSION;
9377function filterAndExtractExtensionDefinitions(ast) {
9378    const extensionDefs = [];
9379    const typesDefs = [];
9380    ast.definitions.forEach(def => {
9381        if (isExtensionNode(def)) {
9382            extensionDefs.push(def);
9383        }
9384        else {
9385            typesDefs.push(def);
9386        }
9387    });
9388    return {
9389        typesAst: {
9390            ...ast,
9391            definitions: typesDefs,
9392        },
9393        extensionsAst: {
9394            ...ast,
9395            definitions: extensionDefs,
9396        },
9397    };
9398}
9399function filterExtensionDefinitions(ast) {
9400    const { typesAst } = filterAndExtractExtensionDefinitions(ast);
9401    return typesAst;
9402}
9403function extractExtensionDefinitions(ast) {
9404    const { extensionsAst } = filterAndExtractExtensionDefinitions(ast);
9405    return extensionsAst;
9406}
9407
9408function concatenateTypeDefs(typeDefinitionsAry, calledFunctionRefs = new Set()) {
9409    const resolvedTypeDefinitions = new Set();
9410    typeDefinitionsAry.forEach((typeDef) => {
9411        if (typeof typeDef === 'function') {
9412            if (!calledFunctionRefs.has(typeDef)) {
9413                calledFunctionRefs.add(typeDef);
9414                resolvedTypeDefinitions.add(concatenateTypeDefs(typeDef(), calledFunctionRefs));
9415            }
9416        }
9417        else if (typeof typeDef === 'string') {
9418            resolvedTypeDefinitions.add(typeDef.trim());
9419        }
9420        else if (typeDef.kind !== undefined) {
9421            resolvedTypeDefinitions.add(Object(printer["a" /* print */])(typeDef).trim());
9422        }
9423        else {
9424            const type = typeof typeDef;
9425            throw new Error(`typeDef array must contain only strings, documents, or functions, got ${type}`);
9426        }
9427    });
9428    return [...resolvedTypeDefinitions].join('\n');
9429}
9430
9431function buildSchemaFromTypeDefinitions(typeDefinitions, parseOptions, noExtensionExtraction) {
9432    const document = buildDocumentFromTypeDefinitions(typeDefinitions, parseOptions);
9433    if (noExtensionExtraction) {
9434        return Object(buildASTSchema["a" /* buildASTSchema */])(document);
9435    }
9436    const { typesAst, extensionsAst } = filterAndExtractExtensionDefinitions(document);
9437    const backcompatOptions = { commentDescriptions: true };
9438    let schema = Object(buildASTSchema["a" /* buildASTSchema */])(typesAst, backcompatOptions);
9439    if (extensionsAst.definitions.length > 0) {
9440        schema = Object(extendSchema["a" /* extendSchema */])(schema, extensionsAst, backcompatOptions);
9441    }
9442    return schema;
9443}
9444function buildDocumentFromTypeDefinitions(typeDefinitions, parseOptions) {
9445    let document;
9446    if (typeof typeDefinitions === 'string') {
9447        document = Object(utils_index_esm["p" /* parseGraphQLSDL */])('', t
9447ypeDefinitions, parseOptions).document;
9448    }
9449    else if (Array.isArray(typeDefinitions)) {
9450        document = Object(utils_index_esm["p" /* parseGraphQLSDL */])('', concatenateTypeDefs(typeDefinitions), parseOptions).document;
9451    }
9452    else if (Object(utils_index_esm["l" /* isDocumentNode */])(typeDefinitions)) {
9453        document = typeDefinitions;
9454    }
9455    else {
9456        const type = typeof typeDefinitions;
9457        throw new Error(`typeDefs must be a string, array or schema AST, got ${type}`);
9458    }
9459    return document;
9460}
9461
9462function chainResolvers(resolvers) {
9463    return (root, args, ctx, info) => resolvers.reduce((prev, curResolver) => {
9464        if (curResolver != null) {
9465            return curResolver(prev, args, ctx, info);
9466        }
9467        return Object(execute["e" /* defaultFieldResolver */])(prev, args, ctx, info);
9468    }, root);
9469}
9470
9471/*
9472 * fn: The function to decorate with the logger
9473 * logger: an object instance of type Logger
9474 * hint: an optional hint to add to the error's message
9475 */
9476function decorateWithLogger(fn, logger, hint) {
9477    const resolver = fn != null ? fn : execute["e" /* defaultFieldResolver */];
9478    const logError = (e) => {
9479        // TODO: clone the error properly
9480        const newE = new Error();
9481        newE.stack = e.stack;
9482        /* istanbul ignore else: always get the hint from addErrorLoggingToSchema */
9483        if (hint) {
9484            newE['originalMessage'] = e.message;
9485            newE.message = `Error in resolver ${hint}\n${e.message}`;
9486        }
9487        logger.log(newE);
9488    };
9489    return (root, args, ctx, info) => {
9490        try {
9491            const result = resolver(root, args, ctx, info);
9492            // If the resolver returns a Promise log any Promise rejects.
9493            if (result && typeof result.then === 'function' && typeof result.catch === 'function') {
9494                result.catch((reason) => {
9495                    // make sure that it's an error we're logging.
9496                    const error = reason instanceof Error ? reason : new Error(reason);
9497                    logError(error);
9498                    // We don't want to leave an unhandled exception so pass on error.
9499                    return reason;
9500                });
9501            }
9502            return result;
9503        }
9504        catch (e) {
9505            logError(e);
9506            // we want to pass on the error, just in case.
9507            throw e;
9508        }
9509    };
9510}
9511
9512// If we have any union or interface types throw if no there is no resolveType resolver
9513function checkForResolveTypeResolver(schema, requireResolversForResolveType) {
9514    Object(utils_index_esm["n" /* mapSchema */])(schema, {
9515        [utils_index_esm["a" /* MapperKind */].ABSTRACT_TYPE]: type => {
9516            if (!type.resolveType) {
9517                const message = `Type "${type.name}" is missing a "__resolveType" resolver. Pass 'ignore' into ` +
9518                    '"resolverValidationOptions.requireResolversForResolveType" to disable this error.';
9519                if (requireResolversForResolveType === 'error') {
9520                    throw new Error(message);
9521                }
9522                if (requireResolversForResolveType === 'warn') {
9523                    // eslint-disable-next-line no-console
9524                    console.warn(message);
9525                }
9526            }
9527            return undefined;
9528        },
9529    });
9530}
9531
9532function extendResolversFromInterfaces(schema, resolvers) {
9533    const typeNames = Object.keys({
9534        ...schema.getTypeMap(),
9535        ...resolvers,
9536    });
9537    const extendedResolvers = {};
9538    typeNames.forEach(typeName => {
9539        const type = schema.getType(typeName);
9540        if (type && 'getInterfaces' in type) {
9541            const allInterfaceResolvers = type
9542                .getInterfaces()
9543                .map(iFace => resolvers[iFace.name])
9544                .filter(interfaceResolvers => interfaceResolvers != null);
9545            extendedResolvers[typeName] = {};
9546            allInterfaceResolvers.forEach(interfaceResolvers => {
9547                Object.keys(interfaceResolvers).forEach(fieldName => {
9548                    if (fieldName === '__isTypeOf' || !fieldName.startsWith('__')) {
9549                        extendedResolvers[typeName][fieldName] = interfaceResolvers[fieldName];
9550                    }
9551                });
9552            });
9553            const typeResolvers = resolvers[typeName];
9554            extendedResolvers[typeName] = {
9555                ...extendedResolvers[typeName],
9556                ...typeResolvers,
9557            };
9558        }
9559        else {
9560            const typeResolvers = resolvers[typeName];
9561            if (typeResolvers != null) {
9562                extendedResolvers[typeName] = typeResolvers;
9563            }
9564        }
9565    });
9566    return extendedResolvers;
9567}
9568
9569function addResolversToSchema(schemaOrOptions, legacyInputResolvers, legacyInputValidationOptions) {
9570    const options = Object(type_schema["c" /* isSchema */])(schemaOrOptions)
9571        ? {
9572            schema: schemaOrOptions,
9573            resolvers: legacyInputResolvers,
9574            resolverValidationOptions: legacyInputValidationOptions,
9575        }
9576        : schemaOrOptions;
9577    let { schema, resolvers: inputResolvers, defaultFieldResolver, resolverValidationOptions = {}, inheritResolversFromInterfaces = false, updateResolversInPlace = false, } = options;
9578    const { requireResolversToMatchSchema = 'error', requireResolversForResolveType } = resolverValidationOptions;
9579    const resolvers = inheritResolversFromInterfaces
9580        ? extendResolversFromInterfaces(schema, inputResolvers)
9581        : inputResolvers;
9582    Object.keys(resolvers).forEach(typeName => {
9583        const resolverValue = resolvers[typeName];
9584        const resolverType = typeof resolverValue;
9585        if (typeName === '__schema') {
9586            if (resolverType !== 'function') {
9587                throw new Error(`"${typeName}" defined in resolvers, but has invalid value "${resolverValue}". A schema resolver's value must be of type object or function.`);
9588            }
9589        }
9590        else {
9591            if (resolverType !== 'object') {
9592                throw new Error(`"${typeName}" defined in resolvers, but has invalid value "${resolverValue}". The resolver's value must be of type object.`);
9593            }
9594            const type = schema.getType(typeName);
9595            if (type == null) {
9596                if (requireResolversToMatchSchema === 'ignore') {
9597                    return;
9598                }
9599                throw new Error(`"${typeName}" defined in resolvers, but not in schema`);
9600            }
9601            else if (Object(type_scalars["f" /* isSpecifiedScalarType */])(type)) {
9602                // allow -- without recommending -- overriding of specified scalar types
9603                Object.keys(resolverValue).forEach(fieldName => {
9604                    if (fieldName.startsWith('__')) {
9605                        type[fieldName.substring(2)] = resolverValue[fieldName];
9606                    }
9607                    else {
9608                        type[fieldName] = resolverValue[fieldName];
9609                    }
9610                });
9611            }
9612            else if (Object(definition["E" /* isEnumType */])(type)) {
9613                const values = type.getValues();
9614                Object.keys(resolverValue).forEach(fieldName => {
9615                    if (!fieldName.startsWith('__') &&
9616                        !values.some(value => value.name === fieldName) &&
9617                        requireResolversToMatchSchema &&
9618                        requireResolversToMatchSchema !== 'ignore') {
9619                        throw new Error(`${type.name}.${fieldName} was defined in resolvers, but not present within ${type.name}`);
9620                    }
9621                });
9622            }
9623            else if (Object(definition["T" /* isUnionType */])(type)) {
9624                Object.keys(resolverValue).forEach(fieldName => {
9625                    if (!fieldName.startsWith('__') &&
9626                        requireResolversToMatchSchema &&
9627                        requireResolversToMatchSchema !== 'ignore') {
9628                        throw new Error(`${type.name}.${fieldName} was defined in resolvers, but ${type.name} is not an object or interface type`);
9629                    }
9630                });
9631            }
9632            else if (Object(definition["N" /* isObjectType */])(type) || Object(definition["H" /* isInterfaceType */])(type)) {
9633                Object.keys(resolverValue).forEach(fieldName => {
9634                    if (!fieldName.startsWith('__')) {
9635                        const fields = type.getFields();
9636                        const field = fields[fieldName];
9637                        if (field == null && requireResolversToMatchSchema && requireResolversToMatchSchema !== 'ignore') {
9638                            throw new Error(`${typeName}.${fieldName} defined in resolvers, but not in schema`);
9639                        }
9640                        const fieldResolve = resolverValue[fieldName];
9641                        if (typeof fieldResolve !== 'function' && typeof fieldResolve !== 'object') {
9642                            throw new Error(`Resolver ${typeName}.${fieldName} must be object or function`);
9643                        }
9644                    }
9645                });
9646            }
9647        }
9648    });
9649    schema = updateResolversInPlace
9650        ? addResolversToExistingSchema(schema, resolvers, defaultFieldResolver)
9651        : createNewSchemaWithResolvers(schema, resolvers, defaultFieldResolver);
9652    if (requireResolversForResolveType || requireResolversForResolveType !== 'ignore') {
9653        checkForResolveTypeResolver(schema, requireResolversForResolveType);
9654    }
9655    return schema;
9656}
9657function addResolversToExistingSchema(schema, resolvers, defaultFieldResolver) {
9658    const typeMap = schema.getTypeMap();
9659    Object.keys(resolvers).forEach(typeName => {
9660        if (typeName !== '__schema') {
9661            const type = schema.getType(typeName);
9662            const resolverValue = resolvers[typeName];
9663            if (Object(definition["R" /* isScalarType */])(type)) {
9664                Object.keys(resolverValue).forEach(fieldName => {
9665                    var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
9666                    if (fieldName.startsWith('__')) {
9667                        type[fieldName.substring(2)] = resolverValue[fieldName];
9668                    }
9669                    else if (fieldName === 'astNode' && type.astNode != null) {
9670                        type.astNode = {
9671                            ...type.astNode,
9672                            description: (_c = (_b = (_a = resolverValue) === null || _a === void 0 ? void 0 : _a.astNode) === null || _b === void 0 ? void 0 : _b.description) !== null && _c !== void 0 ? _c : type.astNode.description,
9673                            directives: ((_d = type.astNode.directives) !== null && _d !== void 0 ? _d : []).concat((_g = (_f = (_e = resolverValue) === null || _e === void 0 ? void 0 : _e.astNode) === null || _f === void 0 ? void 0 : _f.directives) !== null && _g !== void 0 ? _g : []),
9674                        };
9675                    }
9676                    else if (fieldName === 'extensionASTNodes' && type.extensionASTNodes != null) {
9677                        type.extensionASTNodes = ((_h = []) !== null && _h !== void 0 ? _h : type.extensionASTNodes).concat((_k = (_j = resolverValue) === null || _j === void 0 ? void 0 : _j.extensionASTNodes) !== null && _k !== void 0 ? _k : []);
9678                    }
9679                    else if (fieldName === 'extensions' &&
9680                        type.extensions != null &&
9681                        resolverValue.extensions != null) {
9682                        type.extensions = Object.assign({}, type.extensions, resolverValue.extensions);
9683                    }
9684                    else {
9685                        type[fieldName] = resolverValue[fieldName];
9686                    }
9687                });
9688            }
9689            else if (Object(definition["E" /* isEnumType */])(type)) {
9690                const config = type.toConfig();
9691                const enumValueConfigMap = config.values;
9692                Object.keys(resolverValue).forEach(fieldName => {
9693                    var _a, _b, _c, _d, _e, _f, _g, _h, _j;
9694                    if (fieldName.startsWith('__')) {
9695                        config[fieldName.substring(2)] = resolverValue[fieldName];
9696                    }
9697                    else if (fieldName === 'astNode' && config.astNode != null) {
9698                        config.astNode = {
9699                            ...config.astNode,
9700                            description: (_c = (_b = (_a = resolverValue) === null || _a === void 0 ? void 0 : _a.astNode) === null || _b === void 0 ? void 0 : _b.description) !== null && _c !== void 0 ? _c : config.astNode.description,
9701                            directives: ((_d = config.astNode.directives) !== null && _d !== void 0 ? _d : []).concat((_g = (_f = (_e = resolverValue) === null || _e === void 0 ? void 0 : _e.astNode) === null || _f === void 0 ? void 0 : _f.directives) !== null && _g !== void 0 ? _g : []),
9702                        };
9703                    }
9704                    else if (fieldName === 'extensionASTNodes' && config.extensionASTNodes != null) {
9705                        config.extensionASTNodes = config.extensionASTNodes.concat((_j = (_h = resolverValue) === null || _h === void 0 ? void 0 : _h.extensionASTNodes) !== null && _j !== void 0 ? _j : []);
9706                    }
9707                    else if (fieldName === 'extensions' &&
9708                        type.extensions != null &&
9709                        resolverValue.extensions != null) {
9710                        type.extensions = Object.assign({}, type.extensions, resolverValue.extensions);
9711                    }
9712                    else if (enumValueConfigMap[fieldName]) {
9713                        enumValueConfigMap[fieldName].value = resolverValue[fieldName];
9714                    }
9715                });
9716                typeMap[typeName] = new definition["a" /* GraphQLEnumType */](config);
9717            }
9718            else if (Object(definition["T" /* isUnionType */])(type)) {
9719                Object.keys(resolverValue).forEach(fieldName => {
9720                    if (fieldName.startsWith('__')) {
9721                        type[fieldName.substring(2)] = resolverValue[fieldName];
9722                    }
9723                });
9724            }
9725            else if (Object(definition["N" /* isObjectType */])(type) || Object(definition["H" /* isInterfaceType */])(type)) {
9726                Object.keys(resolverValue).forEach(fieldName => {
9727                    if (fieldName.startsWith('__')) {
9728                        // this is for isTypeOf and resolveType and all the other stuff.
9729                        type[fieldName.substring(2)] = resolverValue[fieldName];
9730                        return;
9731                    }
9732                    const fields = type.getFields();
9733                    const field = fields[fieldName];
9734                    if (field != null) {
9735                        const fieldResolve = resolverValue[fieldName];
9736                        if (typeof fieldResolve === 'function') {
9737                            // for convenience. Allows shorter syntax in resolver definition file
9738                            field.resolve = fieldResolve;
9739                        }
9740                        else {
9741                            setFieldProperties(field, fieldResolve);
9742                        }
9743                    }
9744                });
9745            }
9746        }
9747    });
9748    // serialize all default values prior to healing fields with 
9748new scalar/enum types.
9749    Object(utils_index_esm["f" /* forEachDefaultValue */])(schema, utils_index_esm["t" /* serializeInputValue */]);
9750    // schema may have new scalar/enum types that require healing
9751    Object(utils_index_esm["k" /* healSchema */])(schema);
9752    // reparse all default values with new parsing functions.
9753    Object(utils_index_esm["f" /* forEachDefaultValue */])(schema, utils_index_esm["q" /* parseInputValue */]);
9754    if (defaultFieldResolver != null) {
9755        Object(utils_index_esm["g" /* forEachField */])(schema, field => {
9756            if (!field.resolve) {
9757                field.resolve = defaultFieldResolver;
9758            }
9759        });
9760    }
9761    return schema;
9762}
9763function createNewSchemaWithResolvers(schema, resolvers, defaultFieldResolver) {
9764    schema = Object(utils_index_esm["n" /* mapSchema */])(schema, {
9765        [utils_index_esm["a" /* MapperKind */].SCALAR_TYPE]: type => {
9766            const config = type.toConfig();
9767            const resolverValue = resolvers[type.name];
9768            if (!Object(type_scalars["f" /* isSpecifiedScalarType */])(type) && resolverValue != null) {
9769                Object.keys(resolverValue).forEach(fieldName => {
9770                    var _a, _b, _c, _d, _e, _f, _g, _h, _j;
9771                    if (fieldName.startsWith('__')) {
9772                        config[fieldName.substring(2)] = resolverValue[fieldName];
9773                    }
9774                    else if (fieldName === 'astNode' && config.astNode != null) {
9775                        config.astNode = {
9776                            ...config.astNode,
9777                            description: (_c = (_b = (_a = resolverValue) === null || _a === void 0 ? void 0 : _a.astNode) === null || _b === void 0 ? void 0 : _b.description) !== null && _c !== void 0 ? _c : config.astNode.description,
9778                            directives: ((_d = config.astNode.directives) !== null && _d !== void 0 ? _d : []).concat((_g = (_f = (_e = resolverValue) === null || _e === void 0 ? void 0 : _e.astNode) === null || _f === void 0 ? void 0 : _f.directives) !== null && _g !== void 0 ? _g : []),
9779                        };
9780                    }
9781                    else if (fieldName === 'extensionASTNodes' && config.extensionASTNodes != null) {
9782                        config.extensionASTNodes = config.extensionASTNodes.concat((_j = (_h = resolverValue) === null || _h === void 0 ? void 0 : _h.extensionASTNodes) !== null && _j !== void 0 ? _j : []);
9783                    }
9784                    else if (fieldName === 'extensions' &&
9785                        config.extensions != null &&
9786                        resolverValue.extensions != null) {
9787                        config.extensions = Object.assign({}, type.extensions, resolverValue.extensions);
9788                    }
9789                    else {
9790                        config[fieldName] = resolverValue[fieldName];
9791                    }
9792                });
9793                return new definition["g" /* GraphQLScalarType */](config);
9794            }
9795        },
9796        [utils_index_esm["a" /* MapperKind */].ENUM_TYPE]: type => {
9797            const resolverValue = resolvers[type.name];
9798            const config = type.toConfig();
9799            const enumValueConfigMap = config.values;
9800            if (resolverValue != null) {
9801                Object.keys(resolverValue).forEach(fieldName => {
9802                    var _a, _b, _c, _d, _e, _f, _g, _h, _j;
9803                    if (fieldName.startsWith('__')) {
9804                        config[fieldName.substring(2)] = resolverValue[fieldName];
9805                    }
9806                    else if (fieldName === 'astNode' && config.astNode != null) {
9807                        config.astNode = {
9808                            ...config.astNode,
9809                            description: (_c = (_b = (_a = resolverValue) === null || _a === void 0 ? void 0 : _a.astNode) === null || _b === void 0 ? void 0 : _b.description) !== null && _c !== void 0 ? _c : config.astNode.description,
9810                            directives: ((_d = config.astNode.directives) !== null && _d !== void 0 ? _d : []).concat((_g = (_f = (_e = resolverValue) === null || _e === void 0 ? void 0 : _e.astNode) === null || _f === void 0 ? void 0 : _f.directives) !== null && _g !== void 0 ? _g : []),
9811                        };
9812                    }
9813                    else if (fieldName === 'extensionASTNodes' && config.extensionASTNodes != null) {
9814                        config.extensionASTNodes = config.extensionASTNodes.concat((_j = (_h = resolverValue) === null || _h === void 0 ? void 0 : _h.extensionASTNodes) !== null && _j !== void 0 ? _j : []);
9815                    }
9816                    else if (fieldName === 'extensions' &&
9817                        config.extensions != null &&
9818                        resolverValue.extensions != null) {
9819                        config.extensions = Object.assign({}, type.extensions, resolverValue.extensions);
9820                    }
9821                    else if (enumValueConfigMap[fieldName]) {
9822                        enumValueConfigMap[fieldName].value = resolverValue[fieldName];
9823                    }
9824                });
9825                return new definition["a" /* GraphQLEnumType */](config);
9826            }
9827        },
9828        [utils_index_esm["a" /* MapperKind */].UNION_TYPE]: type => {
9829            const resolverValue = resolvers[type.name];
9830            if (resolverValue != null) {
9831                const config = type.toConfig();
9832                Object.keys(resolverValue).forEach(fieldName => {
9833                    if (fieldName.startsWith('__')) {
9834                        config[fieldName.substring(2)] = resolverValue[fieldName];
9835                    }
9836                });
9837                return new definition["h" /* GraphQLUnionType */](config);
9838            }
9839        },
9840        [utils_index_esm["a" /* MapperKind */].OBJECT_TYPE]: type => {
9841            const resolverValue = resolvers[type.name];
9842            if (resolverValue != null) {
9843                const config = type.toConfig();
9844                Object.keys(resolverValue).forEach(fieldName => {
9845                    if (fieldName.startsWith('__')) {
9846                        config[fieldName.substring(2)] = resolverValue[fieldName];
9847                    }
9848                });
9849                return new definition["f" /* GraphQLObjectType */](config);
9850            }
9851        },
9852        [utils_index_esm["a" /* MapperKind */].INTERFACE_TYPE]: type => {
9853            const resolverValue = resolvers[type.name];
9854            if (resolverValue != null) {
9855                const config = type.toConfig();
9856                Object.keys(resolverValue).forEach(fieldName => {
9857                    if (fieldName.startsWith('__')) {
9858                        config[fieldName.substring(2)] = resolverValue[fieldName];
9859                    }
9860                });
9861                return new definition["c" /* GraphQLInterfaceType */](config);
9862            }
9863        },
9864        [utils_index_esm["a" /* MapperKind */].COMPOSITE_FIELD]: (fieldConfig, fieldName, typeName) => {
9865            const resolverValue = resolvers[typeName];
9866            if (resolverValue != null) {
9867                const fieldResolve = resolverValue[fieldName];
9868                if (fieldResolve != null) {
9869                    const newFieldConfig = { ...fieldConfig };
9870                    if (typeof fieldResolve === 'function') {
9871                        // for convenience. Allows shorter syntax in resolver definition file
9872                        newFieldConfig.resolve = fieldResolve;
9873                    }
9874                    else {
9875                        setFieldProperties(newFieldConfig, fieldResolve);
9876                    }
9877                    return newFieldConfig;
9878                }
9879            }
9880        },
9881    });
9882    if (defaultFieldResolver != null) {
9883        schema = Object(utils_index_esm["n" /* mapSchema */])(schema, {
9884            [utils_index_esm["a" /* MapperKind */].OBJECT_FIELD]: fieldConfig => ({
9885                ...fieldConfig,
9886                resolve: fieldConfig.resolve != null ? fieldConfig.resolve : defaultFieldResolver,
9887            }),
9888        });
9889    }
9890    return schema;
9891}
9892function setFieldProperties(field, propertiesObj) {
9893    Object.keys(propertiesObj).forEach(propertyName => {
9894        field[propertyName] = propertiesObj[propertyName];
9895    });
9896}
9897
9898function addErrorLoggingToSchema(schema, logger) {
9899    if (!logger) {
9900        throw new Error('Must provide a logger');
9901    }
9902    if (typeof logger.log !== 'function') {
9903        throw new Error('Logger.log must be a function');
9904    }
9905    return Object(utils_index_esm["n" /* mapSchema */])(schema, {
9906        [utils_index_esm["a" /* MapperKind */].OBJECT_FIELD]: (fieldConfig, fieldName, typeName) => ({
9907            ...fieldConfig,
9908            resolve: decorateWithLogger(fieldConfig.resolve, logger, `${typeName}.${fieldName}`),
9909        }),
9910    });
9911}
9912
9913function decorateToCatchUndefined(fn, hint) {
9914    const resolve = fn == null ? execute["e" /* defaultFieldResolver */] : fn;
9915    return (root, args, ctx, info) => {
9916        const result = resolve(root, args, ctx, info);
9917        if (typeof result === 'undefined') {
9918            throw new Error(`Resolver for "${hint}" returned undefined`);
9919        }
9920        return result;
9921    };
9922}
9923function addCatchUndefinedToSchema(schema) {
9924    return Object(utils_index_esm["n" /* mapSchema */])(schema, {
9925        [utils_index_esm["a" /* MapperKind */].OBJECT_FIELD]: (fieldConfig, fieldName, typeName) => ({
9926            ...fieldConfig,
9927            resolve: decorateToCatchUndefined(fieldConfig.resolve, `${typeName}.${fieldName}`),
9928        }),
9929    });
9930}
9931
9932/**
9933 * Builds a schema from the provided type definitions and resolvers.
9934 *
9935 * The type definitions are written using Schema Definition Language (SDL). They
9936 * can be provided as a string, a `DocumentNode`, a function, or an array of any
9937 * of these. If a function is provided, it will be passed no arguments and
9938 * should return an array of strings or `DocumentNode`s.
9939 *
9940 * Note: You can use `graphql-tag` to not only parse a string into a
9941 * `DocumentNode` but also to provide additional syntax highlighting in your
9942 * editor (with the appropriate editor plugin).
9943 *
9944 * ```js
9945 * const typeDefs = gql`
9946 *   type Query {
9947 *     posts: [Post]
9948 *     author(id: Int!): Author
9949 *   }
9950 * `;
9951 * ```
9952 *
9953 * The `resolvers` object should be a map of type names to nested object, which
9954 * themselves map the type's fields to their appropriate resolvers.
9955 * See the [Resolvers](/docs/resolvers) section of the documentation for more details.
9956 *
9957 * ```js
9958 * const resolvers = {
9959 *   Query: {
9960 *     posts: (obj, args, ctx, info) => getAllPosts(),
9961 *     author: (obj, args, ctx, info) => getAuthorById(args.id)
9962 *   }
9963 * };
9964 * ```
9965 *
9966 * Once you've defined both the `typeDefs` and `resolvers`, you can create your
9967 * schema:
9968 *
9969 * ```js
9970 * const schema = makeExecutableSchema({
9971 *   typeDefs,
9972 *   resolvers,
9973 * })
9974 * ```
9975 */
9976function makeExecutableSchema({ typeDefs, resolvers = {}, logger, allowUndefinedInResolve = true, resolverValidationOptions = {}, directiveResolvers, schemaDirectives, schemaTransforms: userProvidedSchemaTransforms, parseOptions = {}, inheritResolversFromInterfaces = false, pruningOptions, updateResolversInPlace = false, noExtensionExtraction = false, }) {
9977    // Validate and clean up arguments
9978    if (typeof resolverValidationOptions !== 'object') {
9979        throw new Error('Expected `resolverValidationOptions` to be an object');
9980    }
9981    if (!typeDefs) {
9982        throw new Error('Must provide typeDefs');
9983    }
9984    // Arguments are now validated and cleaned up
9985    const schemaTransforms = [
9986        schema => {
9987            // We allow passing in an array of resolver maps, in 
9987which case we merge them
9988            const resolverMap = Array.isArray(resolvers) ? resolvers.reduce(utils_index_esm["o" /* mergeDeep */], {}) : resolvers;
9989            const schemaWithResolvers = addResolversToSchema({
9990                schema,
9991                resolvers: resolverMap,
9992                resolverValidationOptions,
9993                inheritResolversFromInterfaces,
9994                updateResolversInPlace,
9995            });
9996            if (Object.keys(resolverValidationOptions).length > 0) {
9997                assertResolversPresent(schemaWithResolvers, resolverValidationOptions);
9998            }
9999            return schemaWithResolvers;
10000        },
10001    ];
10002    if (!allowUndefinedInResolve) {
10003        schemaTransforms.push(addCatchUndefinedToSchema);
10004    }
10005    if (logger != null) {
10006        schemaTransforms.push(schema => addErrorLoggingToSchema(schema, logger));
10007    }
10008    if (typeof resolvers['__schema'] === 'function') {
10009        // TODO a bit of a hack now, better rewrite generateSchema to attach it there.
10010        // not doing that now, because I'd have to rewrite a lot of tests.
10011        schemaTransforms.push(schema => addSchemaLevelResolver(schema, resolvers['__schema']));
10012    }
10013    if (userProvidedSchemaTransforms) {
10014        schemaTransforms.push(schema => userProvidedSchemaTransforms.reduce((s, schemaTransform) => schemaTransform(s), schema));
10015    }
10016    // directive resolvers are implemented using SchemaDirectiveVisitor.visitSchemaDirectives
10017    // schema visiting modifies the schema in place
10018    if (directiveResolvers != null) {
10019        schemaTransforms.push(schema => attachDirectiveResolvers(schema, directiveResolvers));
10020    }
10021    if (schemaDirectives != null) {
10022        schemaTransforms.push(schema => {
10023            utils_index_esm["b" /* SchemaDirectiveVisitor */].visitSchemaDirectives(schema, schemaDirectives);
10024            return schema;
10025        });
10026    }
10027    if (pruningOptions) {
10028        schemaTransforms.push(utils_index_esm["s" /* pruneSchema */]);
10029    }
10030    const schemaFromTypeDefs = buildSchemaFromTypeDefinitions(typeDefs, parseOptions, noExtensionExtraction);
10031    return schemaTransforms.reduce((schema, schemaTransform) => schemaTransform(schema), schemaFromTypeDefs);
10032}
10033
10034
10035//# sourceMappingURL=index.esm.js.map
10036
10037// CONCATENATED MODULE: ./node_modules/@graphql-tools/merge/index.esm.js
10038
10039
10040
10041
10042/**
10043 * Deep merges multiple resolver definition objects into a single definition.
10044 * @param resolversDefinitions Resolver definitions to be merged
10045 * @param options Additional options
10046 *
10047 * ```js
10048 * const { mergeResolvers } = require('@graphql-tools/merge');
10049 * const clientResolver = require('./clientResolver');
10050 * const productResolver = require('./productResolver');
10051 *
10052 * const resolvers = mergeResolvers([
10053 *  clientResolver,
10054 *  productResolver,
10055 * ]);
10056 * ```
10057 *
10058 * If you don't want to manually create the array of resolver objects, you can
10059 * also use this function along with loadFiles:
10060 *
10061 * ```js
10062 * const path = require('path');
10063 * const { mergeResolvers } = require('@graphql-tools/merge');
10064 * const { loadFilesSync } = require('@graphql-tools/load-files');
10065 *
10066 * const resolversArray = loadFilesSync(path.join(__dirname, './resolvers'));
10067 *
10068 * const resolvers = mergeResolvers(resolversArray)
10069 * ```
10070 */
10071function mergeResolvers(resolversDefinitions, options) {
10072    if (!resolversDefinitions || resolversDefinitions.length === 0) {
10073        return {};
10074    }
10075    if (resolversDefinitions.length === 1) {
10076        const singleDefinition = resolversDefinitions[0];
10077        if (Array.isArray(singleDefinition)) {
10078            return mergeResolvers(singleDefinition);
10079        }
10080        return singleDefinition;
10081    }
10082    const resolversFactories = new Array();
10083    const resolvers = new Array();
10084    for (let resolversDefinition of resolversDefinitions) {
10085        if (Array.isArray(resolversDefinition)) {
10086            resolversDefinition = mergeResolvers(resolversDefinition);
10087        }
10088        if (typeof resolversDefinition === 'function') {
10089            resolversFactories.push(resolversDefinition);
10090        }
10091        else if (typeof resolversDefinition === 'object') {
10092            resolvers.push(resolversDefinition);
10093        }
10094    }
10095    let result = {};
10096    if (resolversFactories.length) {
10097        result = ((...args) => {
10098            const resultsOfFactories = resolversFactories.map(factory => factory(...args));
10099            return resolvers.concat(resultsOfFactories).reduce(utils_index_esm["o" /* mergeDeep */], {});
10100        });
10101    }
10102    else {
10103        result = resolvers.reduce(utils_index_esm["o" /* mergeDeep */], {});
10104    }
10105    if (options && options.exclusions) {
10106        for (const exclusion of options.exclusions) {
10107            const [typeName, fieldName] = exclusion.split('.');
10108            if (!fieldName || fieldName === '*') {
10109                delete result[typeName];
10110            }
10111            else if (result[typeName]) {
10112                delete result[typeName][fieldName];
10113            }
10114        }
10115    }
10116    return result;
10117}
10118
10119function mergeArguments(args1, args2, config) {
10120    const result = deduplicateArguments([].concat(args2, args1).filter(a => a));
10121    if (config && config.sort) {
10122        result.sort(utils_index_esm["e" /* compareNodes */]);
10123    }
10124    return result;
10125}
10126function deduplicateArguments(args) {
10127    return args.reduce((acc, current) => {
10128        const dup = acc.find(arg => arg.name.value === current.name.value);
10129        if (!dup) {
10130            return acc.concat([current]);
10131        }
10132        return acc;
10133    }, []);
10134}
10135
10136let commentsRegistry = {};
10137function resetComments() {
10138    commentsRegistry = {};
10139}
10140function collectComment(node) {
10141    const entityName = node.name.value;
10142    pushComment(node, entityName);
10143    switch (node.kind) {
10144        case 'EnumTypeDefinition':
10145            node.values.forEach(value => {
10146                pushComment(value, entityName, value.name.value);
10147            });
10148            break;
10149        case 'ObjectTypeDefinition':
10150        case 'InputObjectTypeDefinition':
10151        case 'InterfaceTypeDefinition':
10152            if (node.fields) {
10153                node.fields.forEach((field) => {
10154                    pushComment(field, entityName, field.name.value);
10155                    if (isFieldDefinitionNode(field) && field.arguments) {
10156                        field.arguments.forEach(arg => {
10157                            pushComment(arg, entityName, field.name.value, arg.name.value);
10158                        });
10159                    }
10160                });
10161            }
10162            break;
10163    }
10164}
10165function pushComment(node, entity, field, argument) {
10166    const comment = Object(extendSchema["c" /* getDescription */])(node, { commentDescriptions: true });
10167    if (typeof comment !== 'string' || comment.length === 0) {
10168        return;
10169    }
10170    const keys = [entity];
10171    if (field) {
10172        keys.push(field);
10173        if (argument) {
10174            keys.push(argument);
10175        }
10176    }
10177    const path = keys.join('.');
10178    if (!commentsRegistry[path]) {
10179        commentsRegistry[path] = [];
10180    }
10181    commentsRegistry[path].push(comment);
10182}
10183function printComment(comment) {
10184    return '\n# ' + comment.replace(/\n/g, '\n# ');
10185}
10186/**
10187 * Copyright (c) 2015-present, Facebook, Inc.
10188 *
10189 * This source code is licensed under the MIT license found in the
10190 * LICENSE file in the root directory of this source tree.
10191 */
10192/**
10193 * NOTE: ==> This file has been modified just to add comments to the printed AST
10194 * This is a temp measure, we will move to using the original non modified printer.js ASAP.
10195 */
10196// import { visit, VisitFn } from 'graphql/language/visitor';
10197/**
10198 * Given maybeArray, print an empty string if it is null or empty, otherwise
10199 * print all items together separated by separator if provided
10200 */
10201function join(maybeArray, separator) {
10202    return maybeArray ? maybeArray.filter(x => x).join(separator || '') : '';
10203}
10204function addDescription(cb) {
10205    return (node, _key, _parent, path, ancestors) => {
10206        const keys = [];
10207        const parent = path.reduce((prev, key) => {
10208            if (['fields', 'arguments', 'values'].includes(key)) {
10209                keys.push(prev.name.value);
10210            }
10211            return prev[key];
10212        }, ancestors[0]);
10213        const key = [...keys, parent.name.value].join('.');
10214        const items = [];
10215        if (commentsRegistry[key]) {
10216            items.push(...commentsRegistry[key]);
10217        }
10218        return join([...items.map(printComment), node.description, cb(node)], '\n');
10219    };
10220}
10221function index_esm_indent(maybeString) {
10222    return maybeString && `  ${maybeString.replace(/\n/g, '\n  ')}`;
10223}
10224/**
10225 * Given array, print each item on its own line, wrapped in an
10226 * indented "{ }" block.
10227 */
10228function index_esm_block(array) {
10229    return array && array.length !== 0 ? `{\n${index_esm_indent(join(array, '\n'))}\n}` : '';
10230}
10231/**
10232 * If maybeString is not null or empty, then wrap with start and end, otherwise
10233 * print an empty string.
10234 */
10235function wrap(start, maybeString, end) {
10236    return maybeString ? start + maybeString + (end || '') : '';
10237}
10238/**
10239 * Print a block string in the indented block form by adding a leading and
10240 * trailing blank line. However, if a block string starts with whitespace and is
10241 * a single-line, adding a leading blank line would strip that whitespace.
10242 */
10243function printBlockString(value, isDescription) {
10244    const escaped = value.replace(/"""/g, '\\"""');
10245    return (value[0] === ' ' || value[0] === '\t') && value.indexOf('\n') === -1
10246        ? `"""${escaped.replace(/"$/, '"\n')}"""`
10247        : `"""\n${isDescription ? escaped : index_esm_indent(escaped)}\n"""`;
10248}
10249/**
10250 * Converts an AST into a string, using one set of reasonable
10251 * formatting rules.
10252 */
10253function printWithComments(ast) {
10254    return Object(language_visitor["c" /* visit */])(ast, {
10255        leave: {
10256            Name: node =>
10256 node.value,
10257            Variable: node => `$${node.name}`,
10258            // Document
10259            Document: node => `${node.definitions
10260                .map(defNode => `${defNode}\n${defNode[0] === '#' ? '' : '\n'}`)
10261                .join('')
10262                .trim()}\n`,
10263            OperationTypeDefinition: node => `${node.operation}: ${node.type}`,
10264            VariableDefinition: ({ variable, type, defaultValue }) => `${variable}: ${type}${wrap(' = ', defaultValue)}`,
10265            SelectionSet: ({ selections }) => index_esm_block(selections),
10266            Field: ({ alias, name, arguments: args, directives, selectionSet }) => join([wrap('', alias, ': ') + name + wrap('(', join(args, ', '), ')'), join(directives, ' '), selectionSet], '  '),
10267            Argument: addDescription(({ name, value }) => `${name}: ${value}`),
10268            // Value
10269            IntValue: ({ value }) => value,
10270            FloatValue: ({ value }) => value,
10271            StringValue: ({ value, block: isBlockString }, key) => isBlockString ? printBlockString(value, key === 'description') : JSON.stringify(value),
10272            BooleanValue: ({ value }) => (value ? 'true' : 'false'),
10273            NullValue: () => 'null',
10274            EnumValue: ({ value }) => value,
10275            ListValue: ({ values }) => `[${join(values, ', ')}]`,
10276            ObjectValue: ({ fields }) => `{${join(fields, ', ')}}`,
10277            ObjectField: ({ name, value }) => `${name}: ${value}`,
10278            // Directive
10279            Directive: ({ name, arguments: args }) => `@${name}${wrap('(', join(args, ', '), ')')}`,
10280            // Type
10281            NamedType: ({ name }) => name,
10282            ListType: ({ type }) => `[${type}]`,
10283            NonNullType: ({ type }) => `${type}!`,
10284            // Type System Definitions
10285            SchemaDefinition: ({ directives, operationTypes }) => join(['schema', join(directives, ' '), index_esm_block(operationTypes)], ' '),
10286            ScalarTypeDefinition: addDescription(({ name, directives }) => join(['scalar', name, join(directives, ' ')], ' ')),
10287            ObjectTypeDefinition: addDescription(({ name, interfaces, directives, fields }) => join(['type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), index_esm_block(fields)], ' ')),
10288            FieldDefinition: addDescription(({ name, arguments: args, type, directives }) => `${name + wrap('(', join(args, ', '), ')')}: ${type}${wrap(' ', join(directives, ' '))}`),
10289            InputValueDefinition: addDescription(({ name, type, defaultValue, directives }) => join([`${name}: ${type}`, wrap('= ', defaultValue), join(directives, ' ')], ' ')),
10290            InterfaceTypeDefinition: addDescription(({ name, directives, fields }) => join(['interface', name, join(directives, ' '), index_esm_block(fields)], ' ')),
10291            UnionTypeDefinition: addDescription(({ name, directives, types }) => join(['union', name, join(directives, ' '), types && types.length !== 0 ? `= ${join(types, ' | ')}` : ''], ' ')),
10292            EnumTypeDefinition: addDescription(({ name, directives, values }) => join(['enum', name, join(directives, ' '), index_esm_block(values)], ' ')),
10293            EnumValueDefinition: addDescription(({ name, directives }) => join([name, join(directives, ' ')], ' ')),
10294            InputObjectTypeDefinition: addDescription(({ name, directives, fields }) => join(['input', name, join(directives, ' '), index_esm_block(fields)], ' ')),
10295            ScalarTypeExtension: ({ name, directives }) => join(['extend scalar', name, join(directives, ' ')], ' '),
10296            ObjectTypeExtension: ({ name, interfaces, directives, fields }) => join(['extend type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), index_esm_block(fields)], ' '),
10297            InterfaceTypeExtension: ({ name, directives, fields }) => join(['extend interface', name, join(directives, ' '), index_esm_block(fields)], ' '),
10298            UnionTypeExtension: ({ name, directives, types }) => join(['extend union', name, join(directives, ' '), types && types.length !== 0 ? `= ${join(types, ' | ')}` : ''], ' '),
10299            EnumTypeExtension: ({ name, directives, values }) => join(['extend enum', name, join(directives, ' '), index_esm_block(values)], ' '),
10300            InputObjectTypeExtension: ({ name, directives, fields }) => join(['extend input', name, join(directives, ' '), index_esm_block(fields)], ' '),
10301            DirectiveDefinition: addDescription(({ name, arguments: args, locations }) => `directive @${name}${wrap('(', join(args, ', '), ')')} on ${join(locations, ' | ')}`),
10302        },
10303    });
10304}
10305function isFieldDefinitionNode(node) {
10306    return node.kind === 'FieldDefinition';
10307}
10308
10309function directiveAlreadyExists(directivesArr, otherDirective) {
10310    return !!directivesArr.find(directive => directive.name.value === otherDirective.name.value);
10311}
10312function nameAlreadyExists(name, namesArr) {
10313    return namesArr.some(({ value }) => value === name.value);
10314}
10315function mergeArguments$1(a1, a2) {
10316    const result = [...a2];
10317    for (const argument of a1) {
10318        const existingIndex = result.findIndex(a => a.name.value === argument.name.value);
10319        if (existingIndex > -1) {
10320            const existingArg = result[existingIndex];
10321            if (existingArg.value.kind === 'ListValue') {
10322                const source = existingArg.value.values;
10323                const target = argument.value.values;
10324                // merge values of two lists
10325                existingArg.value.values = deduplicateLists(source, target, (targetVal, source) => {
10326                    const value = targetVal.value;
10327                    return !value || !source.some((sourceVal) => sourceVal.value === value);
10328                });
10329            }
10330            else {
10331                existingArg.value = argument.value;
10332            }
10333        }
10334        else {
10335            result.push(argument);
10336        }
10337    }
10338    return result;
10339}
10340function deduplicateDirectives(directives) {
10341    return directives
10342        .map((directive, i, all) => {
10343        const firstAt = all.findIndex(d => d.name.value === directive.name.value);
10344        if (firstAt !== i) {
10345            const dup = all[firstAt];
10346            directive.arguments = mergeArguments$1(directive.arguments, dup.arguments);
10347            return null;
10348        }
10349        return directive;
10350    })
10351        .filter(d => d);
10352}
10353function mergeDirectives(d1 = [], d2 = [], config) {
10354    const reverseOrder = config && config.reverseDirectives;
10355    const asNext = reverseOrder ? d1 : d2;
10356    const asFirst = reverseOrder ? d2 : d1;
10357    const result = deduplicateDirectives([...asNext]);
10358    for (const directive of asFirst) {
10359        if (directiveAlreadyExists(result, directive)) {
10360            const existingDirectiveIndex = result.findIndex(d => d.name.value === directive.name.value);
10361            const existingDirective = result[existingDirectiveIndex];
10362            result[existingDirectiveIndex].arguments = mergeArguments$1(directive.arguments || [], existingDirective.arguments || []);
10363        }
10364        else {
10365            result.push(directive);
10366        }
10367    }
10368    return result;
10369}
10370function validateInputs(node, existingNode) {
10371    const printedNode = Object(printer["a" /* print */])(node);
10372    const printedExistingNode = Object(printer["a" /* print */])(existingNode);
10373    // eslint-disable-next-line
10374    const leaveInputs = new RegExp('(directive @w*d*)|( on .*$)', 'g');
10375    const sameArguments = printedNode.replace(leaveInputs, '') === printedExistingNode.replace(leaveInputs, '');
10376    if (!sameArguments) {
10377        throw new Error(`Unable to merge GraphQL directive "${node.name.value}". \nExisting directive:  \n\t${printedExistingNode} \nReceived directive: \n\t${printedNode}`);
10378    }
10379}
10380function mergeDirective(node, existingNode) {
10381    if (existingNode) {
10382        validateInputs(node, existingNode);
10383        return {
10384            ...node,
10385            locations: [
10386                ...existingNode.locations,
10387                ...node.locations.filter(name => !nameAlreadyExists(name, existingNode.locations)),
10388            ],
10389        };
10390    }
10391    return node;
10392}
10393function deduplicateLists(source, target, filterFn) {
10394    return source.concat(target.filter(val => filterFn(val, source)));
10395}
10396
10397function mergeEnumValues(first, second, config) {
10398    if (config === null || config === void 0 ? void 0 : config.consistentEnumMerge) {
10399        const reversed = first;
10400        first = second;
10401        second = reversed;
10402    }
10403    const enumValueMap = new Map();
10404    for (const firstValue of first) {
10405        enumValueMap.set(firstValue.name.value, firstValue);
10406    }
10407    for (const secondValue of second) {
10408        const enumValue = secondValue.name.value;
10409        if (enumValueMap.has(enumValue)) {
10410            const firstValue = enumValueMap.get(enumValue);
10411            firstValue.description = secondValue.description || firstValue.description;
10412            firstValue.directives = mergeDirectives(secondValue.directives, firstValue.directives);
10413        }
10414        else {
10415            enumValueMap.set(enumValue, secondValue);
10416        }
10417    }
10418    const result = [...enumValueMap.values()];
10419    if (config && config.sort) {
10420        result.sort(utils_index_esm["e" /* compareNodes */]);
10421    }
10422    return result;
10423}
10424
10425function mergeEnum(e1, e2, config) {
10426    if (e2) {
10427        return {
10428            name: e1.name,
10429            description: e1['description'] || e2['description'],
10430            kind: (config && config.convertExtensions) || e1.kind === 'EnumTypeDefinition' || e2.kind === 'EnumTypeDefinition'
10431                ? 'EnumTypeDefinition'
10432                : 'EnumTypeExtension',
10433            loc: e1.loc,
10434            directives: mergeDirectives(e1.directives, e2.directives, config),
10435            values: mergeEnumValues(e1.values, e2.values, config),
10436        };
10437    }
10438    return config && config.convertExtensions
10439        ? {
10440            ...e1,
10441            kind: 'EnumTypeDefinition',
10442        }
10443        : e1;
10444}
10445
10446function isStringTypes(types) {
10447    return typeof types === 'string';
10448}
10449function isSourceTypes(types) {
10450    return types instanceof source["a" /* Source */];
10451}
10452function extractType(type) {
10453    let visitedType = type;
10454    while (visitedType.kind === language_kinds["a" /* Kind */].LIST_TYPE || visitedType.kind === 'NonNullType') {
10455        visitedType = visitedType.type;
10456    }
10457    return visitedType;
10458}
10459function isWrappingTypeNode(type) {
10460    return type.kind !== language_kinds["a" /* Kind */].NAMED_TYPE;
10461}
10462function isListTypeNode(type) {
10463    return type.kind === language_kinds["a" /* Kind */].LIST_TYPE;
10464}
10465function isNonNullTypeNode(type) {
10466    return type.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE;
10467}
10468function printTypeNode(type) {
10469    if (isListTypeNode(type)) {
10470        return `[${printTypeNode(type.type)}]`;
10471    }
10472    if (isNonNullTypeNode(type)) {
10473        return `${printTypeNode(type.type)}!`;
10474    }
10475    return type.name.value;
10476}
10477var CompareVal;
10478(function (CompareVal) {
10479    CompareVal[CompareVal["A_SMALLER_THAN_B"] = -1] = "A_SMALLER_THAN_B";
10480    CompareVal[CompareVal["A_EQUALS_B"] = 0] = "A_EQUALS_B";
10481    CompareVal[CompareVal["A_GREATER_THAN_B"] = 1] = "A_GREATER_THAN_B";
10482})(CompareVal || (CompareVal = {}));
10483function defaultStringComparator(a, b) {
10484    if (a < b)
10485        return CompareVal.A_SMALLER_THAN_B;
10486    if (a > b)
10487        return CompareVal.A_GREATER_THAN_B;
10488    return CompareVal.A_EQUALS_B;
10489}
10490
10491function fieldAlreadyExists(fieldsArr, otherField, config) {
10492    const result = fieldsArr.find(field => field.name.value === otherField.name.value);
10493    if (result && !(config === null || config === void 0 ? void 0 : config.ignoreFieldConflicts)) {
10494        const t1 = extractType(result.type);
10495        const t2 = extractType(otherField.type);
10496        if (t1.name.value !== t2.name.value) {
10497            throw new Error(`Field "${otherField.name.value}" already defined with a different type. Declared as "${t1.name.value}", but you tried to override with "${t2.name.value}"`);
10498        }
10499    }
10500    return !!result;
10501}
10502function mergeFields(type, f1, f2, config) {
10503    const result = [...f2];
10504    for (const field of f1) {
10505        if (fieldAlreadyExists(result, field, config)) {
10506            const existing = result.find((f) => f.name.value === field.name.value);
10507            if (!(config === null || config === void 0 ? void 0 : config.ignoreFieldConflicts)) {
10508                if (config === null || config === void 0 ? void 0 : config.throwOnConflict) {
10509                    preventConflicts(type, existing, field, false);
10510                }
10511                else {
10512                    preventConflicts(type, existing, field, true);
10513                }
10514                if (isNonNullTypeNode(field.type) && !isNonNullTypeNode(existing.type)) {
10515                    existing.type = field.type;
10516                }
10517            }
10518            existing.arguments = mergeArguments(field['arguments'] || [], existing.arguments || [], config);
10519            existing.directives = mergeDirectives(field.directives, existing.directives, config);
10520            existing.description = field.description || existing.description;
10521        }
10522        else {
10523            result.push(field);
10524        }
10525    }
10526    if (config && config.sort) {
10527        result.sort(utils_index_esm["e" /* compareNodes */]);
10528    }
10529    if (config && config.exclusions) {
10530        return result.filter(field => !config.exclusions.includes(`${type.name.value}.${field.name.value}`));
10531    }
10532    return result;
10533}
10534function preventConflicts(type, a, b, ignoreNullability = false) {
10535    const aType = printTypeNode(a.type);
10536    const bType = printTypeNode(b.type);
10537    if (Object(utils_index_esm["m" /* isNotEqual */])(aType, bType)) {
10538        if (safeChangeForFieldType(a.type, b.type, ignoreNullability) === false) {
10539            throw new Error(`Field '${type.name.value}.${a.name.value}' changed type from '${aType}' to '${bType}'`);
10540        }
10541    }
10542}
10543function safeChangeForFieldType(oldType, newType, ignoreNullability = false) {
10544    // both are named
10545    if (!isWrappingTypeNode(oldType) && !isWrappingTypeNode(newType)) {
10546        return oldType.toString() === newType.toString();
10547    }
10548    // new is non-null
10549    if (isNonNullTypeNode(newType)) {
10550        const ofType = isNonNullTypeNode(oldType) ? oldType.type : oldType;
10551        return safeChangeForFieldType(ofType, newType.type);
10552    }
10553    // old is non-null
10554    if (isNonNullTypeNode(oldType)) {
10555        return safeChangeForFieldType(newType, oldType, ignoreNullability);
10556    }
10557    // old is list
10558    if (isListTypeNode(oldType)) {
10559        return ((isListTypeNode(newType) && safeChangeForFieldType(oldType.type, newType.type)) ||
10560            (isNonNullTypeNode(newType) && safeChangeForFieldType(oldType, newType['type'])));
10561    }
10562    return false;
10563}
10564
10565function mergeInputType(node, existingNode, config) {
10566    if (existingNode) {
10567        try {
10568            return {
10569                name: node.name,
10570                description: node['description'] || existingNode['description'],
10571                kind: (config && config.convertExtensions) ||
10572                    node.kind === 'InputObjectTypeDefinition' ||
10573                    existingNode.kind === 'InputObjectTypeDefinition'
10574                    ? 'InputObjectTypeDefinition'
10575                    : 'InputObjectTypeExtension',
10576                loc: node.loc,
10577                fields: mergeFields(node, node.fields, existingNode.fields, config),
10578                directives: mergeDirectives(node.directives, existingNode.directives, config),
10579            };
10580        }
10581        catch (e) {
10582            throw new Error(`Unable to merge GraphQL input type "${node.name.value}": ${e.message}`);
10583        }
10584    }
10585    return config && config.convertExtensions
10586        ? {
10587            ...node,
10588            kind: 'InputObjectTypeDefinition',
10589        }
10590        : node;
10591}
10592
10593function mergeInterface(node, existingNode, config) {
10594    if (existingNode) {
10595        try {
10596            return {
10597                name: node.name,
10598                description: node['description'] || existingNode['description'],
10599                kind: (config && config.convertExtensions) ||
10600                    node.kind === 'InterfaceTypeDefinition' ||
10601                    existingNode.kind === 'InterfaceTypeDefinition'
10602                    ? 'InterfaceTypeDefinition'
10603                    : 'InterfaceTypeExtension',
10604                loc: node.loc,
10605                fields: mergeFields(node, node.fields, existingNode.fields, config),
10606                directives: mergeDirectives(node.directives, existingNode.directives, config),
10607            };
10608        }
10609        catch (e) {
10610            throw new Error(`Unable to merge GraphQL interface "${node.name.value}": ${e.message}`);
10611        }
10612    }
10613    return config && config.convertExtensions
10614        ? {
10615            ...node,
10616            kind: 'InterfaceTypeDefinition',
10617        }
10618        : node;
10619}
10620
10621function alreadyExists(arr, other) {
10622    return !!arr.find(i => i.name.value === other.name.value);
10623}
10624function mergeNamedTypeArray(first = [], second = [], config = {}) {
10625    const result = [...second, ...first.filter(d => !alreadyExists(second, d))];
10626    if (config && config.sort) {
10627        result.sort(utils_index_esm["e" /* compareNodes */]);
10628    }
10629    return result;
10630}
10631
10632function mergeType(node, existingNode, config) {
10633    if (existingNode) {
10634        try {
10635            return {
10636                name: node.name,
10637                description: node['description'] || existingNode['description'],
10638                kind: (config && config.convertExtensions) ||
10639                    node.kind === 'ObjectTypeDefinition' ||
10640                    existingNode.kind === 'ObjectTypeDefinition'
10641                    ? 'ObjectTypeDefinition'
10642                    : 'ObjectTypeExtension',
10643                loc: node.loc,
10644                fields: mergeFields(node, node.fields, existingNode.fields, config),
10645                directives: mergeDirectives(node.directives, existingNode.directives, config),
10646                interfaces: mergeNamedTypeArray(node.interfaces, existingNode.interfaces, config),
10647            };
10648        }
10649        catch (e) {
10650            throw new Error(`Unable to merge GraphQL type "${node.name.value}": ${e.message}`);
10651        }
10652    }
10653    return config && config.convertExtensions
10654        ? {
10655            ...node,
10656            kind: 'ObjectTypeDefinition',
10657        }
10658        : node;
10659}
10660
10661function mergeScalar(node, existingNode, config) {
10662    if (existingNode) {
10663        return {
10664            name: node.name,
10665            description: node['description'] || existingNode['description'],
10666            kind: (config && config.convertExtensions) ||
10667                node.kind === 'ScalarTypeDefinition' ||
10668                existingNode.kind === 'ScalarTypeDefinition'
10669                ? 'ScalarTypeDefinition'
10670                : 'ScalarTypeExtension',
10671            loc: node.loc,
10672            directives: mergeDirectives(node.directives, existingNode.directives, config),
10673        };
10674    }
10675    return config && config.convertExtensions
10676        ? {
10677            ...node,
10678            kind: 'ScalarTypeDefinition',
10679        }
10680        : node;
10681}
10682
10683function mergeUnion(first, second, config) {
10684    if (second) {
10685        return {
10686            name: first.name,
10687            description: first['description'] || second['description'],
10688            directives: mergeDirectives(first.directives, second.directives, config),
10689            kind: (config && config.convertExtensions) ||
10690                first.kind === 'UnionTypeDefinition' ||
10691                second.kind === 'UnionTypeDefinition'
10692                ? 'UnionTypeDefinition'
10693                : 'UnionTypeExtension',
10694            loc: first.loc,
10695            types: mergeNamedTypeArray(first.types, second.types, config),
10696        };
10697    }
10698    return config && config.convertExtensions
10699        ? {
10700            ...first,
10701            kind: 'UnionTypeDefinition',
10702        }
10703        : first;
10704}
10705
10706const operationTypeDefinitionNodeTypeRootTypeMap = {
10707    query: 'Query',
10708    mutation: 'Mutation',
10709    subscription: 'Subscription',
10710};
10711function mergeOperationTypes(opNodeList = [], existingOpNodeList = []) {
10712    const finalOpNodeList = [];
10713    for (const opNodeType in operationTypeDefinitionNodeTypeRootTypeMap) {
10714        const opNode = opNodeList.find(n => n.operation === opNodeType) || existingOpNodeList.find(n => n.operation === opNodeType);
10715        if (opNode) {
10716            finalOpNodeList.push(opNode);
10717        }
10718    }
10719    return finalOpNodeList;
10720}
10721function mergeSchemaDefs(node, existingNode, config) {
10722    if (existingNode) {
10723        return {
10724            kind: node.kind === language_kinds["a" /* Kind */].SCHEMA_DEFINITION ||
10725                existingNode.kind === language_kinds["a" /* Kind */].SCHEMA_DEFINITION
10726                ? language_kinds["a" /* Kind */].SCHEMA_DEFINITION
10727                : language_kinds["a" /* Kind */].SCHEMA_EXTENSION,
10728            description: node['description'] || existingNode['description'],
10729            directives: mergeDirectives(node.directives, existingNode.directives, config),
10730            operationTypes: mergeOperationTypes(node.operationTypes, existingNode.operationTypes),
10731        };
10732    }
10733    return ((config === null || config === void 0 ? void 0 : config.convertExtensions)
10734        ? {
10735            ...node,
10736            kind: language_kinds["a" /* Kind */].SCHEMA_EXTENSION,
10737        }
10738        : node);
10739}
10740
10741function isNamedDefinitionNode(definitionNode) {
10742    return 'name' in definitionNode;
10743}
10744const schemaDefSymbol = Symbol('schemaDefSymbol');
10745function mergeGraphQLNodes(nodes, config) {
10746    var _a, _b;
10747    const mergedResultMap = {};
10748    for (const nodeDefinition of nodes) {
10749        if (isNamedDefinitionNode(nodeDefinition)) {
10750            const name = nodeDefinition.name.value;
10751            if (config === null || config === void 0 ? void 0 : config.commentDescriptions) {
10752                collectComment(nodeDefinition);
10753            }
10754            if (((_a = config === null || config === void 0 ? void 0 : config.exclusions) === null || _a === void 0 ? void 0 : _a.includes(name + '.*')) || ((_b = config === null || config === void 0 ? void 0 : config.exclusions) === null || _b === void 0 ? void 0 : _b.includes(name))) {
10755                delete mergedResultMap[name];
10756            }
10757            else {
10758                switch (nodeDefinition.kind) {
10759                    case language_kinds["a" /* Kind */].OBJECT_TYPE_DEFINITION:
10760                    case language_kinds["a" /* Kind */].OBJECT_TYPE_EXTENSION:
10761                        mergedResultMap[name] = mergeType(nodeDefinition, mergedResultMap[name], config);
10762                        break;
10763                    case language_kinds["a" /* Kind */].ENUM_TYPE_DEFINITION:
10764                    case language_kinds["a" /* Kind */].ENUM_TYPE_EXTENSION:
10765                        mergedResultMap[name] = mergeEnum(nodeDefinition, mergedResultMap[name], config);
10766                        break;
10767                    case language_kinds["a" /* Kind */].UNION_TYPE_DEFINITION:
10768                    case language_kinds["a" /* Kind */].UNION_TYPE_EXTENSION:
10769                        mergedResultMap[name] = mergeUnion(nodeDefinition, mergedResultMap[name], config);
10770                        break;
10771                    case language_kinds["a" /* Kind */].SCALAR_TYPE_DEFINITION:
10772                    case language_kinds["a" /* Kind */].SCALAR_TYPE_EXTENSION:
10773                        mergedResultMap[name] = mergeScalar(nodeDefinition, mergedResultMap[name], config);
10774                        break;
10775                    case language_kinds["a" /* Kind */].INPUT_OBJECT_TYPE_DEFINITION:
10776                    case language_kinds["a" /* Kind */].INPUT_OBJECT_TYPE_EXTENSION:
10777                        mergedResultMap[name] = mergeInputType(nodeDefinition, mergedResultMap[name], config);
10778                        break;
10779                    case language_kinds["a" /* Kind */].INTERFACE_TYPE_DEFINITION:
10780                    case language_kinds["a" /* Kind */].INTERFACE_TYPE_EXTENSION:
10781                        mergedResultMap[name] = mergeInterface(nodeDefinition, mergedResultMap[name], config);
10782                        break;
10783                    case language_kinds["a" /* Kind */].DIRECTIVE_DEFINITION:
10784                        mergedResultMap[name] = mergeDirective(nodeDefinition, mergedResultMap[name]);
10785                        break;
10786                }
10787            }
10788        }
10789        else if (nodeDefinition.kind === language_kinds["a" /* Kind */].SCHEMA_DEFINITION || nodeDefinition.kind === language_kinds["a" /* Kind */].SCHEMA_EXTENSION) {
10790            mergedResultMap[schemaDefSymbol] = mergeSchemaDefs(nodeDefinition, mergedResultMap[schemaDefSymbol], config);
10791        }
10792    }
10793    return mergedResultMap;
10794}
10795
10796function mergeTypeDefs(types, config) {
10797    resetComments();
10798    const doc = {
10799        kind: language_kinds["a" /* Kind */].DOCUMENT,
10800        definitions: mergeGraphQLTypes(types, {
10801            useSchemaDefinition: true,
10802            forceSchemaDefinition: false,
10803            throwOnConflict: false,
10804            commentDescriptions: false,
10805            ...config,
10806        }),
10807    };
10808    let result;
10809    if (config && config.commentDescriptions) {
10810        result = printWithComments(doc);
10811    }
10812    else {
10813        result = doc;
10814    }
10815    resetComments();
10816    return result;
10817}
10818function visitTypeSources(types, allNodes) {
10819    for (const type of types) {
10820        if (type) {
10821            if (Array.isArray(type)) {
10822                visitTypeSources(type, allNodes);
10823            }
10824            else if (Object(type_schema["c" /* isSchema */])(type)) {
10825                const documentNode = Object(utils_index_esm["i" /* getDocumentNodeFromSchema */])(type);
10826                visitTypeSources(documentNode.definitions, allNodes);
10827            }
10828            else if (isStringTypes(type) || isSourceTypes(type)) {
10829                const documentNode = Object(parser["parse"])(type);
10830                visitTypeSources(documentNode.definitions, allNodes);
10831            }
10832            else if (Object(predicates["a" /* isDefinitionNode */])(type)) {
10833                allNodes.push(type);
10834            }
10835            else {
10836                visitTypeSources(type.definitions, allNodes);
10837            }
10838        }
10839    }
10840}
10841function mergeGraphQLTypes(types, config) {
10842    var _a, _b;
10843    resetComments();
10844    const allNodes = [];
10845    visitTypeSources(types, allNodes);
10846    const mergedNodes = mergeGraphQLNodes(allNodes, config);
10847    // XXX: right now we don't handle multiple schema definitions
10848    let schemaDef = mergedNodes[schemaDefSymbol] || {
10849        kind: language_kinds["a" /* Kind */].SCHEMA_DEFINITION,
10850        operationTypes: [],
10851    };
10852    if (config === null || config === void 0 ? void 0 : config.useSchemaDefinition) {
10853        const operationTypes = schemaDef.operationTypes;
10854        for (const opTypeDefNodeType in operationTypeDefinitionNodeTypeRootTypeMap) {
10855            const opTypeDefNode = operationTypes.find(operationType => operationType.operation === opTypeDefNodeType);
10856            if (!opTypeDefNode) {
10857                const existingPossibleRootType = mergedNodes[operationTypeDefinitionNodeTypeRootTypeMap[opTypeDefNodeType]];
10858                if (existingPossibleRootType) {
10859                    operationTypes.push({
10860                        kind: language_kinds["a" /* Kind */].OPERATION_TYPE_DEFINITION,
10861                        type: {
10862                            kind: language_kinds["a" /* Kind */].NAMED_TYPE,
10863                            name: existingPossibleRootType.name,
10864                        },
10865                        operation: opTypeDefNodeType,
10866                    });
10867                }
10868            }
10869        }
10870    }
10871    if ((config === null || config === void 0 ? void 0 : config.forceSchemaDefinition) && !((_a = schemaDef === null || schemaDef === void 0 ? void 0 : schemaDef.operationTypes) === null || _a === void 0 ? void 0 : _a.length)) {
10872        schemaDef = {
10873            kind: language_kinds["a" /* Kind */].SCHEMA_DEFINITION,
10874            operationTypes: [
10875                {
10876                    kind: language_kinds["a" /* Kind */].OPERATION_TYPE_DEFINITION,
10877                    operation: 'query',
10878                    type: {
10879                        kind: language_kinds["a" /* Kind */].NAMED_TYPE,
10880                        name: {
10881                            kind: language_kinds["a" /* Kind */].NAME,
10882                            value: 'Query',
10883                        },
10884                    },
10885                },
10886            ],
10887        };
10888    }
10889    const mergedNodeDefinitions = Object.values(mergedNodes);
10890    if ((_b = schemaDef.operationTypes) === null || _b === void 0 ? void 0 : _b.length) {
10891        mergedNodeDefinitions.push(schemaDef);
10892    }
10893    if (config === null || config === void 0 ? void 0 : config.sort) {
10894        const sortFn = typeof config.sort === 'function' ? config.sort : defaultStringComparator;
10895        mergedNodeDefinitions.sort((a, b) => { var _a, _b; return sortFn((_a = a.name) === null || _a === void 0 ? void 0 : _a.value, (_b = b.name) === null || _b === void 0 ? void 0 : _b.value); });
10896    }
10897    return mergedNodeDefinitions;
10898}
10899
10900function travelSchemaPossibleExtensions(schema, hooks) {
10901    hooks.onSchema(schema);
10902    const typesMap = schema.getTypeMap();
10903    for (const [, type] of Object.entries(typesMap)) {
10904        const isPredefinedScalar = Object(definition["R" /* isScalarType */])(type) && Object(type_scalars["f" /* isSpecifiedScalarType */])(type);
10905        const isIntrospection = Object(type_introspection["n" /* isIntrospectionType */])(type);
10906        if (isPredefinedScalar || isIntrospection) {
10907            continue;
10908        }
10909        if (Object(definition["N" /* isObjectType */])(type)) {
10910            hooks.onObjectType(type);
10911            const fields = type.getFields();
10912            for (const [, field] of Object.entries(fields)) {
10913                hooks.onObjectField(type, field);
10914                const args = field.args || [];
10915                for (const arg of args) {
10916                    hooks.onObjectFieldArg(type, field, arg);
10917                }
10918            }
10919        }
10920        else if (Object(definition["H" /* isInterfaceType */])(type)) {
10921            hooks.onInterface(type);
10922            const fields = type.getFields();
10923            for (const [, field] of Object.entries(fields)) {
10924                hooks.onInterfaceField(type, field);
10925                const args = field.args || [];
10926                for (const arg of args) {
10927                    hooks.onInterfaceFieldArg(type, field, arg);
10928                }
10929            }
10930        }
10931        else if (Object(definition["F" /* isInputObjectType */])(type)) {
10932            hooks.onInputType(type);
10933            const fields = type.getFields();
10934            for (const [, field] of Object.entries(fields)) {
10935                hooks.onInputFieldType(type, field);
10936            }
10937        }
10938        else if (Object(definition["T" /* isUnionType */])(type)) {
10939            hooks.onUnion(type);
10940        }
10941        else if (Object(definition["R" /* isScalarType */])(type)) {
10942            hooks.onScalar(type);
10943        }
10944        else if (Object(definition["E" /* isEnumType */])(type)) {
10945            hooks.onEnum(type);
10946            for (const value of type.getValues()) {
10947                hooks.onEnumValue(type, value);
10948            }
10949        }
10950    }
10951}
10952function mergeExtensions(extensions) {
10953    return extensions.reduce((result, extensionObj) => [result, extensionObj].reduce(utils_index_esm["o" /* mergeDeep */], {}), {});
10954}
10955function applyExtensionObject(obj, extensions) {
10956    if (!obj) {
10957        return;
10958    }
10959    obj.extensions = [obj.extensions || {}, extensions || {}].reduce(utils_index_esm["o" /* mergeDeep */], {});
10960}
10961function applyExtensions(schema, extensions) {
10962    applyExtensionObject(schema, extensions.schemaExtensions);
10963    for (const [typeName, data] of Object.entries(extensions.types || {})) {
10964        const type = schema.getType(typeName);
10965        if (type) {
10966            applyExtensionObject(type, data.extensions);
10967            if (data.type === 'object' || data.type === 'interface') {
10968                for (const [fieldName, fieldData] of Object.entries(data.fields)) {
10969                    const field = type.getFields()[fieldName];
10970                    if (field) {
10971                        applyExtensionObject(field, fieldData.extensions);
10972                        for (const [arg, argData] of Object.entries(fieldData.arguments)) {
10973                            applyExtensionObject(field.args.find(a => a.name === arg), argData);
10974                        }
10975                    }
10976                }
10977            }
10978            else if (data.type === 'input') {
10979                for (const [fieldName, fieldData] of Object.entries(data.fields)) {
10980                    const field = type.getFields()[fieldName];
10981                    applyExtensionObject(field, fieldData.extensions);
10982                }
10983            }
10984            else if (data.type === 'enum') {
10985                for (const [valueName, valueData] of Object.entries(data.values)) {
10986                    const value = type.getValue(valueName);
10987                    applyExtensionObject(value, valueData);
10988                }
10989            }
10990        }
10991    }
10992    return schema;
10993}
10994function extractExtensionsFromSchema(schema) {
10995    const result = {
10996        schemaExtensions: {},
10997        types: {},
10998    };
10999    travelSchemaPossibleExtensions(schema, {
11000        onSchema: schema => (result.schemaExtensions = schema.extensions || {}),
11001        onObjectType: type => (result.types[type.name] = { fields: {}, type: 'object', extensions: type.extensions || {} }),
11002        onObjectField: (type, field) => (result.types[type.name].fields[field.name] = {
11003            arguments: {},
11004            extensions: field.extensions || {},
11005        }),
11006        onObjectFieldArg: (type, field, arg) => (result.types[type.name].fields[field.name].arguments[arg.name] = arg.extensions || {}),
11007        onInterface: type => (result.types[type.name] = { fields: {}, type: 'interface', extensions: type.extensions || {} }),
11008        onInterfaceField: (type, field) => (result.types[type.name].fields[field.name] = {
11009            arguments: {},
11010            extensions: field.extensions || {},
11011        }),
11012        onInterfaceFieldArg: (type, field, arg) => (result.types[type.name].fields[field.name].arguments[arg.name] =
11013            arg.extensions || {}),
11014        onEnum: type => (result.types[type.name] = { values: {}, type: 'enum', extensions: type.extensions || {} }),
11015        onEnumValue: (type, value) => (result.types[type.name].values[value.name] = value.extensions || {}),
11016        onScalar: type => (result.types[type.name] = { type: 'scalar', extensions: type.extensions || {} }),
11017        onUnion: type => (result.types[type.name] = { type: 'union', extensions: type.extensions || {} }),
11018        onInputType: type => (result.types[type.name] = { fields: {}, type: 'input', extensions: type.extensions || {} }),
11019        onInputFieldType: (type, field) => (result.types[type.name].fields[field.name] = { extensions: field.extensions || {} }),
11020    });
11021    return result;
11022}
11023
11024const defaultResolverValidationOptions = {
11025    requireResolversForArgs: 'ignore',
11026    requireResolversForNonScalar: 'ignore',
11027    requireResolversForAllFields: 'ignore',
11028    requireResolversForResolveType: 'ignore',
11029    requireResolversToMatchSchema: 'ignore',
11030};
11031/**
11032 * Synchronously merges multiple schemas, typeDefinitions and/or resolvers into a single schema.
11033 * @param config Configuration object
11034 */
11035function mergeSchemas(config) {
11036    const typeDefs = mergeTypes(config);
11037    const extractedResolvers = [];
11038    const extractedExtensions = [];
11039    for (const schema of config.schemas) {
11040        extractedResolvers.push(Object(utils_index_esm["j" /* getResolversFromSchema */])(schema));
11041        extractedExtensions.push(extractExtensionsFromSchema(schema));
11042    }
11043    extractedResolvers.push(...ensureResolvers(config));
11044    const resolvers = mergeResolvers(extractedResolvers, config);
11045    const extensions = mergeExtensions(extractedExtensions);
11046    return makeSchema({ resolvers, typeDefs, extensions }, config);
11047}
11048/**
11049 * Synchronously merges multiple schemas, typeDefinitions and/or resolvers into a single schema.
11050 * @param config Configuration object
11051 */
11052async function mergeSchemasAsync(config) {
11053    const [typeDefs, resolvers, extensions] = await Promise.all([
11054        mergeTypes(config),
11055        Promise.all(config.schemas.map(async (schema) => Object(utils_index_esm["j" /* getResolversFromSchema */])(schema))).then(extractedResolvers => mergeResolvers([...extractedResolvers, ...ensureResolvers(config)], config)),
11056        Promise.all(config.schemas.map(async (schema) => extractExtensionsFromSchema(schema))).then(extractedExtensions => mergeExtensions(extractedExtensions)),
11057    ]);
11058    return makeSchema({ resolvers, typeDefs, extensions }, config);
11059}
11060function mergeTypes({ schemas, typeDefs, ...config }) {
11061    return mergeTypeDefs([...schemas, ...(typeDefs ? Object(utils_index_esm["c" /* asArray */])(typeDefs) : [])], config);
11062}
11063function ensureResolvers(config) {
11064    return config.resolvers ? Object(utils_index_esm["c" /* asArray */])(config.resolvers) : [];
11065}
11066function makeSchema({ resolvers, typeDefs, extensions, }, config) {
11067    let schema = typeof typeDefs === 'string' ? Object(buildASTSchema["b" /* buildSchema */])(typeDefs, config) : Object(buildASTSchema["a" /* buildASTSchema */])(typeDefs, config);
11068    // add resolvers
11069    if (resolvers) {
11070        schema = addResolversToSchema({
11071            schema,
11072            resolvers,
11073            resolverValidationOptions: {
11074                ...defaultResolverValidationOptions,
11075                ...(config.resolverValidationOptions || {}),
11076            },
11077        });
11078    }
11079    // use logger
11080    if (config.logger) {
11081        schema = addErrorLoggingToSchema(schema, config.logger);
11082    }
11083    // use schema directives
11084    if (config.schemaDirectives) {
11085        utils_index_esm["b" /* SchemaDirectiveVisitor */].visitSchemaDirectives(schema, config.schemaDirectives);
11086    }
11087    // extensions
11088    applyExtensions(schema, extensions);
11089    return schema;
11090}
11091
11092
11093//# sourceMappingURL=index.esm.js.map
11094
11095// CONCATENATED MODULE: ./node_modules/@graphql-codegen/core/index.esm.js
11096
11097
11098
11099
11100
11101async function executePlugin(options, plugin) {
11102    if (!plugin || !plugin.plugin || typeof plugin.plugin !== 'function') {
11103        throw new index_esm["b" /* DetailedError */](`Invalid Custom Plugin "${options.name}"`, `
11104        Plugin ${options.name} does not export a valid JS object with "plugin" function.
11105  
11106        Make sure your custom plugin is written in the following form:
11107  
11108        module.exports = {
11109          plugin: (schema, documents, config) => {
11110            return 'my-custom-plugin-content';
11111          },
11112        };
11113        `);
11114    }
11115    const outputSchema = options.schemaAst || Object(buildASTSchema["a" /* buildASTSchema */])(options.schema, options.config);
11116    const documents = options.documents || [];
11117    const pluginContext = options.pluginContext || {};
11118    if (plugin.validate && typeof plugin.validate === 'function') {
11119        try {
11120            // FIXME: Sync validate signature with plugin signature
11121            await plugin.validate(outputSchema, documents, options.config, options.outputFilename, options.allPlugins, pluginContext);
11122        }
11123        catch (e) {
11124            throw new index_esm["b" /* DetailedError */](`Plugin "${options.name}" validation failed:`, `
11125            ${e.message}
11126          `);
11127        }
11128    }
11129    return Promise.resolve(plugin.plugin(outputSchema, documents, typeof options.config === 'object' ? { ...options.config } : options.config, {
11130        outputFile: options.outputFilename,
11131        allPlugins: options.allPlugins,
11132        pluginContext,
11133    }));
11134}
11135
11136async function codegen(options) {
11137    const documents = options.documents || [];
11138    if (documents.length > 0 && !options.skipDocumentsValidation) {
11139        validateDuplicateDocuments(documents);
11140    }
11141    const pluginPackages = Object.keys(options.pluginMap).map(key => options.pluginMap[key]);
11142    if (!options.schemaAst) {
11143        options.schemaAst = mergeSchemas({
11144            schemas: [],
11145            typeDefs: [options.schema],
11146            convertExtensions: true,
11147            assumeValid: true,
11148            assumeValidSDL: true,
11149            ...options.config,
11150        });
11151    }
11152    // merged schema with parts added by plugins
11153    let schemaChanged = false;
11154    let schemaAst = pluginPackages.reduce((schemaAst, plugin) => {
11155        const addToSchema = typeof plugin.addToSchema === 'function' ? plugin.addToSchema(options.config) : plugin.addToSchema;
11156        if (!addToSchema) {
11157            return schemaAst;
11158        }
11159        return mergeSchemas({
11160            schemas: [schemaAst],
11161            typeDefs: [addToSchema],
11162        });
11163    }, options.schemaAst);
11164    const federationInConfig = pickFlag('federation', options.config);
11165    const isFederation = prioritize(federationInConfig, false);
11166    if (isFederation &&
11167        !schemaAst.getDirective('external') &&
11168        !schemaAst.getDirective('requires') &&
11169        !schemaAst.getDirective('provides') &&
11170        !schemaAst.getDirective('key')) {
11171        schemaChanged = true;
11172        schemaAst = mergeSchemas({
11173            schemas: [schemaAst],
11174            typeDefs: [index_esm["d" /* federationSpec */]],
11175            convertExtensions: true,
11176            assumeValid: true,
11177            assumeValidSDL: true,
11178        });
11179    }
11180    if (schemaChanged) {
11181        options.schema = Object(parser["parse"])(Object(utils_index_esm["r" /* printSchemaWithDirectives */])(schemaAst));
11182    }
11183    const skipDocumentValidation = typeof options.config === 'object' && !Array.isArray(options.config) && options.config.skipDocumentsValidation;
11184    if (options.schemaAst && documents.length > 0 && !skipDocumentValidation) {
11185        const extraFragments = options.config && options.config.externalFragments ? options.config.externalFragments : [];
11186        const errors = await Object(utils_index_esm["u" /* validateGraphQlDocuments */])(options.schemaAst, [
11187            ...documents,
11188            ...extraFragments.map(f => ({
11189                location: f.importFrom,
11190                document: { kind: language_kinds["a" /* Kind */].DOCUMENT, definitions: [f.node] },
11191            })),
11192        ]);
11193        Object(utils_index_esm["d" /* checkValidationErrors */])(errors);
11194    }
11195    const prepend = new Set();
11196    const append = new Set();
11197    const output = await Promise.all(options.plugins.map(async (plugin) => {
11198        const name = Object.keys(plugin)[0];
11199        const pluginPackage = options.pluginMap[name];
11200        const pluginConfig = plugin[name] || {};
11201        const execConfig = typeof pluginConfig !== 'object'
11202            ? pluginConfig
11203            : {
11204                ...options.config,
11205                ...pluginConfig,
11206            };
11207        const result = await executePlugin({
11208            name,
11209            config: execConfig,
11210            parentConfig: options.config,
11211            schema: options.schema,
11212            schemaAst,
11213            documents: options.documents,
11214            outputFilename: options.filename,
11215            allPlugins: options.plugins,
11216            skipDocumentsValidation: options.skipDocumentsValidation,
11217            pluginContext: options.pluginContext,
11218        }, pluginPackage);
11219        if (typeof result === 'string') {
11220            return result || '';
11221        }
11222        else if (Object(index_esm["f" /* isComplexPluginOutput */])(result)) {
11223            if (result.append && result.append.length > 0) {
11224                for (const item of result.append) {
11225                    if (item) {
11226                        append.add(item);
11227                    }
11228                }
11229            }
11230            if (result.prepend && result.prepend.length > 0) {
11231                for (const item of result.prepend) {
11232                    if (item) {
11233                        prepend.add(item);
11234                    }
11235                }
11236            }
11237            return result.content || '';
11238        }
11239        return '';
11240    }));
11241    return [...sortPrependValues(Array.from(prepend.values())), ...output, ...Array.from(append.values())]
11242        .filter(Boolean)
11243        .join('\n');
11244}
11245function resolveCompareValue(a) {
11246    if (a.startsWith('/*') || a.startsWith('//') || a.startsWith(' *') || a.startsWith(' */') || a.startsWith('*/')) {
11247        return 0;
11248    }
11249    else if (a.startsWith('package')) {
11250        return 1;
11251    }
11252    else if (a.startsWith('import')) {
11253        return 2;
11254    }
11255    else {
11256        return 3;
11257    }
11258}
11259function sortPrependValues(values) {
11260    return values.sort((a, b) => {
11261        const aV = resolveCompareValue(a);
11262        const bV = resolveCompareValue(b);
11263        if (aV < bV) {
11264            return -1;
11265        }
11266        if (aV > bV) {
11267            return 1;
11268        }
11269        return 0;
11270    });
11271}
11272function validateDuplicateDocuments(files) {
11273    // duplicated names
11274    const definitionMap = {};
11275    function addDefinition(file, node, deduplicatedDefinitions) {
11276        if (typeof node.name !== 'undefined') {
11277            if (!definitionMap[node.kind]) {
11278                definitionMap[node.kind] = {};
11279            }
11280            if (!definitionMap[node.kind][node.name.value]) {
11281                definitionMap[node.kind][node.name.value] = {
11282                    paths: new Set(),
11283                    contents: new Set(),
11284                };
11285            }
11286            const definitionKindMap = definitionMap[node.kind];
11287            const length = definitionKindMap[node.name.value].contents.size;
11288            definitionKindMap[node.name.value].paths.add(file.location);
11289            definitionKindMap[node.name.value].contents.add(Object(printer["a" /* print */])(node));
11290            if (length === definitionKindMap[node.name.value].contents.size) {
11291                return null;
11292            }
11293        }
11294        return deduplicatedDefinitions.add(node);
11295    }
11296    files.forEach(file => {
11297        const deduplicatedDefinitions = new Set();
11298        Object(language_visitor["c" /* visit */])(file.document, {
11299            OperationDefinition(node) {
11300                addDefinition(file, node, deduplicatedDefinitions);
11301            },
11302            FragmentDefinition(node) {
11303                addDefinition(file, node, deduplicatedDefinitions);
11304            },
11305        });
11306        file.document.definitions = Array.from(deduplicatedDefinitions);
11307    });
11308    const kinds = Object.keys(definitionMap);
11309    kinds.forEach(kind => {
11310        const definitionKindMap = definitionMap[kind];
11311        const names = Object.keys(definitionKindMap);
11312        if (names.length) {
11313            const duplicated = names.filter(name => definitionKindMap[name].contents.size > 1);
11314            if (!duplicated.length) {
11315                return;
11316            }
11317            const list = duplicated
11318                .map(name => `
11319        * ${name} found in:
11320          ${[...definitionKindMap[name].paths]
11321                .map(filepath => {
11322                return `
11323              - ${filepath}
11324            `.trimRight();
11325            })
11326                .join('')}
11327    `.trimRight())
11328                .join('');
11329            const definitionKindName = kind.replace('Definition', '').toLowerCase();
11330            throw new index_esm["b" /* DetailedError */](`Not all ${definitionKindName}s have an unique name: ${duplicated.join(', ')}`, `
11331          Not all ${definitionKindName}s have an unique name
11332          ${list}
11333        `);
11334        }
11335    });
11336}
11337function isObjectMap(obj) {
11338    return obj && typeof obj === 'object' && !Array.isArray(obj);
11339}
11340function prioritize(...values) {
11341    const picked = values.find(val => typeof val === 'boolean');
11342    if (typeof picked !== 'boolean') {
11343        return values[values.length - 1];
11344    }
11345    return picked;
11346}
11347function pickFlag(flag, config) {
11348    return isObjectMap(config) ? config[flag] : undefined;
11349}
11350
11351
11352//# sourceMappingURL=index.esm.js.map
11353
11354// EXTERNAL MODULE: ./node_modules/graphql/utilities/printSchema.mjs
11355var printSchema = __webpack_require__("3vMM");
11356
11357// EXTERNAL MODULE: ./node_modules/graphql/utilities/TypeInfo.mjs
11358var TypeInfo = __webpack_require__("4RMZ");
11359
11360// EXTERNAL MODULE: ./node_modules/graphql/utilities/typeComparators.mjs
11361var typeComparators = __webpack_require__("sJV+");
11362
11363// EXTERNAL MODULE: ./node_modules/change-case-all/dist/index.js
11364var dist = __webpack_require__("3XYS");
11365
11366// EXTERNAL MODULE: ./node_modules/node-libs-browser/node_modules/path-browserify/index.js
11367var path_browserify = __webpack_require__("tpqs");
11368
11369// EXTERNAL MODULE: ./node_modules/parse-filepath/index.js
11370var parse_filepath = __webpack_require__("JqXL");
11371var parse_filepath_default = /*#__PURE__*/__webpack_require__.n(parse_filepath);
11372
11373// EXTERNAL MODULE: ./node_modules/auto-bind/index.js
11374var auto_bind = __webpack_require__("zeTQ");
11375var auto_bind_default = /*#__PURE__*/__webpack_require__.n(auto_bind);
11376
11377// EXTERNAL MODULE: ./node_modules/array.prototype.flatmap/index.js
11378var array_prototype_flatmap = __webpack_require__("3aNz");
11379var array_prototype_flatmap_default = /*#__PURE__*/__webpack_require__.n(array_prototype_flatmap);
11380
11381// EXTERNAL MODULE: ./node_modules/dependency-graph/lib/dep_graph.js
11382var dep_graph = __webpack_require__("XCPT");
11383
11384// EXTERNAL MODULE: ./node_modules/graphql-tag/src/index.js
11385var src = __webpack_require__("lTCR");
11386var src_default = /*#__PURE__*/__webpack_require__.n(src);
11387
11388// CONCATENATED MODULE: ./node_modules/@graphql-tools/optimize/index.esm.js
11389
11390
11391/**
11392 * This optimizer removes "desciption" field from schema AST definitions.
11393 * @param input
11394 */
11395const removeDescriptions = input => {
11396    function transformNode(node) {
11397        if (node.description) {
11398            node.description = undefined;
11399        }
11400        return node;
11401    }
11402    return Object(language_visitor["c" /* visit */])(input, {
11403        ScalarTypeDefinition: transformNode,
11404        ObjectTypeDefinition: transformNode,
11405        InterfaceTypeDefinition: transformNode,
11406        UnionTypeDefinition: transformNode,
11407        EnumTypeDefinition: transformNode,
11408        EnumValueDefinition: transformNode,
11409        InputObjectTypeDefinition: transformNode,
11410        InputValueDefinition: transformNode,
11411        FieldDefinition: transformNode,
11412    });
11413};
11414
11415/**
11416 * This optimizer removes empty nodes/arrays (directives/argument/variableDefinitions) from a given DocumentNode of operation/fragment.
11417 * @param input
11418 */
11419const removeEmptyNodes = input => {
11420    function transformNode(node) {
11421        let resultNode = node;
11422        if (resultNode.directives && Array.isArray(resultNode.directives) && resultNode.directives.length === 0) {
11423            const { directives, ...rest } = resultNode;
11424            resultNode = rest;
11425        }
11426        if (resultNode.arguments && Array.isArray(resultNode.arguments) && resultNode.arguments.length === 0) {
11427            const { arguments: args, ...rest } = resultNode;
11428            resultNode = rest;
11429        }
11430        if (resultNode.variableDefinitions &&
11431            Array.isArray(resultNode.variableDefinitions) &&
11432            resultNode.variableDefinitions.length === 0) {
11433            const { variableDefinitions, ...rest } = resultNode;
11434            resultNode = rest;
11435        }
11436        return resultNode;
11437    }
11438    return Object(language_visitor["c" /* visit */])(input, {
11439        FragmentDefinition: transformNode,
11440        OperationDefinition: transformNode,
11441        VariableDefinition: transformNode,
11442        Field: transformNode,
11443        FragmentSpread: transformNode,
11444        InlineFragment: transformNode,
11445        Name: transformNode,
11446        Directive: transformNode,
11447    });
11448};
11449
11450/**
11451 * This optimizer removes "loc" fields
11452 * @param input
11453 */
11454const removeLoc = input => {
11455    function transformNode(node) {
11456        if (node.loc && typeof node.loc === 'object') {
11457            const { loc, ...rest } = node;
11458            return rest;
11459        }
11460        return node;
11461    }
11462    return Object(language_visitor["c" /* visit */])(input, { enter: transformNode });
11463};
11464
11465const DEFAULT_OPTIMIZERS = [removeDescriptions, removeEmptyNodes, removeLoc];
11466/**
11467 * This method accept a DocumentNode and applies the optimizations you wish to use.
11468 * You can override the defualt ones or provide you own optimizers if you wish.
11469 *
11470 * @param node document to optimize
11471 * @param optimizers optional, list of optimizer to use
11472 */
11473function optimizeDocumentNode(node, optimizers = DEFAULT_OPTIMIZERS) {
11474    let resultNode = node;
11475    for (const optimizer of optimizers) {
11476        if (typeof optimizer !== 'function') {
11477            throw new Error(`Optimizer provided for "optimizeDocumentNode" must be a function!`);
11478        }
11479        const result = optimizer(resultNode);
11480        if (!result) {
11481            throw new Error(`Optimizer provided for "optimizeDocumentNode" returned empty value instead of modified "DocumentNode"!`);
11482        }
11483        resultNode = result;
11484    }
11485    return resultNode;
11486}
11487
11488
11489//# sourceMappingURL=index.esm.js.map
11490
11491// EXTERNAL MODULE: ./node_modules/graphql/utilities/concatAST.mjs
11492var concatAST = __webpack_require__("h5lq");
11493
11494// EXTERNAL MODULE: ./node_modules/relay-compiler/lib/transforms/SkipRedundantNodesTransform.js
11495var SkipRedundantNodesTransform = __webpack_require__("ZF9o");
11496
11497// EXTERNAL MODULE: ./node_modules/relay-compiler/lib/transforms/InlineFragmentsTransform.js
11498var InlineFragmentsTransform = __webpack_require__("HCwE");
11499
11500// EXTERNAL MODULE: ./node_modules/relay-compiler/lib/transforms/ApplyFragmentArgumentTransform.js
11501var ApplyFragmentArgumentTransform = __webpack_require__("UtIy");
11502
11503// EXTERNAL MODULE: ./node_modules/relay-compiler/lib/transforms/FlattenTransform.js
11504var FlattenTransform = __webpack_require__("9PYa");
11505
11506// EXTERNAL MODULE: ./node_modules/relay-compiler/lib/core/CompilerContext.js
11507var CompilerContext = __webpack_require__("5iWz");
11508var CompilerContext_default = /*#__PURE__*/__webpack_require__.n(CompilerContext);
11509
11510// EXTERNAL MODULE: ./node_modules/relay-compiler/lib/core/RelayParser.js
11511var RelayParser = __webpack_require__("r+Cj");
11512
11513// EXTERNAL MODULE: ./node_modules/relay-compiler/lib/core/IRPrinter.js
11514var IRPrinter = __webpack_require__("/HjL");
11515
11516// EXTERNAL MODULE: ./node_modules/relay-compiler/lib/core/Schema.js
11517var Schema = __webpack_require__("IFkQ");
11518
11519// CONCATENATED MODULE: ./node_modules/@graphql-tools/relay-operation-optimizer/index.esm.js
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531function optimizeDocuments(schema, documents, options = {}) {
11532    options = {
11533        noLocation: true,
11534        ...options,
11535    };
11536    // @TODO way for users to define directives they use, otherwise relay will throw an unknown directive error
11537    // Maybe we can scan the queries and add them dynamically without users having to do some extra stuff
11538    // transformASTSchema creates a new schema instance instead of mutating the old one
11539    const adjustedSchema = Object(Schema["create"])(Object(utils_index_esm["r" /* printSchemaWithDirectives */])(schema, options));
11540    const documentAsts = Object(concatAST["a" /* concatAST */])(documents);
11541    const relayDocuments = Object(RelayParser["transform"])(adjustedSchema, documentAsts.definitions);
11542    const result = [];
11543    if (options.includeFragments) {
11544        const fragmentCompilerContext = new CompilerContext_default.a(adjustedSchema)
11545            .addAll(relayDocuments)
11546            .applyTransforms([
11547            ApplyFragmentArgumentTransform["transform"],
11548            Object(FlattenTransform["transformWithOptions"])({ flattenAbstractTypes: false }),
11549            SkipRedundantNodesTransform["transform"],
11550        ]);
11551        result.push(...fragmentCompilerContext
11552            .documents()
11553            .filter(doc => doc.kind === 'Fragment')
11554            .map(doc => Object(parser["parse"])(Object(IRPrinter["print"])(adjustedSchema, doc), options)));
11555    }
11556    const queryCompilerContext = new CompilerContext_default.a(adjustedSchema)
11557        .addAll(relayDocuments)
11558        .applyTransforms([
11559        ApplyFragmentArgumentTransform["transform"],
11560        InlineFragmentsTransform["transform"],
11561        Object(FlattenTransform["transformWithOptions"])({ flattenAbstractTypes: false }),
11562        SkipRedundantNodesTransform["transform"],
11563    ]);
11564    result.push(...queryCompilerContext.documents().map(doc => Object(parser["parse"])(Object(IRPrinter["print"])(adjustedSchema, doc), options)));
11565    return result;
11566}
11567
11568
11569//# sourceMappingURL=index.esm.js.map
11570
11571// CONCATENATED MODULE: ./node_modules/@graphql-codegen/visitor-plugin-common/index.esm.js
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584const DEFAULT_SCALARS = {
11585    ID: 'string',
11586    String: 'string',
11587    Boolean: 'boolean',
11588    Int: 'number',
11589    Float: 'number',
11590};
11591
11592function isExternalMapperType(m) {
11593    return !!m.import;
11594}
11595var MapperKind;
11596(function (MapperKind) {
11597    MapperKind[MapperKind["Namespace"] = 0] = "Namespace";
11598    MapperKind[MapperKind["Default"] = 1] = "Default";
11599    MapperKind[MapperKind["Regular"] = 2] = "Regular";
11600})(MapperKind || (MapperKind = {}));
11601function prepareLegacy(mapper) {
11602    const items = mapper.split('#');
11603    const isNamespace = items.length === 3;
11604    const isDefault = items[1].trim() === 'default' || items[1].startsWith('default ');
11605    const hasAlias = items[1].includes(' as ');
11606    return {
11607        items,
11608        isDefault,
11609        isNamespace,
11610        hasAlias,
11611    };
11612}
11613function prepare(mapper) {
11614    const [source, path] = mapper.split('#');
11615    const isNamespace = path.includes('.');
11616    const isDefault = path.trim() === 'default' || path.startsWith('default ');
11617    const hasAlias = path.includes(' as ');
11618    return {
11619        items: isNamespace ? [source, ...path.split('.')] : [source, path],
11620        isDefault,
11621        isNamespace,
11622        hasAlias,
11623    };
11624}
11625function isLegacyMode(mapper) {
11626    return mapper.split('#').length === 3;
11627}
11628function parseMapper(mapper, gqlTypeName = null, suffix) {
11629    if (isExternalMapper(mapper)) {
11630        const { isNamespace, isDefault, hasAlias, items } = isLegacyMode(mapper) ? prepareLegacy(mapper) : prepare(mapper);
11631        const mapperKind = isNamespace
11632            ? MapperKind.Namespace
11633            : isDefault
11634                ? MapperKind.Default
11635                : MapperKind.Regular;
11636        function handleAlias(isDefault = false) {
11637            const [importedType, aliasType] = items[1].split(/\s+as\s+/);
11638            const type = maybeSuffix(aliasType);
11639            return {
11640                importElement: isDefault ? type : `${importedType} as ${type}`,
11641                type: type,
11642            };
11643        }
11644        function maybeSuffix(type) {
11645            if (suffix) {
11646                return addSuffix(type, suffix);
11647            }
11648            return type;
11649        }
11650        function handle() {
11651            switch (mapperKind) {
11652                // ./my/module#Namespace#Identifier
11653                case MapperKind.Namespace: {
11654                    const [, ns, identifier] = items;
11655                    return {
11656                        type: `${ns}.${identifier}`,
11657                        importElement: ns,
11658                    };
11659                }
11660                case MapperKind.Default: {
11661                    // ./my/module#default as alias
11662                    if (hasAlias) {
11663                        return handleAlias(true);
11664                    }
11665                    const type = maybeSuffix(`${gqlTypeName}`);
11666                    // ./my/module#default
11667                    return {
11668                        importElement: type,
11669                        type,
11670                    };
11671                }
11672                case MapperKind.Regular: {
11673                    // ./my/module#Identifier as alias
11674                    if (hasAlias) {
11675                        return handleAlias();
11676                    }
11677                    const identifier = items[1];
11678                    const type = maybeSuffix(identifier);
11679                    // ./my/module#Identifier
11680                    return {
11681                        type,
11682                        importElement: suffix ? `${identifier} as ${type}` : type,
11683                    };
11684                }
11685            }
11686        }
11687        const { type, importElement } = handle();
11688        return {
11689            default: isDefault,
11690            isExternal: true,
11691            source: items[0],
11692            type,
11693            import: importElement.replace(/<(.*?)>/g, ''),
11694        };
11695    }
11696    return {
11697        isExternal: false,
11698        type: mapper,
11699    };
11700}
11701function addSuffix(element, suffix) {
11702    const generic = element.indexOf('<');
11703    if (generic === -1) {
11704        return `${element}${suffix}`;
11705    }
11706    return `${element.slice(0, generic)}${suffix}${element.slice(generic)}`;
11707}
11708function isExternalMapper(value) {
11709    return value.includes('#');
11710}
11711function transformMappers(rawMappers, mapperTypeSuffix) {
11712    const result = {};
11713    Object.keys(rawMappers).forEach(gqlTypeName => {
11714        const mapperDef = rawMappers[gqlTypeName];
11715        const parsedMapper = parseMapper(mapperDef, gqlTypeName, mapperTypeSuffix);
11716        result[gqlTypeName] = parsedMapper;
11717    });
11718    return result;
11719}
11720function buildMapperImport(source, types, useTypeImports) {
11721    if (!types || types.length === 0) {
11722        return null;
11723    }
11724    const defaultType = types.find(t => t.asDefault === true);
11725    let namedTypes = types.filter(t => !t.asDefault);
11726    if (useTypeImports) {
11727        if (defaultType) {
11728            // default as Baz
11729            namedTypes = [{ identifier: `default as ${defaultType.identifier}` }, ...namedTypes];
11730        }
11731        // { Foo, Bar as BarModel }
11732        const namedImports = namedTypes.length ? `{ ${namedTypes.map(t => t.identifier).join(', ')} }` : '';
11733        // { default as Baz, Foo, Bar as BarModel }
11734        return `import type ${[namedImports].filter(Boolean).join(', ')} from '${source}';`;
11735    }
11736    // { Foo, Bar as BarModel }
11737    const namedImports = namedTypes.length ? `{ ${namedTypes.map(t => t.identifier).join(', ')} }` : '';
11738    // Baz
11739    const defaultImport = defaultType ? defaultType.identifier : '';
11740    // Baz, { Foo, Bar as BarModel }
11741    return `import ${[defaultImport, namedImports].filter(Boolean).join(', ')} from '${source}';`;
11742}
11743
11744const getConfigValue = (value, defaultValue) => {
11745    if (value === null || value === undefined) {
11746        return defaultValue;
11747    }
11748    return value;
11749};
11750function quoteIfNeeded(array, joinWith = ' & ') {
11751    if (array.length === 0) {
11752        return '';
11753    }
11754    else if (array.length === 1) {
11755        return array[0];
11756    }
11757    else {
11758        return `(${array.join(joinWith)})`;
11759    }
11760}
11761function visitor_plugin_common_index_esm_block(array) {
11762    return array && array.length !== 0 ? '{\n' + array.join('\n') + '\n}' : '';
11763}
11764function wrapWithSingleQuotes(value, skipNumericCheck = false) {
11765    if (skipNumericCheck) {
11766        if (typeof value === 'number') {
11767            return `${value}`;
11768        }
11769        else {
11770            return `'${value}'`;
11771        }
11772    }
11773    if (typeof value === 'number' ||
11774        (typeof value === 'string' && !isNaN(parseInt(value)) && parseFloat(value).toString() === value)) {
11775        return `${value}`;
11776    }
11777    return `'${value}'`;
11778}
11779function breakLine(str) {
11780    return str + '\n';
11781}
11782function visitor_plugin_common_index_esm_indent(str, count = 1) {
11783    return new Array(count).fill('  ').join('') + str;
11784}
11785function indentMultiline(str, count = 1) {
11786    const indentation = new Array(count).fill('  ').join('');
11787    const replaceWith = '\n' + indentation;
11788    return indentation + str.replace(/\n/g, replaceWith);
11789}
11790function transformComment(comment, indentLevel = 0, disabled = false) {
11791    if (!comment || comment === '' || disabled) {
11792        return '';
11793    }
11794    if (isStringValueNode(comment)) {
11795        comment = comment.value;
11796    }
11797    comment = comment.split('*/').join('*\\/');
11798    let lines = comment.split('\n');
11799    if (lines.length === 1) {
11800        return visitor_plugin_common_index_esm_indent(`/** ${lines[0]} */\n`, indentLevel);
11801    }
11802    lines = ['/**', ...lines.map(line => ` * ${line}`), ' */\n'];
11803    return stripTrailingSpaces(lines.map(line => visitor_plugin_common_index_esm_indent(line, indentLevel)).join('\n'));
11804}
11805class DeclarationBlock {
11806    constructor(_config) {
11807        this._config = _config;
11808        this._decorator = null;
11809        this._export = false;
11810        this._name = null;
11811        this._kind = null;
11812        this._methodName = null;
11813        this._content = null;
11814        this._block = null;
11815        this._nameGenerics = null;
11816        this._comment = null;
11817        this._ignoreBlockWrapper = false;
11818        this._config = {
11819            blockWrapper: '',
11820            blockTransformer: block => block,
11821            enumNameValueSeparator: ':',
11822            ...this._config,
11823        };
11824    }
11825    withDecorator(decorator) {
11826        this._decorator = decorator;
11827        return this;
11828    }
11829    export(exp = true) {
11830        if (!this._config.ignoreExport) {
11831            this._export = exp;
11832        }
11833        return this;
11834    }
11835    asKind(kind) {
11836        this._kind = kind;
11837        return this;
11838    }
11839    withComment(comment, disabled = false) {
11840        const nonEmptyComment = isStringValueNode(comment) ? !!comment.value : !!comment;
11841        if (nonEmptyComment && !disabled) {
11842            this._comment = transformComment(comment, 0);
11843        }
11844        return this;
11845    }
11846    withMethodCall(methodName, ignoreBlockWrapper = false) {
11847        this._methodName = methodName;
11848        this._ignoreBlockWrapper = ignoreBlockWrapper;
11849        return this;
11850    }
11851    withBlock(block) {
11852        this._block = block;
11853        return this;
11854    }
11855    withContent(content) {
11856        this._content = content;
11857        return this;
11858    }
11859    withName(name, generics = null) {
11860        this._name = name;
11861        this._nameGenerics = generics;
11862        return this;
11863    }
11864    get string() {
11865        let result = '';
11866        if (this._decorator) {
11867            result += this._decorator + '\n';
11868        }
11869        if (this._export) {
11870            result += 'export ';
11871        }
11872        if (this._kind) {
11873            let extra = '';
11874            let name = '';
11875            if (['type', 'const', 'var', 'let'].includes(this._kind)) {
11876                extra = '= ';
11877            }
11878            if (this._name) {
11879                name = this._name + (this._nameGenerics || '') + ' ';
11880            }
11881            result += this._kind + ' ' + name + extra;
11882        }
11883        if (this._block) {
11884            if (this._content) {
11885                result += this._content;
11886            }
11887            const blockWrapper = this._ignoreBlockWrapper ? '' : this._config.blockWrapper;
11888            const before = '{' + blockWrapper;
11889            const after = blockWrapper + '}';
11890            const block = [before, this._block, after].filter(val => !!val).join('\n');
11891            if (this._methodName) {
11892                result += `${this._methodName}(${this._config.blockTransformer(block)})`;
11893            }
11894            else {
11895                result += this._config.blockTransformer(block);
11896            }
11897        }
11898        else if (this._content) {
11899            result += this._content;
11900        }
11901        else if (this._kind) {
11902            result += this._config.blockTransformer('{}');
11903        }
11904        return stripTrailingSpaces((this._comment ? this._comment : '') +
11905            result +
11906            (this._kind === 'interface' || this._kind === 'enum' || this._kind === 'namespace' || this._kind === 'function'
11907                ? ''
11908                : ';') +
11909            '\n');
11910    }
11911}
11912function getBaseTypeNode(typeNode) {
11913    if (typeNode.kind === language_kinds["a" /* Kind */].LIST_TYPE || typeNode.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE) {
11914        return getBaseTypeNode(typeNode.type);
11915    }
11916    return typeNode;
11917}
11918function convertNameParts(str, func, removeUnderscore = false) {
11919    if (removeUnderscore) {
11920        return func(str);
11921    }
11922    return str
11923        .split('_')
11924        .map(s => func(s))
11925        .join('_');
11926}
11927function buildScalarsFromConfig(schema, config, defaultScalarsMapping = DEFAULT_SCALARS, defaultScalarType = 'any') {
11928    return buildScalars(schema, config.scalars, defaultScalarsMapping, config.strictScalars ? null : config.defaultScalarType || defaultScalarType);
11929}
11930function buildScalars(schema, scalarsMapping, defaultScalarsMapping = DEFAULT_SCALARS, defaultScalarType = 'any') {
11931    const result = {};
11932    Object.keys(defaultScalarsMapping).forEach(name => {
11933        result[name] = parseMapper(defaultScalarsMapping[name]);
11934    });
11935    if (schema) {
11936        const typeMap = schema.getTypeMap();
11937        Object.keys(typeMap)
11938            .map(typeName => typeMap[typeName])
11939            .filter(type => Object(definition["R" /* isScalarType */])(type))
11940            .map((scalarType) => {
11941            const name = scalarType.name;
11942            if (typeof scalarsMapping === 'string') {
11943                const value = parseMapper(scalarsMapping + '#' + name, name);
11944                result[name] = value;
11945            }
11946            else if (scalarsMapping && typeof scalarsMapping[name] === 'string') {
11947                const value = parseMapper(scalarsMapping[name], name);
11948                result[name] = value;
11949            }
11950            else if (scalarsMapping && scalarsMapping[name]) {
11951                result[name] = {
11952                    isExternal: false,
11953                    type: JSON.stringify(scalarsMapping[name]),
11954                };
11955            }
11956            else if (!defaultScalarsMapping[name]) {
11957                if (defaultScalarType === null) {
11958                    throw new Error(`Unknown scalar type ${name}. Please override it using the "scalars" configuration field!`);
11959                }
11960                result[name] = {
11961                    isExternal: false,
11962                    type: defaultScalarType,
11963                };
11964            }
11965        });
11966    }
11967    else if (scalarsMapping) {
11968        if (typeof scalarsMapping === 'string') {
11969            throw new Error('Cannot use string scalars mapping when building without a schema');
11970        }
11971        Object.keys(scalarsMapping).forEach(name => {
11972            if (typeof scalarsMapping[name] === 'string') {
11973                const value = parseMapper(scalarsMapping[name], name);
11974                result[name] = value;
11975            }
11976            else {
11977                result[name] = {
11978                    isExternal: false,
11979                    type: JSON.stringify(scalarsMapping[name]),
11980                };
11981            }
11982        });
11983    }
11984    return result;
11985}
11986function isStringValueNode(node) {
11987    return node && typeof node === 'object' && node.kind === language_kinds["a" /* Kind */].STRING;
11988}
11989function index_esm_isRootType(type, schema) {
11990    return (Object(typeComparators["b" /* isEqualType */])(type, schema.getQueryType()) ||
11991        Object(typeComparators["b" /* isEqualType */])(type, schema.getMutationType()) ||
11992        Object(typeComparators["b" /* isEqualType */])(type, schema.getSubscriptionType()));
11993}
11994function getRootTypeNames(schema) {
11995    return [schema.getQueryType(), schema.getMutationType(), schema.getSubscriptionType()]
11996        .filter(t => t)
11997        .map(t => t.name);
11998}
11999function stripMapperTypeInterpolation(identifier) {
12000    return identifier.trim().replace(/<{.*}>/, '');
12001}
12002const OMIT_TYPE = 'export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;';
12003const REQUIRE_FIELDS_TYPE = `export type RequireFields<T, K extends keyof T> = { [X in Exclude<keyof T, K>]?: T[X] } & { [P in K]-?: NonNullable<T[P]> };`;
12004function mergeSelectionSets(selectionSet1, selectionSet2) {
12005    const newSelections = [...selectionSet1.selections];
12006    for (const selection2 of selectionSet2.selections) {
12007        if (selection2.kind === 'FragmentSpread') {
12008            newSelections.push(selection2);
12009            continue;
12010        }
12011        if (selection2.kind !== 'Field') {
12012            throw new TypeError('Invalid state.');
12013        }
12014        const match = newSelections.find(selection1 => selection1.kind === 'Field' && getFieldNodeNameValue(selection1) === getFieldNodeNameValue(selection2));
12015        if (match) {
12016            // recursively merge all selection sets
12017            if (match.kind === 'Field' && match.selectionSet && selection2.selectionSet) {
12018                mergeSelectionSets(match.selectionSet, selection2.selectionSet);
12019            }
12020            continue;
12021        }
12022        newSelections.push(selection2);
12023    }
12024    // replace existing selections
12025    selectionSet1.selections = newSelections;
12026}
12027const getFieldNodeNameValue = (node) => {
12028    return (node.alias || node.name).value;
12029};
12030function separateSelectionSet(selections) {
12031    return {
12032        fields: selections.filter(s => s.kind === language_kinds["a" /* Kind */].FIELD),
12033        inlines: selections.filter(s => s.kind === language_kinds["a" /* Kind */].INLINE_FRAGMENT),
12034        spreads: selections.filter(s => s.kind === language_kinds["a" /* Kind */].FRAGMENT_SPREAD),
12035    };
12036}
12037function getPossibleTypes(schema, type) {
12038    if (Object(definition["J" /* isListType */])(type) || Object(definition["L" /* isNonNullType */])(type)) {
12039        return getPossibleTypes(schema, type.ofType);
12040    }
12041    else if (Object(definition["N" /* isObjectType */])(type)) {
12042        return [type];
12043    }
12044    else if (Object(definition["C" /* isAbstractType */])(type)) {
12045        return schema.getPossibleTypes(type);
12046    }
12047    return [];
12048}
12049function hasConditionalDirectives(field) {
12050    var _a;
12051    const CONDITIONAL_DIRECTIVES = ['skip', 'include'];
12052    return (_a = field.directives) === null || _a === void 0 ? void 0 : _a.some(directive => CONDITIONAL_DIRECTIVES.includes(directive.name.value));
12053}
12054function wrapTypeWithModifiers(baseType, type, options) {
12055    let currentType = type;
12056    const modifiers = [];
12057    while (currentType) {
12058        if (Object(definition["L" /* isNonNullType */])(currentType)) {
12059            currentType = currentType.ofType;
12060        }
12061        else {
12062            modifiers.push(options.wrapOptional);
12063        }
12064        if (Object(definition["J" /* isListType */])(currentType)) {
12065            modifiers.push(options.wrapArray);
12066            currentType = currentType.ofType;
12067        }
12068        else {
12069            break;
12070        }
12071    }
12072    return modifiers.reduceRight((result, modifier) => modifier(result), baseType);
12073}
12074function removeDescription(nodes) {
12075    return nodes.map(node => ({ ...node, description: undefined }));
12076}
12077function wrapTypeNodeWithModifiers(baseType, typeNode) {
12078    switch (typeNode.kind) {
12079        case language_kinds["a" /* Kind */].NAMED_TYPE: {
12080            return `Maybe<${baseType}>`;
12081        }
12082        case language_kinds["a" /* Kind */].NON_NULL_TYPE: {
12083            const innerType = wrapTypeNodeWithModifiers(baseType, typeNode.type);
12084            return clearOptional(innerType);
12085        }
12086        case language_kinds["a" /* Kind */].LIST_TYPE: {
12087            const innerType = wrapTypeNodeWithModifiers(baseType, typeNode.type);
12088            return `Maybe<Array<${innerType}>>`;
12089        }
12090    }
12091}
12092function clearOptional(str) {
12093    const rgx = new RegExp(`^Maybe<(.*?)>$`, 'i');
12094    if (str.startsWith(`Maybe`)) {
12095        return str.replace(rgx, '$1');
12096    }
12097    return str;
12098}
12099function stripTrailingSpaces(str) {
12100    return str.replace(/ +\n/g, '\n');
12101}
12102
12103function getKind(node) {
12104    if (typeof node === 'string') {
12105        return 'typeNames';
12106    }
12107    if (['EnumValueDefinition', 'EnumValue'].includes(node.kind)) {
12108        return 'enumValues';
12109    }
12110    return 'typeNames';
12111}
12112function getName(node) {
12113    if (node == null) {
12114        return undefined;
12115    }
12116    if (typeof node === 'string') {
12117        return node;
12118    }
12119    switch (node.kind) {
12120        case 'OperationDefinition':
12121        case 'Variable':
12122        case 'Argument':
12123        case 'FragmentSpread':
12124        case 'FragmentDefinition':
12125        case 'ObjectField':
12126        case 'Directive':
12127        case 'NamedType':
12128        case 'ScalarTypeDefinition':
12129        case 'ObjectTypeDefinition':
12130        case 'FieldDefinition':
12131        case 'InputValueDefinition':
12132        case 'InterfaceTypeDefinition':
12133        case 'UnionTypeDefinition':
12134        case 'EnumTypeDefinition':
12135        case 'EnumValueDefinition':
12136        case 'InputObjectTypeDefinition':
12137        case 'DirectiveDefinition': {
12138            return getName(node.name);
12139        }
12140        case 'Name': {
12141            return node.value;
12142        }
12143        case 'Field': {
12144            return getName(node.alias || node.name);
12145        }
12146        case 'VariableDefinition': {
12147            return getName(node.variable);
12148        }
12149    }
12150    return undefined;
12151}
12152function convertFactory(config) {
12153    function resolveConventionName(type) {
12154        if (!config.namingConvention) {
12155            return (str, opts = {}) => {
12156                return convertNameParts(str, dist["pascalCase"], getConfigValue((opts || {}).transformUnderscore, false));
12157            };
12158        }
12159        if (typeof config.namingConvention === 'string') {
12160            if (config.namingConvention === 'keep') {
12161                return str => str;
12162            }
12163            return (str, opts = {}) => {
12164                return convertNameParts(str, Object(index_esm["i" /* resolveExternalModuleAndFn */])(config.namingConvention), getConfigValue((opts || {}).transformUnderscore, false));
12165            };
12166        }
12167        if (typeof config.namingConvention === 'function') {
12168            return (str, opts = {}) => {
12169                return convertNameParts(str, config.namingConvention, getConfigValue((opts || {}).transformUnderscore, false));
12170            };
12171        }
12172        if (typeof config.namingConvention === 'object' && config.namingConvention[type] === 'keep') {
12173            return str => str;
12174        }
12175        if (typeof config.namingConvention === 'object') {
12176            if (!config.namingConvention[type]) {
12177                return (str, opts = {}) => {
12178                    const transformUnderscore = config.namingConvention.transformUnderscore || (opts || {}).transformUnderscore;
12179                    return convertNameParts(str, dist["pascalCase"], getConfigValue(transformUnderscore, false));
12180                };
12181            }
12182            return (str, opts = {}) => {
12183                return convertNameParts(str, Object(index_esm["i" /* resolveExter
12183nalModuleAndFn */])(config.namingConvention[type]), getConfigValue((opts || {}).transformUnderscore, true));
12184            };
12185        }
12186        return config.namingConvention[type];
12187    }
12188    return (node, opts) => {
12189        const prefix = opts && opts.prefix;
12190        const suffix = opts && opts.suffix;
12191        const kind = getKind(node);
12192        const str = [prefix || '', getName(node), suffix || ''].join('');
12193        return resolveConventionName(kind)(str, opts);
12194    };
12195}
12196
12197function escapeString(str) {
12198    return str.replace(/\\/g, '\\\\').replace(/\n/g, '\\n').replace(/'/g, "\\'");
12199}
12200function parseEnumValues({ schema, mapOrStr = {}, ignoreEnumValuesFromSchema, }) {
12201    const allTypes = schema.getTypeMap();
12202    const allEnums = Object.keys(allTypes).filter(t => Object(definition["E" /* isEnumType */])(allTypes[t]));
12203    if (typeof mapOrStr === 'object') {
12204        if (!ignoreEnumValuesFromSchema) {
12205            for (const enumTypeName of allEnums) {
12206                const enumType = schema.getType(enumTypeName);
12207                for (const { name, value } of enumType.getValues()) {
12208                    if (value && value !== name) {
12209                        mapOrStr[enumTypeName] = mapOrStr[enumTypeName] || {};
12210                        if (typeof mapOrStr[enumTypeName] !== 'string' && !mapOrStr[enumTypeName][name]) {
12211                            mapOrStr[enumTypeName][name] = typeof value === 'string' ? escapeString(value) : value;
12212                        }
12213                    }
12214                }
12215            }
12216        }
12217        const invalidMappings = Object.keys(mapOrStr).filter(gqlName => !allEnums.includes(gqlName));
12218        if (invalidMappings.length > 0) {
12219            throw new index_esm["b" /* DetailedError */](`Invalid 'enumValues' mapping!`, `The following types does not exist in your GraphQL schema: ${invalidMappings.join(', ')}`);
12220        }
12221        return Object.keys(mapOrStr).reduce((prev, gqlIdentifier) => {
12222            const pointer = mapOrStr[gqlIdentifier];
12223            if (typeof pointer === 'string') {
12224                const mapper = parseMapper(pointer, gqlIdentifier);
12225                return {
12226                    ...prev,
12227                    [gqlIdentifier]: {
12228                        isDefault: mapper.isExternal && mapper.default,
12229                        typeIdentifier: gqlIdentifier,
12230                        sourceFile: mapper.isExternal ? mapper.source : null,
12231                        sourceIdentifier: mapper.type,
12232                        importIdentifier: mapper.isExternal ? mapper.import : null,
12233                        mappedValues: null,
12234                    },
12235                };
12236            }
12237            else if (typeof pointer === 'object') {
12238                return {
12239                    ...prev,
12240                    [gqlIdentifier]: {
12241                        isDefault: false,
12242                        typeIdentifier: gqlIdentifier,
12243                        sourceFile: null,
12244                        sourceIdentifier: null,
12245                        importIdentifier: null,
12246                        mappedValues: pointer,
12247                    },
12248                };
12249            }
12250            else {
12251                throw new index_esm["b" /* DetailedError */](`Invalid "enumValues" configuration`, `Enum "${gqlIdentifier}": expected string or object (with enum values mapping)`);
12252            }
12253        }, {});
12254    }
12255    else if (typeof mapOrStr === 'string') {
12256        return allEnums
12257            .filter(enumName => !enumName.startsWith('__'))
12258            .reduce((prev, enumName) => {
12259            return {
12260                ...prev,
12261                [enumName]: {
12262                    isDefault: false,
12263                    typeIdentifier: enumName,
12264                    sourceFile: mapOrStr,
12265                    sourceIdentifier: enumName,
12266                    importIdentifier: enumName,
12267                    mappedValues: null,
12268                },
12269            };
12270        }, {});
12271    }
12272    return {};
12273}
12274
12275const DEFAULT_DECLARATION_KINDS = {
12276    scalar: 'type',
12277    input: 'type',
12278    type: 'type',
12279    interface: 'type',
12280    arguments: 'type',
12281};
12282function normalizeDeclarationKind(declarationKind) {
12283    if (typeof declarationKind === 'string') {
12284        return {
12285            scalar: declarationKind,
12286            input: declarationKind,
12287            type: declarationKind,
12288            interface: declarationKind,
12289            arguments: declarationKind,
12290        };
12291    }
12292    return {
12293        ...DEFAULT_DECLARATION_KINDS,
12294        ...declarationKind,
12295    };
12296}
12297
12298const DEFAULT_AVOID_OPTIONALS = {
12299    object: false,
12300    inputValue: false,
12301    field: false,
12302    defaultValue: false,
12303};
12304function normalizeAvoidOptionals(avoidOptionals) {
12305    if (typeof avoidOptionals === 'boolean') {
12306        return {
12307            object: avoidOptionals,
12308            inputValue: avoidOptionals,
12309            field: avoidOptionals,
12310            defaultValue: avoidOptionals,
12311        };
12312    }
12313    return {
12314        ...DEFAULT_AVOID_OPTIONALS,
12315        ...avoidOptionals,
12316    };
12317}
12318
12319function generateFragmentImportStatement(statement, kind) {
12320    const { importSource: fragmentImportSource, ...rest } = statement;
12321    const { identifiers, path, namespace } = fragmentImportSource;
12322    const importSource = {
12323        identifiers: identifiers
12324            .filter(fragmentImport => kind === 'both' || kind === fragmentImport.kind)
12325            .map(({ name }) => name),
12326        path,
12327        namespace,
12328    };
12329    return generateImportStatement({
12330        importSource,
12331        ...rest,
12332        typesImport: kind === 'type' ? statement.typesImport : false,
12333    });
12334}
12335function generateImportStatement(statement) {
12336    const { baseDir, importSource, outputPath, typesImport } = statement;
12337    const importPath = resolveImportPath(baseDir, outputPath, importSource.path);
12338    const importNames = importSource.identifiers && importSource.identifiers.length
12339        ? `{ ${Array.from(new Set(importSource.identifiers)).join(', ')} }`
12340        : '*';
12341    const importAlias = importSource.namespace ? ` as ${importSource.namespace}` : '';
12342    const importStatement = typesImport ? 'import type' : 'import';
12343    return `${importStatement} ${importNames}${importAlias} from '${importPath}';${importAlias ? '\n' : ''}`;
12344}
12345function resolveImportPath(baseDir, outputPath, sourcePath) {
12346    const shouldAbsolute = !sourcePath.startsWith('~');
12347    if (shouldAbsolute) {
12348        const absGeneratedFilePath = Object(path_browserify["resolve"])(baseDir, outputPath);
12349        const absImportFilePath = Object(path_browserify["resolve"])(baseDir, sourcePath);
12350        return resolveRelativeImport(absGeneratedFilePath, absImportFilePath);
12351    }
12352    else {
12353        return sourcePath.replace(`~`, '');
12354    }
12355}
12356function resolveRelativeImport(from, to) {
12357    if (!Object(path_browserify["isAbsolute"])(from)) {
12358        throw new Error(`Argument 'from' must be an absolute path, '${from}' given.`);
12359    }
12360    if (!Object(path_browserify["isAbsolute"])(to)) {
12361        throw new Error(`Argument 'to' must be an absolute path, '${to}' given.`);
12362    }
12363    return fixLocalFilePath(clearExtension(Object(path_browserify["relative"])(Object(path_browserify["dirname"])(from), to)));
12364}
12365function resolveImportSource(source) {
12366    return typeof source === 'string' ? { path: source } : source;
12367}
12368function clearExtension(path) {
12369    const parsedPath = parse_filepath_default()(path);
12370    return Object(path_browserify["join"])(parsedPath.dir, parsedPath.name).replace(/\\/g, '/');
12371}
12372function fixLocalFilePath(path) {
12373    return !path.startsWith('..') ? `./${path}` : path;
12374}
12375
12376class index_esm_BaseVisitor {
12377    constructor(rawConfig, additionalConfig) {
12378        this._declarationBlockConfig = {};
12379        this._parsedConfig = {
12380            convert: convertFactory(rawConfig),
12381            typesPrefix: rawConfig.typesPrefix || '',
12382            typesSuffix: rawConfig.typesSuffix || '',
12383            externalFragments: rawConfig.externalFragments || [],
12384            fragmentImports: rawConfig.fragmentImports || [],
12385            addTypename: !rawConfig.skipTypename,
12386            nonOptionalTypename: !!rawConfig.nonOptionalTypename,
12387            useTypeImports: !!rawConfig.useTypeImports,
12388            dedupeFragments: !!rawConfig.dedupeFragments,
12389            ...(additionalConfig || {}),
12390        };
12391        this.scalars = {};
12392        Object.keys(this.config.scalars || {}).forEach(key => {
12393            this.scalars[key] = this.config.scalars[key].type;
12394        });
12395        auto_bind_default()(this);
12396    }
12397    getVisitorKindContextFromAncestors(ancestors) {
12398        if (!ancestors) {
12399            return [];
12400        }
12401        return ancestors.map(t => t.kind).filter(Boolean);
12402    }
12403    get config() {
12404        return this._parsedConfig;
12405    }
12406    convertName(node, options) {
12407        const useTypesPrefix = typeof (options && options.useTypesPrefix) === 'boolean' ? options.useTypesPrefix : true;
12408        const useTypesSuffix = typeof (options && options.useTypesSuffix) === 'boolean' ? options.useTypesSuffix : true;
12409        let convertedName = '';
12410        if (useTypesPrefix) {
12411            convertedName += this.config.typesPrefix;
12412        }
12413        convertedName += this.config.convert(node, options);
12414        if (useTypesSuffix) {
12415            convertedName += this.config.typesSuffix;
12416        }
12417        return convertedName;
12418    }
12419    getOperationSuffix(node, operationType) {
12420        const { omitOperationSuffix = false, dedupeOperationSuffix = false } = this.config;
12421        const operationName = typeof node === 'string' ? node : node.name ? node.name.value : '';
12422        return omitOperationSuffix
12423            ? ''
12424            : dedupeOperationSuffix && operationName.toLowerCase().endsWith(operationType.toLowerCase())
12425                ? ''
12426                : operationType;
12427    }
12428    getFragmentSuffix(node) {
12429        return this.getOperationSuffix(node, 'Fragment');
12430    }
12431    getFragmentName(node) {
12432        return this.convertName(node, {
12433            suffix: this.getFragmentSuffix(node),
12434            useTypesPrefix: false,
12435        });
12436    }
12437    getFragmentVariableName(node) {
12438        const { omitOperationSuffix = false, dedupeOperationSuffix = false, fragmentVariableSuffix = 'FragmentDoc', fragmentVariablePrefix = '', } = this.config;
12439        const fragmentName = typeof node === 'string' ? node : node.name.value;
12440        const suffix = omitOperationSuffix
12441            ? ''
12442            : dedupeOperationSuffix &&
12443                fragmentName.toLowerCase().endsWith('fragment') &&
12444                fragmentVariableSuffix.toLowerCase().startsWith('fragment')
12445                ? fragmentVariableSuffix.substring('fragment'.length)
12446                : fragmentVariableSuffix;
12447        return this.convertName(node, {
12448            prefix: fragmentVariablePrefix,
12449            suffix,
12450            useTypesPrefix: false,
12451        });
12452    }
12453    getPunctuation(_declarationKind) {
12454        return '';
12455    }
12456}
12457
12458class index_esm_OperationVariablesToObject {
12459    constructor(_scalars, _convertName, _namespacedImportName = null, _enumNames = [], _enumPrefix = true, _enumValues = {}, _applyCoercion = false) {
12460        this._scalars = _scalars;
12461        this._convertName = _convertName;
12462        this._namespacedImportName = _namespacedImportName;
12463        this._enumNames = _enumNames;
12464        this._enumPrefix = _enumPrefix;
12465        this._enumValues = _enumValues;
12466        this._applyCoercion = _applyCoercion;
12467        auto_bind_default()(this);
12468    }
12469    getName(node) {
12470        if (node.name) {
12471            if (typeof node.name === 'string') {
12472                return node.name;
12473            }
12474            return node.name.value;
12475        }
12476        else if (node.variable) {
12477            return node.variable.name.value;
12478        }
12479        return null;
12480    }
12481    transform(variablesNode) {
12482        if (!variablesNode || variablesNode.length === 0) {
12483            return null;
12484        }
12485        return (variablesNode.map(variable => visitor_plugin_common_index_esm_indent(this.transformVariable(variable))).join(`${this.getPunctuation()}\n`) +
12486            this.getPunctuation());
12487    }
12488    getScalar(name) {
12489        const prefix = this._namespacedImportName ? `${this._namespacedImportName}.` : '';
12490        return `${prefix}Scalars['${name}']`;
12491    }
12492    transformVariable(variable) {
12493        let typeValue = null;
12494        const prefix = this._namespacedImportName ? `${this._namespacedImportName}.` : '';
12495        if (typeof variable.type === 'string') {
12496            typeValue = variable.type;
12497        }
12498        else {
12499            const baseType = getBaseTypeNode(variable.type);
12500            const typeName = baseType.name.value;
12501            if (this._scalars[typeName]) {
12502                typeValue = this.getScalar(typeName);
12503            }
12504            else if (this._enumValues[typeName] && this._enumValues[typeName].sourceFile) {
12505                typeValue = this._enumValues[typeName].typeIdentifier || this._enumValues[typeName].sourceIdentifier;
12506            }
12507            else {
12508                typeValue = `${prefix}${this._convertName(baseType, {
12509                    useTypesPrefix: this._enumNames.includes(typeName) ? this._enumPrefix : true,
12510                })}`;
12511            }
12512        }
12513        const fieldName = this.getName(variable);
12514        const fieldType = this.wrapAstTypeWithModifiers(typeValue, variable.type, this._applyCoercion);
12515        const hasDefaultValue = variable.defaultValue != null && typeof variable.defaultValue !== 'undefined';
12516        const isNonNullType = variable.type.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE;
12517        const formattedFieldString = this.formatFieldString(fieldName, isNonNullType, hasDefaultValue);
12518        const formattedTypeString = this.formatTypeString(fieldType, isNonNullType, hasDefaultValue);
12519        return `${formattedFieldString}: ${formattedTypeString}`;
12520    }
12521    wrapAstTypeWithModifiers(_baseType, _typeNode, _applyCoercion) {
12522        throw new Error(`You must override "wrapAstTypeWithModifiers" of OperationVariablesToObject!`);
12523    }
12524    formatFieldString(fieldName, isNonNullType, _hasDefaultValue) {
12525        return fieldName;
12526    }
12527    formatTypeString(fieldType, isNonNullType, hasDefaultValue) {
12528        const prefix = this._namespacedImportName ? `${this._namespacedImportName}.` : '';
12529        if (hasDefaultValue) {
12530            return `${prefix}Maybe<${fieldType}>`;
12531        }
12532        return fieldType;
12533    }
12534    getPunctuation() {
12535        return ',';
12536    }
12537}
12538
12539class index_esm_BaseTypesVisitor extends index_esm_BaseVisitor {
12540    constructor(_schema, rawConfig, additionalConfig, defaultScalars = DEFAULT_SCALARS) {
12541        super(rawConfig, {
12542            enumPrefix: getConfigValue(rawConfig.enumPrefix, true),
12543            onlyOperationTypes: getConfigValue(rawConfig.onlyOperationTypes, false),
12544            addUnderscoreToArgsType: getConfigValue(rawConfig.addUnderscoreToArgsType, false),
12545            enumValues: parseEnumValues({
12546                schema: _schema,
12547                mapOrStr: rawConfig.enumValues,
12548                ignoreEnumValuesFromSchema: rawConfig.ignoreEnumValuesFromSchema,
12549            }),
12550            declarationKind: normalizeDeclarationKind(rawConfig.declarationKind),
12551            scalars: buildScalarsFromConfig(_schema, rawConfig, defaultScalars),
12552            fieldWrapperValue: getConfigValue(rawConfig.fieldWrapperValue, 'T'),
12553            wrapFieldDefinitions: getConfigValue(rawConfig.wrapFieldDefinitions, false),
12554            entireFieldWrapperValue: getConfigValue(rawConfig.entireFieldWrapperValue, 'T'),
12555            wrapEntireDefinitions: getConfigValue(rawConfig.wrapEntireFieldDefinitions, false),
12556            ignoreEnumValuesFromSchema: getConfigValue(rawConfig.ignoreEnumValuesFromSchema, false),
12557            ...additionalConfig,
12558        });
12559        this._schema = _schema;
12560        this._argumentsTransformer = new index_esm_OperationVariablesToObject(this.scalars, this.convertName);
12561    }
12562    getExportPrefix() {
12563        return 'export ';
12564    }
12565    getFieldWrapperValue() {
12566        if (this.config.fieldWrapperValue) {
12567            return `${this.getExportPrefix()}type FieldWrapper<T> = ${this.config.fieldWrapperValue};`;
12568        }
12569        return '';
12570    }
12571    getEntireFieldWrapperValue() {
12572        if (this.config.entireFieldWrapperValue) {
12573            return `${this.getExportPrefix()}type EntireFieldWrapper<T> = ${this.config.entireFieldWrapperValue};`;
12574        }
12575        return '';
12576    }
12577    getScalarsImports() {
12578        return Object.keys(this.config.scalars)
12579            .map(enumName => {
12580            const mappedValue = this.config.scalars[enumName];
12581            if (mappedValue.isExternal) {
12582                return this._buildTypeImport(mappedValue.import, mappedValue.source, mappedValue.default);
12583            }
12584            return null;
12585        })
12586            .filter(a => a);
12587    }
12588    get scalarsDefinition() {
12589        const allScalars = Object.keys(this.config.scalars).map(scalarName => {
12590            const scalarValue = this.config.scalars[scalarName].type;
12591            const scalarType = this._schema.getType(scalarName);
12592            const comment = scalarType && scalarType.astNode && scalarType.description ? transformComment(scalarType.description, 1) : '';
12593            const { scalar } = this._parsedConfig.declarationKind;
12594            return comment + visitor_plugin_common_index_esm_indent(`${scalarName}: ${scalarValue}${this.getPunctuation(scalar)}`);
12595        });
12596        return new DeclarationBlock(this._declarationBlockConfig)
12597            .export()
12598            .asKind(this._parsedConfig.declarationKind.scalar)
12599            .withName('Scalars')
12600            .withComment('All built-in and custom scalars, mapped to their actual values')
12601            .withBlock(allScalars.join('\n')).string;
12602    }
12603    setDeclarationBlockConfig(config) {
12604        this._declarationBlockConfig = config;
12605    }
12606    setArgumentsTransformer(argumentsTransfomer) {
12607        this._argumentsTransformer = argumentsTransfomer;
12608    }
12609    NonNullType(node) {
12610        const asString = node.type;
12611        return asString;
12612    }
12613    getInputObjectDeclarationBlock(node) {
12614        return new DeclarationBlock(this._declarationBlockConfig)
12615            .export()
12616            .asKind(this._parsedConfig.declarationKind.input)
12617            .withName(this.convertName(node))
12618            .withComment(node.description)
12619            .withBlock(node.fields.join('\n'));
12620    }
12621    InputObjectTypeDefinition(node) {
12622        return this.getInputObjectDeclarationBlock(node).string;
12623    }
12624    InputValueDefinition(node) {
12625        const comment = transformComment(node.description, 1);
12626        const { input } = this._parsedConfig.declarationKind;
12627        return comment + visitor_plugin_common_index_esm_indent(`${node.name}: ${node.type}${this.getPunctuation(input)}`);
12628    }
12629    Name(node) {
12630        return node.value;
12631    }
12632    FieldDefinition(node) {
12633        const typeString = node.type;
12634        const { type }
12634 = this._parsedConfig.declarationKind;
12635        const comment = this.getFieldComment(node);
12636        return comment + visitor_plugin_common_index_esm_indent(`${node.name}: ${typeString}${this.getPunctuation(type)}`);
12637    }
12638    UnionTypeDefinition(node, key, parent) {
12639        if (this.config.onlyOperationTypes)
12640            return '';
12641        const originalNode = parent[key];
12642        const possibleTypes = originalNode.types
12643            .map(t => (this.scalars[t.name.value] ? this._getScalar(t.name.value) : this.convertName(t)))
12644            .join(' | ');
12645        return new DeclarationBlock(this._declarationBlockConfig)
12646            .export()
12647            .asKind('type')
12648            .withName(this.convertName(node))
12649            .withComment(node.description)
12650            .withContent(possibleTypes).string;
12651    }
12652    mergeInterfaces(interfaces, hasOtherFields) {
12653        return interfaces.join(' & ') + (interfaces.length && hasOtherFields ? ' & ' : '');
12654    }
12655    appendInterfacesAndFieldsToBlock(block, interfaces, fields) {
12656        block.withContent(this.mergeInterfaces(interfaces, fields.length > 0));
12657        block.withBlock(this.mergeAllFields(fields, interfaces.length > 0));
12658    }
12659    getObjectTypeDeclarationBlock(node, originalNode) {
12660        const optionalTypename = this.config.nonOptionalTypename ? '__typename' : '__typename?';
12661        const { type, interface: interfacesType } = this._parsedConfig.declarationKind;
12662        const allFields = [
12663            ...(this.config.addTypename
12664                ? [
12665                    visitor_plugin_common_index_esm_indent(`${this.config.immutableTypes ? 'readonly ' : ''}${optionalTypename}: '${node.name}'${this.getPunctuation(type)}`),
12666                ]
12667                : []),
12668            ...node.fields,
12669        ];
12670        const interfacesNames = originalNode.interfaces ? originalNode.interfaces.map(i => this.convertName(i)) : [];
12671        const declarationBlock = new DeclarationBlock(this._declarationBlockConfig)
12672            .export()
12673            .asKind(type)
12674            .withName(this.convertName(node))
12675            .withComment(node.description);
12676        if (type === 'interface' || type === 'class') {
12677            if (interfacesNames.length > 0) {
12678                const keyword = interfacesType === 'interface' && type === 'class' ? 'implements' : 'extends';
12679                declarationBlock.withContent(`${keyword} ` + interfacesNames.join(', ') + (allFields.length > 0 ? ' ' : ' {}'));
12680            }
12681            declarationBlock.withBlock(this.mergeAllFields(allFields, false));
12682        }
12683        else {
12684            this.appendInterfacesAndFieldsToBlock(declarationBlock, interfacesNames, allFields);
12685        }
12686        return declarationBlock;
12687    }
12688    getFieldComment(node) {
12689        let commentText = node.description;
12690        const deprecationDirective = node.directives.find((v) => v.name === 'deprecated');
12691        if (deprecationDirective) {
12692            const deprecationReason = this.getDeprecationReason(deprecationDirective);
12693            commentText = `${commentText ? `${commentText}\n` : ''}@deprecated ${deprecationReason}`;
12694        }
12695        const comment = transformComment(commentText, 1);
12696        return comment;
12697    }
12698    mergeAllFields(allFields, _hasInterfaces) {
12699        return allFields.join('\n');
12700    }
12701    ObjectTypeDefinition(node, key, parent) {
12702        if (this.config.onlyOperationTypes)
12703            return '';
12704        const originalNode = parent[key];
12705        return [this.getObjectTypeDeclarationBlock(node, originalNode).string, this.buildArgumentsBlock(originalNode)]
12706            .filter(f => f)
12707            .join('\n\n');
12708    }
12709    getInterfaceTypeDeclarationBlock(node, _originalNode) {
12710        const declarationBlock = new DeclarationBlock(this._declarationBlockConfig)
12711            .export()
12712            .asKind(this._parsedConfig.declarationKind.interface)
12713            .withName(this.convertName(node))
12714            .withComment(node.description);
12715        return declarationBlock.withBlock(node.fields.join('\n'));
12716    }
12717    InterfaceTypeDefinition(node, key, parent) {
12718        if (this.config.onlyOperationTypes)
12719            return '';
12720        const originalNode = parent[key];
12721        return [this.getInterfaceTypeDeclarationBlock(node, originalNode).string, this.buildArgumentsBlock(originalNode)]
12722            .filter(f => f)
12723            .join('\n\n');
12724    }
12725    ScalarTypeDefinition(_node) {
12726        // We empty this because we handle scalars in a different way, see constructor.
12727        return '';
12728    }
12729    _buildTypeImport(identifier, source, asDefault = false) {
12730        const { useTypeImports } = this.config;
12731        if (asDefault) {
12732            if (useTypeImports) {
12733                return `import type { default as ${identifier} } from '${source}';`;
12734            }
12735            return `import ${identifier} from '${source}';`;
12736        }
12737        return `import${useTypeImports ? ' type' : ''} { ${identifier} } from '${source}';`;
12738    }
12739    handleEnumValueMapper(typeIdentifier, importIdentifier, sourceIdentifier, sourceFile) {
12740        const importStatement = this._buildTypeImport(importIdentifier || sourceIdentifier, sourceFile);
12741        if (importIdentifier !== sourceIdentifier || sourceIdentifier !== typeIdentifier) {
12742            return [importStatement, `import ${typeIdentifier} = ${sourceIdentifier};`];
12743        }
12744        return [importStatement];
12745    }
12746    getEnumsImports() {
12747        return array_prototype_flatmap_default()(Object.keys(this.config.enumValues), enumName => {
12748            const mappedValue = this.config.enumValues[enumName];
12749            if (mappedValue.sourceFile) {
12750                if (mappedValue.isDefault) {
12751                    return [this._buildTypeImport(mappedValue.typeIdentifier, mappedValue.sourceFile, true)];
12752                }
12753                return this.handleEnumValueMapper(mappedValue.typeIdentifier, mappedValue.importIdentifier, mappedValue.sourceIdentifier, mappedValue.sourceFile);
12754            }
12755            return [];
12756        }).filter(a => a);
12757    }
12758    EnumTypeDefinition(node) {
12759        const enumName = node.name;
12760        // In case of mapped external enum string
12761        if (this.config.enumValues[enumName] && this.config.enumValues[enumName].sourceFile) {
12762            return null;
12763        }
12764        return new DeclarationBlock(this._declarationBlockConfig)
12765            .export()
12766            .asKind('enum')
12767            .withName(this.convertName(node, { useTypesPrefix: this.config.enumPrefix }))
12768            .withComment(node.description)
12769            .withBlock(this.buildEnumValuesBlock(enumName, node.values)).str
12769ing;
12770    }
12771    // We are using it in order to transform "description" field
12772    StringValue(node) {
12773        return node.value;
12774    }
12775    makeValidEnumIdentifier(identifier) {
12776        if (/^[0-9]/.exec(identifier)) {
12777            return wrapWithSingleQuotes(identifier, true);
12778        }
12779        return identifier;
12780    }
12781    buildEnumValuesBlock(typeName, values) {
12782        const schemaEnumType = this._schema
12783            ? this._schema.getType(typeName)
12784            : undefined;
12785        return values
12786            .map(enumOption => {
12787            const optionName = this.makeValidEnumIdentifier(this.convertName(enumOption, { useTypesPrefix: false, transformUnderscore: true }));
12788            const comment = transformComment(enumOption.description, 1);
12789            const schemaEnumValue = schemaEnumType && !this.config.ignoreEnumValuesFromSchema
12790                ? schemaEnumType.getValue(enumOption.name).value
12791                : undefined;
12792            let enumValue = typeof schemaEnumValue !== 'undefined' ? schemaEnumValue : enumOption.name;
12793            if (this.config.enumValues[typeName] &&
12794                this.config.enumValues[typeName].mappedValues &&
12795                typeof this.config.enumValues[typeName].mappedValues[enumValue] !== 'undefined') {
12796                enumValue = this.config.enumValues[typeName].mappedValues[enumValue];
12797            }
12798            return (comment +
12799                visitor_plugin_common_index_esm_indent(`${optionName}${this._declarationBlockConfig.enumNameValueSeparator} ${wrapWithSingleQuotes(enumValue, typeof schemaEnumValue !== 'undefined')}`));
12800        })
12801            .join(',\n');
12802    }
12803    DirectiveDefinition(_node) {
12804        return '';
12805    }
12806    getArgumentsObjectDeclarationBlock(node, name, field) {
12807        return new DeclarationBlock(this._declarationBlockConfig)
12808            .export()
12809            .asKind(this._parsedConfig.declarationKind.arguments)
12810            .withName(this.convertName(name))
12811            .withComment(node.description)
12812            .withBlock(this._argumentsTransformer.transform(field.arguments));
12813    }
12814    getArgumentsObjectTypeDefinition(node, name, field) {
12815        return this.getArgumentsObjectDeclarationBlock(node, name, field).string;
12816    }
12817    buildArgumentsBlock(node) {
12818        const fieldsWithArguments = node.fields.filter(field => field.arguments && field.arguments.length > 0) || [];
12819        return fieldsWithArguments
12820            .map(field => {
12821            const name = node.name.value +
12822                (this.config.addUnderscoreToArgsType ? '_' : '') +
12823                this.convertName(field, {
12824                    useTypesPrefix: false,
12825                    useTypesSuffix: false,
12826                }) +
12827                'Args';
12828            return this.getArgumentsObjectTypeDefinition(node, name, field);
12829        })
12830            .join('\n\n');
12831    }
12832    _getScalar(name) {
12833        return `Scalars['${name}']`;
12834    }
12835    _getTypeForNode(node) {
12836        const typeAsString = node.name;
12837        if (this.scalars[typeAsString]) {
12838            return this._getScalar(typeAsString);
12839        }
12840        else if (this.config.enumValues[typeAsString]) {
12841            return this.config.enumValues[typeAsString].typeIdentifier;
12842        }
12843        const schemaType = this._schema.getType(node.name);
12844        if (schemaType && Object(definition["E" /* isEnumType */])(schemaType)) {
12845            return this.convertName(node, { useTypesPrefix: this.config.enumPrefix });
12846        }
12847        return this.convertName(node);
12848    }
12849    NamedType(node, key, parent, path, ancestors) {
12850        const currentVisitContext = this.getVisitorKindContextFromAncestors(ancestors);
12851        const isVisitingInputType = currentVisitContext.includes(language_kinds["a" /* Kind */].INPUT_OBJECT_TYPE_DEFINITION);
12852        const typeToUse = this._getTypeForNode(node);
12853        if (!isVisitingInputType && this.config.fieldWrapperValue && this.config.wrapFieldDefinitions) {
12854            return `FieldWrapper<${typeToUse}>`;
12855        }
12856        return typeToUse;
12857    }
12858    ListType(node) {
12859        const asString = node.type;
12860        return this.wrapWithListType(asString);
12861    }
12862    SchemaDefinition() {
12863        return null;
12864    }
12865    getDeprecationReason(directive) {
12866        if (directive.name === 'deprecated') {
12867            const hasArguments = directive.arguments.length > 0;
12868            let reason = 'Field no longer supported';
12869            if (hasArguments) {
12870                reason = directive.arguments[0].value;
12871            }
12872            return reason;
12873        }
12874    }
12875    wrapWithListType(str) {
12876        return `Array<${str}>`;
12877    }
12878}
12879
12880function getRootType(operation, schema) {
12881    switch (operation) {
12882        case 'query':
12883            return schema.getQueryType();
12884        case 'mutation':
12885            return schema.getMutationType();
12886        case 'subscription':
12887            return schema.getSubscriptionType();
12888    }
12889}
12890class index_esm_BaseDocumentsVisitor extends index_esm_BaseVisitor {
12891    constructor(rawConfig, additionalConfig, _schema, defaultScalars = DEFAULT_SCALARS) {
12892        super(rawConfig, {
12893            exportFragmentSpreadSubTypes: getConfigValue(rawConfig.exportFragmentSpreadSubTypes, false),
12894            enumPrefix: getConfigValue(rawConfig.enumPrefix, true),
12895            preResolveTypes: getConfigValue(rawConfig.preResolveTypes, false),
12896            dedupeOperationSuffix: getConfigValue(rawConfig.dedupeOperationSuffix, false),
12897            omitOperationSuffix: getConfigValue(rawConfig.omitOperationSuffix, false),
12898            skipTypeNameForRoot: getConfigValue(rawConfig.skipTypeNameForRoot, false),
12899            namespacedImportName: getConfigValue(rawConfig.namespacedImportName, null),
12900            experimentalFragmentVariables: getConfigValue(rawConfig.experimentalFragmentVariables, false),
12901            addTypename: !rawConfig.skipTypename,
12902            globalNamespace: !!rawConfig.globalNamespace,
12903            operationResultSuffix: getConfigValue(rawConfig.operationResultSuffix, ''),
12904            scalars: buildScalarsFromConfig(_schema, rawConfig, defaultScalars),
12905            ...(additionalConfig || {}),
12906        });
12907        this._schema = _schema;
12908        this._unnamedCounter = 1;
12909        this._globalDeclarations = new Set();
12910        auto_bind_default()(this);
12911        this._variablesTransfomer = new index_esm_OperationVariablesToObject(this.scalars, this.convertName, this.config.namespacedImportName);
12912    }
12913    getGlobalDeclarations(noExport = false) {
12914        return Array.from(this._globalDeclarations).map(t => (noExport ? t : `export ${t}`));
12915    }
12916    setSelectionSetHandler(handler) {
12917        this._selectionSetToObject = handler;
12918    }
12919    setDeclarationBlockConfig(config) {
12920        this._declarationBlockConfig = config;
12921    }
12922    setVariablesTransformer(variablesTransfomer) {
12923        this._variablesTransfomer = variablesTransfomer;
12924    }
12925    get schema() {
12926        return this._schema;
12927    }
12928    get addTypename() {
12929        return this._parsedConfig.addTypename;
12930    }
12931    handleAnonymousOperation(node) {
12932        const name = node.name && node.name.value;
12933        if (name) {
12934            return this.convertName(name, {
12935                useTypesPrefix: false,
12936                useTypesSuffix: false,
12937            });
12938        }
12939        return this.convertName(this._unnamedCounter++ + '', {
12940            prefix: 'Unnamed_',
12941            suffix: '_',
12942            useTypesPrefix: false,
12943            useTypesSuffix: false,
12944        });
12945    }
12946    FragmentDefinition(node) {
12947        const fragmentRootType = this._schema.getType(node.typeCondition.name.value);
12948        const selectionSet = this._selectionSetToObject.createNext(fragmentRootType, node.selectionSet);
12949        const fragmentSuffix = this.getFragmentSuffix(node);
12950        return [
12951            selectionSet.transformFragmentSelectionSetToTypes(node.name.value, fragmentSuffix, this._declarationBlockConfig),
12952            this.config.experimentalFragmentVariables
12953                ? new DeclarationBlock({
12954                    ...this._declarationBlockConfig,
12955                    blockTransformer: t => this.applyVariablesWrapper(t),
12956                })
12957                    .export()
12958                    .asKind('type')
12959                    .withName(this.convertName(node.name.value, {
12960                    suffix: fragmentSuffix + 'Variables',
12961                }))
12962                    .withBlock(this._variablesTransfomer.transform(node.variableDefinitions)).string
12963                : undefined,
12964        ]
12965            .filter(r => r)
12966            .join('\n\n');
12967    }
12968    applyVariablesWrapper(variablesBlock) {
12969        return variablesBlock;
12970    }
12971    OperationDefinition(node) {
12972        const name = this.handleAnonymousOperation(node);
12973        const operationRootType = getRootType(node.operation, this._schema);
12974        if (!operationRootType) {
12975            throw new Error(`Unable to find root schema type for operation type "${node.operation}"!`);
12976        }
12977        const selectionSet = this._selectionSetToObject.createNext(operationRootType, node.selectionSet);
12978        const visitedOperationVariables = this._variablesTransfomer.transform(node.variableDefinitions);
12979        const operationType = Object(dist["pascalCase"])(node.operation);
12980        const operationTypeSuffix = this.getOperationSuffix(name, operationType);
12981        const operationResult = new DeclarationBlock(this._declarationBlockConfig)
12982            .export()
12983            .asKind('type')
12984            .withName(this.convertName(name, {
12985            suffix: operationTypeSuffix + this._parsedConfig.operationResultSuffix,
12986        }))
12987            .withContent(selectionSet.transformSelectionSet()).string;
12988        const operationVariables = new DeclarationBlock({
12989            ...this._declarationBlockConfig,
12990            blockTransformer: t => this.applyVariablesWrapper(t),
12991        })
12992            .export()
12993            .asKind('type')
12994            .withName(this.convertName(name, {
12995            suffix: operationTypeSuffix + 'Variables',
12996        }))
12997            .withBlock(visitedOperationVariables).string;
12998        return [operationVariables, operationResult].filter(r => r).join('\n\n');
12999    }
13000}
13001
13002class index_esm_BaseResolversVisitor extends index_esm_BaseVisitor {
13003    constructor(rawConfig, additionalConfig, _schema, defaultScalars = DEFAULT_SCALARS) {
13004        super(rawConfig, {
13005            immutableTypes: getConfigValue(rawConfig.immutableTypes, false),
13006            optionalResolveType: getConfigValue(rawConfig.optionalResolveType, false),
13007            enumPrefix: getConfigValue(rawConfig.enumPrefix, true),
13008            federation: getConfigValue(rawConfig.federation, false),
13009            resolverTypeWrapperSignature: getConfigValue(rawConfig.resolverTypeWrapperSignature, 'Promise<T> | T'),
13010            enumValues: parseEnumValues({
13011                schema: _schema,
13012                mapOrStr: rawConfig.enumValues,
13013            }),
13014            addUnderscoreToArgsType: getConfigValue(rawConfig.addUnderscoreToArgsType, false),
13015            onlyResolveTypeForInterfaces: getConfigValue(rawConfig.onlyResolveTypeForInterfaces, false),
13016            contextType: parseMapper(rawConfig.contextType || 'any', 'ContextType'),
13017            fieldContextTypes: getConfigValue(rawConfig.fieldContextTypes, []),
13018            resolverTypeSuffix: getConfigValue(rawConfig.resolverTypeSuffix, 'Resolvers'),
13019            allResolversTypeName: getConfigValue(rawConfig.allResolversTypeName, 'Resolvers'),
13020            rootValueType: parseMapper(rawConfig.rootValueType || '{}', 'RootValueType'),
13021            namespacedImportName: getConfigValue(rawConfig.namespacedImportName, ''),
13022            avoidOptionals: getConfigValue(rawConfig.avoidOptionals, false),
13023            defaultMapper: rawConfig.defaultMapper
13024                ? parseMapper(rawConfig.defaultMapper || 'any', 'DefaultMapperType')
13025                : null,
13026            mappers: transformMappers(rawConfig.mappers || {}, rawConfig.mapperTypeSuffix),
13027            scalars: buildScalarsFromConfig(_schema, rawConfig, defaultScalars),
13028            internalResolversPrefix: getConfigValue(rawConfig.internalResolversPrefix, '__'),
13029            ...(additionalConfig || {}),
13030        });
13031        this._schema = _schema;
13032        this._declarationBlockConfig = {};
13033        this._collectedResolvers = {};
13034        this._collectedDirectiveResolvers = {};
13035        this._usedMappers = {};
13036        this._resolversTypes = {};
13037        this._resolversParentTypes = {};
13038        this._rootTypeNames = [];
13039        this._globalDeclarations = new Set();
13040        this._hasScalars = false;
13041        this._hasFederation = false;
13042        auto_bind_default()(this);
13043        this._federation = new index_esm["a" /* ApolloFederation */]({ enabled: this.config.federation, schema: this.schema });
13044        this._rootTypeNames = getRootTypeNames(_schema);
13045        this._variablesTransfomer = new index_esm_OperationVariablesToObject(this.scalars, this.convertName, this.config.namespacedImportName);
13046        this._resolversTypes = this.createResolversFields(type => this.applyResolverTypeWrapper(type), type => this.clearResolverTypeWrapper(type), name => this.getTypeToUse(name));
13047        this._resolversParentTypes = this.createResolversFields(type => type, type => type, name => this.getParentTypeToUse(name), namedType => !Object(definition["E" /* isEnumType */])(namedType));
13048        this._fieldContextTypeMap = this.createFieldContextTypeMap();
13049    }
13050    getResolverTypeWrapperSignature() {
13051        return `export type ResolverTypeWrapper<T> = ${this.config.resolverTypeWrapperSignature};`;
13052    }
13053    shouldMapType(type, checkedBefore = {}, duringCheck = []) {
13054        if (checkedBefore[type.name] !== undefined) {
13055            return checkedBefore[type.name];
13056        }
13057        if (type.name.startsWith('__') || this.config.scalars[type.name]) {
13058            return false;
13059        }
13060        if (this.config.mappers[type.name]) {
13061            return true;
13062        }
13063        if (Object(definition["N" /* isObjectType */])(type) || Object(definition["H" /* isInterfaceType */])(type)) {
13064            const fields = type.getFields();
13065            return Object.keys(fields)
13066                .filter(fieldName => {
13067                const field = fields[fieldName];
13068                const fieldType = Object(index_esm["e" /* getBaseType */])(field.type);
13069                return !duringCheck.includes(fieldType.name);
13070            })
13071                .some(fieldName => {
13072                const field = fields[fieldName];
13073                const fieldType = Object(index_esm["e" /* getBaseType */])(field.type);
13074                if (checkedBefore[fieldType.name] !== undefined) {
13075                    return checkedBefore[fieldType.name];
13076                }
13077                if (this.config.mappers[type.name]) {
13078                    return true;
13079                }
13080                duringCheck.push(type.name);
13081                const innerResult = this.shouldMapType(fieldType, checkedBefore, duringCheck);
13082                return innerResult;
13083            });
13084        }
13085        return false;
13086    }
13087    convertName(node, options, applyNamespacedImport = false) {
13088        const sourceType = super.convertName(node, options);
13089        return `${applyNamespacedImport && this.config.namespacedImportName ? this.config.namespacedImportName + '.' : ''}${sourceType}`;
13090    }
13091    // Kamil: this one is heeeeavvyyyy
13092    createResolversFields(applyWrapper, clearWrapper, getTypeToUse, shouldInclude) {
13093        const allSchemaTypes = this._schema.getTypeMap();
13094        const nestedMapping = {};
13095        const typeNames = this._federation.filterTypeNames(Object.keys(allSchemaTypes));
13096        typeNames.forEach(typeName => {
13097            const schemaType = allSchemaTypes[typeName];
13098            nestedMapping[typeName] = this.shouldMapType(schemaType, nestedMapping);
13099        });
13100        return typeNames.reduce((prev, typeName) => {
13101            const schemaType = allSchemaTypes[typeName];
13102            if (typeName.startsWith('__') || (shouldInclude && !shouldInclude(schemaType))) {
13103                return prev;
13104            }
13105            let shouldApplyOmit = false;
13106            const isRootType = this._rootTypeNames.includes(typeName);
13107            const isMapped = this.config.mappers[typeName];
13108            const isScalar = this.config.scalars[typeName];
13109            const hasDefaultMapper = !!(this.config.defaultMapper && this.config.defaultMapper.type);
13110            if (isRootType) {
13111                prev[typeName] = applyWrapper(this.config.rootValueType.type);
13112                return prev;
13113            }
13114            else if (isMapped && this.config.mappers[typeName].type) {
13115                this.markMapperAsUsed(typeName);
13116                prev[typeName] = applyWrapper(this.config.mappers[typeName].type);
13117            }
13118            else if (Object(definition["H" /* isInterfaceType */])(schemaType)) {
13119                const allTypesMap = this._schema.getTypeMap();
13120                const implementingTypes = [];
13121                for (const graphqlType of Object.values(allTypesMap)) {
13122                    if (graphqlType instanceof definition["f" /* GraphQLObjectType */]) {
13123                        const allInterfaces = graphqlType.getInterfaces();
13124                        if (allInterfaces.some(int =>
13124 int.name === schemaType.name)) {
13125                            implementingTypes.push(graphqlType.name);
13126                        }
13127                    }
13128                }
13129                const possibleTypes = implementingTypes.map(name => getTypeToUse(name)).join(' | ') || 'never';
13130                prev[typeName] = possibleTypes;
13131                return prev;
13132            }
13133            else if (Object(definition["E" /* isEnumType */])(schemaType) && this.config.enumValues[typeName]) {
13134                prev[typeName] =
13135                    this.config.enumValues[typeName].sourceIdentifier ||
13136                        this.convertName(this.config.enumValues[typeName].typeIdentifier);
13137            }
13138            else if (hasDefaultMapper && !hasPlaceholder(this.config.defaultMapper.type)) {
13139                prev[typeName] = applyWrapper(this.config.defaultMapper.type);
13140            }
13141            else if (isScalar) {
13142                prev[typeName] = applyWrapper(this._getScalar(typeName));
13143            }
13144            else if (Object(definition["T" /* isUnionType */])(schemaType)) {
13145                prev[typeName] = schemaType
13146                    .getTypes()
13147                    .map(type => getTypeToUse(type.name))
13148                    .join(' | ');
13149            }
13150            else {
13151                shouldApplyOmit = true;
13152                prev[typeName] = this.convertName(typeName, { useTypesPrefix: this.config.enumPrefix }, true);
13153            }
13154            if (shouldApplyOmit && prev[typeName] !== 'any' && Object(definition["N" /* isObjectType */])(schemaType)) {
13155                const fields = schemaType.getFields();
13156                const relevantFields = this._federation
13157                    .filterFieldNames(Object.keys(fields))
13158                    .map(fieldName => {
13159                    const field = fields[fieldName];
13160                    const baseType = Object(index_esm["e" /* getBaseType */])(field.type);
13161                    const isUnion = Object(definition["T" /* isUnionType */])(baseType);
13162                    if (!this.config.mappers[baseType.name] && !isUnion && !nestedMapping[baseType.name]) {
13163                        return null;
13164                    }
13165                    const addOptionalSign = !this.config.avoidOptionals && !Object(definition["L" /* isNonNullType */])(field.type);
13166                    return {
13167                        addOptionalSign,
13168                        fieldName,
13169                        replaceWithType: wrapTypeWithModifiers(getTypeToUse(baseType.name), field.type, {
13170                            wrapOptional: this.applyMaybe,
13171                            wrapArray: this.wrapWithArray,
13172                        }),
13173                    };
13174                })
13175                    .filter(a => a);
13176                if (relevantFields.length > 0) {
13177                    // Puts ResolverTypeWrapper on top of an entire type
13178                    prev[typeName] = applyWrapper(this.replaceFieldsInType(prev[typeName], relevantFields));
13179                }
13180                else {
13181                    // We still want to use ResolverTypeWrapper, even if we don't touch any fields
13182                    prev[typeName] = applyWrapper(prev[typeName]);
13183                }
13184            }
13185            if (isMapped && hasPlaceholder(prev[typeName])) {
13186                prev[typeName] = replacePlaceholder(prev[typeName], typeName);
13187            }
13188            if (!isMapped && hasDefaultMapper && hasPlaceholder(this.config.defaultMapper.type)) {
13189                // Make sure the inner type has no ResolverTypeWrapper
13190                const name = clearWrapper(isScalar ? this._getScalar(typeName) : prev[typeName]);
13191                const replaced = replacePlaceholder(this.config.defaultMapper.type, name);
13192                // Don't wrap Union with ResolverTypeWrapper, each inner type already has it
13193                if (Object(definition["T" /* isUnionType */])(schemaType)) {
13194                    prev[typeName] = replaced;
13195                }
13196                else {
13197                    prev[typeName] = applyWrapper(replacePlaceholder(this.config.defaultMapper.type, name));
13198                }
13199            }
13200            return prev;
13201        }, {});
13202    }
13203    replaceFieldsInType(typeName, relevantFields) {
13204        this._globalDeclarations.add(OMIT_TYPE);
13205        return `Omit<${typeName}, ${relevantFields.map(f => `'${f.fieldName}'`).join(' | ')}> & { ${relevantFields
13206            .map(f => `${f.fieldName}${f.addOptionalSign ? '?' : ''}: ${f.replaceWithType}`)
13207            .join(', ')} }`;
13208    }
13209    applyMaybe(str) {
13210        const namespacedImportPrefix = this.config.namespacedImportName ? this.config.namespacedImportName + '.' : '';
13211        return `${namespacedImportPrefix}Maybe<${str}>`;
13212    }
13213    applyResolverTypeWrapper(str) {
13214        return `ResolverTypeWrapper<${this.clearResolverTypeWrapper(str)}>`;
13215    }
13216    clearMaybe(str) {
13217        const namespacedImportPrefix = this.config.namespacedImportName ? this.config.namespacedImportName + '.' : '';
13218        if (str.startsWith(`${namespacedImportPrefix}Maybe<`)) {
13219            const maybeRe = new RegExp(`${namespacedImportPrefix.replace('.', '\\.')}Maybe<(.*?)>$`);
13220            return str.replace(maybeRe, '$1');
13221        }
13222        return str;
13223    }
13224    clearResolverTypeWrapper(str) {
13225        if (str.startsWith('ResolverTypeWrapper<')) {
13226            return str.replace(/ResolverTypeWrapper<(.*?)>$/, '$1');
13227        }
13228        return str;
13229    }
13230    wrapWithArray(t) {
13231        if (this.config.immutableTypes) {
13232            return `ReadonlyArray<${t}>`;
13233        }
13234        return `Array<${t}>`;
13235    }
13236    createFieldContextTypeMap() {
13237        return this.config.fieldContextTypes.reduce((prev, fieldContextType) => {
13238            const items = fieldContextType.split('#');
13239            if (items.length === 3) {
13240                const [path, source, contextTypeName] = items;
13241                return { ...prev, [path]: parseMapper(`${source}#${contextTypeName}`) };
13242            }
13243            const [path, contextType] = items;
13244            return { ...prev, [path]: parseMapper(contextType) };
13245        }, {});
13246    }
13247    buildResolversTypes() {
13248        const declarationKind = 'type';
13249        return new DeclarationBlock(this._declarationBlockConfig)
13250            .export()
13251            .asKind(declarationKind)
13252            .withName(this.convertName('ResolversTypes'))
13253            .withComment('Mapping between all available schema types and the resolvers types')
13254            .withBlock(Object.keys(this._resolversTypes)
13255            .map(typeName => visitor_plugin_common_index_esm_indent(`${typeName}: ${this._resolversTypes[typeName]}${this.getPunctuation(declarationKind)}`))
13256            .join('\n')).string;
13257    }
13258    buildResolversParentTypes() {
13259        const declarationKind = 'type';
13260        return new DeclarationBlock(this._declarationBlockConfig)
13261            .export()
13262            .asKind(declarationKind)
13263            .withName(this.convertName('ResolversParentTypes'))
13264            .withComment('Mapping between all available schema types and the resolvers parents')
13265            .withBlock(Object.keys(this._resolversParentTypes)
13266            .map(typeName => visitor_plugin_common_index_esm_indent(`${typeName}: ${this._resolversParentTypes[typeName]}${this.getPunctuation(declarationKind)}`))
13267            .join('\n')).string;
13268    }
13269    get schema() {
13270        return this._schema;
13271    }
13272    get defaultMapperType() {
13273        return this.config.defaultMapper.type;
13274    }
13275    get unusedMappers() {
13276        return Object.keys(this.config.mappers).filter(name => !this._usedMappers[name]);
13277    }
13278    get globalDeclarations() {
13279        return Array.from(this._globalDeclarations);
13280    }
13281    isMapperImported(groupedMappers, identifier, source) {
13282        const exists = !groupedMappers[source] ? false : !!groupedMappers[source].find(m => m.identifier === identifier);
13283        const existsFromEnums = !!Object.keys(this.config.enumValues)
13284            .map(key => this.config.enumValues[key])
13285            .find(o => o.sourceFile === source && o.typeIdentifier === identifier);
13286        return exists || existsFromEnums;
13287    }
13288    get mappersImports() {
13289        const groupedMappers = {};
13290        const addMapper = (source, identifier, asDefault) => {
13291            if (!this.isMapperImported(groupedMappers, identifier, source)) {
13292                if (!groupedMappers[source]) {
13293                    groupedMappers[source] = [];
13294                }
13295                groupedMappers[source].push({ identifier, asDefault });
13296            }
13297        };
13298        Object.keys(this.config.mappers)
13299            .map(gqlTypeName => ({ gqlType: gqlTypeName, mapper: this.config.mappers[gqlTypeName] }))
13300            .filter(({ mapper }) => mapper.isExternal)
13301            .forEach(({ mapper }) => {
13302            const externalMapper = mapper;
13303            const identifier = stripMapperTypeInterpolation(externalMapper.import);
13304            addMapper(externalMapper.source, identifier, externalMapper.default);
13305        });
13306        if (this.config.contextType.isExternal) {
13307            addMapper(this.config.contextType.source, this.config.contextType.import, this.config.contextType.default);
13308        }
13309        if (this.config.rootValueType.isExternal) {
13310            addMapper(this.config.rootValueType.source, this.config.rootValueType.import, this.config.rootValueType.default);
13311        }
13312        if (this.config.defaultMapper && this.config.defaultMapper.isExternal) {
13313            const identifier = stripMapperTypeInterpolation(this.config.defaultMapper.import);
13314            addMapper(this.config.defaultMapper.source, identifier, this.config.defaultMapper.default);
13315        }
13316        Object.values(this._fieldContextTypeMap).forEach(parsedMapper => {
13317            if (parsedMapper.isExternal) {
13318                addMapper(parsedMapper.source, parsedMapper.import, parsedMapper.default);
13319            }
13320        });
13321        return Object.keys(groupedMappers)
13322            .map(source => buildMapperImport(source, groupedMappers[source], this.config.useTypeImports))
13323            .filter(Boolean);
13324    }
13325    setDeclarationBlockConfig(config) {
13326        this._declarationBlockConfig = config;
13327    }
13328    setVariablesTransformer(variablesTransfomer) {
13329        this._variablesTransfomer = variablesTransfomer;
13330    }
13331    hasScalars() {
13332        return this._hasScalars;
13333    }
13334    hasFederation() {
13335        return this._hasFederation;
13336    }
13337    getRootResolver() {
13338        const name = this.convertName(this.config.allResolversTypeName);
13339        const declarationKind = 'type';
13340        const contextType = `<ContextType = ${this.config.contextType.type}>`;
13341        // This is here because we don't want to break IResolvers, so there is a mapping by default,
13342        // and if the developer is overriding typesPrefix, it won't get generated at all.
13343        const deprecatedIResolvers = !this.config.typesPrefix
13344            ? `
13345/**
13346 * @deprecated
13347 * Use "Resolvers" root object instead. If you wish to get "IResolvers", add "typesPrefix: I" to your config.
13348 */
13349export type IResolvers${contextType} = ${name}<ContextType>;`
13350            : '';
13351        return [
13352            new DeclarationBlock(this._declarationBlockConfig)
13353                .export()
13354                .asKind(declarationKind)
13355                .withName(name, contextType)
13356                .withBlock(Object.keys(this._collectedResolvers)
13357                .map(schemaTypeName => {
13358                const resolverType = this._collectedResolvers[schemaTypeName];
13359                return visitor_plugin_common_index_esm_indent(this.formatRootResolver(schemaTypeName, resolverType, declarationKind));
13360            })
13361                .join('\n')).string,
13362            deprecatedIResolvers,
13363        ].join('\n');
13364    }
13365    formatRootResolver(schemaTypeName, resolverType, declarationKind) {
13366        return `${schemaTypeName}${this.config.avoidOptionals ? '' : '?'}: ${resolverType}${this.getPunctuation(declarationKind)}`;
13367    }
13368    getAllDirectiveResolvers() {
13369        if (Object.keys(this._collectedDirectiveResolvers).length) {
13370            const declarationKind = 'type';
13371            const name = this.convertName('DirectiveResolvers');
13372            const contextType = `<ContextType = ${this.config.contextType.type}>`;
13373            // This is here because we don't want to break IResolvers, so there is a mapping by default,
13374            // and if the developer is overriding typesPrefix, it won't get generated at all.
13375            const deprecatedIResolvers = !this.config.typesPrefix
13376                ? `
13377/**
13378 * @deprecated
13379 * Use "DirectiveResolvers" root object instead. If you wish to get "IDirectiveResolvers", add "typesPrefix: I" to your config.
13380 */
13381export type IDirectiveResolvers${contextType} = ${name}<ContextType>;`
13382                : '';
13383            return [
13384                new DeclarationBlock(this._declarationBlockConfig)
13385                    .export()
13386                    .asKind(declarationKind)
13387                    .withName(name, contextType)
13388                    .withBlock(Object.keys(this._collectedDirectiveResolvers)
13389                    .map(schemaTypeName => {
13390                    const resolverType = this._collectedDirectiveResolvers[schemaTypeName];
13391                    return visitor_plugin_common_index_esm_indent(this.formatRootResolver(schemaTypeName, resolverType, declarationKind));
13392                })
13393                    .join('\n')).string,
13394                deprecatedIResolvers,
13395            ].join('\n');
13396        }
13397        return '';
13398    }
13399    Name(node) {
13400        return node.value;
13401    }
13402    ListType(node) {
13403        const asString = node.type;
13404        return this.wrapWithArray(asString);
13405    }
13406    _getScalar(name) {
13407        return `${this.config.namespacedImportName ? this.config.namespacedImportName + '.' : ''}Scalars['${name}']`;
13408    }
13409    NamedType(node) {
13410        const nameStr = node.name;
13411        if (this.config.scalars[nameStr]) {
13412            return this._getScalar(nameStr);
13413        }
13414        return this.convertName(node, null, true);
13415    }
13416    NonNullType(node) {
13417        const asString = node.type;
13418        return asString;
13419    }
13420    markMapperAsUsed(name) {
13421        this._usedMappers[name] = true;
13422    }
13423    getTypeToUse(name) {
13424        const resolversType = this.convertName('ResolversTypes');
13425        return `${resolversType}['${name}']`;
13426    }
13427    getParentTypeToUse(name) {
13428        const resolversType = this.convertName('ResolversParentTypes');
13429        return `${resolversType}['${name}']`;
13430    }
13431    getParentTypeForSignature(_node) {
13432        return 'ParentType';
13433    }
13434    transformParentGenericType(parentType) {
13435        return `ParentType extends ${parentType} = ${parentType}`;
13436    }
13437    FieldDefinition(node, key, parent) {
13438        const hasArguments = node.arguments && node.arguments.length > 0;
13439        const declarationKind = 'type';
13440        return (parentName) => {
13441            const original = parent[key];
13442            const baseType = getBaseTypeNode(original.type);
13443            const realType = baseType.name.value;
13444            const parentType = this.schema.getType(parentName);
13445            if (this._federation.skipField({ fieldNode: original, parentType: parentType })) {
13446                return null;
13447            }
13448            const typeToUse = this.getTypeToUse(realType);
13449            const mappedType = this._variablesTransfomer.wrapAstTypeWithModifiers(typeToUse, original.type);
13450            const subscriptionType = this._schema.getSubscriptionType();
13451            const isSubscriptionType = subscriptionType && subscriptionType.n
13451ame === parentName;
13452            let argsType = hasArguments
13453                ? this.convertName(parentName +
13454                    (this.config.addUnderscoreToArgsType ? '_' : '') +
13455                    this.convertName(node.name, {
13456                        useTypesPrefix: false,
13457                        useTypesSuffix: false,
13458                    }) +
13459                    'Args', {
13460                    useTypesPrefix: true,
13461                }, true)
13462                : null;
13463            if (argsType !== null) {
13464                const argsToForceRequire = original.arguments.filter(arg => !!arg.defaultValue || arg.type.kind === 'NonNullType');
13465                if (argsToForceRequire.length > 0) {
13466                    argsType = this.applyRequireFields(argsType, argsToForceRequire);
13467                }
13468                else if (original.arguments.length > 0) {
13469                    argsType = this.applyOptionalFields(argsType, original.arguments);
13470                }
13471            }
13472            const parentTypeSignature = this._federation.transformParentType({
13473                fieldNode: original,
13474                parentType,
13475                parentTypeSignature: this.getParentTypeForSignature(node),
13476            });
13477            const mappedTypeKey = isSubscriptionType ? `${mappedType}, "${node.name}"` : mappedType;
13478            const signature = {
13479                name: node.name,
13480                modifier: this.config.avoidOptionals ? '' : '?',
13481                type: isSubscriptionType ? 'SubscriptionResolver' : 'Resolver',
13482                genericTypes: [
13483                    mappedTypeKey,
13484                    parentTypeSignature,
13485                    this._fieldContextTypeMap[`${parentName}.${node.name}`]
13486                        ? this._fieldContextTypeMap[`${parentName}.${node.name}`].type
13487                        : 'ContextType',
13488                    argsType,
13489                ].filter(f => f),
13490            };
13491            if (this._federation.isResolveReferenceField(node)) {
13492                this._hasFederation = true;
13493                signature.type = 'ReferenceResolver';
13494                if (signature.genericTypes.length >= 3) {
13495                    signature.genericTypes = signature.genericTypes.slice(0, 3);
13496                }
13497            }
13498            return visitor_plugin_common_index_esm_indent(`${signature.name}${signature.modifier}: ${signature.type}<${signature.genericTypes.join(', ')}>${this.getPunctuation(declarationKind)}`);
13499        };
13500    }
13501    applyRequireFields(argsType, fields) {
13502        this._globalDeclarations.add(REQUIRE_FIELDS_TYPE);
13503        return `RequireFields<${argsType}, ${fields.map(f => `'${f.name.value}'`).join(' | ')}>`;
13504    }
13505    applyOptionalFields(argsType, _fields) {
13506        this._globalDeclarations.add(REQUIRE_FIELDS_TYPE);
13507        return `RequireFields<${argsType}, never>`;
13508    }
13509    ObjectTypeDefinition(node) {
13510        var _a, _b, _c;
13511        const declarationKind = 'type';
13512        const name = this.convertName(node, {
13513            suffix: this.config.resolverTypeSuffix,
13514        });
13515        const typeName = node.name;
13516        const parentType = this.getParentTypeToUse(typeName);
13517        const isRootType = [
13518            (_a = this.schema.getQueryType()) === null || _a === void 0 ? void 0 : _a.name,
13519            (_b = this.schema.getMutationType()) === null || _b === void 0 ? void 0 : _b.name,
13520            (_c = this.schema.getSubscriptionType()) === null || _c === void 0 ? void 0 : _c.name,
13521        ].includes(typeName);
13522        const fieldsContent = node.fields.map((f) => f(node.name));
13523        if (!isRootType) {
13524            fieldsContent.push(visitor_plugin_common_index_esm_indent(`${this.config.internalResolversPrefix}isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>${this.getPunctuation(declarationKind)}`));
13525        }
13526        const block = new DeclarationBlock(this._declarationBlockConfig)
13527            .export()
13528            .asKind(declarationKind)
13529            .withName(name, `<ContextType = ${this.config.contextType.type}, ${this.transformParentGenericType(parentType)}>`)
13530            .withBlock(fieldsContent.join('\n'));
13531        this._collectedResolvers[node.name] = name + '<ContextType>';
13532        return block.string;
13533    }
13534    UnionTypeDefinition(node, key, parent) {
13535        const declarationKind = 'type';
13536        const name = this.convertName(node, {
13537            suffix: this.config.resolverTypeSuffix,
13538        });
13539        const originalNode = parent[key];
13540        const possibleTypes = originalNode.types
13541            .map(node =>
13541 node.name.value)
13542            .map(f => `'${f}'`)
13543            .join(' | ');
13544        this._collectedResolvers[node.name] = name + '<ContextType>';
13545        const parentType = this.getParentTypeToUse(node.name);
13546        return new DeclarationBlock(this._declarationBlockConfig)
13547            .export()
13548            .asKind(declarationKind)
13549            .withName(name, `<ContextType = ${this.config.contextType.type}, ${this.transformParentGenericType(parentType)}>`)
13550            .withBlock(visitor_plugin_common_index_esm_indent(`${this.config.internalResolversPrefix}resolveType${this.config.optionalResolveType ? '?' : ''}: TypeResolveFn<${possibleTypes}, ParentType, ContextType>${this.getPunctuation(declarationKind)}`)).string;
13551    }
13552    ScalarTypeDefinition(node) {
13553        const nameAsString = node.name;
13554        const baseName = this.getTypeToUse(nameAsString);
13555        if (this._federation.skipScalar(nameAsString)) {
13556            return null;
13557        }
13558        this._hasScalars = true;
13559        this._collectedResolvers[node.name] = 'GraphQLScalarType';
13560        return new DeclarationBlock({
13561            ...this._declarationBlockConfig,
13562            blockTransformer(block) {
13563                return block;
13564            },
13565        })
13566            .export()
13567            .asKind('interface')
13568            .withName(this.convertName(node, {
13569            suffix: 'ScalarConfig',
13570        }), ` extends GraphQLScalarTypeConfig<${baseName}, any>`)
13571            .withBlock(visitor_plugin_common_index_esm_indent(`name: '${node.name}'${this.getPunctuation('interface')}`)).string;
13572    }
13573    DirectiveDefinition(node, key, parent) {
13574        if (this._federation.skipDirective(node.name)) {
13575            return null;
13576        }
13577        const directiveName = this.convertName(node, {
13578            suffix: 'DirectiveResolver',
13579        });
13580        const sourceNode = parent[key];
13581        const hasArguments = sourceNode.arguments && sourceNode.arguments.length > 0;
13582        this._collectedDirectiveResolvers[node.name] = directiveName + '<any, any, ContextType>';
13583        const directiveArgsTypeName = this.convertName(node, {
13584            suffix: 'DirectiveArgs',
13585        });
13586        return [
13587            new DeclarationBlock({
13588                ...this._declarationBlockConfig,
13589                blockTransformer(block) {
13590                    return block;
13591                },
13592            })
13593                .export()
13594                .asKind('type')
13595                .withName(directiveArgsTypeName)
13596                .withContent(`{ ${hasArguments ? this._variablesTransfomer.transform(sourceNode.arguments) : ''} }`).string,
13597            new DeclarationBlock({
13598                ...this._declarationBlockConfig,
13599                blockTransformer(block) {
13600                    return block;
13601                },
13602            })
13603                .export()
13604                .asKind('type')
13605                .withName(directiveName, `<Result, Parent, ContextType = ${this.config.contextType.type}, Args = ${directiveArgsTypeName}>`)
13606                .withContent(`DirectiveResolverFn<Result, Parent, ContextType, Args>`).string,
13607        ].join('\n');
13608    }
13609    buildEnumResolverContentBlock(_node, _mappedEnumType) {
13610        throw new Error(`buildEnumResolverContentBlock is not implemented!`);
13611    }
13612    buildEnumResolversExplicitMappedValues(_node, _valuesMapping) {
13613        throw new Error(`buildEnumResolversExplicitMappedValues is not implemented!`);
13614    }
13615    EnumTypeDefinition(node) {
13616        const rawTypeName = node.name;
13617        // If we have enumValues set, and it's point to an external enum - we need to allow internal values resolvers
13618        // In case we have enumValues set but as explicit values, no need to to do mapping since it's already
13619        // have type validation (the original enum has been modified by base types plugin).
13620        // If we have mapper for that type - we can skip
13621        if (!this.config.mappers[rawTypeName] && !this.config.enumValues[rawTypeName]) {
13622            return null;
13623        }
13624        const name = this.convertName(node, { suffix: this.config.resolverTypeSuffix });
13625        this._collectedResolvers[rawTypeName] = name;
13626        const hasExplicitValues = this.config.enumValues[rawTypeName] && this.config.enumValues[rawTypeName].mappedValues;
13627        return new DeclarationBlock(this._declarationBlockConfig)
13628            .export()
13629            .asKind('type')
13630            .withName(name)
13631            .withContent(hasExplicitValues
13632            ? this.buildEnumResolversExplicitMappedValues(node, this.config.enumValues[rawTypeName].mappedValues)
13633            : this.buildEnumResolverContentBlock(node, this.getTypeToUse(rawTypeName))).string;
13634    }
13635    InterfaceTypeDefinition(node) {
13636        const name = this.convertName(node, {
13637            suffix: this.config.resolverTypeSuffix,
13638        });
13639        const declarationKind = 'type';
13640        const allTypesMap = this._schema.getTypeMap();
13641        const implementingTypes = [];
13642        this._collectedResolvers[node.name] = name + '<ContextType>';
13643        for (const graphqlType of Object.values(allTypesMap)) {
13644            if (graphqlType instanceof definition["f" /* GraphQLObjectType */]) {
13645                const allInterfaces = graphqlType.getInterfaces();
13646                if (allInterfaces.find(int => int.name === node.name)) {
13647                    implementingTypes.push(graphqlType.name);
13648                }
13649            }
13650        }
13651        const parentType = this.getParentTypeToUse(node.name);
13652        const possibleTypes = implementingTypes.map(name => `'${name}'`).join(' | ') || 'null';
13653        const fields = this.config.onlyResolveTypeForInterfaces ? [] : node.fields || [];
13654        return new DeclarationBlock(this._declarationBlockConfig)
13655            .export()
13656            .asKind(declarationKind)
13657            .withName(name, `<ContextType = ${this.config.contextType.type}, ${this.transformParentGenericType(parentType)}>`)
13658            .withBlock([
13659            visitor_plugin_common_index_esm_indent(`${this.config.internalResolversPrefix}resolveType${this.config.optionalResolveType ? '?' : ''}: TypeResolveFn<${possibleTypes}, ParentType, ContextType>${this.getPunctuation(declarationKind)}`),
13660            ...fields.map((f) => f(node.name)),
13661        ].join('\n')).string;
13662    }
13663    SchemaDefinition() {
13664        return null;
13665    }
13666}
13667function replacePlaceholder(pattern, typename) {
13668    return pattern.replace('{T}', typename);
13669}
13670function hasPlaceholder(pattern) {
13671    return pattern.includes('{T}');
13672}
13673
13674src_default.a.enableExperimentalFragmentVariables();
13675var DocumentMode;
13676(function (DocumentMode) {
13677    DocumentMode["graphQLTag"] = "graphQLTag";
13678    DocumentMode["documentNode"] = "documentNode";
13679    DocumentMode["documentNodeImportFragments"] = "documentNodeImportFragments";
13680    DocumentMode["external"] = "external";
13681    DocumentMode["string"] = "string";
13682})(DocumentMode || (DocumentMode = {}));
13683const EXTENSIONS_TO_REMOVE = ['.ts', '.tsx', '.js', '.jsx'];
13684class index_esm_ClientSideBaseVisitor extends index_esm_BaseVisitor {
13685    constructor(_schema, _fragments, rawConfig, additionalConfig, documents) {
13686        super(rawConfig, {
13687            scalars: buildScalarsFromConfig(_schema, rawConfig),
13688            dedupeOperationSuffix: getConfigValue(rawConfig.dedupeOperationSuffix, false),
13689            optimizeDocumentNode: getConfigValue(rawConfig.optimizeDocumentNode, true),
13690            omitOperationSuffix: getConfigValue(rawConfig.omitOperationSuffix, false),
13691            gqlImport: rawConfig.gqlImport || null,
13692            documentNodeImport: rawConfig.documentNodeImport || null,
13693            noExport: !!rawConfig.noExport,
13694            importOperationTypesFrom: getConfigValue(rawConfig.importOperationTypesFrom, null),
13695            operationResultSuffix: getConfigValue(rawConfig.operationResultSuffix, ''),
13696            documentVariablePrefix: getConfigValue(rawConfig.documentVariablePrefix, ''),
13697            documentVariableSuffix: getConfigValue(rawConfig.documentVariableSuffix, 'Document'),
13698            fragmentVariablePrefix: getConfigValue(rawConfig.fragmentVariablePrefix, ''),
13699            fragmentVariableSuffix: getConfigValue(rawConfig.fragmentVariableSuffix, 'FragmentDoc'),
13700            documentMode: ((rawConfig) => {
13701                if (typeof rawConfig.noGraphQLTag === 'boolean') {
13702                    return rawConfig.noGraphQLTag ? DocumentMode.documentNode : DocumentMode.graphQLTag;
13703                }
13704                return getConfigValue(rawConfig.documentMode, DocumentMode.graphQLTag);
13705            })(rawConfig),
13706            importDocumentNodeExternallyFrom: getConfigValue(rawConfig.importDocumentNodeExternallyFrom, ''),
13707            pureMagicComment: getConfigValue(rawConfig.pureMagicComment, false),
13708            experimentalFragmentVariables: getConfigValue(rawConfig.experimentalFragmentVariables, false),
13709            ...additionalConfig,
13710        });
13711        this._schema = _schema;
13712        this._fragments = _fragments;
13713        this._collectedOperations = [];
13714        this._documents = [];
13715        this._additionalImports = [];
13716        this._imports = new Set();
13717        this._documents = documents;
13718        auto_bind_default()(this);
13719    }
13720    _extractFragments(document, withNested = false) {
13721        if (!document) {
13722            return [];
13723        }
13724        const names = new Set();
13725        Object(language_visitor["c" /* visit */])(document, {
13726            enter: {
13727                FragmentSpread: (node) => {
13728                    names.add(node.name.value);
13729                    if (withNested) {
13730                        const foundFragment = this._fragments.find(f => f.name === node.name.value);
13731                        if (foundFragment) {
13732                            const childItems = this._extractFragments(foundFragment.node, true);
13733                            if (childItems && childItems.length > 0) {
13734                                for (const item of childItems) {
13735                                    names.add(item);
13736                                }
13737                            }
13738                        }
13739                    }
13740                },
13741            },
13742        });
13743        return Array.from(names);
13744    }
13745    _transformFragments(document) {
13746        const includeNestedFragments = this.config.documentMode === DocumentMode.documentNode ||
13747            (this.config.dedupeFragments && document.kind === 'OperationDefinition');
13748        return this._extractFragments(document, includeNestedFragments).map(document => this.getFragmentVariableName(document));
13749    }
13750    _includeFragments(fragments) {
13751        if (fragments && fragments.length > 0) {
13752            if (this.config.documentMode === DocumentMode.documentNode) {
13753                return this._fragments
13754                    .filter(f => fragments.includes(this.getFragmentVariableName(f.name)))
13755                    .map(fragment => Object(printer["a" /* print */])(fragment.node))
13756                    .join('\n');
13757            }
13758            else if (this.config.documentMode === DocumentMode.documentNodeImportFragments) {
13759                return '';
13760            }
13761            else {
13762                return `${fragments.map(name => '${' + name + '}').join('\n')}`;
13763            }
13764        }
13765        return '';
13766    }
13767    _prepareDocument(documentStr) {
13768        return documentStr;
13769    }
13770    _gql(node) {
13771        const fragments = this._transformFragments(node);
13772        const doc = this._prepareDocument(`
13773    ${Object(printer["a" /* print */])(node).split('\\').join('\\\\') /* Re-escape escaped values in GraphQL syntax */}
13774    ${this._includeFragments(fragments)}`);
13775        if (this.config.documentMode === DocumentMode.documentNode) {
13776            let gqlObj = src_default()([doc]);
13777            if (this.config.optimizeDocumentNode) {
13778                gqlObj = optimizeDocumentNode(gqlObj);
13779            }
13780            return JSON.stringify(gqlObj);
13781        }
13782        else if (this.config.documentMode === DocumentMode.documentNodeImportFragments) {
13783            let gqlObj = src_default()([doc]);
13784            if (this.config.optimizeDocumentNode) {
13785                gqlObj = optimizeDocumentNode(gqlObj);
13786            }
13787            if (fragments.length > 0 && (!this.config.dedupeFragments || node.kind === 'OperationDefinition')) {
13788                const definitions = [
13789                    ...gqlObj.definitions.map(t => JSON.stringify(t)),
13790                    ...fragments.map(name => `...${name}.definitions`),
13791                ].join();
13792                return `{"kind":"${language_kinds["a" /* Kind */].DOCUMENT}","definitions":[${definitions}]}`;
13793            }
13794            return JSON.stringify(gqlObj);
13795        }
13796        else if (this.config.documentMode === DocumentMode.string) {
13797            return '`' + doc + '`';
13798        }
13799        const gqlImport = this._parseImport(this.config.gqlImport || 'graphql-tag');
13800        return (gqlImport.propName || 'gql') + '`' + doc + '`';
13801    }
13802    _generateFragment(fragmentDocument) {
13803        const name = this.getFragmentVariableName(fragmentDocument);
13804        const fragmentTypeSuffix = this.getFragmentSuffix(fragmentDocument);
13805        return `export const ${name} =${this.config.pureMagicComment ? ' /*#__PURE__*/' : ''} ${this._gql(fragmentDocument)}${this.getDocumentNodeSignature(this.convertName(fragmentDocument.name.value, {
13806            useTypesPrefix: true,
13807            suffix: fragmentTypeSuffix,
13808        }), this.config.experimentalFragmentVariables
13809            ? this.convertName(fragmentDocument.name.value, {
13810                suffix: fragmentTypeSuffix + 'Variables',
13811            })
13812            : 'unknown', fragmentDocument)};`;
13813    }
13814    get fragmentsGraph() {
13815        const graph = new dep_graph["DepGraph"]({ circular: true });
13816        for (const fragment of this._fragments) {
13817            if (graph.hasNode(fragment.name)) {
13818                const cachedAsString = Object(printer["a" /* print */])(graph.getNodeData(fragment.name).node);
13819                const asString = Object(printer["a" /* print */])(fragment.node);
13820                if (cachedAsString !== asString) {
13821                    throw new Error(`Duplicated fragment called '${fragment.name}'!`);
13822                }
13823            }
13824            graph.addNode(fragment.name, fragment);
13825        }
13826        this._fragments.forEach(fragment => {
13827            const depends = this._extractFragments(fragment.node);
13828            if (depends && depends.length > 0) {
13829                depends.forEach(name => {
13830                    graph.addDependency(fragment.name, name);
13831                });
13832            }
13833        });
13834        return graph;
13835    }
13836    get fragments() {
13837        if (this._fragments.length === 0 || this.config.documentMode === DocumentMode.external) {
13838            return '';
13839        }
13840        const graph = this.fragmentsGraph;
13841        const orderedDeps = graph.overallOrder();
13842        const localFragments = orderedDeps
13843            .filter(name => !graph.getNodeData(name).isExternal)
13844            .map(name => this._generateFragment(graph.getNodeData(name).node));
13845        return localFragments.join('\n');
13846    }
13847    _parseImport(importStr) {
13848        // This is a special case when we want to ignore importing, and just use `gql` provided from somewhere else
13849        // Plugins that uses that will need to ensure to add import/declaration for the gql identifier
13850        if (importStr === 'gql') {
13851            return {
13852                moduleName: null,
13853                propName: 'gql',
13854            };
13855        }
13856        // This is a special use case, when we don't want this plugin to manage the import statement
13857        // of the gql tag. In this case, we provide something like `Namespace.gql` and it will be used instead.
13858        if (importStr.includes('.gql')) {
13859            return {
13860                moduleName: null,
13861                propName: importStr,
13862            };
13863        }
13864        const [moduleName, propName] = importStr.split('#');
13865        return {
13866            moduleName,
13867            propName,
13868        };
13869    }
13870    _generateImport({ moduleName, propName }, varName, isTypeImport) {
13871        const typeImport = isTypeImport && this.config.useTypeImports ? 'import type' : 'import';
13872        const propAlias = propName === varName ? '' : ` as ${varName}`;
13873        if (moduleName) {
13874            return `${typeImport} ${propName ? `{ ${propName}${propAlias} }` : varName} from '${moduleName}';`;
13875        }
13876        return null;
13877    }
13878    clearExtension(path) {
13879        const extension = Object(path_browserify["extname"])(path);
13880        if (EXTENSIONS_TO_REMOVE.includes(extension)) {
13881            return path.replace(/\.[^/.]+$/, '');
13882        }
13883        return path;
13884    }
13885    getImports(options = {}) {
13886        (this._additionalImports || []).forEach(i => this._imports.add(i));
13887        switch (this.config.documentMode) {
13888            case DocumentMode.documentNode:
13889            case DocumentMode.documentNodeImportFragments: {
13890                const documentNodeImport = this._parseImport(this.config.documentNodeImport || 'graphql#DocumentNode');
13891                const tagImport = this._generateImport(documentNodeImport, 'DocumentNode', true);
13892                if (tagImport) {
13893                    this._imports.add(tagImport);
13894                }
13895                break;
13896            }
13897            case DocumentMode.graphQLTag: {
13898                const gqlImport = this._parseImport(this.config.gqlImport || 'graphql-tag');
13899                const tagImport = this._generateImport(gqlImport, 'gql', false);
13900                if (tagImport) {
13901                    this._imports.add(tagImport);
13902                }
13903                break;
13904            }
13905            case DocumentMode.external: {
13906                if (this._collectedOperations.length > 0) {
13907                    if (this.config.importDocumentNodeExternallyFrom === 'near-operation-file' && this._documents.length === 1) {
13908                        this._imports.add(`import * as Operations from './${this.clearExtension(Object(path_browserify["basename"])(this._documents[0].location))}';`);
13909                    }
13910                    else {
13911                        if (!this.config.importDocumentNodeExternallyFrom) {
13912                            // eslint-disable-next-line no-console
13913                            console.warn('importDocumentNodeExternallyFrom must be provided if documentMode=external');
13914                        }
13915                        this._imports.add(`import * as Operations from '${this.clearExtension(this.config.importDocumentNodeExternallyFrom)}';`);
13916                    }
13917                }
13918                break;
13919            }
13920        }
13921        if (!options.excludeFragments && !this.config.globalNamespace) {
13922            const { documentMode, fragmentImports } = this.config;
13923            if (documentMode === DocumentMode.graphQLTag ||
13924                documentMode === DocumentMode.string ||
13925                documentMode === DocumentMode.documentNodeImportFragments) {
13926                fragmentImports.forEach(fragmentImport => {
13927                    this._imports.add(generateFragmentImportStatement(fragmentImport, 'document'));
13928                });
13929            }
13930        }
13931        return Array.from(this._imports);
13932    }
13933    buildOperation(_node, _documentVariableName, _operationType, _operationResultType, _operationVariablesTypes, _hasRequiredVariables) {
13934        return null;
13935    }
13936    getDocumentNodeSignature(_resultType, _variablesTypes, _node) {
13937        if (this.config.documentMode === DocumentMode.documentNode ||
13938            this.config.documentMode === DocumentMode.documentNodeImportFragments) {
13939            return ` as unknown as DocumentNode`;
13940        }
13941        return '';
13942    }
13943    /**
13944     * Checks if the specific operation has variables that are non-null (required), and also doesn't have default.
13945     * This is useful for deciding of `variables` should be optional or not.
13946     * @param node
13947     */
13948    checkVariablesRequirements(node) {
13949        const variables = node.variableDefinitions || [];
13950        if (variables.length === 0) {
13951            return false;
13952        }
13953        return variables.some(variableDef => variableDef.type.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE && !variableDef.defaultValue);
13954    }
13955    OperationDefinition(node) {
13956        this._collectedOperations.push(node);
13957        const documentVariableName = this.convertName(node, {
13958            suffix: this.config.documentVariableSuffix,
13959            prefix: this.config.documentVariablePrefix,
13960            useTypesPrefix: false,
13961        });
13962        const operationType = Object(dist["pascalCase"])(node.operation);
13963        const operationTypeSuffix = this.getOperationSuffix(node, operationType);
13964        const operationResultType = this.convertName(node, {
13965            suffix: operationTypeSuffix + this._parsedConfig.operationResultSuffix,
13966        });
13967        const operationVariablesTypes = this.convertName(node, {
13968            suffix: operationTypeSuffix + 'Variables',
13969        });
13970        let documentString = '';
13971        if (this.config.documentMode !== DocumentMode.external) {
13972            // only generate exports for named queries
13973            if (documentVariableName !== '') {
13974                documentString = `${this.config.noExport ? '' : 'export'} const ${documentVariableName} =${this.config.pureMagicComment ? ' /*#__PURE__*/' : ''} ${this._gql(node)}${this.getDocumentNodeSignature(operationResultType, operationVariablesTypes, node)};`;
13975            }
13976        }
13977        const hasRequiredVariables = this.checkVariablesRequirements(node);
13978        const additional = this.buildOperation(node, documentVariableName, operationType, operationResultType, operationVariablesTypes, hasRequiredVariables);
13979        return [documentString, additional].filter(a => a).join('\n');
13980    }
13981}
13982
13983function isMetadataFieldName(name) {
13984    return ['__schema', '__type'].includes(name);
13985}
13986const metadataFieldMap = {
13987    __schema: type_introspection["a" /* SchemaMetaFieldDef */],
13988    __type: type_introspection["c" /* TypeMetaFieldDef */],
13989};
13990class index_esm_SelectionSetToObject {
13991    constructor(_processor, _scalars, _schema, _convertName, _getFragmentSuffix, _loadedFragments, _config, _parentSchemaType, _selectionSet) {
13992        this._processor = _processor;
13993        this._scalars = _scalars;
13994        this._schema = _schema;
13995        this._convertName = _convertName;
13996        this._getFragmentSuffix = _getFragmentSuffix;
13997        this._loadedFragments = _loadedFragments;
13998        this._config = _config;
13999        this._parentSchemaType = _parentSchemaType;
14000        this._selectionSet = _selectionSet;
14001        this._primitiveFields = [];
14002        this._primitiveAliasedFields = [];
14003        this._linksFields = [];
14004        this._queriedForTypename = false;
14005        auto_bind_default()(this);
14006    }
14007    createNext(parentSchemaType, selectionSet) {
14008        return new index_esm_SelectionSetToObject(this._processor, this._scalars, this._schema, this._convertName.bind(this), this._getFragmentSuffix.bind(this), this._loadedFragments, this._config, parentSchemaType, selectionSet);
14009    }
14010    /**
14011     * traverse the inline fragment nodes recursively for colleting the selectionSets on each type
14012     */
14013    _collectInlineFragments(parentType, nodes, types) {
14014        if (Object(definition["J" /* isListType */])(parentType) || Object(definition["L" /* isNonNullType */])(parentType)) {
14015            return this._collectInlineFragments(parentType.ofType, nodes, types);
14016        }
14017        else if (Object(definition["N" /* isObjectType */])(parentType)) {
14018            for (const node of nodes) {
14019                const typeOnSchema = node.typeCondition ? this._schema.getType(node.typeCondition.name.value) : parentType;
14020                const { fields, inlines, spreads } = separateSelectionSet(node.selectionSet.selections);
14021                const spreadsUsage = this.buildFragmentSpreadsUsage(spreads);
14022                if (Object(definition["N" /* isObjectType */])(typeOnSchema)) {
14023                    this._appendToTypeMap(types, typeOnSchema.name, fields);
14024                    this._appendToTypeMap(types, typeOnSchema.name, spreadsUsage[typeOnSchema.name]);
14025                    this._collectInlineFragments(typeOnSchema, inlines, types);
14026                }
14027                else if (Object(definition["H" /* isInterfaceType */])(typeOnSchema) && parentType.getInterfaces().includes(typeOnSchema)) {
14028                    this._appendToTypeMap(types, parentType.name, fields);
14029                    this._appendToTypeMap(types, parentType.name, spreadsUsage[parentType.name]);
14030                    this._collectInlineFragments(typeOnSchema, inlines, types);
14031                }
14032            }
14033        }
14034        else if (Object(definition["H" /* isInterfaceType */])(parentType)) {
14035            const possibleTypes = getPossibleTypes(this._schema, parentType);
14036            for (const node of nodes) {
14037                const schemaType = node.typeCondition ? this._schema.getType(node.typeCondition.name.value) : parentType;
14038                const { fields, inlines, spreads } = separateSelectionSet(node.selectionSet.selections);
14039                const spreadsUsage = this.buildFragmentSpreadsUsage(spreads);
14040                if (Object(definition["N" /* isObjectType */])(schemaType) && possibleTypes.find(possibleType =>
14040 possibleType.name === schemaType.name)) {
14041                    this._appendToTypeMap(types, schemaType.name, fields);
14042                    this._appendToTypeMap(types, schemaType.name, spreadsUsage[schemaType.name]);
14043                    this._collectInlineFragments(schemaType, inlines, types);
14044                }
14045                else if (Object(definition["H" /* isInterfaceType */])(schemaType) && schemaType.name === parentType.name) {
14046                    for (const possibleType of possibleTypes) {
14047                        this._appendToTypeMap(types, possibleType.name, fields);
14048                        this._appendToTypeMap(types, possibleType.name, spreadsUsage[possibleType.name]);
14049                        this._collectInlineFragments(schemaType, inlines, types);
14050                    }
14051                }
14052                else {
14053                    // it must be an interface type that is spread on an interface field
14054                    for (const possibleType of possibleTypes) {
14055                        if (!node.typeCondition) {
14056                            throw new Error('Invalid state. Expected type condition for interface spread on a interface field.');
14057                        }
14058                        const fragmentSpreadType = this._schema.getType(node.typeCondition.name.value);
14059                        // the field should only be added to the valid selections
14060                        // in case the possible type actually implements the given interface
14061                        if (Object(typeComparators["c" /* isTypeSubTypeOf */])(this._schema, possibleType, fragmentSpreadType)) {
14062                            this._appendToTypeMap(types, possibleType.name, fields);
14063                            this._appendToTypeMap(types, possibleType.name, spreadsUsage[possibleType.name]);
14064                        }
14065                    }
14066                }
14067            }
14068        }
14069        else if (Object(definition["T" /* isUnionType */])(parentType)) {
14070            const possibleTypes = parentType.getTypes();
14071            for (const node of nodes) {
14072                const schemaType = node.typeCondition ? this._schema.getType(node.typeCondition.name.value) : parentType;
14073                const { fields, inlines, spreads } = separateSelectionSet(node.selectionSet.selections);
14074                const spreadsUsage = this.buildFragmentSpreadsUsage(spreads);
14075                if (Object(definition["N" /* isObjectType */])(schemaType) && possibleTypes.find(possibleType => possibleType.name === schemaType.name)) {
14076                    this._appendToTypeMap(types, schemaType.name, fields);
14077                    this._appendToTypeMap(types, schemaType.name, spreadsUsage[schemaType.name]);
14078                    this._collectInlineFragments(schemaType, inlines, types);
14079                }
14080                else if (Object(definition["H" /* isInterfaceType */])(schemaType)) {
14081                    const possibleInterfaceTypes = getPossibleTypes(this._schema, schemaType);
14082                    for (const possibleType of possibleTypes) {
14083                        if (possibleInterfaceTypes.find(possibleInterfaceType => possibleInterfaceType.name === possibleType.name)) {
14084                            this._appendToTypeMap(types, possibleType.name, fields);
14085                            this._appendToTypeMap(types, possibleType.name, spreadsUsage[possibleType.name]);
14086                            this._collectInlineFragments(schemaType, inlines, types);
14087                        }
14088                    }
14089                }
14090                else {
14091                    for (const possibleType of possibleTypes) {
14092                        this._appendToTypeMap(types, possibleType.name, fields);
14093                        this._appendToTypeMap(types, possibleType.name, spreadsUsage[possibleType.name]);
14094                    }
14095                }
14096            }
14097        }
14098    }
14099    _createInlineFragmentForFieldNodes(parentType, fieldNodes) {
14100        return {
14101            kind: language_kinds["a" /* Kind */].INLINE_FRAGMENT,
14102            typeCondition: {
14103                kind: language_kinds["a" /* Kind */].NAMED_TYPE,
14104                name: {
14105                    kind: language_kinds["a" /* Kind */].NAME,
14106                    value: parentType.name,
14107                },
14108            },
14109            directives: [],
14110            selectionSet: {
14111                kind: language_kinds["a" /* Kind */].SELECTION_SET,
14112                selections: fieldNodes,
14113            },
14114        };
14115    }
14116    buildFragmentSpreadsUsage(spreads) {
14117        const selectionNodesByTypeName = {};
14118        for (const spread of spreads) {
14119            const fragmentSpreadObject = this._loadedFragments.find(lf => lf.name === spread.name.value);
14120            if (fragmentSpreadObject) {
14121                const schemaType = this._schema.getType(fragmentSpreadObject.onType);
14122                const possibleTypesForFragment = getPossibleTypes(this._schema, schemaType);
14123                for (const possibleType of possibleTypesForFragment) {
14124                    const fragmentSuffix = this._getFragmentSuffix(spread.name.value);
14125                    const usage = this.buildFragmentTypeName(spread.name.value, fragmentSuffix, possibleTypesForFragment.length === 1 ? null : possibleType.name);
14126                    if (!selectionNodesByTypeName[possibleType.name]) {
14127                        selectionNodesByTypeName[possibleType.name] = [];
14128                    }
14129                    selectionNodesByTypeName[possibleType.name].push(usage);
14130                }
14131            }
14132        }
14133        return selectionNodesByTypeName;
14134    }
14135    flattenSelectionSet(selections) {
14136        const selectionNodesByTypeName = new Map();
14137        const inlineFragmentSelections = [];
14138        const fieldNodes = [];
14139        const fragmentSpreads = [];
14140        for (const selection of selections) {
14141            switch (selection.kind) {
14142                case language_kinds["a" /* Kind */].FIELD:
14143                    fieldNodes.push(selection);
14144                    break;
14145                case language_kinds["a" /* Kind */].INLINE_FRAGMENT:
14146                    inlineFragmentSelections.push(selection);
14147                    break;
14148                case language_kinds["a" /* Kind */].FRAGMENT_SPREAD:
14149                    fragmentSpreads.push(selection);
14150                    break;
14151            }
14152        }
14153        if (fieldNodes.length) {
14154            inlineFragmentSelections.push(this._createInlineFragmentForFieldNodes(this._parentSchemaType, fieldNodes
14154));
14155        }
14156        this._collectInlineFragments(this._parentSchemaType, inlineFragmentSelections, selectionNodesByTypeName);
14157        const fragmentsUsage = this.buildFragmentSpreadsUsage(fragmentSpreads);
14158        Object.keys(fragmentsUsage).forEach(typeName => {
14159            this._appendToTypeMap(selectionNodesByTypeName, typeName, fragmentsUsage[typeName]);
14160        });
14161        return selectionNodesByTypeName;
14162    }
14163    _appendToTypeMap(types, typeName, nodes) {
14164        if (!types.has(typeName)) {
14165            types.set(typeName, []);
14166        }
14167        if (nodes && nodes.length > 0) {
14168            types.get(typeName).push(...nodes);
14169        }
14170    }
14171    _buildGroupedSelections() {
14172        if (!this._selectionSet || !this._selectionSet.selections || this._selectionSet.selections.length === 0) {
14173            return {};
14174        }
14175        const selectionNodesByTypeName = this.flattenSelectionSet(this._selectionSet.selections);
14176        const grouped = getPossibleTypes(this._schema, this._parentSchemaType).reduce((prev, type) => {
14177            const typeName = type.name;
14178            const schemaType = this._schema.getType(typeName);
14179            if (!Object(definition["N" /* isObjectType */])(schemaType)) {
14180                throw new TypeError(`Invalid state! Schema type ${typeName} is not a valid GraphQL object!`);
14181            }
14182            const selectionNodes = selectionNodesByTypeName.get(typeName) || [];
14183            if (!prev[typeName]) {
14184                prev[typeName] = [];
14185            }
14186            const transformedSet = this.buildSelectionSetString(schemaType, selectionNodes);
14187            if (transformedSet) {
14188                prev[typeName].push(transformedSet);
14189            }
14190            return prev;
14191        }, {});
14192        return grouped;
14193    }
14194    buildSelectionSetString(parentSchemaType, selectionNodes) {
14195        const primitiveFields = new Map();
14196        const primitiveAliasFields = new Map();
14197        const linkFieldSelectionSets = new Map();
14198        let requireTypename = false;
14199        const fragmentsSpreadUsages = [];
14200        for (const selectionNode of selectionNodes) {
14201            if (typeof selectionNode === 'string') {
14202                fragmentsSpreadUsages.push(selectionNode);
14203            }
14204            else if (selectionNode.kind === 'Field') {
14205                if (!selectionNode.selectionSet) {
14206                    if (selectionNode.alias) {
14207                        primitiveAliasFields.set(selectionNode.alias.value, selectionNode);
14208                    }
14209                    else if (selectionNode.name.value === '__typename') {
14210                        requireTypename = true;
14211                    }
14212                    else {
14213                        primitiveFields.set(selectionNode.name.value, selectionNode);
14214                    }
14215                }
14216                else {
14217                    let selectedField = null;
14218                    const fields = parentSchemaType.getFields();
14219                    selectedField = fields[selectionNode.name.value];
14220                    if (isMetadataFieldName(selectionNode.name.value)) {
14221                        selectedField = metadataFieldMap[selectionNode.name.value];
14222                    }
14223                    if (!selectedField) {
14224                        continue;
14225                    }
14226                    const fieldName = getFieldNodeNameValue(selectionNode);
14227                    let linkFieldNode = linkFieldSelectionSets.get(fieldName);
14228                    if (!linkFieldNode) {
14229                        linkFieldNode = {
14230                            selectedFieldType: selectedField.type,
14231                            field: selectionNode,
14232                        };
14233                        linkFieldSelectionSets.set(fieldName, linkFieldNode);
14234                    }
14235                    else {
14236                        mergeSelectionSets(linkFieldNode.field.selectionSet, selectionNode.selectionSet);
14237                    }
14238                }
14239            }
14240        }
14241        const linkFields = [];
14242        for (const { field, selectedFieldType } of linkFieldSelectionSets.values()) {
14243            const realSelectedFieldType = Object(index_esm["e" /* getBaseType */])(selectedFieldType);
14244            const selectionSet = this.createNext(realSelectedFieldType, field.selectionSet);
14245            const isConditional = hasConditionalDirectives(field);
14246            linkFields.push({
14247                alias: field.alias ? this._processor.config.formatNamedField(field.alias.value, selectedFieldType) : undefined,
14248                name: this._processor.config.formatNamedField(field.name.value, selectedFieldType, isConditional),
14249                type: realSelectedFieldType.name,
14250                selectionSet: this._processor.config.wrapTypeWithModifiers(selectionSet.transformSelectionSet().split(`\n`).join(`\n  `), isConditional ? Object(index_esm["h" /* removeNonNullWrapper */])(selectedFieldType) : selectedFieldType),
14251            });
14252        }
14253        const typeInfoField = this.buildTypeNameField(parentSchemaType, this._config.nonOptionalTypename, this._config.addTypename, requireTypename, this._config.skipTypeNameForRoot);
14254        const transformed = [
14255            ...(typeInfoField ? this._processor.transformTypenameField(typeInfoField.type, typeInfoField.name) : []),
14256            ...this._processor.transformPrimitiveFields(parentSchemaType, Array.from(primitiveFields.values()).map(field => ({
14257                isConditional: hasConditionalDirectives(field),
14258                fieldName: field.name.value,
14259            }))),
14260            ...this._processor.transformAliasesPrimitiveFields(parentSchemaType, Array.from(primitiveAliasFields.values()).map(field => ({
14261                alias: field.alias.value,
14262                fieldName: field.name.value,
14263            }))),
14264            ...this._processor.transformLinkFields(linkFields),
14265        ].filter(Boolean);
14266        const allStrings = transformed.filter(t => typeof t === 'string');
14267        const allObjectsMerged = transformed
14268            .filter(t => typeof t !== 'string')
14269            .map((t) => `${t.name}: ${t.type}`);
14270        let mergedObjectsAsString = null;
14271        if (allObjectsMerged.length > 0) {
14272            mergedObjectsAsString = this._processor.buildFieldsIntoObject(allObjectsMerged);
14273        }
14274        const fields = [...allStrings, mergedObjectsAsString, ...fragmentsSpreadUsages].filter(Boolean);
14275        return this._processor.buildSelectionSetFromStrings(fields);
14276    }
14277    isRootType(type) {
14278        const rootType = [this._schema.getQueryType(), this._schema.getMutationType(), this._schema.getSubscriptionType()]
14279            .filter(Boolean)
14280            .map(t => t.name);
14281        return rootType.includes(type.name);
14282    }
14283    buildTypeNameField(type, nonOptionalTypename = this._config.nonOptionalTypename, addTypename = this._config.addTypename, queriedForTypename = this._queriedForTypename, skipTypeNameForRoot = this._config.skipTypeNameForRoot) {
14284        if (this.isRootType(type) && skipTypeNameForRoot && !queriedForTypename) {
14285            return null;
14286        }
14287        if (nonOptionalTypename || addTypename || queriedForTypename) {
14288            const optionalTypename = !queriedForTypename && !nonOptionalTypename;
14289            return {
14290                name: `${this._processor.config.formatNamedField('__typename')}${optionalTypename ? '?' : ''}`,
14291                type: `'${type.name}'`,
14292            };
14293        }
14294        return null;
14295    }
14296    getUnknownType() {
14297        return 'never';
14298    }
14299    transformSelectionSet() {
14300        const grouped = this._buildGroupedSelections();
14301        // This might happen in case we have an interface, that is being queries, without any GraphQL
14302        // "type" that implements it. It will lead to a runtime error, but we aim to try to reflect that in
14303        // build time as well.
14304        if (Object.keys(grouped).length === 0) {
14305            return this.getUnknownType();
14306        }
14307        return Object.keys(grouped)
14308            .map(typeName => {
14309            const relevant = grouped[typeName].filter(Boolean);
14310            if (relevant.length === 0) {
14311                return null;
14312            }
14313            else if (relevant.length === 1) {
14314                return relevant[0];
14315            }
14316            else {
14317                return `( ${relevant.join(' & ')} )`;
14318            }
14319        })
14320            .filter(Boolean)
14321            .join(' | ');
14322    }
14323    transformFragmentSelectionSetToTypes(fragmentName, fragmentSuffix, declarationBlockConfig) {
14324        const grouped = this._buildGroupedSelections();
14325        const subTypes = Object.keys(grouped)
14326            .map(typeName => {
14327            const possibleFields = grouped[typeName].filter(Boolean);
14328            const declarationName = this.buildFragmentTypeName(fragmentName, fragmentSuffix, typeName);
14329            if (possibleFields.length === 0) {
14330                if (!this._config.addTypename) {
14331                    return { name: declarationName, content: '{}' };
14332                }
14333                return null;
14334            }
14335            return { name: declarationName, content: possibleFields.join(' & ') };
14336        })
14337            .filter(Boolean);
14338        if (subTypes.length === 1) {
14339            return new DeclarationBlock(declarationBlockConfig)
14340                .export()
14341                .asKind('type')
14342                .withName(this.buildFragmentTypeName(fragmentName, fragmentSuffix))
14343                .withContent(subTypes[0].content).string;
14344        }
14345        return [
14346            ...subTypes.map(t => new DeclarationBlock(declarationBlockConfig)
14347                .export(this._config.exportFragmentSpreadSubTypes)
14348                .asKind('type')
14349                .withName(t.name)
14350                .withContent(t.content).string),
14351            new DeclarationBlock(declarationBlockConfig)
14352                .export()
14353                .asKind('type')
14354                .withName(this.buildFragmentTypeName(fragmentName, fragmentSuffix))
14355                .withContent(subTypes.map(t => t.name).join(' | ')).string,
14356        ].join('\n');
14357    }
14358    buildFragmentTypeName(name, suffix, typeName = '') {
14359        return this._convertName(name, {
14360            useTypesPrefix: true,
14361            suffix: typeName ? `_${typeName}_${suffix}` : suffix,
14362        });
14363    }
14364}
14365
14366class BaseSelectionSetProcessor {
14367    constructor(config) {
14368        this.config = config;
14369    }
14370    buildFieldsIntoObject(allObjectsMerged) {
14371        return `{ ${allObjectsMerged.join(', ')} }`;
14372    }
14373    buildSelectionSetFromStrings(pieces) {
14374        if (pieces.length === 0) {
14375            return null;
14376        }
14377        else if (pieces.length === 1) {
14378            return pieces[0];
14379        }
14380        else {
14381            return `(\n  ${pieces.join(`\n  & `)}\n)`;
14382        }
14383    }
14384    transformPrimitiveFields(_schemaType, _fields) {
14385        throw new Error(`Please override "transformPrimitiveFields" as part of your BaseSelectionSetProcessor implementation!`);
14386    }
14387    transformAliasesPrimitiveFields(_schemaType, _fields) {
14388        throw new Error(`Please override "transformAliasesPrimitiveFields" as part of your BaseSelectionSetProcessor implementation!`);
14389    }
14390    transformLinkFields(_fields) {
14391        throw new Error(`Please override "transformLinkFields" as part of your BaseSelectionSetProcessor implementation!`);
14392    }
14393    transformTypenameField(_type, _name) {
14394        throw new Error(`Please override "transformTypenameField" as part of your BaseSelectionSetProcessor implementation!`);
14395    }
14396}
14397
14398class index_esm_PreResolveTypesProcessor extends BaseSelectionSetProcessor {
14399    transformTypenameField(type, name) {
14400        return [
14401            {
14402                type,
14403                name,
14404            },
14405        ];
14406    }
14407    transformPrimitiveFields(schemaType, fields) {
14408        if (fields.length === 0) {
14409            return [];
14410        }
14411        return fields.map(field => {
14412            const fieldObj = schemaType.getFields()[field.fieldName];
14413            const baseType = Object(index_esm["e" /* getBaseType */])(fieldObj.type);
14414            let typeToUse = baseType.name;
14415            const useInnerType = field.isConditional && Object(definition["L" /* isNonNullType */])(fieldObj.type);
14416            if (Object(definition["E" /* isEnumType */])(baseType)) {
14417                typeToUse =
14418                    (this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : '') +
14419                        this.config.convertName(baseType.name, { useTypesPrefix: this.config.enumPrefix });
14420            }
14421            else if (this.config.scalars[baseType.name]) {
14422                typeToUse = this.config.scalars[baseType.name];
14423            }
14424            const name = this.config.formatNamedField(field.fieldName, useInnerType ? baseType : fieldObj.type);
14425            const wrappedType = this.config.wrapTypeWithModifiers(typeToUse, useInnerType ? baseType : fieldObj.type);
14426            return {
14427                name,
14428                type: wrappedType,
14429            };
14430        });
14431    }
14432    transformAliasesPrimitiveFields(schemaType, fields) {
14433        if (fields.length === 0) {
14434            return [];
14435        }
14436        return fields.map(aliasedField => {
14437            if (aliasedField.fieldName === '__typename') {
14438                const name = this.config.formatNamedField(aliasedField.alias, null);
14439                return {
14440                    name,
14441                    type: `'${schemaType.name}'`,
14442                };
14443            }
14444            else {
14445                const fieldObj = schemaType.getFields()[aliasedField.fieldName];
14446                const baseType = Object(index_esm["e" /* getBaseType */])(fieldObj.type);
14447                let typeToUse = this.config.scalars[baseType.name] || baseType.name;
14448                if (Object(definition["E" /* isEnumType */])(baseType)) {
14449                    typeToUse =
14450                        (this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : '') +
14451                            this.config.convertName(baseType.name, { useTypesPrefix: this.config.enumPrefix });
14452                }
14453                const name = this.config.formatNamedField(aliasedField.alias, fieldObj.type);
14454                const wrappedType = this.config.wrapTypeWithModifiers(typeToUse, fieldObj.type);
14455                return {
14456                    name,
14457                    type: wrappedType,
14458                };
14459            }
14460        });
14461    }
14462    transformLinkFields(fields) {
14463        if (fields.length === 0) {
14464            return [];
14465        }
14466        return fields.map(field => ({
14467            name: field.alias || field.name,
14468            type: field.selectionSet,
14469        }));
14470    }
14471}
14472
14473function optimizeOperations(schema, documents, options) {
14474    const newDocuments = optimizeDocuments(schema, documents.map(s => s.document), options);
14475    return newDocuments.map(document => ({
14476        location: 'optimized by relay',
14477        document,
14478    }));
14479}
14480
14481
14482//# sourceMappingURL=index.esm.js.map
14483
14484// CONCATENATED MODULE: ./node_modules/@graphql-codegen/typescript/index.esm.js
14485
14486
14487
14488
14489
14490
14491
14492class index_esm_TypeScriptOperationVariablesToObject extends index_esm_OperationVariablesToObject {
14493    constructor(_scalars, _convertName, _avoidOptionals, _immutableTypes, _namespacedImportName = null, _enumNames = [], _enumPrefix = true, _enumValues = {}, _applyCoercion = false) {
14494        super(_scalars, _convertName, _namespacedImportName, _enumNames, _enumPrefix, _enumValues, _applyCoercion);
14495        this._avoidOptionals = _avoidOptionals;
14496        this._immutableTypes = _immutableTypes;
14497    }
14498    clearOptional(str) {
14499        const prefix = this._namespacedImportName ? `${this._namespacedImportName}.` : '';
14500        const rgx = new RegExp(`^${this.wrapMaybe(`(.*?)`)}$`, 'i');
14501        if (str.startsWith(`${prefix}Maybe`)) {
14502            return str.replace(rgx, '$1');
14503        }
14504        return str;
14505    }
14506    wrapAstTypeWithModifiers(baseType, typeNode, applyCoercion = false) {
14507        if (typeNode.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE) {
14508            const type = this.wrapAstTypeWithModifiers(baseType, typeNode.type, applyCoercion);
14509            return this.clearOptional(type);
14510        }
14511        else if (typeNode.kind === language_kinds["a" /* Kind */].LIST_TYPE) {
14512            const innerType = this.wrapAstTypeWithModifiers(baseType, typeNode.type, applyCoercion);
14513            const listInputCoercionExtension = applyCoercion ? ` | ${innerType}` : '';
14514            return this.wrapMaybe(`${this._immutableTypes ? 'ReadonlyArray' : 'Array'}<${innerType}>${listInputCoercionExtension}`);
14515        }
14516        else {
14517            return this.wrapMaybe(baseType);
14518        }
14519    }
14520    formatFieldString(fieldName, isNonNullType, hasDefaultValue) {
14521        return `${fieldName}${this.getAvoidOption(isNonNullType, hasDefaultValue) ? '?' : ''}`;
14522    }
14523    formatTypeString(fieldType, isNonNullType, hasDefaultValue) {
14524        if (!hasDefaultValue && isNonNullType) {
14525            return this.clearOptional(fieldType);
14526        }
14527        return fieldType;
14528    }
14529    wrapMaybe(type) {
14530        const prefix = this._namespacedImportName ? `${this._namespacedImportName}.` : '';
14531        return `${prefix}Maybe${type ? `<${type}>` : ''}`;
14532    }
14533    getAvoidOption(isNonNullType, hasDefaultValue) {
14534        const options = normalizeAvoidOptionals(this._avoidOptionals);
14535        return ((options.object || !options.defaultValue) && hasDefaultValue) || (!options.object && !isNonNullType);
14536    }
14537    getPunctuation() {
14538        return ';';
14539    }
14540}
14541
14542const EXACT_SIGNATURE = `type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };`;
14543const MAKE_OPTIONAL_SIGNATURE = `type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };`;
14544const MAKE_MAYBE_SIGNATURE = `type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };`;
14545class index_esm_TsVisitor extends index_esm_BaseTypesVisitor {
14546    constructor(schema, pluginConfig, additionalConfig = {}) {
14547        super(schema, pluginConfig, {
14548            noExport: getConfigValue(pluginConfig.noExport, false),
14549            avoidOptionals: normalizeAvoidOptionals(getConfigValue(pluginConfig.avoidOptionals, false)),
14550            maybeValue: getConfigValue(pluginConfig.maybeValue, 'T | null'),
14551            constEnums: getConfigValue(pluginConfig.constEnums, false),
14552            enumsAsTypes: getConfigValue(pluginConfig.enumsAsTypes, false),
14553            futureProofEnums: getConfigValue(pluginConfig.futureProofEnums, false),
14554            futureProofUnions: getConfigValue(pluginConfig.futureProofUnions, false),
14555            enumsAsConst: getConfigValue(pluginConfig.enumsAsConst, false),
14556            numericEnums: getConfigValue(pluginConfig.numericEnums, false),
14557            onlyOperationTypes: getConfigValue(pluginConfig.onlyOperationTypes, false),
14558            immutableTypes: getConfigValue(pluginConfig.immutableTypes, false),
14559            useImplementingTypes: getConfigValue(pluginConfig.useImplementingTypes, false),
14560            entireFieldWrapperValue: getConfigValue(pluginConfig.entireFieldWrapperValue, 'T'),
14561            wrapEntireDefinitions: getConfigValue(pluginConfig.wrapEntireFieldDefinitions, false),
14562            ...(additionalConfig || {}),
14563        });
14564        auto_bind_default()(this);
14565        const enumNames = Object.values(schema.getTypeMap())
14566            .filter(definition["E" /* isEnumType */])
14567            .map(type =>
14567 type.name);
14568        this.setArgumentsTransformer(new index_esm_TypeScriptOperationVariablesToObject(this.scalars, this.convertName, this.config.avoidOptionals, this.config.immutableTypes, null, enumNames, pluginConfig.enumPrefix, this.config.enumValues));
14569        this.setDeclarationBlockConfig({
14570            enumNameValueSeparator: ' =',
14571            ignoreExport: this.config.noExport,
14572        });
14573    }
14574    _getTypeForNode(node) {
14575        const typeAsString = node.name;
14576        if (this.config.useImplementingTypes) {
14577            const allTypesMap = this._schema.getTypeMap();
14578            const implementingTypes = [];
14579            // TODO: Move this to a better place, since we are using this logic in some other places as well.
14580            for (const graphqlType of Object.values(allTypesMap)) {
14581                if (graphqlType instanceof definition["f" /* GraphQLObjectType */]) {
14582                    const allInterfaces = graphqlType.getInterfaces();
14583                    if (allInterfaces.some(int => typeAsString === int.name)) {
14584                        implementingTypes.push(this.convertName(graphqlType.name));
14585                    }
14586                }
14587            }
14588            if (implementingTypes.length > 0) {
14589                return implementingTypes.join(' | ');
14590            }
14591        }
14592        return super._getTypeForNode(node);
14593    }
14594    getWrapperDefinitions() {
14595        const definitions = [
14596            this.getMaybeValue(),
14597            this.getExactDefinition(),
14598            this.getMakeOptionalDefinition(),
14599            this.getMakeMaybeDefinition(),
14600        ];
14601        if (this.config.wrapFieldDefinitions) {
14602            definitions.push(this.getFieldWrapperValue());
14603        }
14604        if (this.config.wrapEntireDefinitions) {
14605            definitions.push(this.getEntireFieldWrapperValue());
14606        }
14607        return definitions;
14608    }
14609    getExactDefinition() {
14610        return `${this.getExportPrefix()}${EXACT_SIGNATURE}`;
14611    }
14612    getMakeOptionalDefinition() {
14613        return `${this.getExportPrefix()}${MAKE_OPTIONAL_SIGNATURE}`;
14614    }
14615    getMakeMaybeDefinition() {
14616        return `${this.getExportPrefix()}${MAKE_MAYBE_SIGNATURE}`;
14617    }
14618    getMaybeValue() {
14619        return `${this.getExportPrefix()}type Maybe<T> = ${this.config.maybeValue};`;
14620    }
14621    clearOptional(str) {
14622        if (str.startsWith('Maybe')) {
14623            return str.replace(/Maybe<(.*?)>$/, '$1');
14624        }
14625        return str;
14626    }
14627    getExportPrefix() {
14628        if (this.config.noExport) {
14629            return '';
14630        }
14631        return super.getExportPrefix();
14632    }
14633    NamedType(node, key, parent, path, ancestors) {
14634        return `Maybe<${super.NamedType(node, key, parent, path, ancestors)}>`;
14635    }
14636    ListType(node) {
14637        return `Maybe<${super.ListType(node)}>`;
14638    }
14639    UnionTypeDefinition(node, key, parent) {
14640        if (this.config.onlyOperationTypes)
14641            return '';
14642        let withFutureAddedValue = [];
14643        if (this.config.futureProofUnions) {
14644            withFutureAddedValue = [
14645                this.config.immutableTypes ? `{ readonly __typename?: "%other" }` : `{ __typename?: "%other" }`,
14646            ];
14647        }
14648        const originalNode = parent[key];
14649        const possibleTypes = originalNode.types
14650            .map(t => (this.scalars[t.name.value] ? this._getScalar(t.name.value) : this.convertName(t)))
14651            .concat(...withFutureAddedValue)
14652            .join(' | ');
14653        return new DeclarationBlock(this._declarationBlockConfig)
14654            .export()
14655            .asKind('type')
14656            .withName(this.convertName(node))
14657            .withComment(node.description)
14658            .withContent(possibleTypes).string;
14659        // return super.UnionTypeDefinition(node, key, parent).concat(withFutureAddedValue).join("");
14660    }
14661    wrapWithListType(str) {
14662        return `${this.config.immutableTypes ? 'ReadonlyArray' : 'Array'}<${str}>`;
14663    }
14664    NonNullType(node) {
14665        const baseValue = super.NonNullType(node);
14666        return this.clearOptional(baseValue);
14667    }
14668    FieldDefinition(node, key, parent) {
14669        const typeString = this.config.wrapEntireDefinitions
14670            ? `EntireFieldWrapper<${node.type}>`
14671            : node.type;
14672        const originalFieldNode = parent[key];
14673        const addOptionalSign = !this.config.avoidOptionals.field && originalFieldNode.type.kind !== language_kinds["a" /* Kind */].NON_NULL_TYPE;
14674        const comment = this.getFieldComment(node);
14675        const { type }
14675 = this.config.declarationKind;
14676        return (comment +
14677            visitor_plugin_common_index_esm_indent(`${this.config.immutableTypes ? 'readonly ' : ''}${node.name}${addOptionalSign ? '?' : ''}: ${typeString}${this.getPunctuation(type)}`));
14678    }
14679    InputValueDefinition(node, key, parent) {
14680        const originalFieldNode = parent[key];
14681        const addOptionalSign = !this.config.avoidOptionals.inputValue &&
14682            (originalFieldNode.type.kind !== language_kinds["a" /* Kind */].NON_NULL_TYPE ||
14683                (!this.config.avoidOptionals.defaultValue && node.defaultValue !== undefined));
14684        const comment = transformComment(node.description, 1);
14685        const { type } = this.config.declarationKind;
14686        return (comment +
14687            visitor_plugin_common_index_esm_indent(`${this.config.immutableTypes ? 'readonly ' : ''}${node.name}${addOptionalSign ? '?' : ''}: ${node.type}${this.getPunctuation(type)}`));
14688    }
14689    EnumTypeDefinition(node) {
14690        const enumName = node.name;
14691        // In case of mapped external enum string
14692        if (this.config.enumValues[enumName] && this.config.enumValues[enumName].sourceFile) {
14693            return `export { ${this.config.enumValues[enumName].typeIdentifier} };\n`;
14694        }
14695        const getValueFromConfig = (enumValue) => {
14696            if (this.config.enumValues[enumName] &&
14697                this.config.enumValues[enumName].mappedValues &&
14698                typeof this.config.enumValues[enumName].mappedValues[enumValue] !== 'undefined') {
14699                return this.config.enumValues[enumName].mappedValues[enumValue];
14700            }
14701            return null;
14702        };
14703        const withFutureAddedValue = [
14704            this.config.futureProofEnums ? [visitor_plugin_common_index_esm_indent('| ' + wrapWithSingleQuotes('%future added value'))] : [],
14705        ];
14706        const enumTypeName = this.convertName(node, { useTypesPrefix: this.config.enumPrefix });
14707        if (this.config.enumsAsTypes) {
14708            return new DeclarationBlock(this._declarationBlockConfig)
14709                .export()
14710                .asKind('type')
14711                .withComment(node.description)
14712                .withName(enumTypeName)
14713                .withContent('\n' +
14714                node.values
14715                    .map(enumOption => {
14716                    var _a;
14717                    const name = enumOption.name;
14718                    const enumValue = (_a = getValueFromConfig(name)) !== null && _a !== void 0 ? _a : name;
14719                    const comment = transformComment(enumOption.description, 1);
14720                    return comment + visitor_plugin_common_index_esm_indent('| ' + wrapWithSingleQuotes(enumValue));
14721                })
14722                    .concat(...withFutureAddedValue)
14723                    .join('\n')).string;
14724        }
14725        if (this.config.numericEnums) {
14726            const block = new DeclarationBlock(this._declarationBlockConfig)
14727                .export()
14728                .withComment(node.description)
14729                .withName(enumTypeName)
14730                .asKind('enum')
14731                .withBlock(node.values
14732                .map((enumOption, i) => {
14733                const valueFromConfig = getValueFromConfig(enumOption.name);
14734                const enumValue = valueFromConfig !== null && valueFromConfig !== void 0 ? valueFromConfig : i;
14735                const comment = transformComment(enumOption.description, 1);
14736                return comment + visitor_plugin_common_index_esm_indent(enumOption.name) + ` = ${enumValue}`;
14737            })
14738                .concat(...withFutureAddedValue)
14739                .join(',\n')).string;
14740            return block;
14741        }
14742        if (this.config.enumsAsConst) {
14743            const typeName = `export type ${enumTypeName} = typeof ${enumTypeName}[keyof typeof ${enumTypeName}];`;
14744            const enumAsConst = new DeclarationBlock({
14745                ...this._declarationBlockConfig,
14746                blockTransformer: block => {
14747                    return block + ' as const';
14748                },
14749            })
14750                .export()
14751                .asKind('const')
14752                .withName(enumTypeName)
14753                .withComment(node.description)
14754                .withBlock(node.values
14755                .map(enumOption => {
14756                var _a;
14757                const optionName = this.convertName(enumOption, { useTypesPrefix: false, transformUnderscore: true });
14758                const comment = transformComment(enumOption.description, 1);
14759                const name = enumOption.name;
14760                const enumValue = (_a = getValueFromConfig(name)) !== null && _a !== void 0 ? _a : name;
14761                return comment + visitor_plugin_common_index_esm_indent(`${optionName}: ${wrapWithSingleQuotes(enumValue)}`);
14762            })
14763                .join(',\n')).string;
14764            return [enumAsConst, typeName].join('\n');
14765        }
14766        return new DeclarationBlock(this._declarationBlockConfig)
14767            .export()
14768            .asKind(this.config.constEnums ? 'const enum' : 'enum')
14769            .withName(enumTypeName)
14770            .withComment(node.description)
14771            .withBlock(this.buildEnumValuesBlock(enumName, node.values)).str
14771ing;
14772    }
14773    getPunctuation(_declarationKind) {
14774        return ';';
14775    }
14776}
14777
14778class index_esm_TsIntrospectionVisitor extends index_esm_TsVisitor {
14779    constructor(schema, pluginConfig = {}, typesToInclude) {
14780        super(schema, pluginConfig);
14781        this.typesToInclude = [];
14782        this.typesToInclude = typesToInclude;
14783        auto_bind_default()(this);
14784    }
14785    DirectiveDefinition() {
14786        return null;
14787    }
14788    ObjectTypeDefinition(node, key, parent) {
14789        const name = node.name;
14790        if (this.typesToInclude.some(type => type.name === name)) {
14791            return super.ObjectTypeDefinition(node, key, parent);
14792        }
14793        return null;
14794    }
14795    EnumTypeDefinition(node) {
14796        const name = node.name;
14797        if (this.typesToInclude.some(type => type.name === name)) {
14798            return super.EnumTypeDefinition(node);
14799        }
14800        return null;
14801    }
14802}
14803
14804function transformSchemaAST(schema, config) {
14805    const printedSchema = Object(printSchema["b" /* printSchema */])(schema);
14806    const astNode = Object(parser["parse"])(printedSchema);
14807    const transformedAST = config.disableDescriptions
14808        ? Object(language_visitor["c" /* visit */])(astNode, {
14809            leave: node => ({
14810                ...node,
14811                description: undefined,
14812            }),
14813        })
14814        : astNode;
14815    const transformedSchema = config.disableDescriptions ? Object(buildASTSchema["a" /* buildASTSchema */])(transformedAST) : schema;
14816    return {
14817        schema: transformedSchema,
14818        ast: transformedAST,
14819    };
14820}
14821
14822const index_esm_plugin = (schema, documents, config) => {
14823    const { schema: _schema, ast } = transformSchemaAST(schema, config);
14824    const visitor = new index_esm_TsVisitor(_schema, config);
14825    const visitorResult = Object(language_visitor["c" /* visit */])(ast, { leave: visitor });
14826    const introspectionDefinitions = includeIntrospectionDefinitions(_schema, documents, config);
14827    const scalars = visitor.scalarsDefinition;
14828    return {
14829        prepend: [...visitor.getEnumsImports(), ...visitor.getScalarsImports(), ...visitor.getWrapperDefinitions()],
14830        content: [scalars, ...visitorResult.definitions, ...introspectionDefinitions].join('\n'),
14831    };
14832};
14833function includeIntrospectionDefinitions(schema, documents, config) {
14834    const typeInfo = new TypeInfo["a" /* TypeInfo */](schema);
14835    const usedTypes = [];
14836    const documentsVisitor = Object(TypeInfo["b" /* visitWithTypeInfo */])(typeInfo, {
14837        Field() {
14838            const type = Object(definition["A" /* getNamedType */])(typeInfo.getType());
14839            if (Object(type_introspection["n" /* isIntrospectionType */])(type) && !usedTypes.includes(type)) {
14840                usedTypes.push(type);
14841            }
14842        },
14843    });
14844    documents.forEach(doc => Object(language_visitor["c" /* visit */])(doc.document, documentsVisitor));
14845    const typesToInclude = [];
14846    usedTypes.forEach(type => {
14847        collectTypes(type);
14848    });
14849    const visitor = new index_esm_TsIntrospectionVisitor(schema, config, typesToInclude);
14850    const result = Object(language_visitor["c" /* visit */])(Object(parser["parse"])(Object(printSchema["a" /* printIntrospectionSchema */])(schema)), { leave: visitor });
14851    // recursively go through each `usedTypes` and their children and collect all used types
14852    // we don't care about Interfaces, Unions and others, but Objects and Enums
14853    function collectTypes(type) {
14854        if (typesToInclude.includes(type)) {
14855            return;
14856        }
14857        typesToInclude.push(type);
14858        if (Object(definition["N" /* isObjectType */])(type)) {
14859            const fields = type.getFields();
14860            Object.keys(fields).forEach(key => {
14861                const field = fields[key];
14862                const type = Object(definition["A" /* getNamedType */])(field.type);
14863                collectTypes(type);
14864            });
14865        }
14866    }
14867    return result.definitions;
14868}
14869
14870
14871//# sourceMappingURL=index.esm.js.map
14872
14873// CONCATENATED MODULE: ./node_modules/@graphql-codegen/typescript-operations/index.esm.js
14874
14875
14876
14877
14878
14879class typescript_operations_index_esm_TypeScriptOperationVariablesToObject extends index_esm_TypeScriptOperationVariablesToObject {
14880    formatTypeString(fieldType, isNonNullType, _hasDefaultValue) {
14881        return fieldType;
14882    }
14883}
14884
14885class index_esm_TypeScriptSelectionSetProcessor extends BaseSelectionSetProcessor {
14886    transformPrimitiveFields(schemaType, fields) {
14887        if (fields.length === 0) {
14888            return [];
14889        }
14890        const parentName = (this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : '') +
14891            this.config.convertName(schemaType.name, {
14892                useTypesPrefix: true,
14893            });
14894        let hasConditionals = false;
14895        const conditilnalsList = [];
14896        let resString = `Pick<${parentName}, ${fields
14897            .map(field => {
14898            if (field.isConditional) {
14899                hasConditionals = true;
14900                conditilnalsList.push(field.fieldName);
14901            }
14902            return `'${field.fieldName}'`;
14903        })
14904            .join(' | ')}>`;
14905        if (hasConditionals) {
14906            const avoidOptional = 
14907            // TODO: check type and exec only if relevant
14908            this.config.avoidOptionals === true ||
14909                this.config.avoidOptionals.field ||
14910                this.config.avoidOptionals.inputValue ||
14911                this.config.avoidOptionals.object;
14912            const transform = avoidOptional ? 'MakeMaybe' : 'MakeOptional';
14913            resString = `${this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : ''}${transform}<${resString}, ${conditilnalsList.map(field => `'${field}'`).join(' | ')}>`;
14914        }
14915        return [resString];
14916    }
14917    transformTypenameField(type, name) {
14918        return [`{ ${name}: ${type} }`];
14919    }
14920    transformAliasesPrimitiveFields(schemaType, fields) {
14921        if (fields.length === 0) {
14922            return [];
14923        }
14924        const parentName = (this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : '') +
14925            this.config.convertName(schemaType.name, {
14926                useTypesPrefix: true,
14927            });
14928        return [
14929            `{ ${fields
14930                .map(aliasedField => {
14931                const value = aliasedField.fieldName === '__typename'
14932                    ? `'${schemaType.name}'`
14933                    : `${parentName}['${aliasedField.fieldName}']`;
14934                return `${aliasedField.alias}: ${value}`;
14935            })
14936                .join(', ')} }`,
14937        ];
14938    }
14939    transformLinkFields(fields) {
14940        if (fields.length === 0) {
14941            return [];
14942        }
14943        return [`{ ${fields.map(field => `${field.alias || field.name}: ${field.selectionSet}`).join(', ')} }`];
14944    }
14945}
14946
14947class index_esm_TypeScriptDocumentsVisitor extends index_esm_BaseDocumentsVisitor {
14948    constructor(schema, config, allFragments) {
14949        super(config, {
14950            arrayInputCoercion: getConfigValue(config.arrayInputCoercion, true),
14951            noExport: getConfigValue(config.noExport, false),
14952            avoidOptionals: normalizeAvoidOptionals(getConfigValue(config.avoidOptionals, false)),
14953            immutableTypes: getConfigValue(config.immutableTypes, false),
14954            nonOptionalTypename: getConfigValue(config.nonOptionalTypename, false),
14955        }, schema);
14956        auto_bind_default()(this);
14957        const wrapOptional = (type) => {
14958            const prefix = this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : '';
14959            return `${prefix}Maybe<${type}>`;
14960        };
14961        const wrapArray = (type) => {
14962            const listModifier = this.config.immutableTypes ? 'ReadonlyArray' : 'Array';
14963            return `${listModifier}<${type}>`;
14964        };
14965        const formatNamedField = (name, type, isConditional = false) => {
14966            const optional = isConditional || (!this.config.avoidOptionals.field && !!type && !Object(definition["L" /* isNonNullType */])(type));
14967            return (this.config.immutableTypes ? `readonly ${name}` : name) + (optional ? '?' : '');
14968        };
14969        const processorConfig = {
14970            namespacedImportName: this.config.namespacedImportName,
14971            convertName: this.convertName.bind(this),
14972            enumPrefix: this.config.enumPrefix,
14973            scalars: this.scalars,
14974            formatNamedField,
14975            wrapTypeWithModifiers(baseType, type) {
14976                return wrapTypeWithModifiers(baseType, type, { wrapOptional, wrapArray });
14977            },
14978            avoidOptionals: this.config.avoidOptionals,
14979        };
14980        const processor = new (config.preResolveTypes ? index_esm_PreResolveTypesProcessor : index_esm_TypeScriptSelectionSetProcessor)(processorConfig);
14981        this.setSelectionSetHandler(new index_esm_SelectionSetToObject(processor, this.scalars, this.schema, this.convertName.bind(this), this.getFragmentSuffix.bind(this), allFragments, this.config));
14982        const enumsNames = Object.keys(schema.getTypeMap()).filter(typeName => Object(definition["E" /* isEnumType */])(schema.getType(typeName)));
14983        this.setVariablesTransformer(new typescript_operations_index_esm_TypeScriptOperationVariablesToObject(this.scalars, this.convertName.bind(this), this.config.avoidOptionals.object, this.config.immutableTypes, this.config.namespacedImportName, enumsNames, this.config.enumPrefix, this.config.enumValues, this.config.arrayInputCoercion));
14984        this._declarationBlockConfig = {
14985            ignoreExport: this.config.noExport,
14986        };
14987    }
14988    getImports() {
14989        return !this.config.globalNamespace
14990            ? this.config.fragmentImports.map(fragmentImport =>
14990 generateFragmentImportStatement(fragmentImport, 'type'))
14991            : [];
14992    }
14993    getPunctuation(_declarationKind) {
14994        return ';';
14995    }
14996    applyVariablesWrapper(variablesBlock) {
14997        const prefix = this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : '';
14998        return `${prefix}Exact<${variablesBlock === '{}' ? `{ [key: string]: never; }` : variablesBlock}>`;
14999    }
15000}
15001
15002const typescript_operations_index_esm_plugin = (schema, rawDocuments, config) => {
15003    const documents = config.flattenGeneratedTypes ? optimizeOperations(schema, rawDocuments) : rawDocuments;
15004    const allAst = Object(concatAST["a" /* concatAST */])(documents.map(v => v.document));
15005    const allFragments = [
15006        ...allAst.definitions.filter(d => d.kind === language_kinds["a" /* Kind */].FRAGMENT_DEFINITION).map(fragmentDef => ({
15007            node: fragmentDef,
15008            name: fragmentDef.name.value,
15009            onType: fragmentDef.typeCondition.name.value,
15010            isExternal: false,
15011        })),
15012        ...(config.externalFragments || []),
15013    ];
15014    const visitor = new index_esm_TypeScriptDocumentsVisitor(schema, config, allFragments);
15015    const visitorResult = Object(language_visitor["c" /* visit */])(allAst, {
15016        leave: visitor,
15017    });
15018    let content = visitorResult.definitions.join('\n');
15019    if (config.addOperationExport) {
15020        const exportConsts = [];
15021        allAst.definitions.forEach(d => {
15022            if ('name' in d) {
15023                exportConsts.push(`export declare const ${d.name.value}: import("graphql").DocumentNode;`);
15024            }
15025        });
15026        content = visitorResult.definitions.concat(exportConsts).join('\n');
15027    }
15028    if (config.globalNamespace) {
15029        content = `
15030    declare global { 
15031      ${content} 
15032    }`;
15033    }
15034    return {
15035        prepend: [...visitor.getImports(), ...visitor.getGlobalDeclarations(visitor.config.noExport)],
15036        content,
15037    };
15038};
15039
15040
15041//# sourceMappingURL=index.esm.js.map
15042
15043// CONCATENATED MODULE: ./node_modules/@graphql-codegen/flow/index.esm.js
15044
15045
15046
15047
15048class index_esm_FlowOperationVariablesToObject extends index_esm_OperationVariablesToObject {
15049    clearOptional(str) {
15050        if (str.startsWith('?')) {
15051            return str.replace(/^\?(.*?)$/i, '$1');
15052        }
15053        return str;
15054    }
15055    getScalar(name) {
15056        const prefix = this._namespacedImportName ? `${this._namespacedImportName}.` : '';
15057        return `$ElementType<${prefix}Scalars, '${name}'>`;
15058    }
15059    wrapAstTypeWithModifiers(baseType, typeNode, applyCoercion = false) {
15060        if (typeNode.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE) {
15061            const type = this.wrapAstTypeWithModifiers(baseType, typeNode.type, applyCoercion);
15062            return this.clearOptional(type);
15063        }
15064        else if (typeNode.kind === language_kinds["a" /* Kind */].LIST_TYPE) {
15065            const innerType = this.wrapAstTypeWithModifiers(baseType, typeNode.type, applyCoercion);
15066            const listInputCoercionExtension = applyCoercion ? ` | ${innerType}` : '';
15067            return `?Array<${innerType}>${listInputCoercionExtension}`;
15068        }
15069        else {
15070            return `?${baseType}`;
15071        }
15072    }
15073    formatFieldString(fieldName, isNonNullType, hasDefaultValue) {
15074        if (hasDefaultValue || isNonNullType) {
15075            return fieldName;
15076        }
15077        else {
15078            return `${fieldName}?`;
15079        }
15080    }
15081    formatTypeString(fieldType, isNonNullType, hasDefaultValue) {
15082        if (hasDefaultValue && !isNonNullType) {
15083            return this.clearOptional(fieldType);
15084        }
15085        return fieldType;
15086    }
15087}
15088
15089class index_esm_FlowVisitor extends index_esm_BaseTypesVisitor {
15090    constructor(schema, pluginConfig) {
15091        super(schema, pluginConfig, {
15092            useFlowExactObjects: getConfigValue(pluginConfig.useFlowExactObjects, true),
15093            useFlowReadOnlyTypes: getConfigValue(pluginConfig.useFlowReadOnlyTypes, false),
15094        });
15095        auto_bind_default()(this);
15096        const enumNames = Object.values(schema.getTypeMap())
15097            .map(type => (type instanceof definition["a" /* GraphQLEnumType */] ? type.name : undefined))
15098            .filter(t => t);
15099        this.setArgumentsTransformer(new index_esm_FlowOperationVariablesToObject(this.scalars, this.convertName, null, enumNames, pluginConfig.enumPrefix));
15100        this.setDeclarationBlockConfig({
15101            blockWrapper: this.config.useFlowExactObjects ? '|' : '',
15102        });
15103    }
15104    _getScalar(name) {
15105        return `$ElementType<Scalars, '${name}'>`;
15106    }
15107    InputValueDefinition(node, key, parent) {
15108        const originalFieldNode = parent[key];
15109        const addOptionalSign = originalFieldNode.type.kind !== language_kinds["a" /* Kind */].NON_NULL_TYPE;
15110        const comment = transformComment(node.description, 1);
15111        return comment + visitor_plugin_common_index_esm_indent(`${node.name}${addOptionalSign ? '?' : ''}: ${node.type},`);
15112    }
15113    NamedType(node, key, parent, path, ancestors) {
15114        return `?${super.NamedType(node, key, parent, path, ancestors)}`;
15115    }
15116    ListType(node) {
15117        return `?${super.ListType(node)}`;
15118    }
15119    NonNullType(node) {
15120        const baseValue = super.NonNullType(node);
15121        if (baseValue.startsWith('?')) {
15122            return baseValue.substr(1);
15123        }
15124        return baseValue;
15125    }
15126    FieldDefinition(node) {
15127        const typeString = node.type;
15128        const namePostfix = typeString.startsWith('?') ? '?' : '';
15129        const comment = transformComment(node.description, 1);
15130        return comment + visitor_plugin_common_index_esm_indent(`${this.config.useFlowReadOnlyTypes ? '+' : ''}${node.name}${namePostfix}: ${typeString},`);
15131    }
15132    ObjectTypeDefinition(node, key, parent) {
15133        return super.ObjectTypeDefinition({
15134            ...node,
15135            interfaces: node.interfaces && node.interfaces.length > 0
15136                ? node.interfaces.map(name => name.replace('?', ''))
15137                : [],
15138        }, key, parent);
15139    }
15140    _buildTypeImport(identifier, source) {
15141        return `import { type ${identifier} } from '${source}';`;
15142    }
15143    mergeInterfaces(interfaces, hasOtherFields) {
15144        if (!interfaces.length) {
15145            return '';
15146        }
15147        return interfaces.map(i => visitor_plugin_common_index_esm_indent(`...${i}`)).join(',\n') + (hasOtherFields ? ',\n  ' : '');
15148    }
15149    appendInterfacesAndFieldsToBlock(block, interfaces, fields) {
15150        block.withBlock(this.mergeInterfaces(interfaces, fields.length > 0) + this.mergeAllFields(fields, interfaces.length > 0));
15151    }
15152    mergeAllFields(allFields, hasInterfaces) {
15153        if (allFields.length === 0) {
15154            return '';
15155        }
15156        if (!hasInterfaces) {
15157            return allFields.join('\n');
15158        }
15159        return `...{${this.config.useFlowExactObjects ? '|' : ''}\n${allFields.map(s => visitor_plugin_common_index_esm_indent(s)).join('\n')}\n  ${this.config.useFlowExactObjects ? '|' : ''}}`;
15160    }
15161    handleEnumValueMapper(typeIdentifier, importIdentifier, sourceIdentifier, sourceFile) {
15162        let identifier = sourceIdentifier;
15163        if (sourceIdentifier !== typeIdentifier && !sourceIdentifier.includes(' as ')) {
15164            identifier = `${sourceIdentifier} as ${typeIdentifier}`;
15165        }
15166        return [this._buildTypeImport(identifier, sourceFile)];
15167    }
15168    EnumTypeDefinition(node) {
15169        const typeName = node.name;
15170        if (this.config.enumValues[typeName] && this.config.enumValues[typeName].sourceFile) {
15171            return null;
15172        }
15173        const enumValuesName = this.convertName(node, {
15174            suffix: 'Values',
15175            useTypesPrefix: this.config.enumPrefix,
15176        });
15177        const enumValues = new DeclarationBlock(this._declarationBlockConfig)
15178            .export()
15179            .asKind('const')
15180            .withName(enumValuesName)
15181            .withMethodCall('Object.freeze', true)
15182            .withBlock(node.values
15183            .map(enumOption => {
15184            const comment = transformComment(enumOption.description, 1);
15185            const optionName = this.convertName(enumOption, { transformUnderscore: true, useTypesPrefix: false });
15186            let enumValue = enumOption.name;
15187            if (this.config.enumValues[typeName] &&
15188                this.config.enumValues[typeName].mappedValues &&
15189                typeof this.config.enumValues[typeName].mappedValues[enumValue] !== 'undefined') {
15190                enumValue = this.config.enumValues[typeName].mappedValues[enumValue];
15191            }
15192            return comment + visitor_plugin_common_index_esm_indent(`${optionName}: ${wrapWithSingleQuotes(enumValue)}`);
15193        })
15194            .join(', \n')).string;
15195        const enumType = new DeclarationBlock(this._declarationBlockConfig)
15196            .export()
15197            .asKind('type')
15198            .withName(this.convertName(node, { useTypesPrefix: this.config.enumPrefix }))
15199            .withComment(node.description)
15200            .withContent(`$Values<typeof ${enumValuesName}>`).string;
15201        return [enumValues, enumType].join('\n\n');
15202    }
15203    getPunctuation(declarationKind) {
15204        return declarationKind === 'type' ? ',' : ';';
15205    }
15206}
15207
15208const flow_index_esm_plugin = (schema, documents, config) => {
15209    const header = `// @flow\n`;
15210    const printedSchema = Object(printSchema["b" /* printSchema */])(schema);
15211    const astNode = Object(parser["parse"])(printedSchema);
15212    const visitor = new index_esm_FlowVisitor(schema, config);
15213    const visitorResult = Object(language_visitor["c" /* visit */])(astNode, {
15214        leave: visitor,
15215    });
15216    return {
15217        prepend: [header, ...visitor.getEnumsImports()],
15218        content: [visitor.scalarsDefinition, ...visitorResult.definitions].join('\n'),
15219    };
15220};
15221
15222
15223//# sourceMappingURL=index.esm.js.map
15224
15225// CONCATENATED MODULE: ./node_modules/@graphql-codegen/flow-operations/index.esm.js
15226
15227
15228
15229
15230
15231class index_esm_FlowWithPickSelectionSetProcessor extends BaseSelectionSetProcessor {
15232    transformAliasesPrimitiveFields(schemaType, fields) {
15233        if (fields.length === 0) {
15234            return [];
15235        }
15236        const useFlowExactObject = this.config.useFlowExactObjects;
15237        const formatNamedField = this.config.formatNamedField;
15238        const fieldObj = schemaType.getFields();
15239        const parentName = (this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : '') +
15240            this.config.convertName(schemaType.name, {
15241                useTypesPrefix: true,
15242            });
15243        return [
15244            `{${useFlowExactObject ? '|' : ''} ${fields
15245                .map(aliasedField => `${formatNamedField(aliasedField.alias, fieldObj[aliasedField.fieldName].type)}: $ElementType<${parentName}, '${aliasedField.fieldName}'>`)
15246                .join(', ')} ${useFlowExactObject ? '|' : ''}}`,
15247        ];
15248    }
15249    buildFieldsIntoObject(allObjectsMerged) {
15250        return `...{ ${allObjectsMerged.join(', ')} }`;
15251    }
15252    buildSelectionSetFromStrings(pieces) {
15253        if (pieces.length === 0) {
15254            return null;
15255        }
15256        else if (pieces.length === 1) {
15257            return pieces[0];
15258        }
15259        else {
15260            return `({\n  ${pieces.map(t => visitor_plugin_common_index_esm_indent(`...${t}`)).join(`,\n`)}\n})`;
15261        }
15262    }
15263    transformLinkFields(fields) {
15264        if (fields.length === 0) {
15265            return [];
15266        }
15267        const useFlowExactObject = this.config.useFlowExactObjects;
15268        return [
15269            `{${useFlowExactObject ? '|' : ''} ${fields
15270                .map(field => `${field.alias || field.name}: ${field.selectionSet}`)
15271                .join(', ')} ${useFlowExactObject ? '|' : ''}}`,
15272        ];
15273    }
15274    transformPrimitiveFields(schemaType, fields) {
15275        if (fields.length === 0) {
15276            return [];
15277        }
15278        const useFlowExactObject = this.config.useFlowExactObjects;
15279        const formatNamedField = this.config.formatNamedField;
15280        const parentName = (this.config.namespacedImportName ? `${this.config.namespacedImportName}.` : '') +
15281            this.config.convertName(schemaType.name, {
15282                useTypesPrefix: true,
15283            });
15284        const fieldObj = schemaType.getFields();
15285        let hasConditionals = false;
15286        const conditilnalsList = [];
15287        let resString = `$Pick<${parentName}, {${useFlowExactObject ? '|' : ''} ${fields
15288            .map(field => {
15289            if (field.isConditional) {
15290                hasConditionals = true;
15291                conditilnalsList.push(field.fieldName);
15292            }
15293            return `${formatNamedField(field.fieldName, fieldObj[field.fieldName].type)}: *`;
15294        })
15295            .join(', ')} ${useFlowExactObject ? '|' : ''}}>`;
15296        if (hasConditionals) {
15297            resString = `$MakeOptional<${resString}, ${conditilnalsList.map(field => `{ ${field}: * }`).join(' | ')}>`;
15298        }
15299        return [resString];
15300    }
15301    transformTypenameField(type, name) {
15302        return [`{ ${name}: ${type} }`];
15303    }
15304}
15305
15306class index_esm_FlowSelectionSetToObject extends index_esm_SelectionSetToObject {
15307    getUnknownType() {
15308        return 'any';
15309    }
15310    createNext(parentSchemaType, selectionSet) {
15311        return new index_esm_FlowSelectionSetToObject(this._processor, this._scalars, this._schema, this._convertName.bind(this), this._getFragmentSuffix.bind(this), this._loadedFragments, this._config, parentSchemaType, selectionSet);
15312    }
15313}
15314class index_esm_FlowDocumentsVisitor extends index_esm_BaseDocumentsVisitor {
15315    constructor(schema, config, allFragments) {
15316        super(config, {
15317            useFlowExactObjects: getConfigValue(config.useFlowExactObjects, true),
15318            useFlowReadOnlyTypes: getConfigValue(config.useFlowReadOnlyTypes, false),
15319        }, schema);
15320        auto_bind_default()(this);
15321        const wrapArray = (type) => `${this.config.useFlowReadOnlyTypes ? '$ReadOnlyArray' : 'Array'}<${type}>`;
15322        const wrapOptional = (type) => `?${type}`;
15323        const useFlowReadOnlyTypes = this.config.useFlowReadOnlyTypes;
15324        const formatNamedField = (name, type, isConditional = false) => {
15325            const optional = (!!type && !Object(definition["L" /* isNonNullType */])(type)) || isConditional;
15326            return `${useFlowReadOnlyTypes ? '+' : ''}${name}${optional ? '?' : ''}`;
15327        };
15328        const processorConfig = {
15329            namespacedImportName: this.config.namespacedImportName,
15330            convertName: this.convertName.bind(this),
15331            enumPrefix: this.config.enumPrefix,
15332            scalars: this.scalars,
15333            formatNamedField,
15334            wrapTypeWithModifiers(baseType, type) {
15335                return wrapTypeWithModifiers(baseType, type, { wrapOptional, wrapArray });
15336            },
15337        };
15338        const processor = config.preResolveTypes
15339            ? new index_esm_PreResolveTypesProcessor(processorConfig)
15340            : new index_esm_FlowWithPickSelectionSetProcessor({
15341                ...processorConfig,
15342                useFlowExactObjects: this.config.useFlowExactObjects,
15343            });
15344        const enumsNames = Object.keys(schema.getTypeMap()).filter(typeName => Object(definition["E" /* isEnumType */])(schema.getType(typeName)));
15345        this.setSelectionSetHandler(new index_esm_FlowSelectionSetToObject(processor, this.scalars, this.schema, this.convertName.bind(this), this.getFragmentSuffix.bind(this), allFragments, this.config));
15346        this.setVariablesTransformer(new index_esm_FlowOperationVariablesToObject(this.scalars, this.convertName.bind(this), this.config.namespacedImportName, enumsNames, this.config.enumPrefix, {}, true));
15347    }
15348    getPunctuation(declarationKind) {
15349        return declarationKind === 'type' ? ',' : ';';
15350    }
15351    getImports() {
15352        return !this.config.globalNamespace
15353            ? this.config.fragmentImports
15354                // In flow, all non ` * as x` imports must be type imports
15355                .map(fragmentImport =>
15355 ({ ...fragmentImport, typesImport: true }))
15356                .map(fragmentImport => generateFragmentImportStatement(fragmentImport, 'type'))
15357            : [];
15358    }
15359}
15360
15361const flow_operations_index_esm_plugin = (schema, rawDocuments, config) => {
15362    const documents = config.flattenGeneratedTypes
15363        ? optimizeOperations(schema, rawDocuments, { includeFragments: true })
15364        : rawDocuments;
15365    const prefix = config.preResolveTypes
15366        ? ''
15367        : `type $Pick<Origin: Object, Keys: Object> = $ObjMapi<Keys, <Key>(k: Key) => $ElementType<Origin, Key>>;\n`;
15368    const allAst = Object(concatAST["a" /* concatAST */])(documents.map(v => v.document));
15369    const includedFragments = allAst.definitions.filter(d => d.kind === language_kinds["a" /* Kind */].FRAGMENT_DEFINITION);
15370    const allFragments = [
15371        ...includedFragments.map(fragmentDef => ({
15372            node: fragmentDef,
15373            name: fragmentDef.name.value,
15374            onType: fragmentDef.typeCondition.name.value,
15375            isExternal: false,
15376        })),
15377        ...(config.externalFragments || []),
15378    ];
15379    const visitor = new index_esm_FlowDocumentsVisitor(schema, config, allFragments);
15380    const visitorResult = Object(language_visitor["c" /* visit */])(allAst, {
15381        leave: visitor,
15382    });
15383    return {
15384        prepend: ['// @flow\n', ...visitor.getImports()],
15385        content: [prefix, ...visitorResult.definitions].join('\n'),
15386    };
15387};
15388
15389
15390//# sourceMappingURL=index.esm.js.map
15391
15392// EXTERNAL MODULE: ./node_modules/graphql/utilities/introspectionFromSchema.mjs
15393var introspectionFromSchema = __webpack_require__("FAQy");
15394
15395// CONCATENATED MODULE: ./node_modules/@graphql-codegen/introspection/index.esm.js
15396
15397
15398
15399
15400var index_esm_MapperKind;
15401(function (MapperKind) {
15402    MapperKind[MapperKind["Namespace"] = 0] = "Namespace";
15403    MapperKind[MapperKind["Default"] = 1] = "Default";
15404    MapperKind[MapperKind["Regular"] = 2] = "Regular";
15405})(index_esm_MapperKind || (index_esm_MapperKind = {}));
15406
15407const index_esm_getConfigValue = (value, defaultValue) => {
15408    if (value === null || value === undefined) {
15409        return defaultValue;
15410    }
15411    return value;
15412};
15413
15414const introspection_index_esm_plugin = async (schema, _documents, pluginConfig) => {
15415    const cleanSchema = pluginConfig.federation ? Object(index_esm["g" /* removeFederation */])(schema) : schema;
15416    const descriptions = index_esm_getConfigValue(pluginConfig.descriptions, true);
15417    const directiveIsRepeatable = index_esm_getConfigValue(pluginConfig.directiveIsRepeatable, true);
15418    const schemaDescription = index_esm_getConfigValue(pluginConfig.schemaDescription, undefined);
15419    const specifiedByUrl = index_esm_getConfigValue(pluginConfig.specifiedByUrl, undefined);
15420    const introspection = Object(introspectionFromSchema["a" /* introspectionFromSchema */])(cleanSchema, {
15421        descriptions,
15422        directiveIsRepeatable,
15423        schemaDescription,
15424        specifiedByUrl,
15425    });
15426    return pluginConfig.minify ? JSON.stringify(introspection) : JSON.stringify(introspection, null, 2);
15427};
15428const validate = async (schema, documents, config, outputFile) => {
15429    if (Object(path_browserify["extname"])(outputFile) !== '.json') {
15430        throw new Error(`Plugin "introspection" requires extension to be ".json"!`);
15431    }
15432};
15433
15434
15435//# sourceMappingURL=index.esm.js.map
15436
15437// CONCATENATED MODULE: ./node_modules/@graphql-codegen/fragment-matcher/index.esm.js
15438
15439
15440
15441
15442const index_esm_extensions = {
15443    ts: ['.ts', '.tsx'],
15444    js: ['.js', '.jsx'],
15445    json: ['.json'],
15446};
15447const fragment_matcher_index_esm_plugin = async (schema, _documents, pluginConfig, info) => {
15448    const config = {
15449        module: 'es2015',
15450        federation: false,
15451        apolloClientVersion: 3,
15452        useExplicitTyping: false,
15453        ...pluginConfig,
15454    };
15455    const apolloClientVersion = parseInt(config.apolloClientVersion);
15456    const cleanSchema = config.federation ? Object(index_esm["g" /* removeFederation */])(schema) : schema;
15457    const useExplicitTyping = config.useExplicitTyping;
15458    const introspection = await Object(execute["g" /* execute */])({
15459        schema: cleanSchema,
15460        document: Object(parser["parse"])(`
15461      {
15462        __schema {
15463          types {
15464            kind
15465            name
15466            possibleTypes {
15467              name
15468            }
15469          }
15470        }
15471      }
15472    `),
15473    });
15474    const ext = Object(path_browserify["extname"])(info.outputFile).toLowerCase();
15475    if (!introspection.data) {
15476        throw new Error(`Plugin "fragment-matcher" couldn't introspect the schema`);
15477    }
15478    const filterUnionAndInterfaceTypes = type => type.kind === 'UNION' || type.kind === 'INTERFACE';
15479    const createPossibleTypesCollection = (acc, type) => {
15480        return { ...acc, ...{ [type.name]: type.possibleTypes.map(possibleType => possibleType.name) } };
15481    };
15482    const filteredData = apolloClientVersion === 2
15483        ? {
15484            __schema: {
15485                ...introspection.data.__schema,
15486                types: introspection.data.__schema.types.filter(type => type.kind === 'UNION' || type.kind === 'INTERFACE'),
15487            },
15488        }
15489        : {
15490            possibleTypes: introspection.data.__schema.types
15491                .filter(filterUnionAndInterfaceTypes)
15492                .reduce(createPossibleTypesCollection, {}),
15493        };
15494    const content = JSON.stringify(filteredData, null, 2);
15495    if (index_esm_extensions.json.includes(ext)) {
15496        return content;
15497    }
15498    if (index_esm_extensions.js.includes(ext)) {
15499        const defaultExportStatement = config.module === 'es2015' ? `export default` : 'module.exports =';
15500        return `
15501      ${defaultExportStatement} ${content}
15502    `;
15503    }
15504    if (index_esm_extensions.ts.includes(ext)) {
15505        let typename;
15506        if (apolloClientVersion === 2) {
15507            typename = `IntrospectionResultData`;
15508        }
15509        else if (apolloClientVersion === 3) {
15510            typename = `PossibleTypesResultData`;
15511        }
15512        let type;
15513        if (useExplicitTyping) {
15514            type = `export type ${typename} = ${content};`;
15515        }
15516        else if (apolloClientVersion === 2) {
15517            type = `export interface ${typename} {
15518        __schema: {
15519          types: {
15520            kind: string;
15521            name: string;
15522            possibleTypes: {
15523              name: string;
15524            }[];
15525          }[];
15526        };
15527      }`;
15528        }
15529        else if (apolloClientVersion === 3) {
15530            type = `export interface ${typename} {
15531        possibleTypes: {
15532          [key: string]: string[]
15533        }
15534      }`;
15535        }
15536        return `
15537      ${type}
15538      const result: ${typename} = ${content};
15539      export default result;
15540    `;
15541    }
15542    throw new Error(`Extension ${ext} is not supported`);
15543};
15544const index_esm_validate = async (_schema, _documents, config, outputFile) => {
15545    const ext = Object(path_browserify["extname"])(outputFile).toLowerCase();
15546    const all = Object.values(index_esm_extensions).reduce((acc, exts) => [...acc, ...exts], []);
15547    if (!all.includes(ext)) {
15548        throw new Error(`Plugin "fragment-matcher" requires extension to be one of ${all.map(val => val.replace('.', '')).join(', ')}!`);
15549    }
15550    if (config.module === 'commonjs' && index_esm_extensions.ts.includes(ext)) {
15551        throw new Error(`Plugin "fragment-matcher" doesn't support commonjs modules combined with TypeScript!`);
15552    }
15553};
15554
15555
15556//# sourceMappingURL=index.esm.js.map
15557
15558// EXTERNAL MODULE: ./node_modules/graphql/utilities/lexicographicSortSchema.mjs
15559var lexicographicSortSchema = __webpack_require__("X4IK");
15560
15561// CONCATENATED MODULE: ./node_modules/@graphql-codegen/schema-ast/index.esm.js
15562
15563
15564
15565
15566
15567const schema_ast_index_esm_plugin = async (schema, _documents, { commentDescriptions = false, includeDirectives = false, sort = false, federation }) => {
15568    let outputSchema = federation ? Object(index_esm["g" /* removeFederation */])(schema) : schema;
15569    outputSchema = sort ? Object(lexicographicSortSchema["a" /* lexicographicSortSchema */])(outputSchema) : outputSchema;
15570    if (includeDirectives) {
15571        return Object(utils_index_esm["r" /* printSchemaWithDirectives */])(outputSchema);
15572    }
15573    return Object(printSchema["b" /* printSchema */])(outputSchema, { commentDescriptions: commentDescriptions });
15574};
15575const schema_ast_index_esm_validate = async (_schema, _documents, _config, outputFile, allPlugins) => {
15576    const singlePlugin = allPlugins.length === 1;
15577    if (singlePlugin && Object(path_browserify["extname"])(outputFile) !== '.graphql') {
15578        throw new Error(`Plugin "schema-ast" requires extension to be ".graphql"!`);
15579    }
15580};
15581function index_esm_transformSchemaAST(schema, config) {
15582    const printedSchema = Object(printSchema["b" /* printSchema */])(schema);
15583    const astNode = Object(parser["parse"])(printedSchema);
15584    const transformedAST = config.disableDescriptions
15585        ? Object(language_visitor["c" /* visit */])(astNode, {
15586            leave: node => ({
15587                ...node,
15588                description: undefined,
15589            }),
15590        })
15591        : astNode;
15592    const transformedSchema = config.disableDescriptions ? Object(buildASTSchema["a" /* buildASTSchema */])(transformedAST) : schema;
15593    return {
15594        schema: transformedSchema,
15595        ast: transformedAST,
15596    };
15597}
15598
15599
15600//# sourceMappingURL=index.esm.js.map
15601
15602// EXTERNAL MODULE: ./node_modules/min-indent/index.js
15603var min_indent = __webpack_require__("sQdO");
15604var min_indent_default = /*#__PURE__*/__webpack_require__.n(min_indent);
15605
15606// CONCATENATED MODULE: ./node_modules/@graphql-codegen/java-common/index.esm.js
15607
15608
15609
15610
15611function buildPackageNameFromPath(path) {
15612    const unixify = __webpack_require__("mZcR");
15613    return unixify(path || '')
15614        .replace(/src\/main\/.*?\//, '')
15615        .replace(/\//g, '.');
15616}
15617function index_esm_wrapTypeWithModifiers(baseType, typeNode, listType = 'Iterable') {
15618    if (typeNode.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE) {
15619        return index_esm_wrapTypeWithModifiers(baseType, typeNode.type, listType);
15620    }
15621    else if (typeNode.kind === language_kinds["a" /* Kind */].LIST_TYPE) {
15622        const innerType = index_esm_wrapTypeWithModifiers(baseType, typeNode.type, listType);
15623        return `${listType}<${innerType}>`;
15624    }
15625    else {
15626        return baseType;
15627    }
15628}
15629function stripIndent(string) {
15630    const indent = min_indent_default()(string);
15631    if (indent === 0) {
15632        return string;
15633    }
15634    const regex = new RegExp(`^[ \\t]{${indent}}`, 'gm');
15635    return string.replace(regex, '');
15636}
15637
15638class index_esm_JavaDeclarationBlock {
15639    constructor() {
15640        this._name = null;
15641        this._extendStr = [];
15642        this._implementsStr = [];
15643        this._kind = null;
15644        this._access = 'public';
15645        this._final = false;
15646        this._static = false;
15647        this._block = null;
15648        this._comment = null;
15649        this._annotations = [];
15650        this._members = [];
15651        this._methods = [];
15652        this._nestedClasses = [];
15653    }
15654    nestedClass(nstCls) {
15655        this._nestedClasses.push(nstCls);
15656        return this;
15657    }
15658    access(access) {
15659        this._access = access;
15660        return this;
15661    }
15662    asKind(kind) {
15663        this._kind = kind;
15664        return this;
15665    }
15666    final() {
15667        this._final = true;
15668        return this;
15669    }
15670    static() {
15671        this._static = true;
15672        return this;
15673    }
15674    annotate(annotations) {
15675        this._annotations = annotations;
15676        return this;
15677    }
15678    withComment(comment) {
15679        if (comment) {
15680            this._comment = transformComment(comment, 0);
15681        }
15682        return this;
15683    }
15684    withBlock(block) {
15685        this._block = block;
15686        return this;
15687    }
15688    extends(extendStr) {
15689        this._extendStr = extendStr;
15690        return this;
15691    }
15692    implements(implementsStr) {
15693        this._implementsStr = implementsStr;
15694        return this;
15695    }
15696    withName(name) {
15697        this._name = typeof name === 'object' ? name.value : name;
15698        return this;
15699    }
15700    printMember(member) {
15701        const flags = member.flags || {};
15702        const pieces = [
15703            member.access,
15704            flags.static ? 'static' : null,
15705            flags.final ? 'final' : null,
15706            flags.transient ? 'transient' : null,
15707            flags.volatile ? 'volatile' : null,
15708            ...(member.annotations || []).map(annotation => `@${annotation}`),
15709            member.type,
15710            member.name,
15711        ].filter(f => f);
15712        return pieces.join(' ') + (member.value ? ` = ${member.value}` : '');
15713    }
15714    printMethod(method) {
15715        const pieces = [
15716            ...method.methodAnnotations.map(a => `@${a}\n`),
15717            method.access,
15718            method.flags.static ? 'static' : null,
15719            method.flags.final ? 'final' : null,
15720            method.flags.transient ? 'transient' : null,
15721            method.flags.volatile ? 'volatile' : null,
15722            ...(method.returnTypeAnnotations || []).map(annotation => `@${annotation}`),
15723            method.returnType,
15724            method.name,
15725        ].filter(f => f);
15726        const args = method.args.map(arg => this.printMember(arg)).join(', ');
15727        return `${pieces.join(' ')}(${args}) {
15728${indentMultiline(method.implementation)}
15729}`;
15730    }
15731    addClassMember(name, type, value, typeAnnotations = [], access = null, flags = {}) {
15732        this._members.push({
15733            name,
15734            type,
15735            value,
15736            annotations: typeAnnotations,
15737            access,
15738            flags: {
15739                final: false,
15740                transient: false,
15741                volatile: false,
15742                static: false,
15743                ...flags,
15744            },
15745        });
15746        return this;
15747    }
15748    addClassMethod(name, returnType, impl, args = [], returnTypeAnnotations = [], access = null, flags = {}, methodAnnotations = []) {
15749        this._methods.push({
15750            name,
15751            returnType,
15752            implementation: impl,
15753            args,
15754            returnTypeAnnotations,
15755            access,
15756            flags: {
15757                final: false,
15758                transient: false,
15759                volatile: false,
15760                static: false,
15761                ...flags,
15762            },
15763            methodAnnotations: methodAnnotations || [],
15764        });
15765        return this;
15766    }
15767    get string() {
15768        let result = '';
15769        if (this._kind) {
15770            let name = '';
15771            if (this._name) {
15772                name = this._name;
15773            }
15774            let extendStr = '';
15775            let implementsStr = '';
15776            let annotatesStr = '';
15777            const final = this._final ? ' final' : '';
15778            const isStatic = this._static ? ' static' : '';
15779            if (this._extendStr.length > 0) {
15780                extendStr = ` extends ${this._extendStr.join(', ')}`;
15781            }
15782            if (this._implementsStr.length > 0) {
15783                implementsStr = ` implements ${this._implementsStr.join(', ')}`;
15784            }
15785            if (this._annotations.length > 0) {
15786                annotatesStr = this._annotations.map(a => `@${a}`).join('\n') + '\n';
15787            }
15788            result += `${annotatesStr}${this._access}${isStatic}${final} ${this._kind} ${name}${extendStr}${implementsStr} `;
15789        }
15790        const members = this._members.length
15791            ? indentMultiline(stripIndent(this._members.map(member => this.printMember(member) + ';').join('\n')))
15792            : null;
15793        const methods = this._methods.length
15794            ? indentMultiline(stripIndent(this._methods.map(method =>
15794 this.printMethod(method)).join('\n\n')))
15795            : null;
15796        const nestedClasses = this._nestedClasses.length
15797            ? this._nestedClasses.map(c => indentMultiline(c.string)).join('\n\n')
15798            : null;
15799        const before = '{';
15800        const after = '}';
15801        const block = [before, members, methods, nestedClasses, this._block, after].filter(f => f).join('\n');
15802        result += block;
15803        return (this._comment ? this._comment : '') + result + '\n';
15804    }
15805}
15806
15807const JAVA_SCALARS = {
15808    ID: 'Object',
15809    String: 'String',
15810    Boolean: 'Boolean',
15811    Int: 'Integer',
15812    Float: 'Double',
15813};
15814
15815
15816//# sourceMappingURL=index.esm.js.map
15817
15818// CONCATENATED MODULE: ./node_modules/@graphql-codegen/java/index.esm.js
15819
15820
15821
15822
15823
15824class index_esm_JavaResolversVisitor extends index_esm_BaseVisitor {
15825    constructor(rawConfig, _schema, defaultPackageName) {
15826        super(rawConfig, {
15827            enumValues: rawConfig.enumValues || {},
15828            listType: rawConfig.listType || 'Iterable',
15829            className: rawConfig.className || 'Types',
15830            classMembersPrefix: rawConfig.classMembersPrefix || '',
15831            package: rawConfig.package || defaultPackageName,
15832            scalars: buildScalarsFromConfig(_schema, rawConfig, JAVA_SCALARS, 'Object'),
15833            useEmptyCtor: rawConfig.useEmptyCtor || false,
15834        });
15835        this._schema = _schema;
15836        this._addHashMapImport = false;
15837        this._addMapImport = false;
15838        this._addListImport = false;
15839    }
15840    getImports() {
15841        const allImports = [];
15842        if (this._addHashMapImport) {
15843            allImports.push(`java.util.HashMap`);
15844        }
15845        if (this._addMapImport) {
15846            allImports.push(`java.util.Map`);
15847        }
15848        if (this._addListImport) {
15849            allImports.push(`java.util.List`);
15850            allImports.push(`java.util.stream.Collectors`);
15851        }
15852        return allImports.map(i => `import ${i};`).join('\n') + '\n';
15853    }
15854    wrapWithClass(content) {
15855        return new index_esm_JavaDeclarationBlock()
15856            .access('public')
15857            .asKind('class')
15858            .withName(this.config.className)
15859            .withBlock(indentMultiline(content)).string;
15860    }
15861    getPackageName() {
15862        return `package ${this.config.package};\n`;
15863    }
15864    getEnumValue(enumName, enumOption) {
15865        if (this.config.enumValues[enumName] &&
15866            typeof this.config.enumValues[enumName] === 'object' &&
15867            this.config.enumValues[enumName][enumOption]) {
15868            return this.config.enumValues[enumName][enumOption];
15869        }
15870        return enumOption;
15871    }
15872    EnumValueDefinition(node) {
15873        return (enumName) => {
15874            return visitor_plugin_common_index_esm_indent(`${this.getEnumValue(enumName, node.name.value)}`);
15875        };
15876    }
15877    EnumTypeDefinition(node) {
15878        this._addHashMapImport = true;
15879        this._addMapImport = true;
15880        const enumName = this.convertName(node.name);
15881        const enumValues = node.values
15882            .map(enumValue => {
15883            const a = enumValue(node.name.value);
15884            // replace reserved word new
15885            if (a.trim() === 'new') {
15886                return '_new';
15887            }
15888            return a;
15889        })
15890            .join(',\n');
15891        const enumCtor = indentMultiline(``);
15892        const enumBlock = [enumValues, enumCtor].join('\n');
15893        return new index_esm_JavaDeclarationBlock()
15894            .access('public')
15895            .asKind('enum')
15896            .withComment(node.description)
15897            .withName(enumName)
15898            .withBlock(enumBlock).string;
15899    }
15900    resolveInputFieldType(typeNode) {
15901        const innerType = getBaseTypeNode(typeNode);
15902        const schemaType = this._schema.getType(innerType.name.value);
15903        const isArray = typeNode.kind === language_kinds["a" /* Kind */].LIST_TYPE ||
15904            (typeNode.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE && typeNode.type.kind === language_kinds["a" /* Kind */].LIST_TYPE);
15905        let result;
15906        if (Object(definition["R" /* isScalarType */])(schemaType)) {
15907            if (this.scalars[schemaType.name]) {
15908                result = {
15909                    baseType: this.scalars[schemaType.name],
15910                    typeName: this.scalars[schemaType.name],
15911                    isScalar: true,
15912                    isEnum: false,
15913                    isArray,
15914                };
15915            }
15916            else {
15917                result = { isArray, baseType: 'Object', typeName: 'Object', isScalar: true, isEnum: false };
15918            }
15919        }
15920        else if (Object(definition["F" /* isInputObjectType */])(schemaType)) {
15921            const convertedName = this.convertName(schemaType.name);
15922            const typeName = convertedName.endsWith('Input') ? convertedName : `${convertedName}Input`;
15923            result = {
15924                baseType: typeName,
15925                typeName: typeName,
15926                isScalar: false,
15927                isEnum: false,
15928                isArray,
15929            };
15930        }
15931        else if (Object(definition["E" /* isEnumType */])(schemaType)) {
15932            result = {
15933                isArray,
15934                baseType: this.convertName(schemaType.name),
15935                typeName: this.convertName(schemaType.name),
15936                isScalar: false,
15937                isEnum: true,
15938            };
15939        }
15940        else {
15941            result = { isArray, baseType: 'Object', typeName: 'Object', isScalar: true, isEnum: false };
15942        }
15943        if (result) {
15944            result.typeName = index_esm_wrapTypeWithModifiers(result.typeName, typeNode, this.config.listType);
15945        }
15946        return result;
15947    }
15948    buildInputTransfomer(name, inputValueArray) {
15949        this._addMapImport = true;
15950        const classMembers = inputValueArray
15951            .map(arg => {
15952            const typeToUse = this.resolveInputFieldType(arg.type);
15953            if (arg.name.value === 'interface' || arg.name.value === 'new') {
15954                // forcing prefix of _ since interface is a keyword in JAVA
15955                return visitor_plugin_common_index_esm_indent(`private ${typeToUse.typeName} _${this.config.classMembersPrefix}${arg.name.value};`);
15956            }
15957            else {
15958                return visitor_plugin_common_index_esm_indent(`private ${typeToUse.typeName} ${this.config.classMembersPrefix}${arg.name.value};`);
15959            }
15960        })
15961            .join('\n');
15962        const ctorSet = inputValueArray
15963            .map(arg => {
15964            const typeToUse = this.resolveInputFieldType(arg.type);
15965            if (typeToUse.isArray && !typeToUse.isScalar) {
15966                this._addListImport = true;
15967                return indentMultiline(`if (args.get("${arg.name.value}") != null) {
15968		this.${arg.name.value} = (${this.config.listType}<${typeToUse.baseType}>) args.get("${arg.name.value}");
15969}`, 3);
15970            }
15971            else if (typeToUse.isScalar) {
15972                return visitor_plugin_common_index_esm_indent(`this.${this.config.classMembersPrefix}${arg.name.value} = (${typeToUse.typeName}) args.get("${arg.name.value}");`, 3);
15973            }
15974            else if (typeToUse.isEnum) {
15975                return indentMultiline(`if (args.get("${arg.name.value}") instanceof ${typeToUse.typeName}) {
15976  this.${this.config.classMembersPrefix}${arg.name.value} = (${typeToUse.typeName}) args.get("${arg.name.value}");
15977} else {
15978  this.${this.config.classMembersPrefix}${arg.name.value} = ${typeToUse.typeName}.valueOfLabel((String) args.get("${arg.name.value}"));
15979}`, 3);
15980            }
15981            else {
15982                if (arg.name.value === 'interface') {
15983                    // forcing prefix of _ since interface is a keyword in JAVA
15984                    return visitor_plugin_common_index_esm_indent(`this._${this.config.classMembersPrefix}${arg.name.value} = new ${typeToUse.typeName}((Map<String, Object>) args.get("${arg.name.value}"));`, 3);
15985                }
15986                else {
15987                    return visitor_plugin_common_index_esm_indent(`this.${this.config.classMembersPrefix}${arg.name.value} = new ${typeToUse.typeName}((Map<String, Object>) args.get("${arg.name.value}"));`, 3);
15988                }
15989            }
15990        })
15991            .join('\n');
15992        const getters = inputValueArray
15993            .map(arg => {
15994            const typeToUse = this.resolveInputFieldType(arg.type);
15995            if (arg.name.value === 'interface' || arg.name.value === 'new') {
15996                // forcing prefix of _ since interface is a keyword in JAVA
15997                return visitor_plugin_common_index_esm_indent(`public ${typeToUse.typeName} get${this.convertName(arg.name.value)}() { return this._${this.config.classMembersPrefix}${arg.name.value}; }`);
15998            }
15999            else {
16000                return visitor_plugin_common_index_esm_indent(`public ${typeToUse.typeName} get${this.convertName(arg.name.value)}() { return this.${this.config.classMembersPrefix}${arg.name.value}; }`);
16001            }
16002        })
16003            .join('\n');
16004        const setters = inputValueArray
16005            .map(arg => {
16006            const typeToUse = this.resolveInputFieldType(arg.type);
16007            if (arg.name.value === 'interface' || arg.name.value === 'new') {
16008                return visitor_plugin_common_index_esm_indent(`public void set${this.convertName(arg.name.value)}(${typeToUse.typeName} _${arg.name.value}) { this._${arg.name.value} = _${arg.name.value}; }`);
16009            }
16010            else {
16011                return visitor_plugin_common_index_esm_indent(`public void set${this.convertName(arg.name.value)}(${typeToUse.typeName} ${arg.name.value}) { this.${arg.name.value} = ${arg.name.value}; }`);
16012            }
16013        })
16014            .join('\n');
16015        if (this.config.useEmptyCtor) {
16016            return `public static class ${name} {
16017${classMembers}
16018
16019  public ${name}() {}
16020
16021${getters}
16022${setters}
16023}`;
16024        }
16025        else {
16026            return `public static class ${name} {
16027${classMembers}
16028
16029  public ${name}(Map<String, Object> args) {
16030    if (args != null) {
16031${ctorSet}
16032    }
16033  }
16034
16035${getters}
16036${setters}
16037}`;
16038        }
16039    }
16040    FieldDefinition(node) {
16041        return (typeName) => {
16042            if (node.arguments.length > 0) {
16043                const transformerName = `${this.convertName(typeName, { useTypesPrefix: true })}${this.convertName(node.name.value, { useTypesPrefix: false })}Args`;
16044                return this.buildInputTransfomer(transformerName, node.arguments);
16045            }
16046            return null;
16047        };
16048    }
16049    InputObjectTypeDefinition(node) {
16050        const convertedName = this.convertName(node);
16051        const name = convertedName.endsWith('Input') ? convertedName : `${convertedName}Input`;
16052        return this.buildInputTransfomer(name, node.fields);
16053    }
16054    ObjectTypeDefinition(node) {
16055        const fieldsArguments = node.fields.map(f => f(node.name.value)).filter(r => r);
16056        return fieldsArguments.join('\n');
16057    }
16058}
16059
16060const java_index_esm_plugin = async (schema, documents, config, { outputFile }) => {
16061    const relevantPath = Object(path_browserify["dirname"])(Object(path_browserify["normalize"])(outputFile));
16062    const defaultPackageName = buildPackageNameFromPath(relevantPath);
16063    const visitor = new index_esm_JavaResolversVisitor(config, schema, defaultPackageName);
16064    const printedSchema = Object(printSchema["b" /* printSchema */])(schema);
16065    const astNode = Object(parser["parse"])(printedSchema);
16066    const visitorResult = Object(language_visitor["c" /* visit */])(astNode, { leave: visitor });
16067    const imports = visitor.getImports();
16068    const packageName = visitor.getPackageName();
16069    const blockContent = visitorResult.definitions.filter(d => typeof d === 'string').join('\n');
16070    const wrappedContent = visitor.wrapWithClass(blockContent);
16071    return [packageName, imports, wrappedContent].join('\n');
16072};
16073
16074
16075//# sourceMappingURL=index.esm.js.map
16076
16077// CONCATENATED MODULE: ./node_modules/@graphql-codegen/typescript-apollo-angular/index.esm.js
16078
16079
16080
16081
16082
16083
16084
16085const R_MOD = /module:\s*"([^"]+)"/; // matches: module: "..."
16086const R_NAME = /name:\s*"([^"]+)"/; // matches: name: "..."
16087function R_DEF(directive) {
16088    return new RegExp(`\\s+\\@${directive}\\([^)]+\\)`, 'gm');
16089}
16090class index_esm_ApolloAngularVisitor extends index_esm_ClientSideBaseVisitor {
16091    constructor(schema, fragments, _allOperations, rawConfig, documents) {
16092        super(schema, fragments, rawConfig, {
16093            sdkClass: rawConfig.sdkClass,
16094            ngModule: rawConfig.ngModule,
16095            namedClient: rawConfig.namedClient,
16096            serviceName: rawConfig.serviceName,
16097            serviceProvidedIn: rawConfig.serviceProvidedIn,
16098            serviceProvidedInRoot: rawConfig.serviceProvidedInRoot,
16099            querySuffix: rawConfig.querySuffix,
16100            mutationSuffix: rawConfig.mutationSuffix,
16101            subscriptionSuffix: rawConfig.subscriptionSuffix,
16102            additionalDI: getConfigValue(rawConfig.additionalDI, []),
16103            apolloAngularPackage: getConfigValue(rawConfig.apolloAngularPackage, 'apollo-angular'),
16104            apolloAngularVersion: getConfigValue(rawConfig.apolloAngularVersion, 2),
16105            gqlImport: getConfigValue(rawConfig.gqlImport, !rawConfig.apolloAngularVersion || rawConfig.apolloAngularVersion === 2 ? `apollo-angular#gql` : null),
16106        }, documents);
16107        this._allOperations = _allOperations;
16108        this._externalImportPrefix = '';
16109        this._operationsToInclude = [];
16110        this.dependencyInjections = '';
16111        this.dependencyInjectionArgs = '';
16112        if (this.config.importOperationTypesFrom) {
16113            this._externalImportPrefix = `${this.config.importOperationTypesFrom}.`;
16114            if (this.config.documentMode !== DocumentMode.external || !this.config.importDocumentNodeExternallyFrom) {
16115                // eslint-disable-next-line no-console
16116                console.warn('"importOperationTypesFrom" should be used with "documentMode=external" and "importDocumentNodeExternallyFrom"');
16117            }
16118            if (this.config.importOperationTypesFrom !== 'Operations') {
16119                // eslint-disable-next-line no-console
16120                console.warn('importOperationTypesFrom only works correctly when left empty or set to "Operations"');
16121            }
16122        }
16123        const dependencyInjections = ['apollo: Apollo.Apollo'].concat(this.config.additionalDI);
16124        const dependencyInjectionArgs = dependencyInjections.map(content => {
16125            return content.split(':')[0];
16126        });
16127        this.dependencyInjections = dependencyInjections.join(', ');
16128        this.dependencyInjectionArgs = dependencyInjectionArgs.join(', ');
16129        auto_bind_default()(this);
16130    }
16131    getImports() {
16132        const baseImports = super.getImports();
16133        const hasOperations = this._collectedOperations.length > 0;
16134        if (!hasOperations) {
16135            return baseImports;
16136        }
16137        const imports = [
16138            `import { Injectable } from '@angular/core';`,
16139            `import * as Apollo from '${this.config.apolloAngularPackage}';`,
16140        ];
16141        if (this.config.sdkClass) {
16142            const corePackage = this.config.apolloAngularVersion > 1 ? '@apollo/client/core' : 'apollo-client';
16143            imports.push(`import * as ApolloCore from '${corePackage}';`);
16144        }
16145        const defs = {};
16146        this._allOperations
16147            .filter(op => this._operationHasDirective(op, 'NgModule') || !!this.config.ngModule)
16148            .forEach(op => {
16149            const def = this._operationHasDirective(op, 'NgModule')
16150                ? this._extractNgModule(op)
16151                : this._parseNgModule(this.config.ngModule);
16152            // by setting key as link we easily get rid of duplicated imports
16153            // every path should be relative to the output file
16154            defs[def.link] = {
16155                path: def.path,
16156                module: def.module,
16157            };
16158        });
16159        if (this.config.serviceProvidedIn) {
16160            const ngModule = this._parseNgModule(this.config.serviceProvidedIn);
16161            defs[ngModule.link] = {
16162                path: ngModule.path,
16163                module: ngModule.module,
16164            };
16165        }
16166        Object.keys(defs).forEach(key => {
16167            const def = defs[key];
16168            // Every Angular Module that I've seen in my entire life use named exports
16169            imports.push(`import { ${def.module} } from '${def.path}';`);
16170        });
16171        return [...baseImports, ...imports];
16172    }
16173    _extractNgModule(operation) {
16174        const [, link] = Object(printer["a" /* print */])(operation).match(R_MOD);
16175        return this._parseNgModule(link);
16176    }
16177    _parseNgModule(link) {
16178        const [path, module] = link.split('#');
16179        return {
16180            path,
16181            module,
16182            link,
16183        };
16184    }
16185    _operationHasDirective(operation, directive) {
16186        if (typeof operation === 'string') {
16187            return operation.includes(`@${directive}`);
16188        }
16189        let found = false;
16190        Object(language_visitor["c" /* visit */])(operation, {
16191            Directive(node) {
16192                if (node.name.value === directive) {
16193                    found = true;
16194                }
16195            },
16196        });
16197        return found;
16198    }
16199    _removeDirective(document, directive) {
16200        if (this._operationHasDirective(document, directive)) {
16201            return document.replace(R_DEF(directive), '');
16202        }
16203        return document;
16204    }
16205    _removeDirectives(document, directives) {
16206        return directives.reduce((doc, directive) => this._removeDirective(doc, directive), document);
16207    }
16208    _extractDirective(operation, directive) {
16209        const directives = Object(printer["a" /* print */])(operation).match(R_DEF(directive));
16210        if (directives.length > 1) {
16211            throw new Error(`The ${directive} directive used multiple times in '${operation.name}' operation`);
16212        }
16213        return directives[0];
16214    }
16215    _prepareDocument(documentStr) {
16216        return this._removeDirectives(documentStr, ['NgModule', 'namedClient']);
16217    }
16218    _namedClient(operation) {
16219        let name;
16220        if (this._operationHasDirective(operation, 'namedClient')) {
16221            name = this._extractNamedClient(operation);
16222        }
16223        else if (this.config.namedClient) {
16224            name = this.config.namedClient;
16225        }
16226        return name ? `client = '${name}';` : '';
16227    }
16228    // tries to find namedClient directive and extract {name}
16229    _extractNamedClient(operation) {
16230        const [, name] = this._extractDirective(operation, 'namedClient').match(R_NAME);
16231        return name;
16232    }
16233    _providedIn(operation) {
16234        if (this._operationHasDirective(operation, 'NgModule')) {
16235            return this._extractNgModule(operation).module;
16236        }
16237        else if (this.config.ngModule) {
16238            return this._parseNgModule(this.config.ngModule).module;
16239        }
16240        return `'root'`;
16241    }
16242    _getDocumentNodeVariable(node, documentVariableName) {
16243        return this.config.importOperationTypesFrom
16244            ? `${this.config.importOperationTypesFrom}.${documentVariableName}`
16245            : documentVariableName;
16246    }
16247    _operationSuffix(operationType) {
16248        const defaultSuffix = 'GQL';
16249        switch (operationType) {
16250            case 'Query':
16251                return this.config.querySuffix || defaultSuffix;
16252            case 'Mutation':
16253                return this.config.mutationSuffix || defaultSuffix;
16254            case 'Subscription':
16255                return this.config.subscriptionSuffix || defaultSuffix;
16256            default:
16257                return defaultSuffix;
16258        }
16259    }
16260    buildOperation(node, documentVariableName, operationType, operationResultType, operationVariablesTypes) {
16261        const serviceName = `${this.convertName(node)}${this._operationSuffix(operationType)}`;
16262        this._operationsToInclude.push({
16263            node,
16264            documentVariableName,
16265            operationType,
16266            operationResultType,
16267            operationVariablesTypes,
16268            serviceName,
16269        });
16270        operationResultType = this._externalImportPrefix + operationResultType;
16271        operationVariablesTypes = this._externalImportPrefix + operationVariablesTypes;
16272        const content = `
16273  @Injectable({
16274    providedIn: ${this._providedIn(node)}
16275  })
16276  export class ${serviceName} extends Apollo.${operationType}<${operationResultType}, ${operationVariablesTypes}> {
16277    document = ${this._getDocumentNodeVariable(node, documentVariableName)};
16278    ${this._namedClient(node)}
16279    constructor(${this.dependencyInjections}) {
16280      super(${this.dependencyInjectionArgs});
16281    }
16282  }`;
16283        return content;
16284    }
16285    get sdkClass() {
16286        const actionType = operation => {
16287            switch (operation) {
16288                case 'Mutation':
16289                    return 'mutate';
16290                case 'Subscription':
16291                    return 'subscribe';
16292                default:
16293                    return 'fetch';
16294            }
16295        };
16296        const allPossibleActions = this._operationsToInclude
16297            .map(o => {
16298            const operationResultType = this._externalImportPrefix + o.operationResultType;
16299            const operationVariablesTypes = this._externalImportPrefix + o.operationVariablesTypes;
16300            const optionalVariables = !o.node.variableDefinitions ||
16301                o.node.variableDefinitions.length === 0 ||
16302                o.node.variableDefinitions.every(v => v.type.kind !== language_kinds["a" /* Kind */].NON_NULL_TYPE || !!v.defaultValue);
16303            const options = o.operationType === 'Mutation'
16304                ? `${o.operationType}OptionsAlone<${operationResultType}, ${operationVariablesTypes}>`
16305                : `${o.operationType}OptionsAlone<${operationVariablesTypes}>`;
16306            const method = `
16307${Object(dist["camelCase"])(o.node.name.value)}(variables${optionalVariables ? '?' : ''}: ${operationVariablesTypes}, options?: ${options}) {
16308  return this.${Object(dist["camelCase"])(o.serviceName)}.${actionType(o.operationType)}(variables, options)
16309}`;
16310            let watchMethod;
16311            if (o.operationType === 'Query') {
16312                watchMethod = `
16313
16314${Object(dist["camelCase"])(o.node.name.value)}Watch(variables${optionalVariables ? '?' : ''}: ${operationVariablesTypes}, options?: WatchQueryOptionsAlone<${operationVariablesTypes}>) {
16315  return this.${Object(dist["camelCase"])(o.serviceName)}.watch(variables, options)
16316}`;
16317            }
16318            return [method, watchMethod].join('');
16319        })
16320            .map(s => indentMultiline(s, 2));
16321        // Inject the generated services in the constructor
16322        const injectString = (service) => `private ${Object(dist["camelCase"])(service)}: ${service}`;
16323        const injections = this._operationsToInclude
16324            .map(op => injectString(op.serviceName))
16325            .map(s => indentMultiline(s, 3))
16326            .join(',\n');
16327        const serviceName = this.config.serviceName || 'ApolloAngularSDK';
16328        const providedIn = this.config.serviceProvidedIn
16329            ? `{ providedIn: ${this._parseNgModule(this.config.serviceProvidedIn).module} }`
16330            : this.config.serviceProvidedInRoot === false
16331                ? ''
16332                : `{ providedIn: 'root' }`;
16333        return `
16334  type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
16335
16336  interface WatchQueryOptionsAlone<V>
16337    extends Omit<ApolloCore.WatchQueryOptions<V>, 'query' | 'variables'> {}
16338    
16339  interface QueryOptionsAlone<V>
16340    extends Omit<ApolloCore.QueryOptions<V>, 'query' | 'variables'> {}
16341    
16342  interface MutationOptionsAlone<T, V>
16343    extends Omit<ApolloCore.MutationOptions<T, V>, 'mutation' | 'variables'> {}
16344    
16345  interface SubscriptionOptionsAlone<V>
16346    extends Omit<ApolloCore.SubscriptionOptions<V>, 'query' | 'variables'> {}
16347
16348  @Injectable(${providedIn})
16349  export class ${serviceName} {
16350    constructor(
16351${injections}
16352    ) {}
16353  ${allPossibleActions.join('\n')}
16354  }`;
16355    }
16356}
16357
16358const typescript_apollo_angular_index_esm_plugin = (schema, documents, config) => {
16359    const allAst = Object(concatAST["a" /* concatAST */])(documents.map(v => v.document));
16360    const operations = allAst.definitions.filter(d => d.kind === language_kinds["a" /* Kind */].OPERATION_DEFINITION);
16361    const allFragments = [
16362        ...allAst.definitions.filter(d => d.kind === language_kinds["a" /* Kind */].FRAGMENT_DEFINITION).map(fragmentDef => ({
16363            node: fragmentDef,
16364            name: fragmentDef.name.value,
16365            onType: fragmentDef.typeCondition.name.value,
16366            isExternal: false,
16367        })),
16368        ...(config.externalFragments || []),
16369    ];
16370    const visitor = new index_esm_ApolloAngularVisitor(schema, allFragments, operations, config, documents);
16371    const visitorResult = Object(language_visitor["c" /* visit */])(allAst, { leave: visitor });
16372    return {
16373        prepend: visitor.getImports(),
16374        content: [
16375            visitor.fragments,
16376            ...visitorResult.definitions.filter(t => typeof t === 'string'),
16377            config.sdkClass ? visitor.sdkClass : null,
16378        ]
16379            .filter(a => a)
16380            .join('\n'),
16381    };
16382};
16383const index_esm_addToSchema = src_default.a `
16384  directive @NgModule(module: String!) on OBJECT | FIELD
16385  directive @namedClient(name: String!) on OBJECT | FIELD
16386`;
16387const typescript_apollo_angular_index_esm_validate = async (schema, documents, config, outputFile) => {
16388    if (Object(path_browserify["extname"])(outputFile) !== '.ts') {
16389        throw new Error(`Plugin "apollo-angular" requires extension to be ".ts"!`);
16390    }
16391};
16392
16393
16394//# sourceMappingURL=index.esm.js.map
16395
16396// CONCATENATED MODULE: ./node_modules/@graphql-codegen/typescript-react-apollo/index.esm.js
16397
16398
16399
16400
16401
16402
16403const APOLLO_CLIENT_3_UNIFIED_PACKAGE = `@apollo/client`;
16404const GROUPED_APOLLO_CLIENT_3_IDENTIFIER = 'Apollo';
16405class index_esm_ReactApolloVisitor extends index_esm_ClientSideBaseVisitor {
16406    constructor(schema, fragments, rawConfig, documents) {
16407        super(schema, fragments, rawConfig, {
16408            componentSuffix: getConfigValue(rawConfig.componentSuffix, 'Component'),
16409            withHOC: getConfigValue(rawConfig.withHOC, false),
16410            withComponent: getConfigValue(rawConfig.withComponent, false),
16411            withHooks: getConfigValue(rawConfig.withHooks, true),
16412            withMutationFn: getConfigValue(rawConfig.withMutationFn, true),
16413            withRefetchFn: getConfigValue(rawConfig.withRefetchFn, false),
16414            apolloReactCommonImportFrom: getConfigValue(rawConfig.apolloReactCommonImportFrom, rawConfig.reactApolloVersion === 2 ? '@apollo/react-common' : APOLLO_CLIENT_3_UNIFIED_PACKAGE),
16415            apolloReactComponentsImportFrom: getConfigValue(rawConfig.apolloReactComponentsImportFrom, rawConfig.reactApolloVersion === 2
16416                ? '@apollo/react-components'
16417                : `${APOLLO_CLIENT_3_UNIFIED_PACKAGE}/react/components`),
16418            apolloReactHocImportFrom: getConfigValue(rawConfig.apolloReactHocImportFrom, rawConfig.reactApolloVersion === 2 ? '@apollo/react-hoc' : `${APOLLO_CLIENT_3_UNIFIED_PACKAGE}/react/hoc`),
16419            apolloReactHooksImportFrom: getConfigValue(rawConfig.apolloReactHooksImportFrom, rawConfig.reactApolloVersion === 2 ? '@apollo/react-hooks' : APOLLO_CLIENT_3_UNIFIED_PACKAGE),
16420            reactApolloVersion: getConfigValue(rawConfig.reactApolloVersion, 3),
16421            withResultType: getConfigValue(rawConfig.withResultType, true),
16422            withMutationOptionsType: getConfigValue(rawConfig.withMutationOptionsType, true),
16423            addDocBlocks: getConfigValue(rawConfig.addDocBlocks, true),
16424            defaultBaseOptions: getConfigValue(rawConfig.defaultBaseOptions, {}),
16425            gqlImport: getConfigValue(rawConfig.gqlImport, rawConfig.reactApolloVersion === 2 ? null : `${APOLLO_CLIENT_3_UNIFIED_PACKAGE}#gql`),
16426        });
16427        this.rawConfig = rawConfig;
16428        this.imports = new Set();
16429        this._externalImportPrefix = this.config.importOperationTypesFrom ? `${this.config.importOperationTypesFrom}.` : '';
16430        this._documents = documents;
16431        auto_bind_default()(this);
16432    }
16433    getImportStatement(isTypeImport) {
16434        return isTypeImport && this.config.useTypeImports ? 'import type' : 'import';
16435    }
16436    getReactImport() {
16437        return `import * as React from 'react';`;
16438    }
16439    getApolloReactCommonIdentifier() {
16440        if (this.rawConfig.apolloReactCommonImportFrom || this.config.reactApolloVersion === 2) {
16441            return `ApolloReactCommon`;
16442        }
16443        return GROUPED_APOLLO_CLIENT_3_IDENTIFIER;
16444    }
16445    getApolloReactHooksIdentifier() {
16446        if (this.rawConfig.apolloReactHooksImportFrom || this.config.reactApolloVersion === 2) {
16447            return `ApolloReactHooks`;
16448        }
16449        return GROUPED_APOLLO_CLIENT_3_IDENTIFIER;
16450    }
16451    usesExternalHooksOnly() {
16452        const apolloReactCommonIdentifier = this.getApolloReactCommonIdentifier();
16453        return (apolloReactCommonIdentifier === GROUPED_APOLLO_CLIENT_3_IDENTIFIER &&
16454            this.config.apolloReactHooksImportFrom !== APOLLO_CLIENT_3_UNIFIED_PACKAGE &&
16455            this.config.withHooks &&
16456            !this.config.withComponent &&
16457            !this.config.withHOC);
16458    }
16459    getApolloReactCommonImport(isTypeImport) {
16460        const apolloReactCommonIdentifier = this.getApolloReactCommonIdentifier();
16461        return `${this.getImportStatement(isTypeImport &&
16462            (apolloReactCommonIdentifier !== GROUPED_APOLLO_CLIENT_3_IDENTIFIER || this.usesExternalHooksOnly()))} * as ${apolloReactCommonIdentifier} from '${this.config.apolloReactCommonImportFrom}';`;
16463    }
16464    getApolloReactComponentsImport(isTypeImport) {
16465        return `${this.getImportStatement(isTypeImport)} * as ApolloReactComponents from '${this.config.apolloReactComponentsImportFrom}';`;
16466    }
16467    getApolloReactHocImport(isTypeImport) {
16468        return `${this.getImportStatement(isTypeImport)} * as ApolloReactHoc from '${this.config.apolloReactHocImportFrom}';`;
16469    }
16470    getApolloReactHooksImport(isTypeImport) {
16471        return `${this.getImportStatement(isTypeImport)} * as ${this.getApolloReactHooksIdentifier()} from '${this.config.apolloReactHooksImportFrom}';`;
16472    }
16473    getOmitDeclaration() {
16474        return OMIT_TYPE;
16475    }
16476    getDefaultOptions() {
16477        return `const defaultOptions =  ${JSON.stringify(this.config.defaultBaseOptions)}`;
16478    }
16479    getDocumentNodeVariable(node, documentVariableName) {
16480        var _a, _b;
16481        return this.config.documentMode === DocumentMode.external
16482            ? `Operations.${(_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : ''}`
16483            : documentVariableName;
16484    }
16485    getImports() {
16486        const baseImports = super.getImports();
16487        const hasOperations = this._collectedOperations.length > 0;
16488        if (!hasOperations) {
16489            return baseImports;
16490        }
16491        return [...baseImports, ...Array.from(this.imports)];
16492    }
16493    _buildHocProps(operationName, operationType) {
16494        const typeVariableName = this._externalImportPrefix +
16495            this.convertName(operationName + Object(dist["pascalCase"])(operationType) + this._parsedConfig.operationResultSuffix);
16496        const variablesVarName = this._externalImportPrefix + this.convertName(operationName + Object(dist["pascalCase"])(operationType) + 'Variables');
16497        const typeArgs = `<${typeVariableName}, ${variablesVarName}>`;
16498        if (operationType === 'mutation') {
16499            this.imports.add(this.getApolloReactCommonImport(true));
16500            return `${this.getApolloReactCommonIdentifier()}.MutationFunction${typeArgs}`;
16501        }
16502        else {
16503            this.imports.add(this.getApolloReactHocImport(true));
16504            return `ApolloReactHoc.DataValue${typeArgs}`;
16505        }
16506    }
16507    _buildMutationFn(node, operationResultType, operationVariablesTypes) {
16508        var _a, _b;
16509        if (node.operation === 'mutation') {
16510            this.imports.add(this.getApolloReactCommonImport(true));
16511            return `export type ${this.convertName(((_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '') + 'MutationFn')} = ${this.getApolloReactCommonIdentifier()}.MutationFunction<${operationResultType}, ${operationVariablesTypes}>;`;
16512        }
16513        return null;
16514    }
16515    _buildOperationHoc(node, documentVariableName, operationResultType, operationVariablesTypes) {
16516        var _a, _b;
16517        this.imports.add(this.getApolloReactCommonImport(false));
16518        this.imports.add(this.getApolloReactHocImport(false));
16519        const nodeName = (_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
16520        const operationName = this.convertName(nodeName, { useTypesPrefix: false });
16521        const propsTypeName = this.convertName(nodeName, { suffix: 'Props' });
16522        const defaultDataName = node.operation === 'mutation' ? 'mutate' : 'data';
16523        const propsVar = `export type ${propsTypeName}<TChildProps = {}, TDataName extends string = '${defaultDataName}'> = {
16524      [key in TDataName]: ${this._buildHocProps(nodeName, node.operation)}
16525    } & TChildProps;`;
16526        const hocString = `export function with${operationName}<TProps, TChildProps = {}, TDataName extends string = '${defaultDataName}'>(operationOptions?: ApolloReactHoc.OperationOption<
16527  TProps,
16528  ${operationResultType},
16529  ${operationVariablesTypes},
16530  ${propsTypeName}<TChildProps, TDataName>>) {
16531    return ApolloReactHoc.with${Object(dist["pascalCase"])(node.operation)}<TProps, ${operationResultType}, ${operationVariablesTypes}, ${propsTypeName}<TChildProps, TDataName>>(${this.getDocumentNodeVariable(node, documentVariableName)}, {
16532      alias: '${Object(dist["camelCase"])(operationName)}',
16533      ...operationOptions
16534    });
16535};`;
16536        return [propsVar, hocString].filter(a => a).join('\n');
16537    }
16538    _buildComponent(node, documentVariableName, operationType, operationResultType, operationVariablesTypes) {
16539        var _a, _b;
16540        const nodeName = (_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
16541        const componentPropsName = this.convertName(nodeName, {
16542            suffix: this.config.componentSuffix + 'Props',
16543            useTypesPrefix: false,
16544        });
16545        const componentName = this.convertName(nodeName, {
16546            suffix: this.config.componentSuffix,
16547            useTypesPrefix: false,
16548        });
16549        const isVariablesRequired = operationType === 'Query' &&
16550            node.variableDefinitions.some(variableDef => variableDef.type.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE);
16551        this.imports.add(this.getReactImport());
16552        this.imports.add(this.getApolloReactCommonImport(true));
16553        this.imports.add(this.getApolloReactComponentsImport(false));
16554        this.imports.add(this.getOmitDeclaration());
16555        const propsType = `Omit<ApolloReactComponents.${operationType}ComponentOptions<${operationResultType}, ${operationVariablesTypes}>, '${operationType.toLowerCase()}'>`;
16556        let componentProps = '';
16557        if (isVariablesRequired) {
16558            componentProps = `export type ${componentPropsName} = ${propsType} & ({ variables: ${operationVariablesTypes}; skip?: boolean; } | { skip: boolean; });`;
16559        }
16560        else {
16561            componentProps = `export type ${componentPropsName} = ${propsType};`;
16562        }
16563        const component = `
16564    export const ${componentName} = (props: ${componentPropsName}) => (
16565      <ApolloReactComponents.${operationType}<${operationResultType}, ${operationVariablesTypes}> ${node.operation}={${this.getDocumentNodeVariable(node, documentVariableName)}} {...props} />
16566    );
16567    `;
16568        return [componentProps, component].join('\n');
16569    }
16570    _buildHooksJSDoc(node, operationName, operationType) {
16571        const variableString = node.variableDefinitions.reduce((acc, item) => {
16572            const name = item.variable.name.value;
16573            return `${acc}\n *      ${name}: // value for '${name}'`;
16574        }, '');
16575        const queryDescription = `
16576 * To run a query within a React component, call \`use${operationName}\` and pass it any options that fit your needs.
16577 * When your component renders, \`use${operationName}\` returns an object from Apollo Client that contains loading, error, and data properties
16578 * you can use to render your UI.`;
16579        const queryExample = `
16580 * const { data, loading, error } = use${operationName}({
16581 *   variables: {${variableString}
16582 *   },
16583 * });`;
16584        const mutationDescription = `
16585 * To run a mutation, you first call \`use${operationName}\` within a React component and pass it any options that fit your needs.
16586 * When your component renders, \`use${operationName}\` returns a tuple that includes:
16587 * - A mutate function that you can call at any time to execute the mutation
16588 * - An object with fields that represent the current status of the mutation's execution`;
16589        const mutationExample = `
16590 * const [${Object(dist["camelCase"])(operationName)}, { data, loading, error }] = use${operationName}({
16591 *   variables: {${variableString}
16592 *   },
16593 * });`;
16594        return `
16595/**
16596 * __use${operationName}__
16597 *${operationType === 'Mutation' ? mutationDescription : queryDescription}
16598 *
16599 * @param baseOptions options that will be passed into the ${operationType.toLowerCase()}, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#${operationType === 'Mutation' ? 'options-2' : 'options'};
16600 *
16601 * @example${operationType === 'Mutation' ? mutationExample : queryExample}
16602 */`;
16603    }
16604    _buildHooks(node, operationType, documentVariableName, operationResultType, operationVariablesTypes, hasRequiredVariables) {
16605        var _a, _b;
16606        const nodeName = (_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
16607        const suffix = this._getHookSuffix(nodeName, operationType);
16608        const operationName = this.convertName(nodeName, {
16609            suffix,
16610            useTypesPrefix: false,
16611            useTypesSuffix: false,
16612        });
16613        this.imports.add(this.getApolloReactCommonImport(true));
16614        this.imports.add(this.getApolloReactHooksImport(false));
16615        this.imports.add(this.getDefaultOptions());
16616        const hookFns = [
16617            `export function use${operationName}(baseOptions${hasRequiredVariables && operationType !== 'Mutation' ? '' : '?'}: ${this.getApolloReactHooksIdentifier()}.${operationType}HookOptions<${operationResultType}, ${operationVariablesTypes}>) {
16618        const options = {...defaultOptions, ...baseOptions}
16619        return ${this.getApolloReactHooksIdentifier()}.use${operationType}<${operationResultType}, ${operationVariablesTypes}>(${this.getDocumentNodeVariable(node, documentVariableName)}, options);
16620      }`,
16621        ];
16622        if (this.config.addDocBlocks) {
16623            hookFns.unshift(this._buildHooksJSDoc(node, operationName, operationType));
16624        }
16625        const hookResults = [`export type ${operationName}HookResult = ReturnType<typeof use${operationName}>;`];
16626        if (operationType === 'Query') {
16627            const lazyOperationName = this.convertName(nodeName, {
16628                suffix: Object(dist["pascalCase"])('LazyQuery'),
16629                useTypesPrefix: false,
16630            });
16631            hookFns.push(`export function use${lazyOperationName}(baseOptions?: ${this.getApolloReactHooksIdentifier()}.LazyQueryHookOptions<${operationResultType}, ${operationVariablesTypes}>) {
16632          const options = {...defaultOptions, ...baseOptions}
16633          return ${this.getApolloReactHooksIdentifier()}.useLazyQuery<${operationResultType}, ${operationVariablesTypes}>(${this.getDocumentNodeVariable(node, documentVariableName)}, options);
16634        }`);
16635            hookResults.push(`export type ${lazyOperationName}HookResult = ReturnType<typeof use${lazyOperationName}>;`);
16636        }
16637        return [...hookFns, ...hookResults].join('\n');
16638    }
16639    _getHookSuffix(name, operationType) {
16640        if (this.config.omitOperationSuffix) {
16641            return '';
16642        }
16643        if (!this.config.dedupeOperationSuffix) {
16644            return Object(dist["pascalCase"])(operationType);
16645        }
16646        if (name.includes('Query') || name.includes('Mutation') || name.includes('Subscription')) {
16647            return '';
16648        }
16649        return Object(dist["pascalCase"])(operationType);
16650    }
16651    _buildResultType(node, operationType, operationResultType, operationVariablesTypes) {
16652        var _a, _b;
16653        const componentResultType = this.convertName((_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '', {
16654            suffix: `${operationType}Result`,
16655            useTypesPrefix: false,
16656        });
16657        switch (node.operation) {
16658            case 'query':
16659                this.imports.add(this.getApolloReactCommonImport(true));
16660                return `export type ${componentResultType} = ${this.getApolloReactCommonIdentifier()}.QueryResult<${operationResultType}, ${operationVariablesTypes}>;`;
16661            case 'mutation':
16662                this.imports.add(this.getApolloReactCommonImport(true));
16663                return `export type ${componentResultType} = ${this.getApolloReactCommonIdentifier()}.MutationResult<${operationResultType}>;`;
16664            case 'subscription':
16665                this.imports.add(this.getApolloReactCommonImport(true));
16666                return `export type ${componentResultType} = ${this.getApolloReactCommonIdentifier()}.SubscriptionResult<${operationResultType}>;`;
16667            default:
16668                return '';
16669        }
16670    }
16671    _buildWithMutationOptionsType(node, operationResultType, operationVariablesTypes) {
16672        var _a, _b;
16673        if (node.operation !== 'mutation') {
16674            return '';
16675        }
16676        this.imports.add(this.getApolloReactCommonImport(true));
16677        const mutationOptionsType = this.convertName((_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '', {
16678            suffix: 'MutationOptions',
16679            useTypesPrefix: false,
16680        });
16681        return `export type ${mutationOptionsType} = ${this.getApolloReactCommonIdentifier()}.BaseMutationOptions<${operationResultType}, ${operationVariablesTypes}>;`;
16682    }
16683    _buildRefetchFn(node, documentVariableName, operationType, operationVariablesTypes) {
16684        var _a, _b;
16685        if (node.operation !== 'query') {
16686            return '';
16687        }
16688        const nodeName = (_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
16689        const operationName = this.convertName(nodeName, {
16690            suffix: this._getHookSuffix(nodeName, operationType),
16691            useTypesPrefix: false,
16692        });
16693        return `export function refetch${operationName}(variables?: ${operationVariablesTypes}) {
16694      return { query: ${this.getDocumentNodeVariable(node, documentVariableName)}, variables: variables }
16695    }`;
16696    }
16697    buildOperation(node, documentVariableName, operationType, operationResultType, operationVariablesTypes, hasRequiredVariables) {
16698        operationResultType = this._externalImportPrefix + operationResultType;
16699        operationVariablesTypes = this._externalImportPrefix + operationVariablesTypes;
16700        const mutationFn = this.config.withMutationFn || this.config.withComponent
16701            ? this._buildMutationFn(node, operationResultType, operationVariablesTypes)
16702            : null;
16703        const component = this.config.withComponent
16704            ? this._buildComponent(node, documentVariableName, operationType, operationResultType, operationVariablesTypes)
16705            : null;
16706        const hoc = this.config.withHOC
16707            ? this._buildOperationHoc(node, documentVariableName, operationResultType, operationVariablesTypes)
16708            : null;
16709        const hooks = this.config.withHooks
16710            ? this._buildHooks(node, operationType, documentVariableName, operationResultType, operationVariablesTypes, hasRequiredVariables)
16711            : null;
16712        const resultType = this.config.withResultType
16713            ? this._buildResultType(node, operationType, operationResultType, operationVariablesTypes)
16714            : null;
16715        const mutationOptionsType = this.config.withMutationOptionsType
16716            ? this._buildWithMutationOptionsType(node, operationResultType, operationVariablesTypes)
16717            : null;
16718        const refetchFn = this.config.withRefetchFn
16719            ? this._buildRefetchFn(node, documentVariableName, operationType, operationVariablesTypes)
16720            : null;
16721        return [mutationFn, component, hoc, hooks, resultType, mutationOptionsType, refetchFn].filter(a => a).join('\n');
16722    }
16723}
16724
16725const typescript_react_apollo_index_esm_plugin = (schema, documents, config) => {
16726    const allAst = Object(concatAST["a" /* concatAST */])(documents.map(v => v.document));
16727    const allFragments = [
16728        ...allAst.definitions.filter(d => d.kind === language_kinds["a" /* Kind */].FRAGMENT_DEFINITION).map(fragmentDef => ({
16729            node: fragmentDef,
16730            name: fragmentDef.name.value,
16731            onType: fragmentDef.typeCondition.name.value,
16732            isExternal: false,
16733        })),
16734        ...(config.externalFragments || []),
16735    ];
16736    const visitor = new index_esm_ReactApolloVisitor(schema, allFragments, config, documents);
16737    const visitorResult = Object(language_visitor["c" /* visit */])(allAst, { leave: visitor });
16738    return {
16739        prepend: visitor.getImports(),
16740        content: [visitor.fragments, ...visitorResult.definitions.filter(t => typeof t === 'string')].join('\n'),
16741    };
16742};
16743const typescript_react_apollo_index_esm_validate = async (schema, documents, config, outputFile) => {
16744    if (config.withComponent === true) {
16745        if (Object(path_browserify["extname"])(outputFile) !== '.tsx') {
16746            throw new Error(`Plugin "typescript-react-apollo" requires extension to be ".tsx" when withComponent: true is set!`);
16747        }
16748    }
16749    else {
16750        if (Object(path_browserify["extname"])(outputFile) !== '.ts' && Object(path_browserify["extname"])(outputFile) !== '.tsx') {
16751            throw new Error(`Plugin "typescript-react-apollo" requires extension to be ".ts" or ".tsx"!`);
16752        }
16753    }
16754};
16755
16756
16757//# sourceMappingURL=index.esm.js.map
16758
16759// CONCATENATED MODULE: ./node_modules/@graphql-codegen/typescript-stencil-apollo/index.esm.js
16760
16761
16762
16763
16764
16765
16766var StencilComponentType;
16767(function (StencilComponentType) {
16768    StencilComponentType["functional"] = "functional";
16769    StencilComponentType["class"] = "class";
16770})(StencilComponentType || (StencilComponentType = {}));
16771
16772class index_esm_StencilApolloVisitor extends index_esm_ClientSideBaseVisitor {
16773    constructor(schema, fragments, rawConfig) {
16774        super(schema, fragments, rawConfig, {
16775            componentType: getConfigValue(rawConfig.componentType, StencilComponentType.functional),
16776            noExport: rawConfig.componentType === StencilComponentType.class,
16777        });
16778        auto_bind_default()(this);
16779    }
16780    getImports() {
16781        const baseImports = super.getImports();
16782        const imports = [];
16783        const hasOperations = this._collectedOperations.length > 0;
16784        if (!hasOperations) {
16785            return baseImports;
16786        }
16787        if (this.config.componentType === StencilComponentType.class) {
16788            imports.push(`import 'stencil-apollo';`);
16789            imports.push(`import { Component, Prop, h } from '@stencil/core';`);
16790        }
16791        else {
16792            imports.push(`import * as StencilApollo from 'stencil-apollo';`);
16793            imports.push(`import { h } from '@stencil/core';`);
16794        }
16795        return [...baseImports, ...imports];
16796    }
16797    _buildOperationFunctionalComponent(node, documentVariableName, operationType, operationResultType, operationVariablesTypes) {
16798        const operationName = this.convertName(node.name.value);
16799        const propsTypeName = this.convertName(operationName + 'Props');
16800        const rendererSignature = Object(dist["pascalCase"])(`${operationType}Renderer`) + `<${operationResultType}, ${operationVariablesTypes}>`;
16801        const apolloStencilComponentTag = Object(dist["paramCase"])(`Apollo${operationType}`);
16802        const componentName = this.convertName(`${operationName}Component`);
16803        const propsVar = `
16804export type ${propsTypeName} = {
16805    variables ?: ${operationVariablesTypes};
16806    inlist ?: StencilApollo.${rendererSignature};
16807};
16808      `;
16809        const component = `
16810export const ${componentName} = (props: ${propsTypeName}, children: [StencilApollo.${rendererSignature}]) => (
16811  <${apolloStencilComponentTag} ${operationType.toLowerCase()}={ ${documentVariableName} } { ...props } renderer={ children[0] } />
16812);
16813      `;
16814        return [propsVar, component].filter(a => a).join('\n');
16815    }
16816    _buildClassComponent(node, documentVariableName, operationType, operationResultType, operationVariablesTypes) {
16817        const componentName = this.convertName(node.name.value + 'Component');
16818        const apolloStencilComponentTag = Object(dist["paramCase"])(`Apollo${operationType}`);
16819        const rendererSignature = Object(dist["pascalCase"])(`${operationType}Renderer`);
16820        return `
16821@Component({
16822    tag: '${Object(dist["paramCase"])(`Apollo${Object(dist["pascalCase"])(node.name.value)}`)}'
16823})
16824export class ${componentName} {
16825    @Prop() renderer: import('stencil-apollo').${rendererSignature}<${operationResultType}, ${operationVariablesTypes}>;
16826    @Prop() variables: ${operationVariablesTypes};
16827    render() {
16828        return <${apolloStencilComponentTag} ${operationType.toLowerCase()}={ ${documentVariableName} } variables={ this.variables } renderer={ this.renderer } />;
16829    }
16830}
16831      `;
16832    }
16833    buildOperation(node, documentVariableName, operationType, operationResultType, operationVariablesTypes) {
16834        switch (this.config.componentType) {
16835            case StencilComponentType.class:
16836                return this._buildClassComponent(node, documentVariableName, operationType, operationResultType, operationVariablesTypes);
16837            case StencilComponentType.functional:
16838                return this._buildOperationFunctionalComponent(node, documentVariableName, operationType, operationResultType, operationVariablesTypes);
16839            default:
16840                return '';
16841        }
16842    }
16843}
16844
16845const typescript_stencil_apollo_index_esm_plugin = (schema, documents, config) => {
16846    const allAst = Object(concatAST["a" /* concatAST */])(documents.map(v => v.document));
16847    const allFragments = [
16848        ...allAst.definitions.filter(d => d.kind === language_kinds["a" /* Kind */].FRAGMENT_DEFINITION).map(fragmentDef => ({
16849            node: fragmentDef,
16850            name: fragmentDef.name.value,
16851            onType: fragmentDef.typeCondition.name.value,
16852            isExternal: false,
16853        })),
16854        ...(config.externalFragments || []),
16855    ];
16856    const visitor = new index_esm_StencilApolloVisitor(schema, allFragments, config);
16857    const visitorResult = Object(language_visitor["c" /* visit */])(allAst, { leave: visitor });
16858    return {
16859        prepend: visitor.getImports(),
16860        content: ['', visitor.fragments, ...visitorResult.definitions.filter(t => typeof t === 'string')].join('\n'),
16861    };
16862};
16863const typescript_stencil_apollo_index_esm_validate = async (schema, documents, config, outputFile) => {
16864    if (Object(path_browserify["extname"])(outputFile) !== '.tsx') {
16865        throw new Error(`Plugin "stencil-apollo" requires extension to be ".tsx"!`);
16866    }
16867};
16868
16869
16870//# sourceMappingURL=index.esm.js.map
16871
16872// CONCATENATED MODULE: ./node_modules/@graphql-codegen/typescript-resolvers/index.esm.js
16873
16874
16875
16876
16877
16878
16879
16880const ENUM_RESOLVERS_SIGNATURE = 'export type EnumResolverSignature<T, AllowedValues = any> = { [key in keyof T]?: AllowedValues };';
16881class index_esm_TypeScriptResolversVisitor extends index_esm_BaseResolversVisitor {
16882    constructor(pluginConfig, schema) {
16883        super(pluginConfig, {
16884            avoidOptionals: getConfigValue(pluginConfig.avoidOptionals, false),
16885            useIndexSignature: getConfigValue(pluginConfig.useIndexSignature, false),
16886            wrapFieldDefinitions: getConfigValue(pluginConfig.wrapFieldDefinitions, false),
16887            allowParentTypeOverride: getConfigValue(pluginConfig.allowParentTypeOverride, false),
16888            optionalInfoArgument: getConfigValue(pluginConfig.optionalInfoArgument, false),
16889        }, schema);
16890        auto_bind_default()(this);
16891        this.setVariablesTransformer(new index_esm_TypeScriptOperationVariablesToObject(this.scalars, this.convertName, this.config.avoidOptionals, this.config.immutableTypes, this.config.namespacedImportName, [], this.config.enumPrefix, this.config.enumValues));
16892        if (this.config.useIndexSignature) {
16893            this._declarationBlockConfig = {
16894                blockTransformer(block) {
16895                    return `ResolversObject<${block}>`;
16896                },
16897            };
16898        }
16899    }
16900    transformParentGenericType(parentType) {
16901        if (this.config.allowParentTypeOverride) {
16902            return `ParentType = ${parentType}`;
16903        }
16904        return `ParentType extends ${parentType} = ${parentType}`;
16905    }
16906    formatRootResolver(schemaTypeName, resolverType, declarationKind) {
16907        return `${schemaTypeName}${this.config.avoidOptionals ? '' : '?'}: ${resolverType}${this.getPunctuation(declarationKind)}`;
16908    }
16909    clearOptional(str) {
16910        if (str.startsWith('Maybe')) {
16911            return str.replace(/Maybe<(.*?)>$/, '$1');
16912        }
16913        return str;
16914    }
16915    ListType(node) {
16916        return `Maybe<${super.ListType(node)}>`;
16917    }
16918    wrapWithListType(str) {
16919        return `${this.config.immutableTypes ? 'ReadonlyArray' : 'Array'}<${str}>`;
16920    }
16921    getParentTypeForSignature(node) {
16922        if (this._federation.isResolveReferenceField(node) && this.config.wrapFieldDefinitions) {
16923            return 'UnwrappedObject<ParentType>';
16924        }
16925        return 'ParentType';
16926    }
16927    NamedType(node) {
16928        return `Maybe<${super.NamedType(node)}>`;
16929    }
16930    NonNullType(node) {
16931        const baseValue = super.NonNullType(node);
16932        return this.clearOptional(baseValue);
16933    }
16934    getPunctuation(_declarationKind) {
16935        return ';';
16936    }
16937    buildEnumResolverContentBlock(node, mappedEnumType) {
16938        const valuesMap = `{ ${(node.values || [])
16939            .map(v => `${v.name}${this.config.avoidOptionals ? '' : '?'}: any`)
16940            .join(', ')} }`;
16941        this._globalDeclarations.add(ENUM_RESOLVERS_SIGNATURE);
16942        return `EnumResolverSignature<${valuesMap}, ${mappedEnumType}>`;
16943    }
16944    buildEnumResolversExplicitMappedValues(node, valuesMapping) {
16945        return `{ ${(node.values || [])
16946            .map(v => {
16947            const valueName = v.name;
16948            const mappedValue = valuesMapping[valueName];
16949            return `${valueName}: ${typeof mappedValue === 'number' ? mappedValue : `'${mappedValue}'`}`;
16950        })
16951            .join(', ')} }`;
16952    }
16953}
16954
16955const typescript_resolvers_index_esm_plugin = (schema, documents, config) => {
16956    const imports = [];
16957    if (!config.customResolveInfo) {
16958        imports.push('GraphQLResolveInfo');
16959    }
16960    const showUnusedMappers = typeof config.showUnusedMappers === 'boolean' ? config.showUnusedMappers : true;
16961    const noSchemaStitching = typeof config.noSchemaStitching === 'boolean' ? config.noSchemaStitching : false;
16962    if (config.noSchemaStitching === false) {
16963        // eslint-disable-next-line no-console
16964        console.warn(`The default behavior of 'noSchemaStitching' will be reversed in the next major release. Support for Schema Stitching will be disabled by default.`);
16965    }
16966    const indexSignature = config.useIndexSignature
16967        ? [
16968            'export type WithIndex<TObject> = TObject & Record<string, any>;',
16969            'export type ResolversObject<TObject> = WithIndex<TObject>;',
16970        ].join('\n')
16971        : '';
16972    const transformedSchema = config.federation ? Object(index_esm["c" /* addFederationReferencesToSchema */])(schema) : schema;
16973    const visitor = new index_esm_TypeScriptResolversVisitor(config, transformedSchema);
16974    const namespacedImportPrefix = visitor.config.namespacedImportName ? `${visitor.config.namespacedImportName}.` : '';
16975    const printedSchema = config.federation
16976        ? Object(utils_index_esm["r" /* printSchemaWithDirectives */])(transformedSchema)
16977        : Object(printSchema["b" /* printSchema */])(transformedSchema);
16978    const astNode = Object(parser["parse"])(printedSchema);
16979    // runs visitor
16980    const visitorResult = Object(language_visitor["c" /* visit */])(astNode, { leave: visitor });
16981    const optionalSignForInfoArg = visitor.config.optionalInfoArgument ? '?' : '';
16982    const prepend = [];
16983    const defsToInclude = [];
16984    const legacyStitchingResolverType = `
16985export type LegacyStitchingResolver<TResult, TParent, TContext, TArgs> = {
16986  fragment: string;
16987  resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
16988};`;
16989    const newStitchingResolverType = `
16990export type NewStitchingResolver<TResult, TParent, TContext, TArgs> = {
16991  selectionSet: string;
16992  resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
16993};`;
16994    const stitchingResolverType = `export type StitchingResolver<TResult, TParent, TContext, TArgs> = LegacyStitchingResolver<TResult, TParent, TContext, TArgs> | NewStitchingResolver<TResult, TParent, TContext, TArgs>;`;
16995    const resolverType = `export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> =`;
16996    const resolverFnUsage = `ResolverFn<TResult, TParent, TContext, TArgs>`;
16997    const stitchingResolverUsage = `StitchingResolver<TResult, TParent, TContext, TArgs>`;
16998    if (visitor.hasFederation()) {
16999        if (visitor.config.wrapFieldDefinitions) {
17000            defsToInclude.push(`export type UnwrappedObject<T> = {
17001        [P in keyof T]: T[P] extends infer R | Promise<infer R> | (() => infer R2 | Promise<infer R2>)
17002          ? R & R2 : T[P]
17003      };`);
17004        }
17005        defsToInclude.push(`export type ReferenceResolver<TResult, TReference, TContext> = (
17006      reference: TReference,
17007      context: TContext,
17008      info${optionalSignForInfoArg}: GraphQLResolveInfo
17009    ) => Promise<TResult> | TResult;`);
17010        defsToInclude.push(`
17011      type ScalarCheck<T, S> = S extends true ? T : NullableCheck<T, S>;
17012      type NullableCheck<T, S> = ${namespacedImportPrefix}Maybe<T> extends T ? ${namespacedImportPrefix}Maybe<ListCheck<NonNullable<T>, S>> : ListCheck<T, S>;
17013      type ListCheck<T, S> = T extends (infer U)[] ? NullableCheck<U, S>[] : GraphQLRecursivePick<T, S>;
17014      export type GraphQLRecursivePick<T, S> = { [K in keyof T & keyof S]: ScalarCheck<T[K], S[K]> };
17015    `);
17016    }
17017    if (noSchemaStitching) {
17018        // Resolver = ResolverFn;
17019        defsToInclude.push(`${resolverType} ${resolverFnUsage};`);
17020    }
17021    else {
17022        // StitchingResolver
17023        // Resolver =
17024        // | ResolverFn
17025        // | StitchingResolver;
17026        defsToInclude.push([
17027            legacyStitchingResolverType,
17028            newStitchingResolverType,
17029            stitchingResolverType,
17030            resolverType,
17031            `  | ${resolverFnUsage}`,
17032            `  | ${stitchingResolverUsage};`,
17033        ].join('\n'));
17034    }
17035    const importType = config.useTypeImports ? 'import type' : 'import';
17036    if (config.customResolverFn) {
17037        const parsedMapper = parseMapper(config.customResolverFn);
17038        if (parsedMapper.isExternal) {
17039            if (parsedMapper.default) {
17040                prepend.push(`${importType} ResolverFn from '${parsedMapper.source}';`);
17041            }
17042            else {
17043                prepend.push(`${importType} { ${parsedMapper.import} ${parsedMapper.import !== 'ResolverFn' ? 'as ResolverFn ' : ''}} from '${parsedMapper.source}';`);
17044            }
17045            prepend.push(`export${config.useTypeImports ? ' type' : ''} { ResolverFn };`);
17046        }
17047        else {
17048            prepend.push(`export type ResolverFn<TResult, TParent, TContext, TArgs> = ${parsedMapper.type}`);
17049        }
17050    }
17051    else {
17052        const defaultResolverFn = `
17053export type ResolverFn<TResult, TParent, TContext, TArgs> = (
17054  parent: TParent,
17055  args: TArgs,
17056  context: TContext,
17057  info${optionalSignForInfoArg}: GraphQLResolveInfo
17058) => Promise<TResult> | TResult;`;
17059        defsToInclude.push(defaultResolverFn);
17060    }
17061    const header = `${indexSignature}
17062
17063${visitor.getResolverTypeWrapperSignature()}
17064
17065${defsToInclude.join('\n')}
17066
17067export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (
17068  parent: TParent,
17069  args: TArgs,
17070  context: TContext,
17071  info${optionalSignForInfoArg}: GraphQLResolveInfo
17072) => AsyncIterator<TResult> | Promise<AsyncIterator<TResult>>;
17073
17074export type SubscriptionResolveFn<TResult, TParent, TContext, TArgs> = (
17075  parent: TParent,
17076  args: TArgs,
17077  context: TContext,
17078  info${optionalSignForInfoArg}: GraphQLResolveInfo
17079) => TResult | Promise<TResult>;
17080
17081export interface SubscriptionSubscriberObject<TResult, TKey extends string, TParent, TContext, TArgs> {
17082  subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>;
17083  resolve?: SubscriptionResolveFn<TResult, { [key in TKey]: TResult }, TContext, TArgs>;
17084}
17085
17086export interface SubscriptionResolverObject<TResult, TParent, TContext, TArgs> {
17087  subscribe: SubscriptionSubscribeFn<any, TParent, TContext, TArgs>;
17088  resolve: SubscriptionResolveFn<TResult, any, TContext, TArgs>;
17089}
17090
17091export type SubscriptionObject<TResult, TKey extends string, TParent, TContext, TArgs> =
17092  | SubscriptionSubscriberObject<TResult, TKey, TParent, TContext, TArgs>
17093  | SubscriptionResolverObject<TResult, TParent, TContext, TArgs>;
17094
17095export type SubscriptionResolver<TResult, TKey extends string, TParent = {}, TContext = {}, TArgs = {}> =
17096  | ((...args: any[]) => SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>)
17097  | SubscriptionObject<TResult, TKey, TParent, TContext, TArgs>;
17098
17099export type TypeResolveFn<TTypes, TParent = {}, TContext = {}> = (
17100  parent: TParent,
17101  context: TContext,
17102  info${optionalSignForInfoArg}: GraphQLResolveInfo
17103) => ${namespacedImportPrefix}Maybe<TTypes> | Promise<${namespacedImportPrefix}Maybe<TTypes>>;
17104
17105export type IsTypeOfResolverFn<T = {}, TContext = {}> = (obj: T, context: TContext, info${optionalSignForInfoArg}: GraphQLResolveInfo) => boolean | Promise<boolean>;
17106
17107export type NextResolverFn<T> = () => Promise<T>;
17108
17109export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs = {}> = (
17110  next: NextResolverFn<TResult>,
17111  parent: TParent,
17112  args: TArgs,
17113  context: TContext,
17114  info${optionalSignForInfoArg}: GraphQLResolveInfo
17115) => TResult | Promise<TResult>;
17116`;
17117    const resolversTypeMapping = visitor.buildResolversTypes();
17118    const resolversParentTypeMapping = visitor.buildResolversParentTypes();
17119    const { getRootResolver, getAllDirectiveResolvers, mappersImports, unusedMappers, hasScalars } = visitor;
17120    if (hasScalars()) {
17121        imports.push('GraphQLScalarType', 'GraphQLScalarTypeConfig');
17122    }
17123    if (showUnusedMappers && unusedMappers.length) {
17124        // eslint-disable-next-line no-console
17125        console.warn(`Unused mappers: ${unusedMappers.join(',')}`);
17126    }
17127    if (imports.length) {
17128        prepend.push(`${importType} { ${imports.join(', ')} } from 'graphql';`);
17129    }
17130    if (config.customResolveInfo) {
17131        const parsedMapper = parseMapper(config.customResolveInfo);
17132        if (parsedMapper.isExternal) {
17133            if (parsedMapper.default) {
17134                prepend.push(`import GraphQLResolveInfo from '${parsedMapper.source}'`);
17135            }
17136            prepend.push(`import { ${parsedMapper.import} ${parsedMapper.import !== 'GraphQLResolveInfo' ? 'as GraphQLResolveInfo' : ''} } from '${parsedMapper.source}';`);
17137        }
17138        else {
17139            prepend.push(`type GraphQLResolveInfo = ${parsedMapper.type}`);
17140        }
17141    }
17142    prepend.push(...mappersImports, ...visitor.globalDeclarations);
17143    return {
17144        prepend,
17145        content: [
17146            header,
17147            resolversTypeMapping,
17148            resolversParentTypeMapping,
17149            ...visitorResult.definitions.filter(d => typeof d === 'string'),
17150            getRootResolver(),
17151            getAllDirectiveResolvers(),
17152        ].join('\n'),
17153    };
17154};
17155
17156
17157//# sourceMappingURL=index.esm.js.map
17158
17159// CONCATENATED MODULE: ./node_modules/@graphql-codegen/flow-resolvers/index.esm.js
17160
17161
17162
17163
17164
17165
17166
17167const FLOW_REQUIRE_FIELDS_TYPE = `export type $RequireFields<Origin, Keys> = $Diff<Origin, Keys> & $ObjMapi<Keys, <Key>(k: Key) => $NonMaybeType<$ElementType<Origin, Key>>>;`;
17168
17169const index_esm_ENUM_RESOLVERS_SIGNATURE = 'export type EnumResolverSignature<T, AllowedValues = any> = $ObjMap<T, () => AllowedValues>;';
17170class index_esm_FlowResolversVisitor extends index_esm_BaseResolversVisitor {
17171    constructor(pluginConfig, schema) {
17172        super(pluginConfig, null, schema);
17173        auto_bind_default()(this);
17174        this.setVariablesTransformer(new index_esm_FlowOperationVariablesToObject(this.scalars, this.convertName, this.config.namespacedImportName));
17175    }
17176    _getScalar(name) {
17177        return `$ElementType<Scalars, '${name}'>`;
17178    }
17179    applyRequireFields(argsType, fields) {
17180        this._globalDeclarations.add(FLOW_REQUIRE_FIELDS_TYPE);
17181        return `$RequireFields<${argsType}, { ${fields.map(f => `${f.name.value}: *`).join(', ')} }>`;
17182    }
17183    applyOptionalFields(argsType, _fields) {
17184        return argsType;
17185    }
17186    buildMapperImport(source, types) {
17187        if (types[0] && types[0].asDefault) {
17188            return `import type ${types[0].identifier} from '${source}';`;
17189        }
17190        return `import { ${types.map(t => `type ${t.identifier}`).join(', ')} } from '${source}';`;
17191    }
17192    formatRootResolver(schemaTypeName, resolverType, declarationKind) {
17193        return `${schemaTypeName}?: ${resolverType}${resolverType.includes('<') ? '' : '<>'}${this.getPunctuation(declarationKind)}`;
17194    }
17195    transformParentGenericType(parentType) {
17196        return `ParentType = ${parentType}`;
17197    }
17198    ListType(node) {
17199        return `?${super.ListType(node)}`;
17200    }
17201    NamedType(node) {
17202        return `?${super.NamedType(node)}`;
17203    }
17204    NonNullType(node) {
17205        const baseValue = super.NonNullType(node);
17206        if (baseValue.startsWith('?')) {
17207            return baseValue.substr(1);
17208        }
17209        return baseValue;
17210    }
17211    applyMaybe(str) {
17212        return `?${str}`;
17213    }
17214    clearMaybe(str) {
17215        if (str.startsWith('?')) {
17216            return str.substr(1);
17217        }
17218        return str;
17219    }
17220    getTypeToUse(name) {
17221        const resolversType = this.convertName('ResolversTypes');
17222        return `$ElementType<${resolversType}, '${name}'>`;
17223    }
17224    getParentTypeToUse(name) {
17225        const resolversType = this.convertName('ResolversParentTypes');
17226        return `$ElementType<${resolversType}, '${name}'>`;
17227    }
17228    replaceFieldsInType(typeName, relevantFields) {
17229        return `$Diff<${typeName}, { ${relevantFields
17230            .map(f => `${f.fieldName}: * `)
17231            .join(', ')} }> & { ${relevantFields.map(f => `${f.fieldName}: ${f.replaceWithType}`).join(', ')} }`;
17232    }
17233    ScalarTypeDefinition(node) {
17234        const nameAsString = node.name;
17235        const baseName = this.getTypeToUse(nameAsString);
17236        this._collectedResolvers[node.name] = 'GraphQLScalarType';
17237        return new DeclarationBlock({
17238            ...this._declarationBlockConfig,
17239            blockTransformer(block) {
17240                return block;
17241            },
17242        })
17243            .export()
17244            .asKind('type')
17245            .withName(this.convertName(node, {
17246            suffix: 'ScalarConfig',
17247        }))
17248            .withBlock([visitor_plugin_common_index_esm_indent(`...GraphQLScalarTypeConfig<${baseName}, any>`), visitor_plugin_common_index_esm_indent(`name: '${node.name}'`)].join(', \n'))
17249            .string;
17250    }
17251    getPunctuation(declarationKind) {
17252        return declarationKind === 'type' ? ',' : ';';
17253    }
17254    buildEnumResolverContentBlock(node, mappedEnumType) {
17255        const valuesMap = `{| ${(node.values || [])
17256            .map(v => `${v.name}${this.config.avoidOptionals ? '' : '?'}: *`)
17257            .join(', ')} |}`;
17258        this._globalDeclarations.add(index_esm_ENUM_RESOLVERS_SIGNATURE);
17259        return `EnumResolverSignature<${valuesMap}, ${mappedEnumType}>`;
17260    }
17261    buildEnumResolversExplicitMappedValues(node, valuesMapping) {
17262        return `{| ${(node.values || [])
17263            .map(v => {
17264            const valueName = v.name;
17265            const mappedValue = valuesMapping[valueName];
17266            return `${valueName}: ${typeof mappedValue === 'number' ? mappedValue : `'${mappedValue}'`}`;
17267        })
17268            .join(', ')} |}`;
17269    }
17270}
17271
17272const flow_resolvers_index_esm_plugin = (schema, documents, config) => {
17273    const imports = ['type GraphQLResolveInfo'];
17274    const showUnusedMappers = typeof config.showUnusedMappers === 'boolean' ? config.showUnusedMappers : true;
17275    const gqlImports = `import { ${imports.join(', ')} } from 'graphql';`;
17276    const transformedSchema = config.federation ? Object(index_esm["c" /* addFederationReferencesToSchema */])(schema) : schema;
17277    const printedSchema = config.federation
17278        ? Object(utils_index_esm["r" /* printSchemaWithDirectives */])(transformedSchema)
17279        : Object(printSchema["b" /* printSchema */])(transformedSchema);
17280    const astNode = Object(parser["parse"])(printedSchema);
17281    const visitor = new index_esm_FlowResolversVisitor(config, transformedSchema);
17282    const visitorResult = Object(language_visitor["c" /* visit */])(astNode, { leave: visitor });
17283    const defsToInclude = [visitor.getResolverTypeWrapperSignature()];
17284    if (visitor.hasFederation()) {
17285        defsToInclude.push(`
17286    export type ReferenceResolver<TResult, TReference, TContext> = (
17287      reference: TReference,
17288      context: TContext,
17289      info: GraphQLResolveInfo
17290    ) => Promise<TResult> | TResult;
17291    `);
17292        defsToInclude.push(`export type RecursivePick<T, U> = T`);
17293    }
17294    const header = `export type Resolver<Result, Parent = {}, Context = {}
17294, Args = {}> = (
17295  parent: Parent,
17296  args: Args,
17297  context: Context,
17298  info: GraphQLResolveInfo
17299) => Promise<Result> | Result;
17300
17301export type SubscriptionSubscribeFn<Result, Parent, Context, Args> = (
17302  parent: Parent,
17303  args: Args,
17304  context: Context,
17305  info: GraphQLResolveInfo
17306) => AsyncIterator<Result> | Promise<AsyncIterator<Result>>;
17307
17308export type SubscriptionResolveFn<Result, Parent, Context, Args> = (
17309  parent: Parent,
17310  args: Args,
17311  context: Context,
17312  info: GraphQLResolveInfo
17313) => Result | Promise<Result>;
17314
17315export interface SubscriptionSubscriberObject<Result, Key: string, Parent, Context, Args> {
17316  subscribe: SubscriptionSubscribeFn<{ [key: Key]: Result }, Parent, Context, Args>;
17317  resolve?: SubscriptionResolveFn<Result, { [key: Key]: Result }, Context, Args>;
17318}
17319
17320export interface SubscriptionResolverObject<Result, Parent, Context, Args> {
17321  subscribe: SubscriptionSubscribeFn<mixed, Parent, Context, Args>;
17322  resolve: SubscriptionResolveFn<Result, mixed, Context, Args>;
17323}
17324
17325export type SubscriptionObject<Result, Key: string, Parent, Context, Args> =
17326  | SubscriptionSubscriberObject<Result, Key, Parent, Context, Args>
17327  | SubscriptionResolverObject<Result, Parent, Context, Args>;
17328
17329export type SubscriptionResolver<Result, Key: string, Parent = {}, Context = {}
17329, Args = {}> =
17330  | ((...args: Array<any>) => SubscriptionObject<Result, Key, Parent, Context, Args>)
17331  | SubscriptionObject<Result, Key, Parent, Context, Args>;
17332
17333export type TypeResolveFn<Types, Parent = {}, Context = {}> = (
17334  parent: Parent,
17335  context: Context,
17336  info: GraphQLResolveInfo
17337) => ?Types | Promise<?Types>;
17338
17339export type IsTypeOfResolverFn<T = {}, Context = {}> = (obj: T, context: Context, info: GraphQLResolveInfo) => boolean | Promise<boolean>;
17340
17341export type NextResolverFn<T> = () => Promise<T>;
17342
17343export type DirectiveResolverFn<Result = {}, Parent = {}, Args = {}, Context = {}> = (
17344  next: NextResolverFn<Result>,
17345  parent: Parent,
17346  args: Args,
17347  context: Context,
17348  info: GraphQLResolveInfo
17349) => Result | Promise<Result>;
17350
17351${defsToInclude.join('\n')}
17352`;
17353    const resolversTypeMapping = visitor.buildResolversTypes();
17354    const resolversParentTypeMapping = visitor.buildResolversParentTypes();
17355    const { getRootResolver, getAllDirectiveResolvers, mappersImports, unusedMappers, hasScalars } = visitor;
17356    if (hasScalars()) {
17357        imports.push('type GraphQLScalarTypeConfig');
17358    }
17359    if (showUnusedMappers && unusedMappers.length) {
17360        // eslint-disable-next-line no-console
17361        console.warn(`Unused mappers: ${unusedMappers.join(',')}`);
17362    }
17363    return {
17364        prepend: [gqlImports, ...mappersImports, ...visitor.globalDeclarations],
17365        content: [
17366            header,
17367            resolversTypeMapping,
17368            resolversParentTypeMapping,
17369            ...visitorResult.definitions.filter(d => typeof d === 'string'),
17370            getRootResolver(),
17371            getAllDirectiveResolvers(),
17372        ].join('\n'),
17373    };
17374};
17375
17376
17377//# sourceMappingURL=index.esm.js.map
17378
17379// CONCATENATED MODULE: ./node_modules/@graphql-codegen/java-resolvers/index.esm.js
17380
17381
17382
17383
17384
17385class java_resolvers_index_esm_JavaResolversVisitor extends index_esm_BaseVisitor {
17386    constructor(rawConfig, _schema, defaultPackageName) {
17387        super(rawConfig, {
17388            mappers: transformMappers(rawConfig.mappers || {}),
17389            package: rawConfig.package || defaultPackageName,
17390            defaultMapper: parseMapper(rawConfig.defaultMapper || 'Object'),
17391            className: rawConfig.className || 'Resolvers',
17392            listType: rawConfig.listType || 'Iterable',
17393            scalars: buildScalarsFromConfig(_schema, rawConfig, JAVA_SCALARS, 'Object'),
17394        });
17395        this._includeTypeResolverImport = false;
17396    }
17397    getImports() {
17398        const mappersImports = this.mappersImports();
17399        const allImports = [...mappersImports];
17400        if (this._includeTypeResolverImport) {
17401            allImports.push('graphql.schema.TypeResolver');
17402        }
17403        allImports.push('graphql.schema.DataFetcher');
17404        return allImports.map(i => `import ${i};`).join('\n') + '\n';
17405    }
17406    mappersImports() {
17407        return Object.keys(this.config.mappers)
17408            .map(typeName => this.config.mappers[typeName])
17409            .filter((m) => m.isExternal)
17410            .map(m => m.source);
17411    }
17412    getTypeToUse(type) {
17413        if (this.scalars[type.name.value]) {
17414            return this.scalars[type.name.value];
17415        }
17416        else if (this.config.mappers[type.name.value]) {
17417            return this.config.mappers[type.name.value].type;
17418        }
17419        return this.config.defaultMapper.type;
17420    }
17421    getPackageName() {
17422        return `package ${this.config.package};\n`;
17423    }
17424    wrapWithClass(content) {
17425        return new index_esm_JavaDeclarationBlock()
17426            .access('public')
17427            .asKind('class')
17428            .withName(this.config.className)
17429            .withBlock(indentMultiline(content)).string;
17430    }
17431    UnionTypeDefinition(node) {
17432        this._includeTypeResolverImport = true;
17433        return new index_esm_JavaDeclarationBlock()
17434            .access('public')
17435            .asKind('interface')
17436            .withName(this.convertName(node.name))
17437            .extends(['TypeResolver'])
17438            .withComment(node.description).string;
17439    }
17440    InterfaceTypeDefinition(node) {
17441        this._includeTypeResolverImport = true;
17442        return new index_esm_JavaDeclarationBlock()
17443            .access('public')
17444            .asKind('interface')
17445            .withName(this.convertName(node.name))
17446            .extends(['TypeResolver'])
17447            .withComment(node.description)
17448            .withBlock(node.fields.map(f => visitor_plugin_common_index_esm_indent(f(true))).join('\n')).string;
17449    }
17450    ObjectTypeDefinition(node) {
17451        return new index_esm_JavaDeclarationBlock()
17452            .access('public')
17453            .asKind('interface')
17454            .withName(this.convertName(node.name))
17455            .withComment(node.description)
17456            .withBlock(node.fields.map(f => visitor_plugin_common_index_esm_indent(f(false))).join('\n')).string;
17457    }
17458    FieldDefinition(node, key, _parent) {
17459        return (isInterface) => {
17460            const baseType = getBaseTypeNode(node.type);
17461            const typeToUse = this.getTypeToUse(baseType);
17462            const wrappedType = index_esm_wrapTypeWithModifiers(typeToUse, node.type, this.config.listType);
17463            if (isInterface) {
17464                return `default public DataFetcher<${wrappedType}> ${node.name.value}() { return null; }`;
17465            }
17466            else {
17467                return `public DataFetcher<${wrappedType}> ${node.name.value}();`;
17468            }
17469        };
17470    }
17471}
17472
17473const java_resolvers_index_esm_plugin = async (schema, documents, config, { outputFile }) => {
17474    const relevantPath = Object(path_browserify["dirname"])(Object(path_browserify["normalize"])(outputFile));
17475    const defaultPackageName = buildPackageNameFromPath(relevantPath);
17476    const visitor = new java_resolvers_index_esm_JavaResolversVisitor(config, schema, defaultPackageName);
17477    const printedSchema = Object(printSchema["b" /* printSchema */])(schema);
17478    const astNode = Object(parser["parse"])(printedSchema);
17479    const visitorResult = Object(language_visitor["c" /* visit */])(astNode, { leave: visitor });
17480    const mappersImports = visitor.getImports();
17481    const packageName = visitor.getPackageName();
17482    const blockContent = visitorResult.definitions.filter(d => typeof d === 'string').join('\n');
17483    const wrappedContent = visitor.wrapWithClass(blockContent);
17484    return [packageName, mappersImports, wrappedContent].join('\n');
17485};
17486
17487
17488//# sourceMappingURL=index.esm.js.map
17489
17490// EXTERNAL MODULE: ./node_modules/lodash/lodash.js
17491var lodash = __webpack_require__("LvDl");
17492
17493// CONCATENATED MODULE: ./node_modules/@graphql-codegen/typescript-mongodb/index.esm.js
17494
17495
17496
17497
17498
17499
17500
17501
17502class index_esm_FieldsTree {
17503    constructor() {
17504        this._fields = {};
17505    }
17506    addField(path, type) {
17507        if (type === undefined) {
17508            throw new Error('Did not expect type to be undefined');
17509        }
17510        Object(lodash["set"])(this._fields, path, type);
17511    }
17512    _getInnerField(root, level = 1) {
17513        if (typeof root === 'string') {
17514            return root;
17515        }
17516        const fields = Object.keys(root).map(fieldName => {
17517            const fieldValue = root[fieldName];
17518            return visitor_plugin_common_index_esm_indent(`${fieldName}: ${this._getInnerField(fieldValue, level + 1)},`, level);
17519        });
17520        return level === 1
17521            ? fields.join('\n')
17522            : `{
17523${fields.join('\n')}
17524${visitor_plugin_common_index_esm_indent('}', level - 1)}`;
17525    }
17526    get string() {
17527        return this._getInnerField(this._fields);
17528    }
17529}
17530
17531var Directives;
17532(function (Directives) {
17533    Directives["ID"] = "id";
17534    Directives["ENTITY"] = "entity";
17535    Directives["ABSTRACT_ENTITY"] = "abstractEntity";
17536    Directives["UNION"] = "union";
17537    Directives["LINK"] = "link";
17538    Directives["COLUMN"] = "column";
17539    Directives["EMBEDDED"] = "embedded";
17540    Directives["MAP"] = "map";
17541})(Directives || (Directives = {}));
17542
17543function resolveObjectId(pointer) {
17544    if (!pointer) {
17545        return { identifier: 'ObjectID', module: 'mongodb' };
17546    }
17547    if (pointer.includes('#')) {
17548        const [path, module] = pointer.split('#');
17549        return { identifier: path, module };
17550    }
17551    return {
17552        identifier: pointer,
17553        module: null,
17554    };
17555}
17556class index_esm_TsMongoVisitor extends index_esm_BaseVisitor {
17557    constructor(_schema, pluginConfig) {
17558        super(pluginConfig, {
17559            dbTypeSuffix: pluginConfig.dbTypeSuffix || 'DbObject',
17560            dbInterfaceSuffix: pluginConfig.dbInterfaceSuffix || 'DbInterface',
17561            objectIdType: resolveObjectId(pluginConfig.objectIdType).identifier,
17562            objectIdImport: resolveObjectId(pluginConfig.objectIdType).module,
17563            idFieldName: pluginConfig.idFieldName || '_id',
17564            enumsAsString: getConfigValue(pluginConfig.enumsAsString, true),
17565            avoidOptionals: getConfigValue(pluginConfig.avoidOptionals, false),
17566            scalars: buildScalarsFromConfig(_schema, pluginConfig),
17567        });
17568        this._schema = _schema;
17569        auto_bind_default()(this);
17570    }
17571    get objectIdImport() {
17572        if (this.config.objectIdImport === null) {
17573            return null;
17574        }
17575        return `import { ${this.config.objectIdType} } from '${this.config.objectIdImport}';`;
17576    }
17577    _resolveDirectiveValue(valueNode) {
17578        switch (valueNode.kind) {
17579            case language_kinds["a" /* Kind */].INT:
17580            case language_kinds["a" /* Kind */].STRING:
17581            case language_kinds["a" /* Kind */].FLOAT:
17582            case language_kinds["a" /* Kind */].BOOLEAN:
17583            case language_kinds["a" /* Kind */].ENUM:
17584                return valueNode.value;
17585            case language_kinds["a" /* Kind */].LIST:
17586                return valueNode.values.map(v => this._resolveDirectiveValue(v));
17587            case language_kinds["a" /* Kind */].NULL:
17588                return null;
17589            case language_kinds["a" /* Kind */].OBJECT:
17590                return valueNode.fields.reduce((prev, f) => {
17591                    return {
17592                        ...prev,
17593                        [f.name.value]: this._resolveDirectiveValue(f.value),
17594                    };
17595                }, {});
17596            default:
17597                return undefined;
17598        }
17599    }
17600    _getDirectiveArgValue(node, argName) {
17601        if (!node || !node.arguments || node.arguments.length === 0) {
17602            return undefined;
17603        }
17604        const foundArgument = node.arguments.find(a => a.name.value === argName);
17605        if (!foundArgument) {
17606            return undefined;
17607        }
17608        return this._resolveDirectiveValue(foundArgument.value);
17609    }
17610    _getDirectiveFromAstNode(node, directiveName) {
17611        if (!node || !node.directives || node.directives.length === 0) {
17612            return null;
17613        }
17614        const foundDirective = node.directives.find(d => d.name === directiveName || (d.name.value && d.name.value === directiveName));
17615        if (!foundDirective) {
17616            return null;
17617        }
17618        return foundDirective;
17619    }
17620    _buildInterfaces(interfaces) {
17621        return (interfaces || [])
17622            .map(namedType => {
17623            const schemaType = this._schema.getType(namedType.name.value);
17624            const abstractEntityDirective = this._getDirectiveFromAstNode(schemaType.astNode, Directives.ABSTRACT_ENTITY);
17625            if (!abstractEntityDirective) {
17626                return null;
17627            }
17628            return this.convertName(namedType.name.value, { suffix: this.config.dbInterfaceSuffix });
17629        })
17630            .filter(a => a);
17631    }
17632    _handleIdField(fieldNode, tree, addOptionalSign) {
17633        tree.addField(`${this.config.idFieldName}${addOptionalSign ? '?' : ''}`, wrapTypeNodeWithModifiers(this.config.objectIdType, fieldNode.type));
17634    }
17635    _handleLinkField(fieldNode, tree, linkDirective, mapPath, addOptionalSign) {
17636        const overrideType = this._getDirectiveArgValue(linkDirective, 'overrideType');
17637        const coreType = overrideType || getBaseTypeNode(fieldNode.type);
17638        const type = this.convertName(coreType, { suffix: this.config.dbTypeSuffix });
17639        tree.addField(`${mapPath || fieldNode.name.value}${addOptionalSign ? '?' : ''}`, wrapTypeNodeWithModifiers(`${type}['${this.config.idFieldName}']`, fieldNode.type));
17640    }
17641    _handleColumnField(fieldNode, tree, columnDirective, mapPath, addOptionalSign) {
17642        const overrideType = this._getDirectiveArgValue(columnDirective, 'overrideType');
17643        const coreType = getBaseTypeNode(fieldNode.type);
17644        let type = null;
17645        if (this.scalars[coreType.name.value]) {
17646            type = this.scalars[coreType.name.value];
17647        }
17648        else {
17649            const schemaType = this._schema.getType(coreType.name.value);
17650            if (Object(definition["E" /* isEnumType */])(schemaType) && this.config.enumsAsString) {
17651                type = this.scalars.String;
17652            }
17653            else {
17654                type = coreType.name.value;
17655            }
17656        }
17657        tree.addField(`${mapPath || fieldNode.name.value}${addOptionalSign ? '?' : ''}`, overrideType || wrapTypeNodeWithModifiers(type, fieldNode.type));
17658    }
17659    _handleEmbeddedField(fieldNode, tree, mapPath, addOptionalSign) {
17660        const coreType = getBaseTypeNode(fieldNode.type);
17661        const type = this.convertName(coreType, { suffix: this.config.dbTypeSuffix });
17662        tree.addField(`${mapPath || fieldNode.name.value}${addOptionalSign ? '?' : ''}`, wrapTypeNodeWithModifiers(type, fieldNode.type));
17663    }
17664    _buildFieldsTree(fields) {
17665        const tree = new index_esm_FieldsTree();
17666        fields.forEach(field => {
17667            const idDirective = this._getDirectiveFromAstNode(field, Directives.ID);
17668            const linkDirective = this._getDirectiveFromAstNode(field, Directives.LINK);
17669            const columnDirective = this._getDirectiveFromAstNode(field, Directives.COLUMN);
17670            const embeddedDirective = this._getDirectiveFromAstNode(field, Directives.EMBEDDED);
17671            const mapDirective = this._getDirectiveFromAstNode(field, Directives.MAP);
17672            const mapPath = this._getDirectiveArgValue(mapDirective, 'path');
17673            const addOptionalSign = !this.config.avoidOptionals && field.type.kind !== language_kinds["a" /* Kind */].NON_NULL_TYPE;
17674            if (idDirective) {
17675                this._handleIdField(field, tree, addOptionalSign);
17676            }
17677            else if (linkDirective) {
17678                this._handleLinkField(field, tree, linkDirective, mapPath, addOptionalSign);
17679            }
17680            else if (columnDirective) {
17681                this._handleColumnField(field, tree, columnDirective, mapPath, addOptionalSign);
17682            }
17683            else if (embeddedDirective) {
17684                this._handleEmbeddedField(field, tree, mapPath, addOptionalSign);
17685            }
17686        });
17687        return tree;
17688    }
17689    _addAdditionalFields(tree, additioalFields) {
17690        const avoidOptionals = this.config.avoidOptionals;
17691        if (!additioalFields || additioalFields.length === 0) {
17692            return;
17693        }
17694        for (const field of additioalFields) {
17695            const isOptional = field.path.includes('?');
17696            tree.addField(`${isOptional && avoidOptionals ? field.path.replace(/\?/g, '') : field.path}`, field.type);
17697        }
17698    }
17699    InterfaceTypeDefinition(node) {
17700        const abstractEntityDirective = this._getDirectiveFromAstNode(node, Directives.ABSTRACT_ENTITY);
17701        if (abstractEntityDirective === null) {
17702            return null;
17703        }
17704        const discriminatorField = this._getDirectiveArgValue(abstractEntityDirective, 'discriminatorField');
17705        const additionalFields = this._getDirectiveArgValue(abstractEntityDirective, 'additionalFields');
17706        const fields = this._buildFieldsTree(node.fields);
17707        fields.addField(discriminatorField, this.scalars.String);
17708        this._addAdditionalFields(fields, additionalFields);
17709        return new DeclarationBlock(this._declarationBlockConfig)
17710            .export()
17711            .asKind('type')
17712            .withName(this.convertName(node, { suffix: this.config.dbInterfaceSuffix }))
17713            .withBlock(fields.string).string;
17714    }
17715    UnionTypeDefinition(node) {
17716        const unionDirective = this._getDirectiveFromAstNode(node, Directives.UNION);
17717        if (unionDirective === null) {
17718            return null;
17719        }
17720        const discriminatorField = this._getDirectiveArgValue(unionDirective, 'discriminatorField');
17721        const possibleTypes = node.types
17722            .map(namedType => {
17723            const schemaType = this._schema.getType(namedType.name.value);
17724            const entityDirective = this._getDirectiveFromAstNode(schemaType.astNode, Directives.ENTITY);
17725            const abstractEntityDirective = this._getDirectiveFromAstNode(schemaType.astNode, Directives.ABSTRACT_ENTITY);
17726            if (entityDirective) {
17727                return this.convertName(namedType, { suffix: this.config.dbTypeSuffix });
17728            }
17729            else if (abstractEntityDirective) {
17730                return this.convertName(namedType, { suffix: this.config.dbInterfaceSuffix });
17731            }
17732            return null;
17733        })
17734            .filter(a => a);
17735        if (possibleTypes.length === 0) {
17736            return null;
17737        }
17738        const additionalFields = this._getDirectiveArgValue(unionDirective, 'additionalFields');
17739        const fields = new index_esm_FieldsTree();
17740        fields.addField(discriminatorField, this.scalars.String);
17741        this._addAdditionalFields(fields, additionalFields);
17742        return new DeclarationBlock(this._declarationBlockConfig)
17743            .export()
17744            .asKind('type')
17745            .withName(this.convertName(node, { suffix: this.config.dbTypeSuffix }))
17746            .withContent(`(${possibleTypes.join(' | ')}
17746) & `)
17747            .withBlock(fields.string).string;
17748    }
17749    ObjectTypeDefinition(node) {
17750        const entityDirective = this._getDirectiveFromAstNode(node, Directives.ENTITY);
17751        if (entityDirective === null) {
17752            return null;
17753        }
17754        const implementingInterfaces = this._buildInterfaces(node.interfaces);
17755        const fields = this._buildFieldsTree(node.fields);
17756        const additionalFields = this._getDirectiveArgValue(entityDirective, 'additionalFields');
17757        this._addAdditionalFields(fields, additionalFields);
17758        return new DeclarationBlock(this._declarationBlockConfig)
17759            .export()
17760            .asKind('type')
17761            .withName(this.convertName(node, { suffix: this.config.dbTypeSuffix }))
17762            .withContent(implementingInterfaces.length ? implementingInterfaces.join(' & ') + ' & ' : '')
17763            .withBlock(fields.string).string;
17764    }
17765}
17766
17767const typescript_mongodb_index_esm_plugin = (schema, documents, config) => {
17768    const visitor = new index_esm_TsMongoVisitor(schema, config);
17769    const printedSchema = Object(utils_index_esm["r" /* printSchemaWithDirectives */])(schema);
17770    const astNode = Object(parser["parse"])(printedSchema);
17771    const visitorResult = Object(language_visitor["c" /* visit */])(astNode, { leave: visitor });
17772    const header = visitor.objectIdImport;
17773    return [header, ...visitorResult.definitions.filter(d => typeof d === 'string')].join('\n');
17774};
17775const DIRECTIVES = src_default.a `
17776  directive @${Directives.UNION}(discriminatorField: String, additionalFields: [AdditionalEntityFields]) on UNION
17777  directive @${Directives.ABSTRACT_ENTITY}(discriminatorField: String!, additionalFields: [AdditionalEntityFields]) on INTERFACE
17778  directive @${Directives.ENTITY}(embedded: Boolean, additionalFields: [AdditionalEntityFields]) on OBJECT
17779  directive @${Directives.COLUMN}(overrideType: String) on FIELD_DEFINITION
17780  directive @${Directives.ID} on FIELD_DEFINITION
17781  directive @${Directives.LINK}(overrideType: String) on FIELD_DEFINITION
17782  directive @${Directives.EMBEDDED} on FIELD_DEFINITION
17783  directive @${Directives.MAP}(path: String!) on FIELD_DEFINITION
17784  # Inputs
17785  input AdditionalEntityFields {
17786    path: String
17787    type: String
17788  }
17789`;
17790const typescript_mongodb_index_esm_addToSchema = DIRECTIVES;
17791const typescript_mongodb_index_esm_validate = async (schema, documents, config, outputFile) => {
17792    if (Object(path_browserify["extname"])(outputFile) !== '.ts' && Object(path_browserify["extname"])(outputFile) !== '.tsx') {
17793        throw new Error(`Plugin "typescript-mongodb" requires extension to be ".ts" or ".tsx"!`);
17794    }
17795};
17796
17797
17798//# sourceMappingURL=index.esm.js.map
17799
17800// CONCATENATED MODULE: ./node_modules/@graphql-codegen/typescript-urql/index.esm.js
17801
17802
17803
17804
17805
17806
17807class index_esm_UrqlVisitor extends index_esm_ClientSideBaseVisitor {
17808    constructor(schema, fragments, rawConfig) {
17809        super(schema, fragments, rawConfig, {
17810            withComponent: getConfigValue(rawConfig.withComponent, false),
17811            withHooks: getConfigValue(rawConfig.withHooks, true),
17812            urqlImportFrom: getConfigValue(rawConfig.urqlImportFrom, null),
17813        });
17814        auto_bind_default()(this);
17815    }
17816    getImports() {
17817        const baseImports = super.getImports();
17818        const imports = [];
17819        const hasOperations = this._collectedOperations.length > 0;
17820        if (!hasOperations) {
17821            return baseImports;
17822        }
17823        if (this.config.withComponent) {
17824            imports.push(`import * as React from 'react';`);
17825        }
17826        if (this.config.withComponent || this.config.withHooks) {
17827            imports.push(`import * as Urql from '${this.config.urqlImportFrom || 'urql'}';`);
17828        }
17829        imports.push(OMIT_TYPE);
17830        return [...baseImports, ...imports];
17831    }
17832    _buildComponent(node, documentVariableName, operationType, operationResultType, operationVariablesTypes) {
17833        var _a, _b;
17834        const componentName = this.convertName((_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '', {
17835            suffix: 'Component',
17836            useTypesPrefix: false,
17837        });
17838        const isVariablesRequired = operationType === 'Query' &&
17839            node.variableDefinitions.some(variableDef => variableDef.type.kind === language_kinds["a" /* Kind */].NON_NULL_TYPE);
17840        const generics = [operationResultType, operationVariablesTypes];
17841        if (operationType === 'Subscription') {
17842            generics.unshift(operationResultType);
17843        }
17844        return `
17845export const ${componentName} = (props: Omit<Urql.${operationType}Props<${generics.join(', ')}>, 'query'> & { variables${isVariablesRequired ? '' : '?'}: ${operationVariablesTypes} }) => (
17846  <Urql.${operationType} {...props} query={${documentVariableName}} />
17847);
17848`;
17849    }
17850    _buildHooks(node, operationType, documentVariableName, operationResultType, operationVariablesTypes) {
17851        var _a, _b;
17852        const operationName = this.convertName((_b = (_a = node.name) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '', {
17853            suffix: this.config.omitOperationSuffix ? '' : Object(dist["pascalCase"])(operationType),
17854            useTypesPrefix: false,
17855        });
17856        if (operationType === 'Mutation') {
17857            return `
17858export function use${operationName}() {
17859  return Urql.use${operationType}<${operationResultType}, ${operationVariablesTypes}>(${documentVariableName});
17860};`;
17861        }
17862        if (operationType === 'Subscription') {
17863            return `
17864export function use${operationName}<TData = ${operationResultType}>(options: Omit<Urql.Use${operationType}Args<${operationVariablesTypes}>, 'query'> = {}, handler?: Urql.SubscriptionHandler<${operationResultType}, TData>) {
17865  return Urql.use${operationType}<${operationResultType}, TData, ${operationVariablesTypes}>({ query: ${documentVariableName}, ...options }, handler);
17866};`;
17867        }
17868        return `
17869export function use${operationName}(options: Omit<Urql.Use${operationType}Args<${operationVariablesTypes}>, 'query'> = {}) {
17870  return Urql.use${operationType}<${operationResultType}>({ query: ${documentVariableName}, ...options });
17871};`;
17872    }
17873    buildOperation(node, documentVariableName, operationType, operationResultType, operationVariablesTypes) {
17874        const component = this.config.withComponent
17875            ? this._buildComponent(node, documentVariableName, operationType, operationResultType, operationVariablesTypes)
17876            : null;
17877        const hooks = this.config.withHooks
17878            ? this._buildHooks(node, operationType, documentVariableName, operationResultType, operationVariablesTypes)
17879            : null;
17880        return [component, hooks].filter(a => a).join('\n');
17881    }
17882}
17883
17884const typescript_urql_index_esm_plugin = (schema, documents, config) => {
17885    const allAst = Object(concatAST["a" /* concatAST */])(documents.map(v => v.document));
17886    const allFragments = [
17887        ...allAst.definitions.filter(d => d.kind === language_kinds["a" /* Kind */].FRAGMENT_DEFINITION).map(fragmentDef => ({
17888            node: fragmentDef,
17889            name: fragmentDef.name.value,
17890            onType: fragmentDef.typeCondition.name.value,
17891            isExternal: false,
17892        })),
17893        ...(config.externalFragments || []),
17894    ];
17895    const visitor = new index_esm_UrqlVisitor(schema, allFragments, config);
17896    const visitorResult = Object(language_visitor["c" /* visit */])(allAst, { leave: visitor });
17897    return {
17898        prepend: visitor.getImports(),
17899        content: [visitor.fragments, ...visitorResult.definitions.filter(t => typeof t === 'string')].join('\n'),
17900    };
17901};
17902const typescript_urql_index_esm_validate = async (schema, documents, config, outputFile) => {
17903    if (config.withComponent === true) {
17904        if (Object(path_browserify["extname"])(outputFile) !== '.tsx') {
17905            throw new Error(`Plugin "typescript-urql" requires extension to be ".tsx" when withComponent: true is set!`);
17906        }
17907    }
17908    else {
17909        if (Object(path_browserify["extname"])(outputFile) !== '.ts' && Ob
17909ject(path_browserify["extname"])(outputFile) !== '.tsx') {
17910            throw new Error(`Plugin "typescript-urql" requires extension to be ".ts" or ".tsx"!`);
17911        }
17912    }
17913};
17914
17915
17916//# sourceMappingURL=index.esm.js.map
17917
17918// CONCATENATED MODULE: ./constants/graphqlTransforms.ts
17919var GraphqlTransforms;
17920
17921(function (GraphqlTransforms) {
17922  GraphqlTransforms[GraphqlTransforms["TO_TYPESCRIPT"] = 1] = "TO_TYPESCRIPT";
17923  GraphqlTransforms[GraphqlTransforms["TO_FLOW"] = 2] = "TO_FLOW";
17924  GraphqlTransforms[GraphqlTransforms["TO_INTROSPECTION_JSON"] = 3] = "TO_INTROSPECTION_JSON";
17925  GraphqlTransforms[GraphqlTransforms["TO_FRAGMENT_MATCHER"] = 4] = "TO_FRAGMENT_MATCHER";
17926  GraphqlTransforms[GraphqlTransforms["TO_SCHEMA_AST"] = 5] = "TO_SCHEMA_AST";
17927  GraphqlTransforms[GraphqlTransforms["TO_JAVA"] = 6] = "TO_JAVA";
17928  GraphqlTransforms[GraphqlTransforms["TO_REACT_APOLLO"] = 7] = "TO_REACT_APOLLO";
17929  GraphqlTransforms[GraphqlTransforms["TO_APOLLO_ANGULAR"] = 8] = "TO_APOLLO_ANGULAR";
17930  GraphqlTransforms[GraphqlTransforms["TO_STENCIL_APOLLO"] = 9] = "TO_STENCIL_APOLLO";
17931  GraphqlTransforms[GraphqlTransforms["TO_JAVA_RESOLVERS_SIGNATURE"] = 10] = "TO_JAVA_RESOLVERS_SIGNATURE";
17932  GraphqlTransforms[GraphqlTransforms["TO_TYPESCRIPT_RESOLVERS_SIGNATURE"] = 11] = "TO_TYPESCRIPT_RESOLVERS_SIGNATURE";
17933  GraphqlTransforms[GraphqlTransforms["TO_FLOW_RESOLVERS_SIGNATURE"] = 12] = "TO_FLOW_RESOLVERS_SIGNATURE";
17934  GraphqlTransforms[GraphqlTransforms["TO_URQL"] = 13] = "TO_URQL";
17935  GraphqlTransforms[GraphqlTransforms["TO_TYPESCRIPT_MONGODB"] = 14] = "TO_TYPESCRIPT_MONGODB";
17936})(GraphqlTransforms || (GraphqlTransforms = {}));
17937// CONCATENATED MODULE: ./node_modules/next/dist/build/webpack/loaders/next-babel-loader.js??ref--5!./workers/graphql.worker.ts
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960var _self = self;
17961
17962function getPlugins(type) {
17963  switch (type) {
17964    case GraphqlTransforms.TO_TYPESCRIPT:
17965      return [typescript_index_esm_namespaceObject, typescript_operations_index_esm_namespaceObject];
17966
17967    case GraphqlTransforms.TO_FLOW:
17968      return [flow_index_esm_namespaceObject, flow_operations_index_esm_namespaceObject];
17969
17970    case GraphqlTransforms.TO_INTROSPECTION_JSON:
17971      return [introspection_index_esm_namespaceObject];
17972
17973    case GraphqlTransforms.TO_FRAGMENT_MATCHER:
17974      return [fragment_matcher_index_esm_namespaceObject];
17975
17976    case GraphqlTransforms.TO_SCHEMA_AST:
17977      return [schema_ast_index_esm_namespaceObject];
17978
17979    case GraphqlTransforms.TO_JAVA:
17980      return [java_index_esm_namespaceObject];
17981
17982    case GraphqlTransforms.TO_REACT_APOLLO:
17983      return [typescript_index_esm_namespaceObject, typescript_operations_index_esm_namespaceObject, typescript_react_apollo_index_esm_namespaceObject];
17984
17985    case GraphqlTransforms.TO_APOLLO_ANGULAR:
17986      return [typescript_index_esm_namespaceObject, typescript_operations_index_esm_namespaceObject, typescript_apollo_angular_index_esm_namespaceObject];
17987
17988    case GraphqlTransforms.TO_STENCIL_APOLLO:
17989      return [typescript_index_esm_namespaceObject, typescript_operations_index_esm_namespaceObject, typescript_stencil_apollo_index_esm_namespaceObject];
17990
17991    case GraphqlTransforms.TO_TYPESCRIPT_RESOLVERS_SIGNATURE:
17992      return [typescript_index_esm_namespaceObject, typescript_resolvers_index_esm_namespaceObject];
17993
17994    case GraphqlTransforms.TO_JAVA_RESOLVERS_SIGNATURE:
17995      return [java_resolvers_index_esm_namespaceObject];
17996
17997    case GraphqlTransforms.TO_FLOW_RESOLVERS_SIGNATURE:
17998      return [flow_index_esm_namespaceObject, flow_resolvers_index_esm_namespaceObject];
17999
18000    case GraphqlTransforms.TO_URQL:
18001      return [typescript_index_esm_namespaceObject, typescript_operations_index_esm_namespaceObject, typescript_urql_index_esm_namespaceObject];
18002
18003    case GraphqlTransforms.TO_TYPESCRIPT_MONGODB:
18004      return [typescript_index_esm_namespaceObject, typescript_mongodb_index_esm_namespaceObject];
18005  }
18006}
18007
18008_self.onmessage = /*#__PURE__*/function () {
18009  var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee(_ref) {
18010    var _ref$data, id, payload, value, _payload$document, document, type, _payload$extension, extension, plugins, pluginMap, result;
18011
18012    return regenerator_default.a.wrap(function _callee$(_context) {
18013      while (1) {
18014        switch (_context.prev = _context.next) {
18015          case 0:
18016            _ref$data = _ref.data, id = _ref$data.id, payload = _ref$data.payload;
18017            value = payload.value, _payload$document = payload.document, document = _payload$document === void 0 ? "" : _payload$document, type = payload.type, _payload$extension = payload.extension, extension = _payload$extension === void 0 ? "tsx" : _payload$extension;
18018            _context.prev = 2;
18019            plugins = getPlugins(type);
18020            pluginMap = {};
18021            plugins.forEach(function (plugin, i) {
18022              pluginMap[i + 1] = plugin;
18023            });
18024            _context.next = 8;
18025            return codegen({
18026              filename: "a.".concat(extension),
18027              schema: Object(parser["parse"])(value),
18028              // @ts-ignore
18029              plugins: plugins.map(function (_plugin, i) {
18030                return _defineProperty({}, i + 1, {});
18031              }),
18032              documents: document.trim() ? [{
18033                location: "",
18034                document: Object(parser["parse"])(document)
18035              }] : [],
18036              config: {},
18037              pluginMap: pluginMap
18038            });
18039
18040          case 8:
18041            result = _context.sent;
18042
18043            _self.postMessage({
18044              id: id,
18045              payload: result
18046            });
18047
18048            _context.next = 15;
18049            break;
18050
18051          case 12:
18052            _context.prev = 12;
18053            _context.t0 = _context["catch"](2);
18054
18055            _self.postMessage({
18056              id: id,
18057              err: _context.t0.message
18058            });
18059
18060          case 15:
18061          case "end":
18062            return _context.stop();
18063        }
18064      }
18065    }, _callee, null, [[2, 12]]);
18066  }));
18067
18068  return function (_x) {
18069    return _ref2.apply(this, arguments);
18070  };
18071}();
18072
18073/***/ }),
18074
18075/***/ "HCwE":
18076/***/ (function(module, exports, __webpack_require__) {
18077
18078"use strict";
18079/**
18080 * Copyright (c) Facebook, Inc. and its affiliates.
18081 *
18082 * This source code is licensed under the MIT license found in the
18083 * LICENSE file in the root directory of this source tree.
18084 *
18085 * 
18086 * @format
18087 */
18088// flowlint ambiguous-object-type:error
18089
18090
18091var IRTransformer = __webpack_require__("OHCT");
18092
18093var invariant = __webpack_require__("OUqe");
18094
18095/**
18096 * A transform that inlines all fragments and removes them.
18097 */
18098function inlineFragmentsTransform(context) {
18099  var visitFragmentSpread = fragmentSpreadVisitor(new Map());
18100  return IRTransformer.transform(context, {
18101    Fragment: visitFragment,
18102    FragmentSpread: visitFragmentSpread
18103  });
18104}
18105
18106function visitFragment(fragment) {
18107  return null;
18108}
18109
18110function fragmentSpreadVisitor(cache) {
18111  return function visitFragmentSpread(fragmentSpread) {
18112    var traverseResult = cache.get(fragmentSpread);
18113
18114    if (traverseResult != null) {
18115      return traverseResult;
18116    }
18117
18118    !(fragmentSpread.args.length === 0) ?  false ? undefined : invariant(false) : void 0;
18119    var fragment = this.getContext().getFragment(fragmentSpread.name, fragmentSpread.loc);
18120    var result = {
18121      kind: 'InlineFragment',
18122      directives: fragmentSpread.directives,
18123      loc: {
18124        kind: 'Derived',
18125        source: fragmentSpread.loc
18126      },
18127      metadata: fragmentSpread.metadata,
18128      selections: fragment.selections,
18129      typeCondition: fragment.type
18130    };
18131    traverseResult = this.traverse(result);
18132    cache.set(fragmentSpread, traverseResult);
18133    return traverseResult;
18134  };
18135}
18136
18137module.exports = {
18138  transform: inlineFragmentsTransform
18139};
18140
18141/***/ }),
18142
18143/***/ "HYxC":
18144/***/ (function(module, exports, __webpack_require__) {
18145
18146"use strict";
18147
18148
18149var ArraySpeciesCreate = __webpack_require__("PDty");
18150var FlattenIntoArray = __webpack_require__("gi2y");
18151var Get = __webpack_require__("V/hC");
18152var IsCallable = __webpack_require__("K4mF");
18153var ToLength = __webpack_require__("JyDY");
18154var ToObject = __webpack_require__("6gHg");
18155
18156module.exports = function flatMap(mapperFunction) {
18157	var O = ToObject(this);
18158	var sourceLen = ToLength(Get(O, 'length'));
18159
18160	if (!IsCallable(mapperFunction)) {
18161		throw new TypeError('mapperFunction must be a function');
18162	}
18163
18164	var T;
18165	if (arguments.length > 1) {
18166		T = arguments[1];
18167	}
18168
18169	var A = ArraySpeciesCreate(O, 0);
18170	FlattenIntoArray(A, O, sourceLen, 0, 1, mapperFunction, T);
18171	return A;
18172};
18173
18174
18175/***/ }),
18176
18177/***/ "HZad":
18178/***/ (function(module, exports, __webpack_require__) {
18179
18180"use strict";
18181
18182
18183var toPrimitive = __webpack_require__("WZeS");
18184
18185// https://ecma-international.org/ecma-262/6.0/#sec-toprimitive
18186
18187module.exports = function ToPrimitive(input) {
18188	if (arguments.length > 1) {
18189		return toPrimitive(input, arguments[1]);
18190	}
18191	return toPrimitive(input);
18192};
18193
18194
18195/***/ }),
18196
18197/***/ "Hb8o":
18198/***/ (function(module, __webpack_exports__, __webpack_require__) {
18199
18200"use strict";
18201/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return noCase; });
18202/* harmony import */ var lower_case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Wyu6");
18203
18204// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
18205var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
18206// Remove all non-word characters.
18207var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
18208/**
18209 * Normalize the string into something other libraries can manipulate easier.
18210 */
18211function noCase(input, options) {
18212    if (options === void 0) { options = {}; }
18213    var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lower_case__WEBPACK_IMPORTED_MODULE_0__["lowerCase"] : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
18214    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
18215    var start = 0;
18216    var end = result.length;
18217    // Trim the delimiter from around the output string.
18218    while (result.charAt(start) === "\0")
18219        start++;
18220    while (result.charAt(end - 1) === "\0")
18221        end--;
18222    // Transform each token independently.
18223    return result.slice(start, end).split("\0").map(transform).join(delimiter);
18224}
18225/**
18226 * Replace `re` in the input string with the replacement value.
18227 */
18228function replace(input, re, value) {
18229    if (re instanceof RegExp)
18230        return input.replace(re, value);
18231    return re.reduce(function (input, re) { return input.replace(re, value); }, input);
18232}
18233//# sourceMappingURL=index.js.map
18234
18235/***/ }),
18236
18237/***/ "IFkQ":
18238/***/ (function(module, exports, __webpack_require__) {
18239
18240"use strict";
18241/**
18242 * Copyright (c) Facebook, Inc. and its affiliates.
18243 *
18244 * This source code is licensed under the MIT license found in the
18245 * LICENSE file in the root directory of this source tree.
18246 *
18247 * 
18248 * @format
18249 * @emails oncall+relay
18250 */
18251// flowlint ambiguous-object-type:error
18252
18253
18254var _interopRequireDefault = __webpack_require__("TqRt");
18255
18256var _inheritsLoose2 = _interopRequireDefault(__webpack_require__("VbXa"));
18257
18258function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
18259
18260function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18261
18262function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18263
18264var _require = __webpack_require__("VrDQ"),
18265    createCompilerError = _require.createCompilerError;
18266
18267var _require2 = __webpack_require__("FFNC"),
18268    isSchemaDefinitionAST = _require2.isSchemaDefinitionAST;
18269
18270var _require3 = __webpack_require__("Tzvz"),
18271    GraphQLFloat = _require3.GraphQLFloat,
18272    GraphQLInt = _require3.GraphQLInt,
18273    GraphQLBoolean = _require3.GraphQLBoolean,
18274    GraphQLString = _require3.GraphQLString,
18275    GraphQLID = _require3.GraphQLID,
18276    parse = _require3.parse,
18277    parseType = _require3.parseType,
18278    print = _require3.print,
18279    valueFromASTUntyped = _require3.valueFromASTUntyped;
18280
18281/**
18282 * @private
18283 */
18284var Type = /*#__PURE__*/function () {
18285  function Type(name, isClient) {
18286    this.name = name;
18287    this.isClient = isClient;
18288  }
18289
18290  var _proto = Type.prototype;
18291
18292  _proto.toString = function toString() {
18293    return this.name;
18294  };
18295
18296  _proto.toJSON = function toJSON() {
18297    return String(this);
18298  };
18299
18300  return Type;
18301}();
18302/**
18303 * @private
18304 */
18305
18306
18307var ScalarType = /*#__PURE__*/function (_Type) {
18308  (0, _inheritsLoose2["default"])(ScalarType, _Type);
18309
18310  function ScalarType() {
18311    return _Type.apply(this, arguments) || this;
18312  }
18313
18314  return ScalarType;
18315}(Type);
18316/**
18317 * @private
18318 */
18319
18320
18321var EnumType = /*#__PURE__*/function (_Type2) {
18322  (0, _inheritsLoose2["default"])(EnumType, _Type2);
18323
18324  function EnumType(name, values, isClient) {
18325    var _this;
18326
18327    _this = _Type2.call(this, name, isClient) || this;
18328    _this.values = values;
18329    return _this;
18330  }
18331
18332  return EnumType;
18333}(Type);
18334/**
18335 * @private
18336 */
18337
18338
18339var UnionType = /*#__PURE__*/function (_Type3) {
18340  (0, _inheritsLoose2["default"])(UnionType, _Type3);
18341
18342  function UnionType() {
18343    return _Type3.apply(this, arguments) || this;
18344  }
18345
18346  return UnionType;
18347}(Type);
18348/**
18349 * @private
18350 */
18351
18352
18353var ObjectType = /*#__PURE__*/function (_Type4) {
18354  (0, _inheritsLoose2["default"])(ObjectType, _Type4);
18355
18356  function ObjectType() {
18357    return _Type4.apply(this, arguments) || this;
18358  }
18359
18360  return ObjectType;
18361}(Type);
18362/**
18363 * @private
18364 */
18365
18366
18367var InputObjectType = /*#__PURE__*/function (_Type5) {
18368  (0, _inheritsLoose2["default"])(InputObjectType, _Type5);
18369
18370  function InputObjectType() {
18371    return _Type5.apply(this, arguments) || this;
18372  }
18373
18374  return InputObjectType;
18375}(Type);
18376/**
18377 * @private
18378 */
18379
18380
18381var InterfaceType = /*#__PURE__*/function (_Type6) {
18382  (0, _inheritsLoose2["default"])(InterfaceType, _Type6);
18383
18384  function InterfaceType() {
18385    return _Type6.apply(this, arguments) || this;
18386  }
18387
18388  return InterfaceType;
18389}(Type);
18390/**
18391 * @private
18392 */
18393
18394
18395var List = /*#__PURE__*/function () {
18396  function List(type) {
18397    this.ofType = type;
18398    this._typeString = "[".concat(String(this.ofType), "]");
18399  }
18400
18401  var _proto2 = List.prototype;
18402
18403  _proto2.toString = function toString() {
18404    return this._typeString;
18405  };
18406
18407  _proto2.toJSON = function toJSON() {
18408    return this.toString();
18409  };
18410
18411  return List;
18412}();
18413/**
18414 * @private
18415 */
18416
18417
18418var NonNull = /*#__PURE__*/function () {
18419  function NonNull(type) {
18420    this.ofType = type;
18421    this._typeString = "".concat(String(this.ofType), "!");
18422  }
18423
18424  var _proto3 = NonNull.prototype;
18425
18426  _proto3.toString = function toString() {
18427    return this._typeString;
18428  };
18429
18430  _proto3.toJSON = function toJSON() {
18431    return this.toString();
18432  };
18433
18434  return NonNull;
18435}();
18436/**
18437 * @private
18438 */
18439
18440
18441var Field = function Field(schema, name, type, belongsTo, args, directives, isClient) {
18442  this.name = name;
18443  this.type = type;
18444  this.belongsTo = belongsTo;
18445  this.isClient = isClient;
18446  this.args = parseInputArgumentDefinitionsMap(schema, args);
18447  this.directives = directives;
18448};
18449/**
18450 * @private
18451 */
18452
18453
18454function unwrap(type) {
18455  if (type instanceof NonNull || type instanceof List) {
18456    return unwrap(type.ofType);
18457  }
18458
18459  return type;
18460}
18461/**
18462 * @private
18463 */
18464
18465
18466function hasConcreteTypeThatImplements(schema, type, interfaceType) {
18467  return _isAbstractType(type) && getConcreteTypes(schema, type).some(function (concreteType) {
18468    return schema.implementsInterface(schema.assertCompositeType(concreteType), interfaceType);
18469  });
18470}
18471/**
18472 * @private
18473 */
18474
18475
18476function getConcreteTypes(schema, type) {
18477  var concreteTypes = new Set();
18478  schema.getPossibleTypes(type).forEach(function (possibleType) {
18479    if (_isObject(possibleType)) {
18480      concreteTypes.add(possibleType);
18481    }
18482  });
18483  return Array.from(concreteTypes);
18484}
18485
18486var TYPENAME_FIELD = '__typename';
18487var CLIENT_ID_FIELD = '__id';
18488var QUERY_TYPE_KEY = Symbol('Query');
18489var MUTATION_TYPE_KEY = Symbol('Mutation');
18490var SUBSCRIPTION_TYPE_KEY = Symbol('Subscription');
18491
18492function _isScalar(type) {
18493  return type instanceof ScalarType;
18494}
18495
18496function _isObject(type) {
18497  return type instanceof ObjectType;
18498}
18499
18500function _isEnum(type) {
18501  return type instanceof EnumType;
18502}
18503
18504function _isUnion(type) {
18505  return type instanceof UnionType;
18506}
18507
18508function _isInputObject(type) {
18509  return type instanceof InputObjectType;
18510}
18511
18512function _isInterface(type) {
18513  return type instanceof InterfaceType;
18514}
18515
18516function _isWrapper(type) {
18517  return type instanceof List || type instanceof NonNull;
18518}
18519
18520function isBaseType(type) {
18521  return type instanceof ScalarType || type instanceof ObjectType || type instanceof EnumType || type instanceof UnionType || type instanceof InputObjectType || type instanceof InterfaceType;
18522}
18523
18524function _isAbstractType(type) {
18525  return type instanceof UnionType || type instanceof InterfaceType;
18526}
18527
18528function _isCompositeType(type) {
18529  return type instanceof ObjectType || type instanceof UnionType || type instanceof InterfaceType;
18530}
18531
18532function _isInputType(type) {
18533  return type instanceof InputObjectType || type instanceof ScalarType || type instanceof EnumType;
18534}
18535
18536var Schema = /*#__PURE__*/function () {
18537  /**
18538   * @private
18539   */
18540  function Schema(typeMap) {
18541    var _this2 = this;
18542
18543    this._typeMap = typeMap;
18544    this._typeWrappersMap = new Map();
18545    this._fieldsMap = new Map();
18546    this._typeNameMap = new Map();
18547    this._clientIdMap = new Map();
18548    this._directiveMap = new Map(typeMap.getDirectives().map(function (directive) {
18549      return [directive.name, {
18550        locations: directive.locations,
18551        args: parseInputArgumentDefinitions(_this2, directive.args),
18552        name: directive.name,
18553        isClient: directive.isClient
18554      }];
18555    }));
18556  }
18557
18558  var _proto4 = Schema.prototype;
18559
18560  _proto4.getTypes = function getTypes() {
18561    return this._typeMap.getTypes();
18562  };
18563
18564  _proto4.getTypeFromAST = function getTypeFromAST(typeNode) {
18565    if (typeNode.kind === 'NonNullType') {
18566      var innerType = this.getTypeFromAST(typeNode.type);
18567
18568      if (!innerType) {
18569        return;
18570      }
18571
18572      if (innerType instanceof NonNull) {
18573        throw createCompilerError('Unable to wrap non-nullable type with non-null wrapper.');
18574      }
18575
18576      var cacheKey = "".concat(this.getTypeString(innerType), "!");
18577
18578      var type = this._typeWrappersMap.get(cacheKey);
18579
18580      if (type) {
18581        return type;
18582      }
18583
18584      type = new NonNull(innerType);
18585
18586      this._typeWrappersMap.set(cacheKey, type);
18587
18588      return type;
18589    } else if (typeNode.kind === 'ListType') {
18590      var _innerType = this.getTypeFromAST(typeNode.type);
18591
18592      if (!_innerType) {
18593        return;
18594      }
18595
18596      var _cacheKey = "[".concat(this.getTypeString(_innerType), "]");
18597
18598      var _type = this._typeWrappersMap.get(_cacheKey);
18599
18600      if (_type) {
18601        return _type;
18602      }
18603
18604      _type = new List(_innerType);
18605
18606      this._typeWrappersMap.set(_cacheKey, _type);
18607
18608      return _type;
18609    }
18610
18611    return this._typeMap.getTypeByName(typeNode.name.value);
18612  };
18613
18614  _proto4._getRawType = function _getRawType(typeName) {
18615    var type = this._typeWrappersMap.get(typeName);
18616
18617    if (type) {
18618      return type;
18619    }
18620
18621    if (typeof typeName === 'string') {
18622      return this.getTypeFromAST(parseType(typeName));
18623    } else {
18624      var operationType;
18625
18626      if (typeName === QUERY_TYPE_KEY) {
18627        operationType = this._typeMap.getQueryType();
18628      } else if (typeName === MUTATION_TYPE_KEY) {
18629        operationType = this._typeMap.getMutationType();
18630      } else if (typeName === SUBSCRIPTION_TYPE_KEY) {
18631        operationType = this._typeMap.getSubscriptionType();
18632      }
18633
18634      if (operationType instanceof ObjectType) {
18635        return operationType;
18636      }
18637    }
18638  };
18639
18640  _proto4.getTypeFromString = function getTypeFromString(typeName) {
18641    return this._getRawType(typeName);
18642  };
18643
18644  _proto4.expectTypeFromString = function expectTypeFromString(typeName) {
18645    var type = this.getTypeFromString(typeName);
18646
18647    if (type == null) {
18648      throw createCompilerError("Unknown type: '".concat(typeName, "'."));
18649    }
18650
18651    return type;
18652  };
18653
18654  _proto4.expectTypeFromAST = function expectTypeFromAST(ast) {
18655    var type = this.getTypeFromAST(ast);
18656
18657    if (type == null) {
18658      throw createCompilerError("Unknown type: '".concat(print(ast), "'."), null, [ast]);
18659    }
18660
18661    return type;
18662  };
18663
18664  _proto4.getNonNullType = function getNonNullType(type) {
18665    if (type instanceof NonNull) {
18666      return type;
18667    }
18668
18669    var cacheKey = "".concat(String(type), "!");
18670
18671    var nonNullType = this._typeWrappersMap.get(cacheKey);
18672
18673    if (nonNullType) {
18674      return nonNullType;
18675    }
18676
18677    nonNullType = new NonNull(type);
18678
18679    this._typeWrappersMap.set(cacheKey, nonNullType);
18680
18681    return nonNullType;
18682  };
18683
18684  _proto4.getRawType = function getRawType(type) {
18685    return unwrap(type);
18686  };
18687
18688  _proto4.getNullableType = function getNullableType(type) {
18689    if (type instanceof NonNull) {
18690      return type.ofType;
18691    }
18692
18693    return type;
18694  };
18695
18696  _proto4.getListItemType = function getListItemType(type) {
18697    if (type instanceof List) {
18698      return type.ofType;
18699    }
18700
18701    return type;
18702  };
18703
18704  _proto4.mapListItemType = function mapListItemType(type, mapper) {
18705    if (!(type instanceof List)) {
18706      throw createCompilerError('Expected List type');
18707    }
18708
18709    var innerType = mapper(type.ofType);
18710    var cacheKey = "[".concat(this.getTypeString(innerType), "]");
18711
18712    var newType = this._typeWrappersMap.get(cacheKey);
18713
18714    if (newType) {
18715      return newType;
18716    }
18717
18718    newType = new List(innerType);
18719
18720    this._typeWrappersMap.set(cacheKey, newType);
18721
18722    return newType;
18723  };
18724
18725  _proto4.areEqualTypes = function areEqualTypes(typeA, typeB) {
18726    if (typeA === typeB) {
18727      return true;
18728    }
18729
18730    if (typeA instanceof NonNull && typeB instanceof NonNull) {
18731      return this.areEqualTypes(typeA.ofType, typeB.ofType);
18732    }
18733
18734    if (typeA instanceof List && typeB instanceof List) {
18735      return this.areEqualTypes(typeA.ofType, typeB.ofType);
18736    }
18737
18738    if (isBaseType(typeA) && isBaseType(typeB)) {
18739      return typeA.name === typeB.name;
18740    }
18741
18742    return false;
18743  }
18744  /**
18745   * Determine if the given type may implement the named type:
18746   * - it is the named type
18747   * - it implements the named interface
18748   * - it is an abstract type and *some* of its concrete types may
18749   *   implement the named type
18750   */
18751  ;
18752
18753  _proto4.mayImplement = function mayImplement(type, interfaceType) {
18754    return this.areEqualTypes(type, interfaceType) || this.implementsInterface(type, interfaceType) || this.isAbstractType(type) && hasConcreteTypeThatImplements(this, type, interfaceType);
18755  };
18756
18757  _proto4.implementsInterface = function implementsInterface(type, interfaceType) {
18758    var _this3 = this;
18759
18760    return this.getInterfaces(type).some(function (typeInterface) {
18761      return _this3.areEqualTypes(typeInterface, interfaceType);
18762    });
18763  };
18764
18765  _proto4.canHaveSelections = function canHaveSelections(type) {
18766    return this.isObject(type) || this.isInterface(type);
18767  };
18768
18769  _proto4.getTypeString = function getTypeString(type) {
18770    return type.toString();
18771  };
18772
18773  _proto4.isTypeSubTypeOf = function isTypeSubTypeOf(maybeSubType, superType) {
18774    // Equivalent type is a valid subtype
18775    if (maybeSubType === superType) {
18776      return true;
18777    } // If superType is non-null, maybeSubType must also be non-null.
18778
18779
18780    if (superType instanceof NonNull) {
18781      if (maybeSubType instanceof NonNull) {
18782        return this.isTypeSubTypeOf(maybeSubType.ofType, superType.ofType);
18783      }
18784
18785      return false;
18786    }
18787
18788    if (maybeSubType instanceof NonNull) {
18789      // If superType is nullable, maybeSubType may be non-null or nullable.
18790      return this.isTypeSubTypeOf(maybeSubType.ofType, superType);
18791    } // If superType type is a list, maybeSubType type must also be a list.
18792
18793
18794    if (superType instanceof List) {
18795      if (maybeSubType instanceof List) {
18796        return this.isTypeSubTypeOf(maybeSubType.ofType, superType.ofType);
18797      }
18798
18799      return false;
18800    }
18801
18802    if (maybeSubType instanceof List) {
18803      // If superType is not a list, maybeSubType must also be not a list.
18804      return false;
18805    } // If superType type is an abstract type, maybeSubType type may be a currently
18806    // possible object type.
18807
18808
18809    if (this.isAbstractType(superType) && this.isObject(maybeSubType) && this.isPossibleType(this.assertAbstractType(superType), this.assertObjectType(maybeSubType))) {
18810      return true;
18811    } // Otherwise, maybeSubType is not a valid subtype of the superType.
18812
18813
18814    return false;
18815  }
18816  /**
18817   * Provided two composite types, determine if they "overlap". Two composite
18818   * types overlap when the Sets of possible concrete types for each intersect.
18819   *
18820   * This is often used to determine if a fragment of a given type could possibly
18821   * be visited in a context of another type.
18822   *
18823   * This function is commutative.
18824   */
18825  ;
18826
18827  _proto4.doTypesOverlap = function doTypesOverlap(typeA, typeB) {
18828    var _this4 = this;
18829
18830    // Equivalent types overlap
18831    if (typeA === typeB) {
18832      return true;
18833    }
18834
18835    if (_isAbstractType(typeA)) {
18836      if (_isAbstractType(typeB)) {
18837        // If both types are abstract, then determine if there is any intersection
18838        // between possible concrete types of each.
18839        return Array.from(this.getPossibleTypes(typeA)).some(function (type) {
18840          if (_isObject(type)) {
18841            return _this4.isPossibleType(typeB, type);
18842          }
18843        });
18844      } // Determine if the latter type is a possible concrete type of the former.
18845
18846
18847      return this.isPossibleType(typeA, typeB);
18848    }
18849
18850    if (_isAbstractType(typeB)) {
18851      // Determine if the former type is a possible concrete type of the latter.
18852      return this.isPossibleType(typeB, typeA);
18853    } // Otherwise the types do not overlap.
18854
18855
18856    return false;
18857  };
18858
18859  _proto4.isPossibleType = function isPossibleType(superType, maybeSubType) {
18860    return this._typeMap.getPossibleTypeSet(superType).has(maybeSubType);
18861  };
18862
18863  _proto4.assertScalarFieldType = function assertScalarFieldType(type) {
18864    // Scalar type fields can be wrappers / or can be scalars/enums
18865    if (_isWrapper(type) && !_isScalar(unwrap(type)) && !_isEnum(unwrap(type)) || !_isWrapper(type) && !_isScalar(type) && !_isEnum(type)) {
18866      throw createCompilerError("Expected ".concat(String(type), " to be a Scalar or Enum type."));
18867    }
18868
18869    return type;
18870  };
18871
18872  _proto4.assertLinkedFieldType = function assertLinkedFieldType(type) {
18873    // Linked Field types can be wrappers / or can be composite types
18874    if (_isWrapper(type) && !_isCompositeType(unwrap(type)) || !_isWrapper(type) && !_isCompositeType(type)) {
18875      throw createCompilerError("Expected ".concat(String(type), " to be a Object, Interface or a Union Type."));
18876    }
18877
18878    return type;
18879  };
18880
18881  _proto4.assertInputType = function assertInputType(type) {
18882    // Input type fields can be wrappers / or can be scalars/enums
18883    if (_isWrapper(type) && !_isInputType(unwrap(type)) || !_isWrapper(type) && !_isInputType(type)) {
18884      throw createCompilerError("Expected ".concat(String(type), " to be a Input, Scalar or Enum type."));
18885    }
18886
18887    return type;
18888  };
18889
18890  _proto4.asCompositeType = function asCompositeType(type) {
18891    if (_isCompositeType(type)) {
18892      return type;
18893    }
18894  };
18895
18896  _proto4.asInputType = function asInputType(type) {
18897    if (_isWrapper(type) && _isInputType(unwrap(type)) || !_isWrapper(type) && _isInputType(type)) {
18898      return type;
18899    }
18900  };
18901
18902  _proto4.asScalarFieldType = function asScalarFieldType(type) {
18903    if (_isScalar(type) || _isEnum(type)) {
18904      return type;
18905    }
18906  };
18907
18908  _proto4.assertScalarType = function assertScalarType(type) {
18909    if (!_isScalar(type)) {
18910      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be a scalar type, got ").concat(this.getTypeString(type), "."));
18911    }
18912
18913    return type;
18914  };
18915
18916  _proto4.assertObjectType = function assertObjectType(type) {
18917    if (!_isObject(type)) {
18918      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be an object type."));
18919    }
18920
18921    return type;
18922  };
18923
18924  _proto4.assertInputObjectType = function assertInputObjectType(type) {
18925    if (!_isInputObject(type)) {
18926      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be an input type."));
18927    }
18928
18929    return type;
18930  };
18931
18932  _proto4.asInputObjectType = function asInputObjectType(type) {
18933    if (!_isInputObject(type)) {
18934      return null;
18935    }
18936
18937    return type;
18938  };
18939
18940  _proto4.assertInterfaceType = function assertInterfaceType(type) {
18941    if (!_isInterface(type)) {
18942      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be an interface type."));
18943    }
18944
18945    return type;
18946  };
18947
18948  _proto4.assertCompositeType = function assertCompositeType(type) {
18949    if (!_isCompositeType(type)) {
18950      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be a composite type."));
18951    }
18952
18953    return type;
18954  };
18955
18956  _proto4.assertAbstractType = function assertAbstractType(type) {
18957    if (!_isAbstractType(type)) {
18958      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be an abstract type."));
18959    }
18960
18961    return type;
18962  };
18963
18964  _proto4.assertLeafType = function assertLeafType(type) {
18965    if (!this.isLeafType(type)) {
18966      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be a leaf type."));
18967    }
18968
18969    return type;
18970  };
18971
18972  _proto4.assertUnionType = function assertUnionType(type) {
18973    if (!_isUnion(type)) {
18974      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be a union type."));
18975    }
18976
18977    return type;
18978  };
18979
18980  _proto4.assertEnumType = function assertEnumType(type) {
18981    if (!_isEnum(type)) {
18982      throw createCompilerError("Expected ".concat(String(type), " to be an enum type."));
18983    }
18984
18985    return type;
18986  };
18987
18988  _proto4.assertIntType = function assertIntType(type) {
18989    if (!_isScalar(type) || !this.isInt(type)) {
18990      throw createCompilerError("Expected ".concat(String(type), " to be an 'Int' type."));
18991    }
18992
18993    return type;
18994  };
18995
18996  _proto4.assertFloatType = function assertFloatType(type) {
18997    if (!_isScalar(type) || !this.isFloat(type)) {
18998      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be a 'Float' type."));
18999    }
19000
19001    return type;
19002  };
19003
19004  _proto4.assertBooleanType = function assertBooleanType(type) {
19005    if (!_isScalar(type) || !this.isBoolean(type)) {
19006      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be a 'Boolean' type."));
19007    }
19008
19009    return type;
19010  };
19011
19012  _proto4.assertStringType = function assertStringType(type) {
19013    if (!_isScalar(type) || !this.isString(type)) {
19014      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be a 'String' type."));
19015    }
19016
19017    return type;
19018  };
19019
19020  _proto4.assertIdType = function assertIdType(type) {
19021    if (!_isScalar(type) || !this.isId(type)) {
19022      throw createCompilerError("Expected ".concat(this.getTypeString(type), " to be an ID type."));
19023    }
19024
19025    return type;
19026  };
19027
19028  _proto4.expectBooleanType = function expectBooleanType() {
19029    return this.assertScalarType(this.expectTypeFromString('Boolean'));
19030  };
19031
19032  _proto4.expectIntType = function expectIntType() {
19033    return this.assertScalarType(this.expectTypeFromString('Int'));
19034  };
19035
19036  _proto4.expectFloatType = function expectFloatType() {
19037    return this.assertScalarType(this.expectTypeFromString('Float'));
19038  };
19039
19040  _proto4.expectStringType = function expectStringType() {
19041    return this.assertScalarType(this.expectTypeFromString('String'));
19042  };
19043
19044  _proto4.expectIdType = function expectIdType() {
19045    return this.assertScalarType(this.expectTypeFromString('ID'));
19046  };
19047
19048  _proto4.getQueryType = function getQueryType() {
19049    var queryType = this._getRawType(QUERY_TYPE_KEY);
19050
19051    if (queryType && _isObject(queryType)) {
19052      return queryType;
19053    }
19054  };
19055
19056  _proto4.getMutationType = function getMutationType() {
19057    var mutationType = this._getRawType(MUTATION_TYPE_KEY);
19058
19059    if (mutationType && _isObject(mutationType)) {
19060      return mutationType;
19061    }
19062  };
19063
19064  _proto4.getSubscriptionType = function getSubscriptionType() {
19065    var subscriptionType = this._getRawType(SUBSCRIPTION_TYPE_KEY);
19066
19067    if (subscriptionType && _isObject(subscriptionType)) {
19068      return subscriptionType;
19069    }
19070  };
19071
19072  _proto4.expectQueryType = function expectQueryType() {
19073    var queryType = this.getQueryType();
19074
19075    if (queryType == null) {
19076      throw createCompilerError('Query type is not defined on the Schema');
19077    }
19078
19079    return queryType;
19080  };
19081
19082  _proto4.expectMutationType = function expectMutationType() {
19083    var mutationType = this.getMutationType();
19084
19085    if (mutationType == null) {
19086      throw createCompilerError('Mutation type is not defined the Schema');
19087    }
19088
19089    return mutationType;
19090  };
19091
19092  _proto4.expectSubscriptionType = function expectSubscriptionType() {
19093    var subscriptionType = this.getSubscriptionType();
19094
19095    if (subscriptionType == null) {
19096      throw createCompilerError('Subscription type is not defined the Schema');
19097    }
19098
19099    return subscriptionType;
19100  };
19101
19102  _proto4.isNonNull = function isNonNull(type) {
19103    return type instanceof NonNull;
19104  };
19105
19106  _proto4.isList = function isList(type) {
19107    return type instanceof List;
19108  };
19109
19110  _proto4.isWrapper = function isWrapper(type) {
19111    return _isWrapper(type);
19112  };
19113
19114  _proto4.isScalar = function isScalar(type) {
19115    return _isScalar(type);
19116  };
19117
19118  _proto4.isObject = function isObject(type) {
19119    return _isObject(type);
19120  };
19121
19122  _proto4.isEnum = function isEnum(type) {
19123    return _isEnum(type);
19124  };
19125
19126  _proto4.isUnion = function isUnion(type) {
19127    return _isUnion(type);
19128  };
19129
19130  _proto4.isInputObject = function isInputObject(type) {
19131    return _isInputObject(type);
19132  };
19133
19134  _proto4.isInterface = function isInterface(type) {
19135    return _isInterface(type);
19136  };
19137
19138  _proto4.isInputType = function isInputType(type) {
19139    // Wrappers can be input types (so it's save to check unwrapped type here)
19140    return _isInputType(type) || _isWrapper(type) && _isInputType(unwrap(type));
19141  };
19142
19143  _proto4.isCompositeType = function isCompositeType(type) {
19144    return _isCompositeType(type);
19145  };
19146
19147  _proto4.isAbstractType = function isAbstractType(type) {
19148    return _isAbstractType(type);
19149  };
19150
19151  _proto4.isLeafType = function isLeafType(type) {
19152    return this.isScalar(type) || this.isEnum(type);
19153  };
19154
19155  _proto4.isId = function isId(type) {
19156    if (type instanceof ScalarType) {
19157      return type.name === 'ID';
19158    }
19159
19160    return false;
19161  };
19162
19163  _proto4.isInt = function isInt(type) {
19164    if (type instanceof ScalarType) {
19165      return type.name === 'Int';
19166    }
19167
19168    return false;
19169  };
19170
19171  _proto4.isFloat = function isFloat(type) {
19172    if (type instanceof ScalarType) {
19173      return type.name === 'Float';
19174    }
19175
19176    return false;
19177  };
19178
19179  _proto4.isBoolean = function isBoolean(type) {
19180    if (type instanceof ScalarType) {
19181      return type.name === 'Boolean';
19182    }
19183
19184    return false;
19185  };
19186
19187  _proto4.isString = function isString(type) {
19188    if (type instanceof ScalarType) {
19189      return type.name === 'String';
19190    }
19191
19192    return false;
19193  };
19194
19195  _proto4.hasField = function hasField(type, fieldName) {
19196    var canHaveTypename = this.isObject(type) || this.isAbstractType(type); // Special case for __typename field
19197
19198    if (canHaveTypename && (fieldName === TYPENAME_FIELD || fieldName === CLIENT_ID_FIELD)) {
19199      return true;
19200    }
19201
19202    if (type instanceof ObjectType || type instanceof InterfaceType) {
19203      return this._typeMap.getField(type, fieldName) != null;
19204    } else if (type instanceof InputObjectType) {
19205      return this._typeMap.getInputField(type, fieldName) != null;
19206    }
19207
19208    return false;
19209  };
19210
19211  _proto4.hasId = function hasId(type) {
19212    if (!this.hasField(type, 'id')) {
19213      return false;
19214    }
19215
19216    var idField = this.expectField(type, 'id');
19217    return this.areEqualTypes(this.getNullableType(this.getFieldType(idField)), this.expectIdType());
19218  };
19219
19220  _proto4.getFields = function getFields(type) {
19221    var fieldsMap = this._getFieldsMap(type);
19222
19223    return Array.from(fieldsMap.values());
19224  };
19225
19226  _proto4._getFieldsMap = function _getFieldsMap(type) {
19227    var cachedMap = this._fieldsMap.get(type);
19228
19229    if (cachedMap != null) {
19230      return cachedMap;
19231    }
19232
19233    var fieldsMap = new Map();
19234
19235    if (type instanceof ObjectType || type instanceof InterfaceType) {
19236      var fields = this._typeMap.getFieldMap(type);
19237
19238      if (fields) {
19239        var _iterator = _createForOfIteratorHelper(fields),
19240            _step;
19241
19242        try {
19243          for (_iterator.s(); !(_step = _iterator.n()).done;) {
19244            var _step$value = _step.value,
19245                fieldName = _step$value[0],
19246                fieldDefinition = _step$value[1];
19247            var fieldType = this.expectTypeFromAST(fieldDefinition.type);
19248            fieldsMap.set(fieldName, new Field(this, fieldName, fieldType, this.assertCompositeType(type), fieldDefinition.arguments, fieldDefinition.directives, fieldDefinition.isClient));
19249          }
19250        } catch (err) {
19251          _iterator.e(err);
19252        } finally {
19253          _iterator.f();
19254        }
19255      }
19256    } else if (type instanceof InputObjectType) {
19257      var _fields = this._typeMap.getInputFieldMap(type);
19258
19259      if (_fields) {
19260        var _iterator2 = _createForOfIteratorHelper(_fields),
19261            _step2;
19262
19263        try {
19264          for (_iterator2.s();
19264 !(_step2 = _iterator2.n()).done;) {
19265            var _step2$value = _step2.value,
19266                _fieldName = _step2$value[0],
19267                typeNode = _step2$value[1];
19268
19269            var _fieldType = this.expectTypeFromAST(typeNode);
19270
19271            fieldsMap.set(_fieldName, new Field(this, _fieldName, _fieldType, type, [], null, false));
19272          }
19273        } catch (err) {
19274          _iterator2.e(err);
19275        } finally {
19276          _iterator2.f();
19277        }
19278      }
19279    }
19280
19281    if (fieldsMap.size === 0) {
19282      throw createCompilerError("_getFieldsMap: Type '".concat(type.name, "' should have fields."));
19283    }
19284
19285    this._fieldsMap.set(type, fieldsMap);
19286
19287    return fieldsMap;
19288  };
19289
19290  _proto4.getFieldByName = function getFieldByName(type, fieldName) {
19291    if (!this.hasField(type, fieldName)) {
19292      return;
19293    } // A "special" case for __typename and __id fields - which should
19294    // not be in the list of type fields, but should be fine to select
19295
19296
19297    if (fieldName === TYPENAME_FIELD) {
19298      var typename = this._typeNameMap.get(type);
19299
19300      if (!typename) {
19301        typename = new Field(this, TYPENAME_FIELD, this.getNonNullType(this.expectStringType()), type, [], null, false);
19302
19303        this._typeNameMap.set(type, typename);
19304      }
19305
19306      return typename;
19307    }
19308
19309    if (fieldName === CLIENT_ID_FIELD) {
19310      var clientId = this._clientIdMap.get(type);
19311
19312      if (!clientId) {
19313        clientId = new Field(this, CLIENT_ID_FIELD, this.getNonNullType(this.expectIdType()), type, [], null, true);
19314
19315        this._clientIdMap.set(type, clientId);
19316      }
19317
19318      return clientId;
19319    }
19320
19321    if (_isUnion(type)) {
19322      throw createCompilerError("Unexpected union type '".concat(this.getTypeString(type), "' in the 'getFieldByName(...)'. Expected type with fields"));
19323    }
19324
19325    var fieldsMap = this._getFieldsMap(type);
19326
19327    return fieldsMap.get(fieldName);
19328  };
19329
19330  _proto4.expectField = function expectField(type, fieldName) {
19331    var field = this.getFieldByName(type, fieldName);
19332
19333    if (!field) {
19334      throw createCompilerError("Unknown field '".concat(fieldName, "' on type '").concat(this.getTypeString(type), "'."));
19335    }
19336
19337    return field;
19338  };
19339
19340  _proto4.getFieldConfig = function getFieldConfig(field) {
19341    return {
19342      type: field.type,
19343      args: Array.from(field.args.values())
19344    };
19345  };
19346
19347  _proto4.getFieldName = function getFieldName(field) {
19348    return field.name;
19349  };
19350
19351  _proto4.getFieldType = function getFieldType(field) {
19352    return field.type;
19353  };
19354
19355  _proto4.getFieldParentType = function getFieldParentType(field) {
19356    return field.belongsTo;
19357  };
19358
19359  _proto4.getFieldArgs = function getFieldArgs(field) {
19360    return Array.from(field.args.values());
19361  };
19362
19363  _proto4.getFieldArgByName = function getFieldArgByName(field, argName) {
19364    return field.args.get(argName);
19365  };
19366
19367  _proto4.getEnumValues = function getEnumValues(type) {
19368    return type.values;
19369  };
19370
19371  _proto4.getUnionTypes = function getUnionTypes(type) {
19372    return Array.from(this._typeMap.getPossibleTypeSet(type));
19373  };
19374
19375  _proto4.getInterfaces = function getInterfaces(type) {
19376    if (type instanceof ObjectType) {
19377      return this._typeMap.getInterfaces(type);
19378    }
19379
19380    return [];
19381  };
19382
19383  _proto4.getPossibleTypes = function getPossibleTypes(type) {
19384    return this._typeMap.getPossibleTypeSet(type);
19385  };
19386
19387  _proto4.getFetchableFieldName = function getFetchableFieldName(type) {
19388    return this._typeMap.getFetchableFieldName(type);
19389  };
19390
19391  _proto4.parseLiteral = function parseLiteral(type, valueNode) {
19392    if (type instanceof EnumType && valueNode.kind === 'EnumValue') {
19393      return this.parseValue(type, valueNode.value);
19394    } else if (type instanceof ScalarType) {
19395      if (valueNode.kind === 'BooleanValue' && type.name === 'Boolean') {
19396        return GraphQLBoolean.parseLiteral(valueNode);
19397      } else if (valueNode.kind === 'FloatValue' && type.name === 'Float') {
19398        return GraphQLFloat.parseLiteral(valueNode);
19399      } else if (valueNode.kind === 'IntValue' && (type.name === 'Int' || type.name === 'ID' || type.name === 'Float')) {
19400        return GraphQLInt.parseLiteral(valueNode);
19401      } else if (valueNode.kind === 'StringValue' && (type.name === 'String' || type.name === 'ID')) {
19402        return GraphQLString.parseLiteral(valueNode);
19403      } else if (!isDefaultScalar(type.name)) {
19404        return valueFromASTUntyped(valueNode);
19405      }
19406    }
19407  };
19408
19409  _proto4.parseValue = function parseValue(type, value) {
19410    if (type instanceof EnumType) {
19411      return type.values.includes(value) ? value : undefined;
19412    } else if (type instanceof ScalarType) {
19413      switch (type.name) {
19414        case 'Boolean':
19415          return GraphQLBoolean.parseValue(value);
19416
19417        case 'Float':
19418          return GraphQLFloat.parseValue(value);
19419
19420        case 'Int':
19421          return GraphQLInt.parseValue(value);
19422
19423        case 'String':
19424          return GraphQLString.parseValue(value);
19425
19426        case 'ID':
19427          return GraphQLID.parseValue(value);
19428
19429        default:
19430          return value;
19431      }
19432    }
19433  };
19434
19435  _proto4.serialize = function serialize(type, value) {
19436    if (type instanceof EnumType) {
19437      return type.values.includes(value) ? value : undefined;
19438    } else if (type instanceof ScalarType) {
19439      switch (type.name) {
19440        case 'Boolean':
19441          return GraphQLBoolean.serialize(value);
19442
19443        case 'Float':
19444          return GraphQLFloat.serialize(value);
19445
19446        case 'Int':
19447          return GraphQLInt.serialize(value);
19448
19449        case 'String':
19450          return GraphQLString.serialize(value);
19451
19452        case 'ID':
19453          return GraphQLID.serialize(value);
19454
19455        default:
19456          return value;
19457      }
19458    }
19459  };
19460
19461  _proto4.getDirectives = function getDirectives() {
19462    return Array.from(this._directiveMap.values());
19463  };
19464
19465  _proto4.getDirective = function getDirective(directiveName) {
19466    return this._directiveMap.get(directiveName);
19467  };
19468
19469  _proto4.isServerType = function isServerType(type) {
19470    var unwrapped = unwrap(type);
19471    return unwrapped.isClient === false;
19472  };
19473
19474  _proto4.isServerField = function isServerField(field) {
19475    return field.isClient === false;
19476  };
19477
19478  _proto4.isServerDirective = function isServerDirective(directiveName) {
19479    var directive = this._directiveMap.get(directiveName);
19480
19481    return (directive === null || directive === void 0 ? void 0 : directive.isClient) === false;
19482  };
19483
19484  _proto4.isServerDefinedField = function isServerDefinedField(type, field) {
19485    return this.isAbstractType(type) && field.directives.some(function (_ref) {
19486      var name = _ref.name;
19487      return name === 'fixme_fat_interface';
19488    }) || this.hasField(type, field.name) && this.isServerField(this.expectField(type, field.name));
19489  };
19490
19491  _proto4.isClientDefinedField = function isClientDefinedField(type, field) {
19492    return !this.isServerDefinedField(type, field);
19493  };
19494
19495  _proto4.extend = function extend(extensions) {
19496    var doc = Array.isArray(extensions) ? parse(extensions.join('\n')) : extensions;
19497    var schemaExtensions = [];
19498    doc.definitions.forEach(function (definition) {
19499      if (isSchemaDefinitionAST(definition)) {
19500        schemaExtensions.push(definition);
19501      }
19502    });
19503
19504    if (schemaExtensions.length > 0) {
19505      return new Schema(this._typeMap.extend(schemaExtensions));
19506    }
19507
19508    return this;
19509  };
19510
19511  return Schema;
19512}();
19513
19514var TypeMap = /*#__PURE__*/function () {
19515  function TypeMap(source, extensions) {
19516    this._types = new Map([['ID', new ScalarType('ID', false)], ['String', new ScalarType('String', false)], ['Boolean', new ScalarType('Boolean', false)], ['Float', new ScalarType('Float', false)], ['Int', new ScalarType('Int', false)]]);
19517    this._typeInterfaces = new Map();
19518    this._unionTypes = new Map();
19519    this._interfaceImplementations = new Map();
19520    this._fields = new Map();
19521    this._inputFields = new Map();
19522    this._directives = new Map([['include', {
19523      name: 'include',
19524      isClient: false,
19525      locations: ['FIELD', 'FRAGMENT_SPREAD', 'INLINE_FRAGMENT'],
19526      args: [{
19527        name: 'if',
19528        typeNode: parseType('Boolean!'),
19529        defaultValue: undefined
19530      }]
19531    }], ['skip', {
19532      name: 'skip',
19533      isClient: false,
19534      locations: ['FIELD', 'FRAGMENT_SPREAD', 'INLINE_FRAGMENT'],
19535      args: [{
19536        name: 'if',
19537        typeNode: parseType('Boolean!'),
19538        defaultValue: undefined
19539      }]
19540    }], ['deprecated', {
19541      name: 'deprecated',
19542      isClient: false,
19543      locations: ['FIELD_DEFINITION', 'ENUM_VALUE'],
19544      args: [{
19545        name: 'reason',
19546        typeNode: parseType('String'),
19547        defaultValue: {
19548          kind: 'StringValue',
19549          value: 'No longer supported'
19550        }
19551      }]
19552    }]]);
19553    this._queryTypeName = 'Query';
19554    this._mutationTypeName = 'Mutation';
19555    this._subscriptionTypeName = 'Subscription';
19556    this._source = source;
19557    this._extensions = extensions;
19558    this._fetchable = new Map();
19559
19560    this._parse(source);
19561
19562    this._extend(extensions);
19563  }
19564
19565  var _proto5 = TypeMap.prototype;
19566
19567  _proto5._parse = function _parse(source) {
19568    var _this5 = this;
19569
19570    var document = parse(source, {
19571      noLocation: true
19572    });
19573    document.definitions.forEach(function (definition) {
19574      switch (definition.kind) {
19575        case 'SchemaDefinition':
19576          {
19577            _this5._parseSchemaDefinition(definition);
19578
19579            break;
19580          }
19581
19582        case 'ScalarTypeDefinition':
19583          {
19584            _this5._parseScalarNode(definition, false);
19585
19586            break;
19587          }
19588
19589        case 'EnumTypeDefinition':
19590          {
19591            _this5._parseEnumNode(definition, false);
19592
19593            break;
19594          }
19595
19596        case 'ObjectTypeDefinition':
19597          {
19598            _this5._parseObjectTypeNode(definition, false);
19599
19600            break;
19601          }
19602
19603        case 'InputObjectTypeDefinition':
19604          {
19605            _this5._parseInputObjectTypeNode(definition, false);
19606
19607            break;
19608          }
19609
19610        case 'UnionTypeDefinition':
19611          {
19612            _this5._parseUnionNode(definition, false);
19613
19614            break;
19615          }
19616
19617        case 'InterfaceTypeDefinition':
19618          {
19619            _this5._parseInterfaceNode(definition, false);
19620
19621            break;
19622          }
19623
19624        case 'DirectiveDefinition':
19625          {
19626            _this5._parseDirective(definition, false);
19627
19628            break;
19629          }
19630      }
19631    });
19632  };
19633
19634  _proto5._parseSchemaDefinition = function _parseSchemaDefinition(node) {
19635    var _this6 = this;
19636
19637    node.operationTypes.forEach(function (operationType) {
19638      switch (operationType.operation) {
19639        case 'query':
19640          _this6._queryTypeName = operationType.type.name.value;
19641          break;
19642
19643        case 'mutation':
19644          _this6._mutationTypeName = operationType.type.name.value;
19645          break;
19646
19647        case 'subscription':
19648          _this6._subscriptionTypeName = operationType.type.name.value;
19649          break;
19650      }
19651    });
19652  };
19653
19654  _proto5._parseScalarNode = function _parseScalarNode(node, isClient) {
19655    var name = node.name.value;
19656
19657    if (!isDefaultScalar(name) && this._types.has(name)) {
19658      throw createCompilerError("_parseScalarNode: Duplicate definition for type ".concat(name, "."), null, [node]);
19659    }
19660
19661    this._types.set(name, new ScalarType(name, isClient));
19662  };
19663
19664  _proto5._parseEnumNode = function _parseEnumNode(node, isClient) {
19665    var name = node.name.value;
19666
19667    if (this._types.has(name)) {
19668      throw createCompilerError("_parseEnumNode: Duplicate definition for type ".concat(name, "."), null, [node]);
19669    } // SDL doesn't have information about the actual ENUM values
19670
19671
19672    var values = node.values ? node.values.map(function (value) {
19673      return value.name.value;
19674    }) : [];
19675
19676    this._types.set(name, new EnumType(name, values, isClient));
19677  };
19678
19679  _proto5._parseObjectTypeNode = function _parseObjectTypeNode(node, isClient) {
19680    var _this7 = this;
19681
19682    var _this$_types$get;
19683
19684    var name = node.name.value; // Objects may be created by _parseUnionNode
19685
19686    var type = (_this$_types$get = this._types.get(name)) !== null && _this$_types$get !== void 0 ? _this$_types$get : new ObjectType(name, isClient);
19687
19688    if (!(type instanceof ObjectType)) {
19689      throw createCompilerError("_parseObjectTypeNode: Expected object type, got ".concat(String(type)), null, [node]);
19690    }
19691
19692    if (type.isClient !== isClient) {
19693      throw createCompilerError("_parseObjectTypeNode: Cannot create object type '".concat(name, "' defined as a client type."), null, [node]);
19694    }
19695
19696    var typeInterfaces = [];
19697    node.interfaces && node.interfaces.forEach(function (interfaceTypeNode) {
19698      var _this$_interfaceImple;
19699
19700      var interfaceName = interfaceTypeNode.name.value;
19701
19702      var interfaceType = _this7._types.get(interfaceName);
19703
19704      if (!interfaceType) {
19705        interfaceType = new InterfaceType(interfaceName, isClient);
19706
19707        _this7._types.set(interfaceName, interfaceType);
19708      }
19709
19710      if (!(interfaceType instanceof InterfaceType)) {
19711        throw createCompilerError('_parseObjectTypeNode: Expected interface type', null, [interfaceTypeNode]);
19712      }
19713
19714      var implementations = (_this$_interfaceImple = _this7._interfaceImplementations.get(interfaceType)) !== null && _this$_interfaceImple !== void 0 ? _this$_interfaceImple : new Set();
19715      implementations.add(type);
19716
19717      _this7._interfaceImplementations.set(interfaceType, implementations);
19718
19719      typeInterfaces.push(interfaceType);
19720    });
19721    var fetchable = null;
19722    node.directives && node.directives.forEach(function (directiveNode) {
19723      if (directiveNode.name.value === 'fetchable') {
19724        var field_name_arg = directiveNode.arguments && directiveNode.arguments.find(function (arg) {
19725          return arg.name.value === 'field_name';
19726        });
19727
19728        if (field_name_arg != null && field_name_arg.value.kind === 'StringValue') {
19729          fetchable = {
19730            field_name: field_name_arg.value.value
19731          };
19732        }
19733      }
19734    });
19735
19736    this._typeInterfaces.set(type, typeInterfaces);
19737
19738    this._types.set(name, type);
19739
19740    if (fetchable != null) {
19741      this._fetchable.set(type, fetchable);
19742    }
19743
19744    node.fields && this._handleTypeFieldsStrict(type, node.fields, isClient);
19745  };
19746
19747  _proto5._parseInputObjectTypeNode = function _parseInputObjectTypeNode(node, isClient) {
19748    var name = node.name.value;
19749
19750    if (this._types.has(name)) {
19751      throw createCompilerError('_parseInputObjectTypeNode: Unable to parse schema file. Duplicate definition for object type', null, [node]);
19752    }
19753
19754    var type = new InputObjectType(name, isClient);
19755
19756    this._types.set(name, type);
19757
19758    this._parseInputObjectFields(type, node);
19759  };
19760
19761  _proto5._parseUnionNode = function _parseUnionNode(node, isClient) {
19762    var _this8 = this;
19763
19764    var name = node.name.value;
19765
19766    if (this._types.has(name)) {
19767      throw createCompilerError('_parseUnionNode: Unable to parse schema file. Duplicate definition for object type', null, [n
19767ode]);
19768    }
19769
19770    var union = new UnionType(name, isClient);
19771
19772    this._types.set(name, union);
19773
19774    this._unionTypes.set(union, new Set(node.types ? node.types.map(function (typeInUnion) {
19775      var _this$_types$get2;
19776
19777      var typeInUnionName = typeInUnion.name.value;
19778      var object = (_this$_types$get2 = _this8._types.get(typeInUnionName)) !== null && _this$_types$get2 !== void 0 ? _this$_types$get2 : new ObjectType(typeInUnionName, false);
19779
19780      if (!(object instanceof ObjectType)) {
19781        throw createCompilerError('_parseUnionNode: Expected object type', null, [typeInUnion]);
19782      }
19783
19784      _this8._types.set(typeInUnionName, object);
19785
19786      return object;
19787    }) : []));
19788  };
19789
19790  _proto5._parseInterfaceNode = function _parseInterfaceNode(node, isClient) {
19791    var name = node.name.value;
19792
19793    var type = this._types.get(name);
19794
19795    if (!type) {
19796      type = new InterfaceType(name, isClient);
19797
19798      this._types.set(name, type);
19799    }
19800
19801    if (!(type instanceof InterfaceType)) {
19802      throw createCompilerError("_parseInterfaceNode: Expected interface type. Got ".concat(String(type)), null, [node]);
19803    }
19804
19805    if (type.isClient !== isClient) {
19806      throw createCompilerError("_parseInterfaceNode: Cannot create interface '".concat(name, "' defined as a client interface"), null, [node]);
19807    }
19808
19809    node.fields && this._handleTypeFieldsStrict(type, node.fields, isClient);
19810  };
19811
19812  _proto5._handleTypeFieldsStrict = function _handleTypeFieldsStrict(type, fields, isClient) {
19813    if (this._fields.has(type)) {
19814      throw createCompilerError('_handleTypeFieldsStrict: Unable to parse schema file. Duplicate definition for object type');
19815    }
19816
19817    this._handleTypeFields(type, fields, isClient);
19818  };
19819
19820  _proto5._handleTypeFields = function _handleTypeFields(type, fields, isClient) {
19821    var _this$_fields$get;
19822
19823    var fieldsMap = (_this$_fields$get = this._fields.get(type)) !== null && _this$_fields$get !== void 0 ? _this$_fields$get : new Map();
19824    fields.forEach(function (fieldNode) {
19825      var fieldName = fieldNode.name.value;
19826
19827      if (fieldsMap.has(fieldName)) {
19828        throw createCompilerError("_handleTypeFields: Duplicate definition for field '".concat(fieldName, "'."));
19829      }
19830
19831      fieldsMap.set(fieldName, {
19832        arguments: fieldNode.arguments ? fieldNode.arguments.map(function (arg) {
19833          return {
19834            name: arg.name.value,
19835            typeNode: arg.type,
19836            defaultValue: arg.defaultValue
19837          };
19838        }) : [],
19839        directives: fieldNode.directives ? fieldNode.directives.map(function (directive) {
19840          return {
19841            name: directive.name.value,
19842            args: directive.arguments ? directive.arguments.map(function (arg) {
19843              return {
19844                name: arg.name.value,
19845                value: arg.value
19846              };
19847            }) : []
19848          };
19849        }) : null,
19850        type: fieldNode.type,
19851        isClient: isClient
19852      });
19853    });
19854
19855    this._fields.set(type, fieldsMap);
19856  };
19857
19858  _proto5._parseInputObjectFields = function _parseInputObjectFields(type, node) {
19859    if (this._inputFields.has(type)) {
19860      throw createCompilerError('_parseInputObjectFields: Unable to parse schema file. Duplicate definition for type', null, [node]);
19861    }
19862
19863    var fields = new Map();
19864
19865    if (node.fields) {
19866      node.fields.forEach(function (fieldNode) {
19867        fields.set(fieldNode.name.value, fieldNode.type);
19868      });
19869    }
19870
19871    this._inputFields.set(type, fields);
19872  };
19873
19874  _proto5._parseDirective = function _parseDirective(node, isClient) {
19875    var name = node.name.value;
19876
19877    this._directives.set(name, {
19878      name: name,
19879      args: node.arguments ? node.arguments.map(function (arg) {
19880        return {
19881          name: arg.name.value,
19882          typeNode: arg.type,
19883          defaultValue: arg.defaultValue
19884        };
19885      }) : [],
19886      locations: node.locations.map(function (location) {
19887        switch (location.value) {
19888          case 'QUERY':
19889          case 'MUTATION':
19890          case 'SUBSCRIPTION':
19891          case 'FIELD':
19892          case 'FRAGMENT_DEFINITION':
19893          case 'FRAGMENT_SPREAD':
19894          case 'INLINE_FRAGMENT':
19895          case 'VARIABLE_DEFINITION':
19896          case 'SCHEMA':
19897          case 'SCALAR':
19898          case 'OBJECT':
19899          case 'FIELD_DEFINITION':
19900          case 'ARGUMENT_DEFINITION':
19901          case 'INTERFACE':
19902          case 'UNION':
19903          case 'ENUM':
19904          case 'ENUM_VALUE':
19905          case 'INPUT_OBJECT':
19906          case 'INPUT_FIELD_DEFINITION':
19907            return location.value;
19908
19909          default:
19910            throw createCompilerError('Invalid directive location');
19911        }
19912      }),
19913      isClient: isClient
19914    });
19915  };
19916
19917  _proto5._parseObjectTypeExtension = function _parseObjectTypeExtension(node) {
19918    var type = this._types.get(node.name.value);
19919
19920    if (!(type instanceof ObjectType)) {
19921      throw createCompilerError("_parseObjectTypeExtension: Expected to find type with the name '".concat(node.name.value, "'"), null, [n
19921ode]);
19922    }
19923
19924    node.fields && this._handleTypeFields(type, node.fields, true
19925    /** client fields */
19926    );
19927  };
19928
19929  _proto5._parseInterfaceTypeExtension = function _parseInterfaceTypeExtension(node) {
19930    var type = this._types.get(node.name.value);
19931
19932    if (!(type instanceof InterfaceType)) {
19933      throw createCompilerError('_parseInterfaceTypeExtension: Expected to have an interface type');
19934    }
19935
19936    node.fields && this._handleTypeFields(type, node.fields, true);
19937  };
19938
19939  _proto5._extend = function _extend(extensions) {
19940    var _this9 = this;
19941
19942    extensions.forEach(function (definition) {
19943      if (definition.kind === 'ObjectTypeDefinition') {
19944        _this9._parseObjectTypeNode(definition, true);
19945      } else if (definition.kind === 'InterfaceTypeDefinition') {
19946        _this9._parseInterfaceNode(definition, true);
19947      } else if (definition.kind === 'ScalarTypeDefinition') {
19948        _this9._parseScalarNode(definition, true);
19949      } else if (definition.kind === 'EnumTypeDefinition') {
19950        _this9._parseEnumNode(definition, true);
19951      } else if (definition.kind === 'InterfaceTypeExtension') {
19952        _this9._parseInterfaceTypeExtension(definition);
19953      } else if (definition.kind === 'ObjectTypeExtension') {
19954        _this9._parseObjectTypeExtension(definition);
19955      } else if (definition.kind === 'DirectiveDefinition') {
19956        _this9._parseDirective(definition, true
19957        /* client directive */
19958        );
19959      } else {
19960        throw createCompilerError("Unexpected extension kind: '".concat(definition.kind, "'"), null, [definition]);
19961      }
19962    });
19963  };
19964
19965  _proto5.getTypes = function getTypes() {
19966    return Array.from(this._types.values());
19967  };
19968
19969  _proto5.getTypeByName = function getTypeByName(typename) {
19970    return this._types.get(typename);
19971  };
19972
19973  _proto5.getInterfaces = function getInterfaces(type) {
19974    var _this$_typeInterfaces;
19975
19976    return (_this$_typeInterfaces = this._typeInterfaces.get(type)) !== null && _this$_typeInterfaces !== void 0 ? _this$_typeInterfaces : [];
19977  };
19978
19979  _proto5.getPossibleTypeSet = function getPossibleTypeSet(type) {
19980    var set;
19981
19982    if (type instanceof InterfaceType) {
19983      var _this$_interfaceImple2;
19984
19985      set = (_this$_interfaceImple2 = this._interfaceImplementations.get(type)) !== null && _this$_interfaceImple2 !== void 0 ? _this$_interfaceImple2 : new Set();
19986    } else if (type instanceof UnionType) {
19987      var _this$_unionTypes$get;
19988
19989      set = (_this$_unionTypes$get = this._unionTypes.get(type)) !== null && _this$_unionTypes$get !== void 0 ? _this$_unionTypes$get : new Set();
19990    } else {
19991      throw createCompilerError('Invalid type supplied to "getPossibleTypeSet"');
19992    }
19993
19994    if (!set) {
19995      throw createCompilerError("Unable to find possible types for ".concat(type.name));
19996    }
19997
19998    return set;
19999  };
20000
20001  _proto5.getFetchableFieldName = function getFetchableFieldName(type) {
20002    var _this$_fetchable$get$, _this$_fetchable$get;
20003
20004    return (_this$_fetchable$get$ = (_this$_fetchable$get = this._fetchable.get(type)) === null || _this$_fetchable$get === void 0 ? void 0 : _this$_fetchable$get.field_name) !== null && _this$_fetchable$get$ !== void 0 ? _this$_fetchable$get$ : null;
20005  };
20006
20007  _proto5.getQueryType = function getQueryType() {
20008    return this._types.get(this._queryTypeName);
20009  };
20010
20011  _proto5.getMutationType = function getMutationType() {
20012    return this._types.get(this._mutationTypeName);
20013  };
20014
20015  _proto5.getSubscriptionType = function getSubscriptionType() {
20016    return this._types.get(this._subscriptionTypeName);
20017  };
20018
20019  _proto5.getField = function getField(type, fieldName) {
20020    var fields = this._fields.get(type);
20021
20022    if (fields) {
20023      return fields.get(fieldName);
20024    }
20025  };
20026
20027  _proto5.getFieldMap = function getFieldMap(type) {
20028    return this._fields.get(type);
20029  };
20030
20031  _proto5.getInputField = function getInputField(type, fieldName) {
20032    var inputFields = this._inputFields.get(type);
20033
20034    if (inputFields) {
20035      return inputFields.get(fieldName);
20036    }
20037  };
20038
20039  _proto5.getInputFieldMap = function getInputFieldMap(type) {
20040    return this._inputFields.get(type);
20041  };
20042
20043  _proto5.getDirectives = function getDirectives() {
20044    return Array.from(this._directives.values());
20045  };
20046
20047  _proto5.extend = function extend(extensions) {
20048    return new TypeMap(this._source, this._extensions.concat(extensions));
20049  };
20050
20051  return TypeMap;
20052}();
20053
20054function create(baseSchema, schemaExtensionDocuments, schemaExtensions) {
20055  var extensions = [];
20056  schemaExtensions && schemaExtensions.forEach(function (source) {
20057    var doc = parse(source, {
20058      noLocation: true
20059    });
20060    doc.definitions.forEach(function (definition) {
20061      if (isSchemaDefinitionAST(definition)) {
20062        extensions.push(definition);
20063      }
20064    });
20065  });
20066  schemaExtensionDocuments && schemaExtensionDocuments.forEach(function (doc) {
20067    doc.definitions.forEach(function (definition) {
20068      if (isSchemaDefinitionAST(definition)) {
20069        extensions.push(definition);
20070      }
20071    });
20072  });
20073  return new Schema(new TypeMap(baseSchema, extensions));
20074}
20075
20076function parseInputArgumentDefinitions(schema, args) {
20077  return args.map(function (arg) {
20078    var argType = schema.assertInputType(schema.expectTypeFromAST(arg.typeNode));
20079    var defaultValue;
20080    var defaultValueNode = arg.defaultValue;
20081
20082    if (defaultValueNode != null) {
20083      var nullableType = schema.getNullableType(argType);
20084      var isNullable = schema.isNonNull(argType) === false;
20085
20086      if (isNullable && defaultValueNode.kind === 'NullValue') {
20087        defaultValue = null;
20088      } else {
20089        if (nullableType instanceof ScalarType || nullableType instanceof EnumType) {
20090          defaultValue = schema.parseLiteral(nullableType, defaultValueNode);
20091        } else if (nullableType instanceof List && defaultValueNode.kind === 'ListValue' || nullableType instanceof InputObjectType && defaultValueNode.kind === 'ObjectValue') {
20092          defaultValue = valueFromASTUntyped(defaultValueNode);
20093        }
20094      }
20095
20096      if (defaultValue === undefined) {
20097        throw createCompilerError("parseInputArgumentDefinitions: Unexpected default value: ".concat(String(defaultValueNode), ". Expected to have a value of type ").concat(String(nullableType), "."));
20098      }
20099    }
20100
20101    return {
20102      name: arg.name,
20103      type: argType,
20104      defaultValue: defaultValue
20105    };
20106  });
20107}
20108
20109function parseInputArgumentDefinitionsMap(schema, args) {
20110  return new Map(parseInputArgumentDefinitions(schema, args).map(function (arg) {
20111    return [arg.name, arg];
20112  }));
20113}
20114
20115function isDefaultScalar(name) {
20116  return new Set(['ID', 'String', 'Boolean', 'Int', 'Float']).has(name);
20117}
20118
20119module.exports = {
20120  create: create
20121};
20122
20123/***/ }),
20124
20125/***/ "IdCN":
20126/***/ (function(module, exports, __webpack_require__) {
20127
20128"use strict";
20129
20130
20131var fnToStr = Function.prototype.toString;
20132var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
20133var badArrayLike;
20134var isCallableMarker;
20135if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
20136	try {
20137		badArrayLike = Object.defineProperty({}, 'length', {
20138			get: function () {
20139				throw isCallableMarker;
20140			}
20141		});
20142		isCallableMarker = {};
20143	} catch (_) {
20144		reflectApply = null;
20145	}
20146} else {
20147	reflectApply = null;
20148}
20149
20150var constructorRegex = /^\s*class\b/;
20151var isES6ClassFn = function isES6ClassFunction(value) {
20152	try {
20153		var fnStr = fnToStr.call(value);
20154		return constructorRegex.test(fnStr);
20155	} catch (e) {
20156		return false; // not a function
20157	}
20158};
20159
20160var tryFunctionObject = function tryFunctionToStr(value) {
20161	try {
20162		if (isES6ClassFn(value)) { return false; }
20163		fnToStr.call(value);
20164		return true;
20165	} catch (e) {
20166		return false;
20167	}
20168};
20169var toStr = Object.prototype.toString;
20170var fnClass = '[object Function]';
20171var genClass = '[object GeneratorFunction]';
20172var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
20173
20174module.exports = reflectApply
20175	? function isCallable(value) {
20176		if (!value) { return false; }
20177		if (typeof value !== 'function' && typeof value !== 'object') { return false; }
20178		if (typeof value === 'function' && !value.prototype) { return true; }
20179		try {
20180			reflectApply(value, null, badArrayLike);
20181		} catch (e) {
20182			if (e !== isCallableMarker) { return false; }
20183		}
20184		return !isES6ClassFn(value);
20185	}
20186	: function isCallable(value) {
20187		if (!value) { return false; }
20188		if (typeof value !== 'function' && typeof value !== 'object') { return false; }
20189		if (typeof value === 'function' && !value.prototype) { return true; }
20190		if (hasToStringTag) { return tryFunctionObject(value); }
20191		if (isES6ClassFn(value)) { return false; }
20192		var strClass = toStr.call(value);
20193		return strClass === fnClass || strClass === genClass;
20194	};
20195
20196
20197/***/ }),
20198
20199/***/ "Ijbi":
20200/***/ (function(module, exports, __webpack_require__) {
20201
20202var arrayLikeToArray = __webpack_require__("WkPL");
20203
20204function _arrayWithoutHoles(arr) {
20205  if (Array.isArray(arr)) return arrayLikeToArray(arr);
20206}
20207
20208module.exports = _arrayWithoutHoles;
20209
20210/***/ }),
20211
20212/***/ "JI1D":
20213/***/ (function(module, exports, __webpack_require__) {
20214
20215"use strict";
20216/*!
20217 * map-cache <https://github.com/jonschlinkert/map-cache>
20218 *
20219 * Copyright (c) 2015, Jon Schlinkert.
20220 * Licensed under the MIT License.
20221 */
20222
20223
20224
20225var hasOwn = Object.prototype.hasOwnProperty;
20226
20227/**
20228 * Expose `MapCache`
20229 */
20230
20231module.exports = MapCache;
20232
20233/**
20234 * Creates a cache object to store key/value pairs.
20235 *
20236 * ```js
20237 * var cache = new MapCache();
20238 * ```
20239 *
20240 * @api public
20241 */
20242
20243function MapCache(data) {
20244  this.__data__ = data || {};
20245}
20246
20247/**
20248 * Adds `value` to `key` on the cache.
20249 *
20250 * ```js
20251 * cache.set('foo', 'bar');
20252 * ```
20253 *
20254 * @param {String} `key` The key of the value to cache.
20255 * @param {*} `value` The value to cache.
20256 * @returns {Object} Returns the `Cache` object for chaining.
20257 * @api public
20258 */
20259
20260MapCache.prototype.set = function mapSet(key, value) {
20261  if (key !== '__proto__') {
20262    this.__data__[key] = value;
20263  }
20264  return this;
20265};
20266
20267/**
20268 * Gets the cached value for `key`.
20269 *
20270 * ```js
20271 * cache.get('foo');
20272 * //=> 'bar'
20273 * ```
20274 *
20275 * @param {String} `key` The key of the value to get.
20276 * @returns {*} Returns the cached value.
20277 * @api public
20278 */
20279
20280MapCache.prototype.get = function mapGet(key) {
20281  return key === '__proto__' ? undefined : this.__data__[key];
20282};
20283
20284/**
20285 * Checks if a cached value for `key` exists.
20286 *
20287 * ```js
20288 * cache.has('foo');
20289 * //=> true
20290 * ```
20291 *
20292 * @param {String} `key` The key of the entry to check.
20293 * @returns {Boolean} Returns `true` if an entry for `key` exists, else `false`.
20294 * @api public
20295 */
20296
20297MapCache.prototype.has = function mapHas(key) {
20298  return key !== '__proto__' && hasOwn.call(this.__data__, key);
20299};
20300
20301/**
20302 * Removes `key` and its value from the cache.
20303 *
20304 * ```js
20305 * cache.del('foo');
20306 * ```
20307 * @title .del
20308 * @param {String} `key` The key of the value to remove.
20309 * @returns {Boolean} Returns `true` if the entry was removed successfully, else `false`.
20310 * @api public
20311 */
20312
20313MapCache.prototype.del = function mapDelete(key) {
20314  return this.has(key) && delete this.__data__[key];
20315};
20316
20317
20318/***/ }),
20319
20320/***/ "JW+s":
20321/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
20322
20323"use strict";
20324/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariablesAreInputTypesRule; });
20325/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
20326/* harmony import */ var _language_printer_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dQau");
20327/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("axIb");
20328/* harmony import */ var _utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("umOc");
20329
20330
20331
20332
20333
20334/**
20335 * Variables are input types
20336 *
20337 * A GraphQL operation is only valid if all the variables it defines are of
20338 * input types (scalar, enum, or input object).
20339 */
20340function VariablesAreInputTypesRule(context) {
20341  return {
20342    VariableDefinition: function VariableDefinition(node) {
20343      var type = Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_3__[/* typeFromAST */ "a"])(context.getSchema(), node.type);
20344
20345      if (type && !Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isInputType */ "G"])(type)) {
20346        var variableName = node.variable.name.value;
20347        var typeName = Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_1__[/* print */ "a"])(node.type);
20348        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Variable \"$".concat(variableName, "\" cannot be non-input type \"").concat(typeName, "\"."), node.type));
20349      }
20350    }
20351  };
20352}
20353
20354
20355/***/ }),
20356
20357/***/ "JqXL":
20358/***/ (function(module, exports, __webpack_require__) {
20359
20360"use strict";
20361
20362
20363var path = __webpack_require__("tpqs");
20364var isAbsolute = __webpack_require__("3Tnt");
20365var pathRoot = __webpack_require__("Z4WY");
20366var MapCache = __webpack_require__("JI1D");
20367var cache = new MapCache();
20368
20369module.exports = function(filepath) {
20370  if (typeof filepath !== 'string') {
20371    throw new TypeError('parse-filepath expects a string');
20372  }
20373
20374  if (cache.has(filepath)) {
20375    return cache.get(filepath);
20376  }
20377
20378  var obj = {};
20379  if (typeof path.parse === 'function') {
20380    obj = path.parse(filepath);
20381    obj.extname = obj.ext;
20382    obj.basename = obj.base;
20383    obj.dirname = obj.dir;
20384    obj.stem = obj.name;
20385
20386  } else {
20387    define(obj, 'root', function() {
20388      return pathRoot(this.path);
20389    });
20390
20391    define(obj, 'extname', function() {
20392      return path.extname(filepath);
20393    });
20394
20395    define(obj, 'ext', function() {
20396      return this.extname;
20397    });
20398
20399    define(obj, 'name', function() {
20400      return path.basename(filepath, this.ext);
20401    });
20402
20403    define(obj, 'stem', function() {
20404      return this.name;
20405    });
20406
20407    define(obj, 'base', function() {
20408      return this.name + this.ext;
20409    });
20410
20411    define(obj, 'basename', function() {
20412      return this.base;
20413    });
20414
20415    define(obj, 'dir', function() {
20416      var dir = path.dirname(filepath);
20417      if (dir === '.') {
20418        return (filepath[0] === '.') ? dir : '';
20419      } else {
20420        return dir;
20421      }
20422    });
20423
20424    define(obj, 'dirname', function() {
20425      return this.dir;
20426    });
20427  }
20428
20429  obj.path = filepath;
20430
20431  define(obj, 'absolute', function() {
20432    return path.resolve(this.path);
20433  });
20434
20435  define(obj, 'isAbsolute', function() {
20436    return isAbsolute(this.path);
20437  });
20438
20439  cache.set(filepath, obj);
20440  return obj;
20441};
20442
20443function define(obj, prop, fn) {
20444  var cached;
20445  Object.defineProperty(obj, prop, {
20446    configurable: true,
20447    enumerable: true,
20448    set: function(val) {
20449      cached = val;
20450    },
20451    get: function() {
20452      return cached || (cached = fn.call(obj));
20453    }
20454  });
20455}
20456
20457
20458/***/ }),
20459
20460/***/ "JvOi":
20461/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
20462
20463"use strict";
20464/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TokenKind; });
20465/**
20466 * An exported enum describing the different kinds of tokens that the
20467 * lexer emits.
20468 */
20469var TokenKind = Object.freeze({
20470  SOF: '<SOF>',
20471  EOF: '<EOF>',
20472  BANG: '!',
20473  DOLLAR: '$',
20474  AMP: '&',
20475  PAREN_L: '(',
20476  PAREN_R: ')',
20477  SPREAD: '...',
20478  COLON: ':',
20479  EQUALS: '=',
20480  AT: '@',
20481  BRACKET_L: '[',
20482  BRACKET_R: ']',
20483  BRACE_L: '{',
20484  PIPE: '|',
20485  BRACE_R: '}',
20486  NAME: 'Name',
20487  INT: 'Int',
20488  FLOAT: 'Float',
20489  STRING: 'String',
20490  BLOCK_STRING: 'BlockString',
20491  COMMENT: 'Comment'
20492});
20493/**
20494 * The enum type representing the token kinds values.
20495 */
20496
20497
20498/***/ }),
20499
20500/***/ "JyDY":
20501/***/ (function(module, exports, __webpack_require__) {
20502
20503"use strict";
20504
20505
20506var MAX_SAFE_INTEGER = __webpack_require__("yVdY");
20507
20508var ToInteger = __webpack_require__("atWj");
20509
20510module.exports = function ToLength(argument) {
20511	var len = ToInteger(argument);
20512	if (len <= 0) { return 0; } // includes converting -0 to +0
20513	if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; }
20514	return len;
20515};
20516
20517
20518/***/ }),
20519
20520/***/ "K4mF":
20521/***/ (function(module, exports, __webpack_require__) {
20522
20523"use strict";
20524
20525
20526// http://262.ecma-international.org/5.1/#sec-9.11
20527
20528module.exports = __webpack_require__("lXvH");
20529
20530
20531/***/ }),
20532
20533/***/ "K7U/":
20534/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
20535
20536"use strict";
20537/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariablesInAllowedPositionRule; });
20538/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
20539/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dWS+");
20540/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("/jXB");
20541/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("axIb");
20542/* harmony import */ var _utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("umOc");
20543/* harmony import */ var _utilities_typeComparators_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("sJV+");
20544
20545
20546
20547
20548
20549
20550
20551/**
20552 * Variables passed to field arguments conform to type
20553 */
20554function VariablesInAllowedPositionRule(context) {
20555  var varDefMap = Object.create(null);
20556  return {
20557    OperationDefinition: {
20558      enter: function enter() {
20559        varDefMap = Object.create(null);
20560      },
20561      leave: function leave(operation) {
20562        var usages = context.getRecursiveVariableUsages(operation);
20563
20564        for (var _i2 = 0; _i2 < usages.length; _i2++) {
20565          var _ref2 = usages[_i2];
20566          var node = _ref2.node;
20567          var type = _ref2.type;
20568          var defaultValue = _ref2.defaultValue;
20569          var varName = node.name.value;
20570          var varDef = varDefMap[varName];
20571
20572          if (varDef && type) {
20573            // A var type is allowed if it is the same or more strict (e.g. is
20574            // a subtype of) than the expected type. It can be more strict if
20575            // the variable type is non-null when the expected type is nullable.
20576            // If both are list types, the variable item type can be more strict
20577            // than the expected item type (contravariant).
20578            var schema = context.getSchema();
20579            var varType = Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_4__[/* typeFromAST */ "a"])(schema, varDef.type);
20580
20581            if (varType && !allowedVariableUsage(schema, varType, varDef.defaultValue, type, defaultValue)) {
20582              var varTypeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(varType);
20583              var typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type);
20584              context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLError */ "a"]("Variable \"$".concat(varName, "\" of type \"").concat(varTypeStr, "\" used in position expecting type \"").concat(typeStr, "\"."), [varDef, node]));
20585            }
20586          }
20587        }
20588      }
20589    },
20590    VariableDefinition: function VariableDefinition(node) {
20591      varDefMap[node.variable.name.value] = node;
20592    }
20593  };
20594}
20595/**
20596 * Returns true if the variable is allowed in the location it was found,
20597 * which includes considering if default values exist for either the variable
20598 * or the location at which it is located.
20599 */
20600
20601function allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {
20602  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_3__[/* isNonNullType */ "L"])(locationType) && !Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_3__[/* isNonNullType */ "L"])(varType)) {
20603    var hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].NULL;
20604    var hasLocationDefaultValue = locationDefaultValue !== undefined;
20605
20606    if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {
20607      return false;
20608    }
20609
20610    var nullableLocationType = locationType.ofType;
20611    return Object(_utilities_typeComparators_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isTypeSubTypeOf */ "c"])(schema, varType, nullableLocationType);
20612  }
20613
20614  return Object(_utilities_typeComparators_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isTypeSubTypeOf */ "c"])(schema, varType, locationType);
20615}
20616
20617
20618/***/ }),
20619
20620/***/ "KPrL":
20621/***/ (function(module, exports, __webpack_require__) {
20622
20623"use strict";
20624
20625
20626var GetIntrinsic = __webpack_require__("AM7I");
20627
20628var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
20629
20630if ($defineProperty) {
20631	try {
20632		$defineProperty({}, 'a', { value: 1 });
20633	} catch (e) {
20634		// IE 8 has a broken defineProperty
20635		$defineProperty = null;
20636	}
20637}
20638
20639var callBound = __webpack_require__("VF6F");
20640
20641var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
20642
20643// eslint-disable-next-line max-params
20644module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {
20645	if (!$defineProperty) {
20646		if (!IsDataDescriptor(desc)) {
20647			// ES3 does not support getters/setters
20648			return false;
20649		}
20650		if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {
20651			return false;
20652		}
20653
20654		// fallback for ES3
20655		if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {
20656			// a non-enumerable existing property
20657			return false;
20658		}
20659
20660		// property does not exist at all, or exists but is enumerable
20661		var V = desc['[[Value]]'];
20662		// eslint-disable-next-line no-param-reassign
20663		O[P] = V; // will use [[Define]]
20664		return SameValue(O[P], V);
20665	}
20666	$defineProperty(O, P, FromPropertyDescriptor(desc));
20667	return true;
20668};
20669
20670
20671/***/ }),
20672
20673/***/ "Kg2h":
20674/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
20675
20676"use strict";
20677/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SingleFieldSubscriptionsRule; });
20678/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
20679
20680
20681/**
20682 * Subscriptions must only include one field.
20683 *
20684 * A GraphQL subscription is valid only if it contains a single root field.
20685 */
20686function SingleFieldSubscriptionsRule(context) {
20687  return {
20688    OperationDefinition: function OperationDefinition(node) {
20689      if (node.operation === 'subscription') {
20690        if (node.selectionSet.selections.length !== 1) {
20691          context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"](node.name ? "Subscription \"".concat(node.name.value, "\" must select only one top level field.") : 'Anonymous Subscription must select only one top level field.', node.selectionSet.selections.slice(1)));
20692        }
20693      }
20694    }
20695  };
20696}
20697
20698
20699/***/ }),
20700
20701/***/ "L2ys":
20702/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
20703
20704"use strict";
20705/* unused harmony export QueryDocumentKeys */
20706/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BREAK; });
20707/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return visit; });
20708/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return visitInParallel; });
20709/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getVisitFn; });
20710/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
20711/* harmony import */ var _ast_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("klf5");
20712
20713
20714/**
20715 * A visitor is provided to visit, it contains the collection of
20716 * relevant functions to be called during the visitor's traversal.
20717 */
20718
20719var QueryDocumentKeys = {
20720  Name: [],
20721  Document: ['definitions'],
20722  OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'],
20723  VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],
20724  Variable: ['name'],
20725  SelectionSet: ['selections'],
20726  Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],
20727  Argument: ['name', 'value'],
20728  FragmentSpread: ['name', 'directives'],
20729  InlineFragment: ['typeCondition', 'directives', 'selectionSet'],
20730  FragmentDefinition: ['name', // Note: fragment variable definitions are experimental and may be changed
20731  // or removed in the future.
20732  'variableDefinitions', 'typeCondition', 'directives', 'selectionSet'],
20733  IntValue: [],
20734  FloatValue: [],
20735  StringValue: [],
20736  BooleanValue: [],
20737  NullValue: [],
20738  EnumValue: [],
20739  ListValue: ['values'],
20740  ObjectValue: ['fields'],
20741  ObjectField: ['name', 'value'],
20742  Directive: ['name', 'arguments'],
20743  NamedType: ['name'],
20744  ListType: ['type'],
20745  NonNullType: ['type'],
20746  SchemaDefinition: ['description', 'directives', 'operationTypes'],
20747  OperationTypeDefinition: ['type'],
20748  ScalarTypeDefinition: ['description', 'name', 'directives'],
20749  ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],
20750  FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],
20751  InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'],
20752  InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],
20753  UnionTypeDefinition: ['description', 'name', 'directives', 'types'],
20754  EnumTypeDefinition: ['description', 'name', 'directives', 'values'],
20755  EnumValueDefinition: ['description', 'name', 'directives'],
20756  InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],
20757  DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],
20758  SchemaExtension: ['directives', 'operationTypes'],
20759  ScalarTypeExtension: ['name', 'directives'],
20760  ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
20761  InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
20762  UnionTypeExtension: ['name', 'directives', 'types'],
20763  EnumTypeExtension: ['name', 'directives', 'values'],
20764  InputObjectTypeExtension: ['name', 'directives', 'fields']
20765};
20766var BREAK = Object.freeze({});
20767/**
20768 * visit() will walk through an AST using a depth-first traversal, calling
20769 * the visitor's enter function at each node in the traversal, and calling the
20770 * leave function after visiting that node and all of its child nodes.
20771 *
20772 * By returning different values from the enter and leave functions, the
20773 * behavior of the visitor can be altered, including skipping over a sub-tree of
20774 * the AST (by returning false), editing the AST by returning a value or null
20775 * to remove the value, or to stop the whole traversal by returning BREAK.
20776 *
20777 * When using visit() to edit an AST, the original AST will not be modified, and
20778 * a new version of the AST with the changes applied will be returned from the
20779 * visit function.
20780 *
vendor: 9,061 bytes, lines 20781-21126
20781 *     const editedAST = visit(ast, {
20782 *       enter(node, key, parent, path, ancestors) {
20783 *         // @return
20784 *         //   undefined: no action
20785 *         //   false: skip visiting this node
20786 *         //   visitor.BREAK: stop visiting altogether
20787 *         //   null: delete this node
20788 *         //   any value: replace this node with the returned value
20789 *       },
20790 *       leave(node, key, parent, path, ancestors) {
20791 *         // @return
20792 *         //   undefined: no action
20793 *         //   false: no action
20794 *         //   visitor.BREAK: stop visiting altogether
20795 *         //   null: delete this node
20796 *         //   any value: replace this node with the returned value
20797 *       }
20798 *     });
20799 *
20800 * Alternatively to providing enter() and leave() functions, a visitor can
20801 * instead provide functions named the same as the kinds of AST nodes, or
20802 * enter/leave visitors at a named key, leading to four permutations of the
20803 * visitor API:
20804 *
20805 * 1) Named visitors triggered when entering a node of a specific kind.
20806 *
20807 *     visit(ast, {
20808 *       Kind(node) {
20809 *         // enter the "Kind" node
20810 *       }
20811 *     })
20812 *
20813 * 2) Named visitors that trigger upon entering and leaving a node of
20814 *    a specific kind.
20815 *
20816 *     visit(ast, {
20817 *       Kind: {
20818 *         enter(node) {
20819 *           // enter the "Kind" node
20820 *         }
20821 *         leave(node) {
20822 *           // leave the "Kind" node
20823 *         }
20824 *       }
20825 *     })
20826 *
20827 * 3) Generic visitors that trigger upon entering and leaving any node.
20828 *
20829 *     visit(ast, {
20830 *       enter(node) {
20831 *         // enter any node
20832 *       },
20833 *       leave(node) {
20834 *         // leave any node
20835 *       }
20836 *     })
20837 *
20838 * 4) Parallel visitors for entering and leaving nodes of a specific kind.
20839 *
20840 *     visit(ast, {
20841 *       enter: {
20842 *         Kind(node) {
20843 *           // enter the "Kind" node
20844 *         }
20845 *       },
20846 *       leave: {
20847 *         Kind(node) {
20848 *           // leave the "Kind" node
20849 *         }
20850 *       }
20851 *     })
20852 */
20853
20854function visit(root, visitor) {
20855  var visitorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : QueryDocumentKeys;
20856
20857  /* eslint-disable no-undef-init */
20858  var stack = undefined;
20859  var inArray = Array.isArray(root);
20860  var keys = [root];
20861  var index = -1;
20862  var edits = [];
20863  var node = undefined;
20864  var key = undefined;
20865  var parent = undefined;
20866  var path = [];
20867  var ancestors = [];
20868  var newRoot = root;
20869  /* eslint-enable no-undef-init */
20870
20871  do {
20872    index++;
20873    var isLeaving = index === keys.length;
20874    var isEdited = isLeaving && edits.length !== 0;
20875
20876    if (isLeaving) {
20877      key = ancestors.length === 0 ? undefined : path[path.length - 1];
20878      node = parent;
20879      parent = ancestors.pop();
20880
20881      if (isEdited) {
20882        if (inArray) {
20883          node = node.slice();
20884        } else {
20885          var clone = {};
20886
20887          for (var _i2 = 0, _Object$keys2 = Object.keys(node); _i2 < _Object$keys2.length; _i2++) {
20888            var k = _Object$keys2[_i2];
20889            clone[k] = node[k];
20890          }
20891
20892          node = clone;
20893        }
20894
20895        var editOffset = 0;
20896
20897        for (var ii = 0; ii < edits.length; ii++) {
20898          var editKey = edits[ii][0];
20899          var editValue = edits[ii][1];
20900
20901          if (inArray) {
20902            editKey -= editOffset;
20903          }
20904
20905          if (inArray && editValue === null) {
20906            node.splice(editKey, 1);
20907            editOffset++;
20908          } else {
20909            node[editKey] = editValue;
20910          }
20911        }
20912      }
20913
20914      index = stack.index;
20915      keys = stack.keys;
20916      edits = stack.edits;
20917      inArray = stack.inArray;
20918      stack = stack.prev;
20919    } else {
20920      key = parent ? inArray ? index : keys[index] : undefined;
20921      node = parent ? parent[key] : newRoot;
20922
20923      if (node === null || node === undefined) {
20924        continue;
20925      }
20926
20927      if (parent) {
20928        path.push(key);
20929      }
20930    }
20931
20932    var result = void 0;
20933
20934    if (!Array.isArray(node)) {
20935      if (!Object(_ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* isNode */ "c"])(node)) {
20936        throw new Error("Invalid AST Node: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(node), "."));
20937      }
20938
20939      var visitFn = getVisitFn(visitor, node.kind, isLeaving);
20940
20941      if (visitFn) {
20942        result = visitFn.call(visitor, node, key, parent, path, ancestors);
20943
20944        if (result === BREAK) {
20945          break;
20946        }
20947
20948        if (result === false) {
20949          if (!isLeaving) {
20950            path.pop();
20951            continue;
20952          }
20953        } else if (result !== undefined) {
20954          edits.push([key, result]);
20955
20956          if (!isLeaving) {
20957            if (Object(_ast_mjs__WEBPACK_IMPORTED_MODULE_1__[/* isNode */ "c"])(result)) {
20958              node = result;
20959            } else {
20960              path.pop();
20961              continue;
20962            }
20963          }
20964        }
20965      }
20966    }
20967
20968    if (result === undefined && isEdited) {
20969      edits.push([key, node]);
20970    }
20971
20972    if (isLeaving) {
20973      path.pop();
20974    } else {
20975      var _visitorKeys$node$kin;
20976
20977      stack = {
20978        inArray: inArray,
20979        index: index,
20980        keys: keys,
20981        edits: edits,
20982        prev: stack
20983      };
20984      inArray = Array.isArray(node);
20985      keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];
20986      index = -1;
20987      edits = [];
20988
20989      if (parent) {
20990        ancestors.push(parent);
20991      }
20992
20993      parent = node;
20994    }
20995  } while (stack !== undefined);
20996
20997  if (edits.length !== 0) {
20998    newRoot = edits[edits.length - 1][1];
20999  }
21000
21001  return newRoot;
21002}
21003/**
21004 * Creates a new visitor instance which delegates to many visitors to run in
21005 * parallel. Each visitor will be visited for each node before moving on.
21006 *
21007 * If a prior visitor edits a node, no following visitors will see that node.
21008 */
21009
21010function visitInParallel(visitors) {
21011  var skipping = new Array(visitors.length);
21012  return {
21013    enter: function enter(node) {
21014      for (var i = 0; i < visitors.length; i++) {
21015        if (skipping[i] == null) {
21016          var fn = getVisitFn(visitors[i], node.kind,
21017          /* isLeaving */
21018          false);
21019
21020          if (fn) {
21021            var result = fn.apply(visitors[i], arguments);
21022
21023            if (result === false) {
21024              skipping[i] = node;
21025            } else if (result === BREAK) {
21026              skipping[i] = BREAK;
21027            } else if (result !== undefined) {
21028              return result;
21029            }
21030          }
21031        }
21032      }
21033    },
21034    leave: function leave(node) {
21035      for (var i = 0; i < visitors.length; i++) {
21036        if (skipping[i] == null) {
21037          var fn = getVisitFn(visitors[i], node.kind,
21038          /* isLeaving */
21039          true);
21040
21041          if (fn) {
21042            var result = fn.apply(visitors[i], arguments);
21043
21044            if (result === BREAK) {
21045              skipping[i] = BREAK;
21046            } else if (result !== undefined && result !== false) {
21047              return result;
21048            }
21049          }
21050        } else if (skipping[i] === node) {
21051          skipping[i] = null;
21052        }
21053      }
21054    }
21055  };
21056}
21057/**
21058 * Given a visitor instance, if it is leaving or not, and a node kind, return
21059 * the function the visitor runtime should call.
21060 */
21061
21062function getVisitFn(visitor, kind, isLeaving) {
21063  var kindVisitor = visitor[kind];
21064
21065  if (kindVisitor) {
21066    if (!isLeaving && typeof kindVisitor === 'function') {
21067      // { Kind() {} }
21068      return kindVisitor;
21069    }
21070
21071    var kindSpecificVisitor = isLeaving ? kindVisitor.leave : kindVisitor.enter;
21072
21073    if (typeof kindSpecificVisitor === 'function') {
21074      // { Kind: { enter() {}, leave() {} } }
21075      return kindSpecificVisitor;
21076    }
21077  } else {
21078    var specificVisitor = isLeaving ? visitor.leave : visitor.enter;
21079
21080    if (specificVisitor) {
21081      if (typeof specificVisitor === 'function') {
21082        // { enter() {}, leave() {} }
21083        return specificVisitor;
21084      }
21085
21086      var specificKindVisitor = specificVisitor[kind];
21087
21088      if (typeof specificKindVisitor === 'function') {
21089        // { enter: { Kind() {} }, leave: { Kind() {} } }
21090        return specificKindVisitor;
21091      }
21092    }
21093  }
21094}
21095
21096
21097/***/ }),
21098
21099/***/ "LOfW":
21100/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
21101
21102"use strict";
21103/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueInputFieldNamesRule; });
21104/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
21105
21106
21107/**
21108 * Unique input field names
21109 *
21110 * A GraphQL input object value is only valid if all supplied fields are
21111 * uniquely named.
21112 */
21113function UniqueInputFieldNamesRule(context) {
21114  var knownNameStack = [];
21115  var knownNames = Object.create(null);
21116  return {
21117    ObjectValue: {
21118      enter: function enter() {
21119        knownNameStack.push(knownNames);
21120        knownNames = Object.create(null);
21121      },
21122      leave: function leave() {
21123        knownNames = knownNameStack.pop();
21124      }
21125    },
21126    ObjectField: function ObjectField(node) {
21127      var fieldName = node.name.value;
21128
21129      if (knownNames[fieldName]) {
21130        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("There can be only one input field named \"".concat(fieldName, "\"."), [knownNames[fieldName], node.name]));
21131      } else {
21132        knownNames[fieldName] = node.name;
21133      }
21134    }
21135  };
21136}
21137
21138
21139/***/ }),
21140
21141/***/ "LViu":
21142/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
21143
21144"use strict";
21145/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __Schema; });
21146/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __Directive; });
21147/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __DirectiveLocation; });
21148/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __Type; });
21149/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __Field; });
21150/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __InputValue; });
21151/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __EnumValue; });
21152/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return TypeKind; });
21153/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __TypeKind; });
21154/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SchemaMetaFieldDef; });
21155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return TypeMetaFieldDef; });
21156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return TypeNameMetaFieldDef; });
21157/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return introspectionTypes; });
21158/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isIntrospectionType; });
21159/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1QEH");
21160/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rWdj");
21161/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2C6G");
21162/* harmony import */ var _language_printer_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("dQau");
21163/* harmony import */ var _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("F8X2");
21164/* harmony import */ var _utilities_astFromValue_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("3HNt");
21165/* harmony import */ var _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("19Hc");
21166/* harmony import */ var _definition_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("axIb");
21167
21168
21169
21170
21171
21172
21173
21174
21175var __Schema = new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLObjectType */ "f"]({
21176  name: '__Schema',
21177  description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.',
21178  fields: function fields() {
21179    return {
21180      description: {
21181        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21182        resolve: function resolve(schema) {
21183          return schema.description;
21184        }
21185      },
21186      types: {
21187        description: 'A list of all types supported by this server.',
21188        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__Type))),
21189        resolve: function resolve(schema) {
21190          return Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(schema.getTypeMap());
21191        }
21192      },
21193      queryType: {
21194        description: 'The type that query operations will be rooted at.',
21195        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__Type),
21196        resolve: function resolve(schema) {
21197          return schema.getQueryType();
21198        }
21199      },
21200      mutationType: {
21201        description: 'If this server supports mutation, the type that mutation operations will be rooted at.',
21202        type: __Type,
21203        resolve: function resolve(schema) {
21204          return schema.getMutationType();
21205        }
21206      },
21207      subscriptionType: {
21208        description: 'If this server support subscription, the type that subscription operations will be rooted at.',
21209        type: __Type,
21210        resolve: function resolve(schema) {
21211          return schema.getSubscriptionType();
21212        }
21213      },
21214      directives: {
21215        description: 'A list of all directives supported by this 
21215server.',
21216        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__Directive))),
21217        resolve: function resolve(schema) {
21218          return schema.getDirectives();
21219        }
21220      }
21221    };
21222  }
21223});
21224var __Directive = new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLObjectType */ "f"]({
21225  name: '__Directive',
21226  description: "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
21227  fields: function fields() {
21228    return {
21229      name: {
21230        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"]),
21231        resolve: function resolve(directive) {
21232          return directive.name;
21233        }
21234      },
21235      description: {
21236        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21237        resolve: function resolve(directive) {
21238          return directive.description;
21239        }
21240      },
21241      isRepeatable: {
21242        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLBoolean */ "a"]),
21243        resolve: function resolve(directive) {
21244          return directive.isRepeatable;
21245        }
21246      },
21247      locations: {
21248        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__DirectiveLocation))),
21249        resolve: function resolve(directive) {
21250          return directive.locations;
21251        }
21252      },
21253      args: {
21254        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__InputValue))),
21255        resolve: function resolve(directive) {
21256          return directive.args;
21257        }
21258      }
21259    };
21260  }
21261});
21262var __DirectiveLocation = new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLEnumType */ "a"]({
21263  name: '__DirectiveLocation',
21264  description: 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.',
21265  values: {
21266    QUERY: {
21267      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].QUERY,
21268      description: 'Location adjacent to a query operation.'
21269    },
21270    MUTATION: {
21271      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].MUTATION,
21272      description: 'Location adjacent to a mutation operation.'
21273    },
21274    SUBSCRIPTION: {
21275      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].SUBSCRIPTION,
21276      description: 'Location adjacent to a subscription operation.'
21277    },
21278    FIELD: {
21279      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].FIELD,
21280      description: 'Location adjacent to a field.'
21281    },
21282    FRAGMENT_DEFINITION: {
21283      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].FRAGMENT_DEFINITION,
21284      description: 'Location adjacent to a fragment definition.'
21285    },
21286    FRAGMENT_SPREAD: {
21287      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].FRAGMENT_SPREAD,
21288      description: 'Location adjacent to a fragment spread.'
21289    },
21290    INLINE_FRAGMENT: {
21291      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].INLINE_FRAGMENT,
21292      description: 'Location adjacent to an inline fragment.'
21293    },
21294    VARIABLE_DEFINITION: {
21295      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].VARIABLE_DEFINITION,
21296      description: 'Location adjacent to a variable definition.'
21297    },
21298    SCHEMA: {
21299      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].SCHEMA,
21300      description: 'Location adjacent to a schema definition.'
21301    },
21302    SCALAR: {
21303      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].SCALAR,
21304      description: 'Location adjacent to a scalar definition.'
21305    },
21306    OBJECT: {
21307      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].OBJECT,
21308      description: 'Location adjacent to an object type definition.'
21309    },
21310    FIELD_DEFINITION: {
21311      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].FIELD_DEFINITION,
21312      description: 'Location adjacent to a field definition.'
21313    },
21314    ARGUMENT_DEFINITION: {
21315      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].ARGUMENT_DEFINITION,
21316      description: 'Location adjacent to an argument definition.'
21317    },
21318    INTERFACE: {
21319      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].INTERFACE,
21320      description: 'Location adjacent to an interface definition.'
21321    },
21322    UNION: {
21323      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].UNION,
21324      description: 'Location adjacent to a union definition.'
21325    },
21326    ENUM: {
21327      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].ENUM,
21328      description: 'Location adjacent to an enum definition.'
21329    },
21330    ENUM_VALUE: {
21331      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].ENUM_VALUE,
21332      description: 'Location adjacent to an enum value definition.'
21333    },
21334    INPUT_OBJECT: {
21335      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].INPUT_OBJECT,
21336      description: 'Location adjacent to an input object type definition.'
21337    },
21338    INPUT_FIELD_DEFINITION: {
21339      value: _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].INPUT_FIELD_DEFINITION,
21340      description: 'Location adjacent to an input object field definition.'
21341    }
21342  }
21343});
21344var __Type = new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLObjectType */ "f"]({
21345  name: '__Type',
21346  description: 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.',
21347  fields: function fields() {
21348    return {
21349      kind: {
21350        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__TypeKind),
21351        resolve: function resolve(type) {
21352          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isScalarType */ "R"])(type)) {
21353            return TypeKind.SCALAR;
21354          }
21355
21356          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isObjectType */ "N"])(type)) {
21357            return TypeKind.OBJECT;
21358          }
21359
21360          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInterfaceType */ "H"])(type)) {
21361            return TypeKind.INTERFACE;
21362          }
21363
21364          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isUnionType */ "T"])(type)) {
21365            return TypeKind.UNION;
21366          }
21367
21368          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isEnumType */ "E"])(type)) {
21369            return TypeKind.ENUM;
21370          }
21371
21372          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInputObjectType */ "F"])(type)) {
21373            return TypeKind.INPUT_OBJECT;
21374          }
21375
21376          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isListType */ "J"])(type)) {
21377            return TypeKind.LIST;
21378          } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
21379
21380
21381          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isNonNullType */ "L"])(type)) {
21382            return TypeKind.NON_NULL;
21383          } // istanbul ignore next (Not reachable. All possible types have been considered)
21384
21385
21386           false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(0, "Unexpected type: \"".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type), "\"."));
21387        }
21388      },
21389      name: {
21390        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21391        resolve: function resolve(type) {
21392          return type.name !== undefined ? type.name : undefined;
21393        }
21394      },
21395      description: {
21396        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21397        resolve: function resolve(type) {
21398          return type.description !== undefined ? type.description : undefined;
21399        }
21400      },
21401      specifiedByUrl: {
21402        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21403        resolve: function resolve(obj) {
21404          return obj.specifiedByUrl !== undefined ? obj.specifiedByUrl : undefined;
21405        }
21406      },
21407      fields: {
21408        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__Field)),
21409        args: {
21410          includeDeprecated: {
21411            type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLBoolean */ "a"],
21412            defaultValue: false
21413          }
21414        },
21415        resolve: function resolve(type, _ref) {
21416          var includeDeprecated = _ref.includeDeprecated;
21417
21418          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isObjectType */ "N"])(type) || Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInterfaceType */ "H"])(type)) {
21419            var fields = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type.getFields());
21420            return includeDeprecated ? fields : fields.filter(function (field) {
21421              return field.deprecationReason == null;
21422            });
21423          }
21424        }
21425      },
21426      interfaces: {
21427        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__Type)),
21428        resolve: function resolve(type) {
21429          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isObjectType */ "N"])(type) || Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInterfaceType */ "H"])(type)) {
21430            return type.getInterfaces();
21431          }
21432        }
21433      },
21434      possibleTypes: {
21435        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__Type)),
21436        resolve: function resolve(type, _args, _context, _ref2) {
21437          var schema = _ref2.schema;
21438
21439          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isAbstractType */ "C"])(type)) {
21440            return schema.getPossibleTypes(type);
21441          }
21442        }
21443      },
21444      enumValues: {
21445        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__EnumValue)),
21446        args: {
21447          includeDeprecated: {
21448            type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLBoolean */ "a"],
21449            defaultValue: false
21450          }
21451        },
21452        resolve: function resolve(type, _ref3) {
21453          var includeDeprecated = _ref3.includeDeprecated;
21454
21455          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isEnumType */ "E"])(type)) {
21456            var values = type.getValues();
21457            return includeDeprecated ? values : values.filter(function (field) {
21458              return field.deprecationReason == null;
21459            });
21460          }
21461        }
21462      },
21463      inputFields: {
21464        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__InputValue)),
21465        args: {
21466          includeDeprecated: {
21467            type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLBoolean */ "a"],
21468            defaultValue: false
21469          }
21470        },
21471        resolve: function resolve(type, _ref4) {
21472          var includeDeprecated = _ref4.includeDeprecated;
21473
21474          if (Object(_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInputObjectType */ "F"])(type)) {
21475            var values = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type.getFields());
21476            return includeDeprecated ? values : values.filter(function (field) {
21477              return field.deprecationReason == null;
21478            });
21479          }
21480        }
21481      },
21482      ofType: {
21483        type: __Type,
21484        resolve: function resolve(type) {
21485          return type.ofType !== undefined ? type.ofType : undefined;
21486        }
21487      }
21488    };
21489  }
21490});
21491var __Field = new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLObjectType */ "f"]({
21492  name: '__Field',
21493  description: 'Object and Interface types are described by a list of Fields, each of which has a 
21493name, potentially a list of arguments, and a return type.',
21494  fields: function fields() {
21495    return {
21496      name: {
21497        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"]),
21498        resolve: function resolve(field) {
21499          return field.name;
21500        }
21501      },
21502      description: {
21503        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21504        resolve: function resolve(field) {
21505          return field.description;
21506        }
21507      },
21508      args: {
21509        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLList */ "d"](new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__InputValue))),
21510        args: {
21511          includeDeprecated: {
21512            type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLBoolean */ "a"],
21513            defaultValue: false
21514          }
21515        },
21516        resolve: function resolve(field, _ref5) {
21517          var includeDeprecated = _ref5.includeDeprecated;
21518          return includeDeprecated ? field.args : field.args.filter(function (arg) {
21519            return arg.deprecationReason == null;
21520          });
21521        }
21522      },
21523      type: {
21524        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__Type),
21525        resolve: function resolve(field) {
21526          return field.type;
21527        }
21528      },
21529      isDeprecated: {
21530        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLBoolean */ "a"]),
21531        resolve: function resolve(field) {
21532          return field.deprecationReason != null;
21533        }
21534      },
21535      deprecationReason: {
21536        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21537        resolve: function resolve(field) {
21538          return field.deprecationReason;
21539        }
21540      }
21541    };
21542  }
21543});
21544var __InputValue = new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLObjectType */ "f"]({
21545  name: '__InputValue',
21546  description: 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.',
21547  fields: function fields() {
21548    return {
21549      name: {
21550        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"]),
21551        resolve: function resolve(inputValue) {
21552          return inputValue.name;
21553        }
21554      },
21555      description: {
21556        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21557        resolve: function resolve(inputValue) {
21558          return inputValue.description;
21559        }
21560      },
21561      type: {
21562        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__Type),
21563        resolve: function resolve(inputValue) {
21564          return inputValue.type;
21565        }
21566      },
21567      defaultValue: {
21568        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21569        description: 'A GraphQL-formatted string representing the default value for this input value.',
21570        resolve: function resolve(inputValue) {
21571          var type = inputValue.type,
21572              defaultValue = inputValue.defaultValue;
21573          var valueAST = Object(_utilities_astFromValue_mjs__WEBPACK_IMPORTED_MODULE_5__[/* astFromValue */ "a"])(defaultValue, type);
21574          return valueAST ? Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_3__[/* print */ "a"])(valueAST) : null;
21575        }
21576      },
21577      isDeprecated: {
21578        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLBoolean */ "a"]),
21579        resolve: function resolve(field) {
21580          return field.deprecationReason != null;
21581        }
21582      },
21583      deprecationReason: {
21584        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21585        resolve: function resolve(obj) {
21586          return obj.deprecationReason;
21587        }
21588      }
21589    };
21590  }
21591});
21592var __EnumValue = new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLObjectType */ "f"]({
21593  name: '__EnumValue',
21594  description: 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.',
21595  fields: function fields() {
21596    return {
21597      name: {
21598        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"]),
21599        resolve: function resolve(enumValue) {
21600          return enumValue.name;
21601        }
21602      },
21603      description: {
21604        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21605        resolve: function resolve(enumValue) {
21606          return enumValue.description;
21607        }
21608      },
21609      isDeprecated: {
21610        type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLBoolean */ "a"]),
21611        resolve: function resolve(enumValue) {
21612          return enumValue.deprecationReason != null;
21613        }
21614      },
21615      deprecationReason: {
21616        type: _scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"],
21617        resolve: function resolve(enumValue) {
21618          return enumValue.deprecationReason;
21619        }
21620      }
21621    };
21622  }
21623});
21624var TypeKind = Object.freeze({
21625  SCALAR: 'SCALAR',
21626  OBJECT: 'OBJECT',
21627  INTERFACE: 'INTERFACE',
21628  UNION: 'UNION',
21629  ENUM: 'ENUM',
21630  INPUT_OBJECT: 'INPUT_OBJECT',
21631  LIST: 'LIST',
21632  NON_NULL: 'NON_NULL'
21633});
21634var __TypeKind = new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLEnumType */ "a"]({
21635  name: '__TypeKind',
21636  description: 'An enum describing what kind of type a given `__Type` is.',
21637  values: {
21638    SCALAR: {
21639      value: TypeKind.SCALAR,
21640      description: 'Indicates this type is a scalar.'
21641    },
21642    OBJECT: {
21643      value: TypeKind.OBJECT,
21644      description: 'Indicates this type is an object. `fields` and `interfaces` are valid fields.'
21645    },
21646    INTERFACE: {
21647      value: TypeKind.INTERFACE,
21648      description: 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.'
21649    },
21650    UNION: {
21651      value: TypeKind.UNION,
21652      description: 'Indicates this type is a union. `possibleTypes` is a valid field.'
21653    },
21654    ENUM: {
21655      value: TypeKind.ENUM,
21656      description: 'Indicates this type is an enum. `enumValues` is a valid field.'
21657    },
21658    INPUT_OBJECT: {
21659      value: TypeKind.INPUT_OBJECT,
21660      description: 'Indicates this type is an input object. `inputFields` is a valid field.'
21661    },
21662    LIST: {
21663      value: TypeKind.LIST,
21664      description: 'Indicates this type is a list. `ofType` is a valid field.'
21665    },
21666    NON_NULL: {
21667      value: TypeKind.NON_NULL,
21668      description: 'Indicates this type is a non-null. `ofType` is a valid field.'
21669    }
21670  }
21671});
21672/**
21673 * Note that these are GraphQLField and not GraphQLFieldConfig,
21674 * so the format for args is different.
21675 */
21676
21677var SchemaMetaFieldDef = {
21678  name: '__schema',
21679  type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](__Schema),
21680  description: 'Access the current type schema of this server.',
21681  args: [],
21682  resolve: function resolve(_source, _args, _context, _ref6) {
21683    var schema = _ref6.schema;
21684    return schema;
21685  },
21686  isDeprecated: false,
21687  deprecationReason: undefined,
21688  extensions: undefined,
21689  astNode: undefined
21690};
21691var TypeMetaFieldDef = {
21692  name: '__type',
21693  type: __Type,
21694  description: 'Request the type information of a single type.',
21695  args: [{
21696    name: 'name',
21697    description: undefined,
21698    type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"]),
21699    defaultValue: undefined,
21700    deprecationReason: undefined,
21701    extensions: undefined,
21702    astNode: undefined
21703  }],
21704  resolve: function resolve(_source, _ref7, _context, _ref8) {
21705    var name = _ref7.name;
21706    var schema = _ref8.schema;
21707    return schema.getType(name);
21708  },
21709  isDeprecated: false,
21710  deprecationReason: undefined,
21711  extensions: undefined,
21712  astNode: undefined
21713};
21714var TypeNameMetaFieldDef = {
21715  name: '__typename',
21716  type: new _definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLNonNull */ "e"](_scalars_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLString */ "e"]),
21717  description: 'The name of the current Object type at runtime.',
21718  args: [],
21719  resolve: function resolve(_source, _args, _context, _ref9) {
21720    var parentType = _ref9.parentType;
21721    return parentType.name;
21722  },
21723  isDeprecated: false,
21724  deprecationReason: undefined,
21725  extensions: undefined,
21726  astNode: undefined
21727};
21728var introspectionTypes = Object.freeze([__Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind]);
21729function isIntrospectionType(type) {
21730  return introspectionTypes.some(function (_ref10) {
21731    var name = _ref10.name;
21732    return type.name === name;
21733  });
21734}
21735
21736
21737/***/ }),
21738
21739/***/ "LY0y":
21740/***/ (function(module, exports) {
21741
21742/* WEBPACK VAR INJECTION */(function(__dirname) {module.exports =
21743/******/ (function() { // webpackBootstrap
21744/******/ 	var __webpack_modules__ = ({
21745
21746/***/ 880:
21747/***/ (function(module) {
21748
21749module.exports = function(module) {
21750	if (!module.webpackPolyfill) {
21751		module.deprecate = function() {};
21752		module.paths = [];
21753		// module.parent = undefined by default
21754		if (!module.children) module.children = [];
21755		Object.defineProperty(module, "loaded", {
21756			enumerable: true,
21757			get: function() {
21758				return module.l;
21759			}
21760		});
21761		Object.defineProperty(module, "id", {
21762			enumerable: true,
21763			get: function() {
21764				return module.i;
21765			}
21766		});
21767		module.webpackPolyfill = 1;
21768	}
21769	return module;
21770};
21771
21772
21773/***/ })
21774
21775/******/ 	});
21776/************************************************************************/
21777/******/ 	// The module cache
21778/******/ 	var __webpack_module_cache__ = {};
21779/******/ 	
21780/******/ 	// The require function
21781/******/ 	function __nccwpck_require__(moduleId) {
21782/******/ 		// Check if module is in cache
21783/******/ 		if(__webpack_module_cache__[moduleId]) {
21784/******/ 			return __webpack_module_cache__[moduleId].exports;
21785/******/ 		}
21786/******/ 		// Create a new module (and put it into the cache)
21787/******/ 		var module = __webpack_module_cache__[moduleId] = {
21788/******/ 			// no module.id needed
21789/******/ 			// no module.loaded needed
21790/******/ 			exports: {}
21791/******/ 		};
21792/******/ 	
21793/******/ 		// Execute the module function
21794/******/ 		var threw = true;
21795/******/ 		try {
21796/******/ 			__webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
21797/******/ 			threw = false;
21798/******/ 		} finally {
21799/******/ 			if(threw) delete __webpack_module_cache__[moduleId];
21800/******/ 		}
21801/******/ 	
21802/******/ 		// Return the exports of the module
21803/******/ 		return module.exports;
21804/******/ 	}
21805/******/ 	
21806/************************************************************************/
21807/******/ 	/* webpack/runtime/compat */
21808/******/ 	
21809/******/ 	__nccwpck_require__.ab = __dirname + "/";/************************************************************************/
21810/******/ 	// module exports must be returned from runtime so entry inlining is disabled
21811/******/ 	// startup
21812/******/ 	// Load entry module and return exports
21813/******/ 	return __nccwpck_require__(880);
21814/******/ })()
21815;
21816/* WEBPACK VAR INJECTION */}.call(this, "/"))
21817
21818/***/ }),
21819
21820/***/ "LidF":
21821/***/ (function(module, exports, __webpack_require__) {
21822
21823"use strict";
21824
21825
21826var GetIntrinsic = __webpack_require__("AM7I");
21827
21828var $TypeError = GetIntrinsic('%TypeError%');
21829
21830var IsPropertyKey = __webpack_require__("ml7t");
21831var Type = __webpack_require__("zOLO");
21832
21833// https://ecma-international.org/ecma-262/6.0/#sec-hasproperty
21834
21835module.exports = function HasProperty(O, P) {
21836	if (Type(O) !== 'Object') {
21837		throw new $TypeError('Assertion failed: `O` must be an Object');
21838	}
21839	if (!IsPropertyKey(P)) {
21840		throw new $TypeError('Assertion failed: `P` must be a Property Key');
21841	}
21842	return P in O;
21843};
21844
21845
21846/***/ }),
21847
21848/***/ "LvDl":
21849/***/ (function(module, exports, __webpack_require__) {
21850
21851/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
21852 * @license
21853 * Lodash <https://lodash.com/>
21854 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
21855 * Released under MIT license <https://lodash.com/license>
21856 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
21857 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
21858 */
21859;(function() {
21860
21861  /** Used as a safe reference for `undefined` in pre-ES5 environments. */
21862  var undefined
vendor: 12,195 bytes, lines 21862-22165
21862;
21863
21864  /** Used as the semantic version number. */
21865  var VERSION = '4.17.21';
21866
21867  /** Used as the size to enable large array optimizations. */
21868  var LARGE_ARRAY_SIZE = 200;
21869
21870  /** Error message constants. */
21871  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
21872      FUNC_ERROR_TEXT = 'Expected a function',
21873      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
21874
21875  /** Used to stand-in for `undefined` hash values. */
21876  var HASH_UNDEFINED = '__lodash_hash_undefined__';
21877
21878  /** Used as the maximum memoize cache size. */
21879  var MAX_MEMOIZE_SIZE = 500;
21880
21881  /** Used as the internal argument placeholder. */
21882  var PLACEHOLDER = '__lodash_placeholder__';
21883
21884  /** Used to compose bitmasks for cloning. */
21885  var CLONE_DEEP_FLAG = 1,
21886      CLONE_FLAT_FLAG = 2,
21887      CLONE_SYMBOLS_FLAG = 4;
21888
21889  /** Used to compose bitmasks for value comparisons. */
21890  var COMPARE_PARTIAL_FLAG = 1,
21891      COMPARE_UNORDERED_FLAG = 2;
21892
21893  /** Used to compose bitmasks for function metadata. */
21894  var WRAP_BIND_FLAG = 1,
21895      WRAP_BIND_KEY_FLAG = 2,
21896      WRAP_CURRY_BOUND_FLAG = 4,
21897      WRAP_CURRY_FLAG = 8,
21898      WRAP_CURRY_RIGHT_FLAG = 16,
21899      WRAP_PARTIAL_FLAG = 32,
21900      WRAP_PARTIAL_RIGHT_FLAG = 64,
21901      WRAP_ARY_FLAG = 128,
21902      WRAP_REARG_FLAG = 256,
21903      WRAP_FLIP_FLAG = 512;
21904
21905  /** Used as default options for `_.truncate`. */
21906  var DEFAULT_TRUNC_LENGTH = 30,
21907      DEFAULT_TRUNC_OMISSION = '...';
21908
21909  /** Used to detect hot functions by number of calls within a span of milliseconds. */
21910  var HOT_COUNT = 800,
21911      HOT_SPAN = 16;
21912
21913  /** Used to indicate the type of lazy iteratees. */
21914  var LAZY_FILTER_FLAG = 1,
21915      LAZY_MAP_FLAG = 2,
21916      LAZY_WHILE_FLAG = 3;
21917
21918  /** Used as references for various `Number` constants. */
21919  var INFINITY = 1 / 0,
21920      MAX_SAFE_INTEGER = 9007199254740991,
21921      MAX_INTEGER = 1.7976931348623157e+308,
21922      NAN = 0 / 0;
21923
21924  /** Used as references for the maximum length and index of an array. */
21925  var MAX_ARRAY_LENGTH = 4294967295,
21926      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
21927      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
21928
21929  /** Used to associate wrap methods with their bit flags. */
21930  var wrapFlags = [
21931    ['ary', WRAP_ARY_FLAG],
21932    ['bind', WRAP_BIND_FLAG],
21933    ['bindKey', WRAP_BIND_KEY_FLAG],
21934    ['curry', WRAP_CURRY_FLAG],
21935    ['curryRight', WRAP_CURRY_RIGHT_FLAG],
21936    ['flip', WRAP_FLIP_FLAG],
21937    ['partial', WRAP_PARTIAL_FLAG],
21938    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
21939    ['rearg', WRAP_REARG_FLAG]
21940  ];
21941
21942  /** `Object#toString` result references. */
21943  var argsTag = '[object Arguments]',
21944      arrayTag = '[object Array]',
21945      asyncTag = '[object AsyncFunction]',
21946      boolTag = '[object Boolean]',
21947      dateTag = '[object Date]',
21948      domExcTag = '[object DOMException]',
21949      errorTag = '[object Error]',
21950      funcTag = '[object Function]',
21951      genTag = '[object GeneratorFunction]',
21952      mapTag = '[object Map]',
21953      numberTag = '[object Number]',
21954      nullTag = '[object Null]',
21955      objectTag = '[object Object]',
21956      promiseTag = '[object Promise]',
21957      proxyTag = '[object Proxy]',
21958      regexpTag = '[object RegExp]',
21959      setTag = '[object Set]',
21960      stringTag = '[object String]',
21961      symbolTag = '[object Symbol]',
21962      undefinedTag = '[object Undefined]',
21963      weakMapTag = '[object WeakMap]',
21964      weakSetTag = '[object WeakSet]';
21965
21966  var arrayBufferTag = '[object ArrayBuffer]',
21967      dataViewTag = '[object DataView]',
21968      float32Tag = '[object Float32Array]',
21969      float64Tag = '[object Float64Array]',
21970      int8Tag = '[object Int8Array]',
21971      int16Tag = '[object Int16Array]',
21972      int32Tag = '[object Int32Array]',
21973      uint8Tag = '[object Uint8Array]',
21974      uint8ClampedTag = '[object Uint8ClampedArray]',
21975      uint16Tag = '[object Uint16Array]',
21976      uint32Tag = '[object Uint32Array]';
21977
21978  /** Used to match empty string literals in compiled template source. */
21979  var reEmptyStringLeading = /\b__p \+= '';/g,
21980      reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
21981      reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
21982
21983  /** Used to match HTML entities and HTML characters. */
21984  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
21985      reUnescapedHtml = /[&<>"']/g,
21986      reHasEscapedHtml = RegExp(reEscapedHtml.source),
21987      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
21988
21989  /** Used to match template delimiters. */
21990  var reEscape = /<%-([\s\S]+?)%>/g,
21991      reEvaluate = /<%([\s\S]+?)%>/g,
21992      reInterpolate = /<%=([\s\S]+?)%>/g;
21993
21994  /** Used to match property names within property paths. */
21995  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
21996      reIsPlainProp = /^\w*$/,
21997      rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
21998
21999  /**
22000   * Used to match `RegExp`
22001   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
22002   */
22003  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
22004      reHasRegExpChar = RegExp(reRegExpChar.source);
22005
22006  /** Used to match leading whitespace. */
22007  var reTrimStart = /^\s+/;
22008
22009  /** Used to match a single whitespace character. */
22010  var reWhitespace = /\s/;
22011
22012  /** Used to match wrap detail comments. */
22013  var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
22014      reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
22015      reSplitDetails = /,? & /;
22016
22017  /** Used to match words composed of alphanumeric characters. */
22018  var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
22019
22020  /**
22021   * Used to validate the `validate` option in `_.template` variable.
22022   *
22023   * Forbids characters which could potentially change the meaning of the function argument definition:
22024   * - "()," (modification of function parameters)
22025   * - "=" (default value)
22026   * - "[]{}" (destructuring of function parameters)
22027   * - "/" (beginning of a comment)
22028   * - whitespace
22029   */
22030  var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
22031
22032  /** Used to match backslashes in property paths. */
22033  var reEscapeChar = /\\(\\)?/g;
22034
22035  /**
22036   * Used to match
22037   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
22038   */
22039  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
22040
22041  /** Used to match `RegExp` flags from their coerced string values. */
22042  var reFlags = /\w*$/;
22043
22044  /** Used to detect bad signed hexadecimal string values. */
22045  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
22046
22047  /** Used to detect binary string values. */
22048  var reIsBinary = /^0b[01]+$/i;
22049
22050  /** Used to detect host constructors (Safari). */
22051  var reIsHostCtor = /^\[object .+?Constructor\]$/;
22052
22053  /** Used to detect octal string values. */
22054  var reIsOctal = /^0o[0-7]+$/i;
22055
22056  /** Used to detect unsigned integer values. */
22057  var reIsUint = /^(?:0|[1-9]\d*)$/;
22058
22059  /** Used to match Latin Unicode letters (excluding mathematical operators). */
22060  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
22061
22062  /** Used to ensure capturing order of template delimiters. */
22063  var reNoMatch = /($^)/;
22064
22065  /** Used to match unescaped characters in compiled string literals. */
22066  var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
22067
22068  /** Used to compose unicode character classes. */
22069  var rsAstralRange = '\\ud800-\\udfff',
22070      rsComboMarksRange = '\\u0300-\\u036f',
22071      reComboHalfMarksRange = '\\ufe20-\\ufe2f',
22072      rsComboSymbolsRange = '\\u20d0-\\u20ff',
22073      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
22074      rsDingbatRange = '\\u2700-\\u27bf',
22075      rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
22076      rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
22077      rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
22078      rsPunctuationRange = '\\u2000-\\u206f',
22079      rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
22080      rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
22081      rsVarRange = '\\ufe0e\\ufe0f',
22082      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
22083
22084  /** Used to compose unicode capture groups. */
22085  var rsApos = "['\u2019]",
22086      rsAstral = '[' + rsAstralRange + ']',
22087      rsBreak = '[' + rsBreakRange + ']',
22088      rsCombo = '[' + rsComboRange + ']',
22089      rsDigits = '\\d+',
22090      rsDingbat = '[' + rsDingbatRange + ']',
22091      rsLower = '[' + rsLowerRange + ']',
22092      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
22093      rsFitz = '\\ud83c[\\udffb-\\udfff]',
22094      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
22095      rsNonAstral = '[^' + rsAstralRange + ']',
22096      rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
22097      rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
22098      rsUpper = '[' + rsUpperRange + ']',
22099      rsZWJ = '\\u200d';
22100
22101  /** Used to compose unicode regexes. */
22102  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
22103      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
22104      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
22105      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
22106      reOptMod = rsModifier + '?',
22107      rsOptVar = '[' + rsVarRange + ']?',
22108      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
22109      rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
22110      rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
22111      rsSeq = rsOptVar + reOptMod + rsOptJoin,
22112      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
22113      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
22114
22115  /** Used to match apostrophes. */
22116  var reApos = RegExp(rsApos, 'g');
22117
22118  /**
22119   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
22120   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
22121   */
22122  var reComboMark = RegExp(rsCombo, 'g');
22123
22124  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
22125  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
22126
22127  /** Used to match complex or compound words. */
22128  var reUnicodeWord = RegExp([
22129    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
22130    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
22131    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
22132    rsUpper + '+' + rsOptContrUpper,
22133    rsOrdUpper,
22134    rsOrdLower,
22135    rsDigits,
22136    rsEmoji
22137  ].join('|'), 'g');
22138
22139  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
22140  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');
22141
22142  /** Used to detect strings that need a more robust regexp to match words. */
22143  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
22144
22145  /** Used to assign default `context` object properties. */
22146  var contextProps = [
22147    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
22148    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
22149    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
22150    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
22151    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
22152  ];
22153
22154  /** Used to make template sourceURLs easier to identify. */
22155  var templateCounter = -1;
22156
22157  /** Used to identify `toStringTag` values of typed arrays. */
22158  var typedArrayTags = {};
22159  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
22160  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
22161  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
22162  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
22163  typedArrayTags[uint32Tag] = true;
22164  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
22165  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
vendor: 5,902 bytes, lines 22166-22300
22166  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
22167  typedArrayTags[errorTag] = typedArrayTags[funcTag] =
22168  typedArrayTags[mapTag] = typedArrayTags[numberTag] =
22169  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
22170  typedArrayTags[setTag] = typedArrayTags[stringTag] =
22171  typedArrayTags[weakMapTag] = false;
22172
22173  /** Used to identify `toStringTag` values supported by `_.clone`. */
22174  var cloneableTags = {};
22175  cloneableTags[argsTag] = cloneableTags[arrayTag] =
22176  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
22177  cloneableTags[boolTag] = cloneableTags[dateTag] =
22178  cloneableTags[float32Tag] = cloneableTags[float64Tag] =
22179  cloneableTags[int8Tag] = cloneableTags[int16Tag] =
22180  cloneableTags[int32Tag] = cloneableTags[mapTag] =
22181  cloneableTags[numberTag] = cloneableTags[objectTag] =
22182  cloneableTags[regexpTag] = cloneableTags[setTag] =
22183  cloneableTags[stringTag] = cloneableTags[symbolTag] =
22184  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
22185  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
22186  cloneableTags[errorTag] = cloneableTags[funcTag] =
22187  cloneableTags[weakMapTag] = false;
22188
22189  /** Used to map Latin Unicode letters to basic Latin letters. */
22190  var deburredLetters = {
22191    // Latin-1 Supplement block.
22192    '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
22193    '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
22194    '\xc7': 'C',  '\xe7': 'c',
22195    '\xd0': 'D',  '\xf0': 'd',
22196    '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
22197    '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
22198    '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
22199    '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
22200    '\xd1': 'N',  '\xf1': 'n',
22201    '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
22202    '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
22203    '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
22204    '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
22205    '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
22206    '\xc6': 'Ae', '\xe6': 'ae',
22207    '\xde': 'Th', '\xfe': 'th',
22208    '\xdf': 'ss',
22209    // Latin Extended-A block.
22210    '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
22211    '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
22212    '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
22213    '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
22214    '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
22215    '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
22216    '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
22217    '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
22218    '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
22219    '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
22220    '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
22221    '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
22222    '\u0134': 'J',  '\u0135': 'j',
22223    '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
22224    '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
22225    '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
22226    '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
22227    '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
22228    '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
22229    '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
22230    '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
22231    '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
22232    '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
22233    '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
22234    '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
22235    '\u0163': 't',  '\u0165': 't', '\u0167': 't',
22236    '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
22237    '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
22238    '\u0174': 'W',  '\u0175': 'w',
22239    '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
22240    '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
22241    '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
22242    '\u0132': 'IJ', '\u0133': 'ij',
22243    '\u0152': 'Oe', '\u0153': 'oe',
22244    '\u0149': "'n", '\u017f': 's'
22245  };
22246
22247  /** Used to map characters to HTML entities. */
22248  var htmlEscapes = {
22249    '&': '&amp;',
22250    '<': '&lt;',
22251    '>': '&gt;',
22252    '"': '&quot;',
22253    "'": '&#39;'
22254  };
22255
22256  /** Used to map HTML entities to characters. */
22257  var htmlUnescapes = {
22258    '&amp;': '&',
22259    '&lt;': '<',
22260    '&gt;': '>',
22261    '&quot;': '"',
22262    '&#39;': "'"
22263  };
22264
22265  /** Used to escape characters for inclusion in compiled string literals. */
22266  var stringEscapes = {
22267    '\\': '\\',
22268    "'": "'",
22269    '\n': 'n',
22270    '\r': 'r',
22271    '\u2028': 'u2028',
22272    '\u2029': 'u2029'
22273  };
22274
22275  /** Built-in method references without a dependency on `root`. */
22276  var freeParseFloat = parseFloat,
22277      freeParseInt = parseInt;
22278
22279  /** Detect free variable `global` from Node.js. */
22280  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
22281
22282  /** Detect free variable `self`. */
22283  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
22284
22285  /** Used as a reference to the global object. */
22286  var root = freeGlobal || freeSelf || Function('return this')();
22287
22288  /** Detect free variable `exports`. */
22289  var freeExports =  true && exports && !exports.nodeType && exports;
22290
22291  /** Detect free variable `module`. */
22292  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
22293
22294  /** Detect the popular CommonJS extension `module.exports`. */
22295  var moduleExports = freeModule && freeModule.exports === freeExports;
22296
22297  /** Detect free variable `process` from Node.js. */
22298  var freeProcess = moduleExports && freeGlobal.process;
22299
22300  /** Used to access faster Node.js helpers. */
vendor: 8,860 bytes, lines 22301-22594
22301  var nodeUtil = (function() {
22302    try {
22303      // Use `util.types` for Node.js 10+.
22304      var types = freeModule && freeModule.require && freeModule.require('util').types;
22305
22306      if (types) {
22307        return types;
22308      }
22309
22310      // Legacy `process.binding('util')` for Node.js < 10.
22311      return freeProcess && freeProcess.binding && freeProcess.binding('util');
22312    } catch (e) {}
22313  }());
22314
22315  /* Node.js helper references. */
22316  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
22317      nodeIsDate = nodeUtil && nodeUtil.isDate,
22318      nodeIsMap = nodeUtil && nodeUtil.isMap,
22319      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
22320      nodeIsSet = nodeUtil && nodeUtil.isSet,
22321      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
22322
22323  /*--------------------------------------------------------------------------*/
22324
22325  /**
22326   * A faster alternative to `Function#apply`, this function invokes `func`
22327   * with the `this` binding of `thisArg` and the arguments of `args`.
22328   *
22329   * @private
22330   * @param {Function} func The function to invoke.
22331   * @param {*} thisArg The `this` binding of `func`.
22332   * @param {Array} args The arguments to invoke `func` with.
22333   * @returns {*} Returns the result of `func`.
22334   */
22335  function apply(func, thisArg, args) {
22336    switch (args.length) {
22337      case 0: return func.call(thisArg);
22338      case 1: return func.call(thisArg, args[0]);
22339      case 2: return func.call(thisArg, args[0], args[1]);
22340      case 3: return func.call(thisArg, args[0], args[1], args[2]);
22341    }
22342    return func.apply(thisArg, args);
22343  }
22344
22345  /**
22346   * A specialized version of `baseAggregator` for arrays.
22347   *
22348   * @private
22349   * @param {Array} [array] The array to iterate over.
22350   * @param {Function} setter The function to set `accumulator` values.
22351   * @param {Function} iteratee The iteratee to transform keys.
22352   * @param {Object} accumulator The initial aggregated object.
22353   * @returns {Function} Returns `accumulator`.
22354   */
22355  function arrayAggregator(array, setter, iteratee, accumulator) {
22356    var index = -1,
22357        length = array == null ? 0 : array.length;
22358
22359    while (++index < length) {
22360      var value = array[index];
22361      setter(accumulator, value, iteratee(value), array);
22362    }
22363    return accumulator;
22364  }
22365
22366  /**
22367   * A specialized version of `_.forEach` for arrays without support for
22368   * iteratee shorthands.
22369   *
22370   * @private
22371   * @param {Array} [array] The array to iterate over.
22372   * @param {Function} iteratee The function invoked per iteration.
22373   * @returns {Array} Returns `array`.
22374   */
22375  function arrayEach(array, iteratee) {
22376    var index = -1,
22377        length = array == null ? 0 : array.length;
22378
22379    while (++index < length) {
22380      if (iteratee(array[index], index, array) === false) {
22381        break;
22382      }
22383    }
22384    return array;
22385  }
22386
22387  /**
22388   * A specialized version of `_.forEachRight` for arrays without support for
22389   * iteratee shorthands.
22390   *
22391   * @private
22392   * @param {Array} [array] The array to iterate over.
22393   * @param {Function} iteratee The function invoked per iteration.
22394   * @returns {Array} Returns `array`.
22395   */
22396  function arrayEachRight(array, iteratee) {
22397    var length = array == null ? 0 : array.length;
22398
22399    while (length--) {
22400      if (iteratee(array[length], length, array) === false) {
22401        break;
22402      }
22403    }
22404    return array;
22405  }
22406
22407  /**
22408   * A specialized version of `_.every` for arrays without support for
22409   * iteratee shorthands.
22410   *
22411   * @private
22412   * @param {Array} [array] The array to iterate over.
22413   * @param {Function} predicate The function invoked per iteration.
22414   * @returns {boolean} Returns `true` if all elements pass the predicate check,
22415   *  else `false`.
22416   */
22417  function arrayEvery(array, predicate) {
22418    var index = -1,
22419        length = array == null ? 0 : array.length;
22420
22421    while (++index < length) {
22422      if (!predicate(array[index], index, array)) {
22423        return false;
22424      }
22425    }
22426    return true;
22427  }
22428
22429  /**
22430   * A specialized version of `_.filter` for arrays without support for
22431   * iteratee shorthands.
22432   *
22433   * @private
22434   * @param {Array} [array] The array to iterate over.
22435   * @param {Function} predicate The function invoked per iteration.
22436   * @returns {Array} Returns the new filtered array.
22437   */
22438  function arrayFilter(array, predicate) {
22439    var index = -1,
22440        length = array == null ? 0 : array.length,
22441        resIndex = 0,
22442        result = [];
22443
22444    while (++index < length) {
22445      var value = array[index];
22446      if (predicate(value, index, array)) {
22447        result[resIndex++] = value;
22448      }
22449    }
22450    return result;
22451  }
22452
22453  /**
22454   * A specialized version of `_.includes` for arrays without support for
22455   * specifying an index to search from.
22456   *
22457   * @private
22458   * @param {Array} [array] The array to inspect.
22459   * @param {*} target The value to search for.
22460   * @returns {boolean} Returns `true` if `target` is found, else `false`.
22461   */
22462  function arrayIncludes(array, value) {
22463    var length = array == null ? 0 : array.length;
22464    return !!length && baseIndexOf(array, value, 0) > -1;
22465  }
22466
22467  /**
22468   * This function is like `arrayIncludes` except that it accepts a comparator.
22469   *
22470   * @private
22471   * @param {Array} [array] The array to inspect.
22472   * @param {*} target The value to search for.
22473   * @param {Function} comparator The comparator invoked per element.
22474   * @returns {boolean} Returns `true` if `target` is found, else `false`.
22475   */
22476  function arrayIncludesWith(array, value, comparator) {
22477    var index = -1,
22478        length = array == null ? 0 : array.length;
22479
22480    while (++index < length) {
22481      if (comparator(value, array[index])) {
22482        return true;
22483      }
22484    }
22485    return false;
22486  }
22487
22488  /**
22489   * A specialized version of `_.map` for arrays without support for iteratee
22490   * shorthands.
22491   *
22492   * @private
22493   * @param {Array} [array] The array to iterate over.
22494   * @param {Function} iteratee The function invoked per iteration.
22495   * @returns {Array} Returns the new mapped array.
22496   */
22497  function arrayMap(array, iteratee) {
22498    var index = -1,
22499        length = array == null ? 0 : array.length,
22500        result = Array(length);
22501
22502    while (++index < length) {
22503      result[index] = iteratee(array[index], index, array);
22504    }
22505    return result;
22506  }
22507
22508  /**
22509   * Appends the elements of `values` to `array`.
22510   *
22511   * @private
22512   * @param {Array} array The array to modify.
22513   * @param {Array} values The values to append.
22514   * @returns {Array} Returns `array`.
22515   */
22516  function arrayPush(array, values) {
22517    var index = -1,
22518        length = values.length,
22519        offset = array.length;
22520
22521    while (++index < length) {
22522      array[offset + index] = values[index];
22523    }
22524    return array;
22525  }
22526
22527  /**
22528   * A specialized version of `_.reduce` for arrays without support for
22529   * iteratee shorthands.
22530   *
22531   * @private
22532   * @param {Array} [array] The array to iterate over.
22533   * @param {Function} iteratee The function invoked per iteration.
22534   * @param {*} [accumulator] The initial value.
22535   * @param {boolean} [initAccum] Specify using the first element of `array` as
22536   *  the initial value.
22537   * @returns {*} Returns the accumulated value.
22538   */
22539  function arrayReduce(array, iteratee, accumulator, initAccum) {
22540    var index = -1,
22541        length = array == null ? 0 : array.length;
22542
22543    if (initAccum && length) {
22544      accumulator = array[++index];
22545    }
22546    while (++index < length) {
22547      accumulator = iteratee(accumulator, array[index], index, array);
22548    }
22549    return accumulator;
22550  }
22551
22552  /**
22553   * A specialized version of `_.reduceRight` for arrays without support for
22554   * iteratee shorthands.
22555   *
22556   * @private
22557   * @param {Array} [array] The array to iterate over.
22558   * @param {Function} iteratee The function invoked per iteration.
22559   * @param {*} [accumulator] The initial value.
22560   * @param {boolean} [initAccum] Specify using the last element of `array` as
22561   *  the initial value.
22562   * @returns {*} Returns the accumulated value.
22563   */
22564  function arrayReduceRight(array, iteratee, accumulator, initAccum) {
22565    var length = array == null ? 0 : array.length;
22566    if (initAccum && length) {
22567      accumulator = array[--length];
22568    }
22569    while (length--) {
22570      accumulator = iteratee(accumulator, array[length], length, array);
22571    }
22572    return accumulator;
22573  }
22574
22575  /**
22576   * A specialized version of `_.some` for arrays without support for iteratee
22577   * shorthands.
22578   *
22579   * @private
22580   * @param {Array} [array] The array to iterate over.
22581   * @param {Function} predicate The function invoked per iteration.
22582   * @returns {boolean} Returns `true` if any element passes the predicate check,
22583   *  else `false`.
22584   */
22585  function arraySome(array, predicate) {
22586    var index = -1,
22587        length = array == null ? 0 : array.length;
22588
22589    while (++index < length) {
22590      if (predicate(array[index], index, array)) {
22591        return true;
22592      }
22593    }
22594    return false;
vendor: 12,899 bytes, lines 22595-23032
22595  }
22596
22597  /**
22598   * Gets the size of an ASCII `string`.
22599   *
22600   * @private
22601   * @param {string} string The string inspect.
22602   * @returns {number} Returns the string size.
22603   */
22604  var asciiSize = baseProperty('length');
22605
22606  /**
22607   * Converts an ASCII `string` to an array.
22608   *
22609   * @private
22610   * @param {string} string The string to convert.
22611   * @returns {Array} Returns the converted array.
22612   */
22613  function asciiToArray(string) {
22614    return string.split('');
22615  }
22616
22617  /**
22618   * Splits an ASCII `string` into an array of its words.
22619   *
22620   * @private
22621   * @param {string} The string to inspect.
22622   * @returns {Array} Returns the words of `string`.
22623   */
22624  function asciiWords(string) {
22625    return string.match(reAsciiWord) || [];
22626  }
22627
22628  /**
22629   * The base implementation of methods like `_.findKey` and `_.findLastKey`,
22630   * without support for iteratee shorthands, which iterates over `collection`
22631   * using `eachFunc`.
22632   *
22633   * @private
22634   * @param {Array|Object} collection The collection to inspect.
22635   * @param {Function} predicate The function invoked per iteration.
22636   * @param {Function} eachFunc The function to iterate over `collection`.
22637   * @returns {*} Returns the found element or its key, else `undefined`.
22638   */
22639  function baseFindKey(collection, predicate, eachFunc) {
22640    var result;
22641    eachFunc(collection, function(value, key, collection) {
22642      if (predicate(value, key, collection)) {
22643        result = key;
22644        return false;
22645      }
22646    });
22647    return result;
22648  }
22649
22650  /**
22651   * The base implementation of `_.findIndex` and `_.findLastIndex` without
22652   * support for iteratee shorthands.
22653   *
22654   * @private
22655   * @param {Array} array The array to inspect.
22656   * @param {Function} predicate The function invoked per iteration.
22657   * @param {number} fromIndex The index to search from.
22658   * @param {boolean} [fromRight] Specify iterating from right to left.
22659   * @returns {number} Returns the index of the matched value, else `-1`.
22660   */
22661  function baseFindIndex(array, predicate, fromIndex, fromRight) {
22662    var length = array.length,
22663        index = fromIndex + (fromRight ? 1 : -1);
22664
22665    while ((fromRight ? index-- : ++index < length)) {
22666      if (predicate(array[index], index, array)) {
22667        return index;
22668      }
22669    }
22670    return -1;
22671  }
22672
22673  /**
22674   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
22675   *
22676   * @private
22677   * @param {Array} array The array to inspect.
22678   * @param {*} value The value to search for.
22679   * @param {number} fromIndex The index to search from.
22680   * @returns {number} Returns the index of the matched value, else `-1`.
22681   */
22682  function baseIndexOf(array, value, fromIndex) {
22683    return value === value
22684      ? strictIndexOf(array, value, fromIndex)
22685      : baseFindIndex(array, baseIsNaN, fromIndex);
22686  }
22687
22688  /**
22689   * This function is like `baseIndexOf` except that it accepts a comparator.
22690   *
22691   * @private
22692   * @param {Array} array The array to inspect.
22693   * @param {*} value The value to search for.
22694   * @param {number} fromIndex The index to search from.
22695   * @param {Function} comparator The comparator invoked per element.
22696   * @returns {number} Returns the index of the matched value, else `-1`.
22697   */
22698  function baseIndexOfWith(array, value, fromIndex, comparator) {
22699    var index = fromIndex - 1,
22700        length = array.length;
22701
22702    while (++index < length) {
22703      if (comparator(array[index], value)) {
22704        return index;
22705      }
22706    }
22707    return -1;
22708  }
22709
22710  /**
22711   * The base implementation of `_.isNaN` without support for number objects.
22712   *
22713   * @private
22714   * @param {*} value The value to check.
22715   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
22716   */
22717  function baseIsNaN(value) {
22718    return value !== value;
22719  }
22720
22721  /**
22722   * The base implementation of `_.mean` and `_.meanBy` without support for
22723   * iteratee shorthands.
22724   *
22725   * @private
22726   * @param {Array} array The array to iterate over.
22727   * @param {Function} iteratee The function invoked per iteration.
22728   * @returns {number} Returns the mean.
22729   */
22730  function baseMean(array, iteratee) {
22731    var length = array == null ? 0 : array.length;
22732    return length ? (baseSum(array, iteratee) / length) : NAN;
22733  }
22734
22735  /**
22736   * The base implementation of `_.property` without support for deep paths.
22737   *
22738   * @private
22739   * @param {string} key The key of the property to get.
22740   * @returns {Function} Returns the new accessor function.
22741   */
22742  function baseProperty(key) {
22743    return function(object) {
22744      return object == null ? undefined : object[key];
22745    };
22746  }
22747
22748  /**
22749   * The base implementation of `_.propertyOf` without support for deep paths.
22750   *
22751   * @private
22752   * @param {Object} object The object to query.
22753   * @returns {Function} Returns the new accessor function.
22754   */
22755  function basePropertyOf(object) {
22756    return function(key) {
22757      return object == null ? undefined : object[key];
22758    };
22759  }
22760
22761  /**
22762   * The base implementation of `_.reduce` and `_.reduceRight`, without support
22763   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
22764   *
22765   * @private
22766   * @param {Array|Object} collection The collection to iterate over.
22767   * @param {Function} iteratee The function invoked per iteration.
22768   * @param {*} accumulator The initial value.
22769   * @param {boolean} initAccum Specify using the first or last element of
22770   *  `collection` as the initial value.
22771   * @param {Function} eachFunc The function to iterate over `collection`.
22772   * @returns {*} Returns the accumulated value.
22773   */
22774  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
22775    eachFunc(collection, function(value, index, collection) {
22776      accumulator = initAccum
22777        ? (initAccum = false, value)
22778        : iteratee(accumulator, value, index, collection);
22779    });
22780    return accumulator;
22781  }
22782
22783  /**
22784   * The base implementation of `_.sortBy` which uses `comparer` to define the
22785   * sort order of `array` and replaces criteria objects with their corresponding
22786   * values.
22787   *
22788   * @private
22789   * @param {Array} array The array to sort.
22790   * @param {Function} comparer The function to define sort order.
22791   * @returns {Array} Returns `array`.
22792   */
22793  function baseSortBy(array, comparer) {
22794    var length = array.length;
22795
22796    array.sort(comparer);
22797    while (length--) {
22798      array[length] = array[length].value;
22799    }
22800    return array;
22801  }
22802
22803  /**
22804   * The base implementation of `_.sum` and `_.sumBy` without support for
22805   * iteratee shorthands.
22806   *
22807   * @private
22808   * @param {Array} array The array to iterate over.
22809   * @param {Function} iteratee The function invoked per iteration.
22810   * @returns {number} Returns the sum.
22811   */
22812  function baseSum(array, iteratee) {
22813    var result,
22814        index = -1,
22815        length = array.length;
22816
22817    while (++index < length) {
22818      var current = iteratee(array[index]);
22819      if (current !== undefined) {
22820        result = result === undefined ? current : (result + current);
22821      }
22822    }
22823    return result;
22824  }
22825
22826  /**
22827   * The base implementation of `_.times` without support for iteratee shorthands
22828   * or max array length checks.
22829   *
22830   * @private
22831   * @param {number} n The number of times to invoke `iteratee`.
22832   * @param {Function} iteratee The function invoked per iteration.
22833   * @returns {Array} Returns the array of results.
22834   */
22835  function baseTimes(n, iteratee) {
22836    var index = -1,
22837        result = Array(n);
22838
22839    while (++index < n) {
22840      result[index] = iteratee(index);
22841    }
22842    return result;
22843  }
22844
22845  /**
22846   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
22847   * of key-value pairs for `object` corresponding to the property names of `props`.
22848   *
22849   * @private
22850   * @param {Object} object The object to query.
22851   * @param {Array} props The property names to get values for.
22852   * @returns {Object} Returns the key-value pairs.
22853   */
22854  function baseToPairs(object, props) {
22855    return arrayMap(props, function(key) {
22856      return [key, object[key]];
22857    });
22858  }
22859
22860  /**
22861   * The base implementation of `_.trim`.
22862   *
22863   * @private
22864   * @param {string} string The string to trim.
22865   * @returns {string} Returns the trimmed string.
22866   */
22867  function baseTrim(string) {
22868    return string
22869      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
22870      : string;
22871  }
22872
22873  /**
22874   * The base implementation of `_.unary` without support for storing metadata.
22875   *
22876   * @private
22877   * @param {Function} func The function to cap arguments for.
22878   * @returns {Function} Returns the new capped function.
22879   */
22880  function baseUnary(func) {
22881    return function(value) {
22882      return func(value);
22883    };
22884  }
22885
22886  /**
22887   * The base implementation of `_.values` and `_.valuesIn` which creates an
22888   * array of `object` property values corresponding to the property names
22889   * of `props`.
22890   *
22891   * @private
22892   * @param {Object} object The object to query.
22893   * @param {Array} props The property names to get values for.
22894   * @returns {Object} Returns the array of property values.
22895   */
22896  function baseValues(object, props) {
22897    return arrayMap(props, function(key) {
22898      return object[key];
22899    });
22900  }
22901
22902  /**
22903   * Checks if a `cache` value for `key` exists.
22904   *
22905   * @private
22906   * @param {Object} cache The cache to query.
22907   * @param {string} key The key of the entry to check.
22908   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
22909   */
22910  function cacheHas(cache, key) {
22911    return cache.has(key);
22912  }
22913
22914  /**
22915   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
22916   * that is not found in the character symbols.
22917   *
22918   * @private
22919   * @param {Array} strSymbols The string symbols to inspect.
22920   * @param {Array} chrSymbols The character symbols to find.
22921   * @returns {number} Returns the index of the first unmatched string symbol.
22922   */
22923  function charsStartIndex(strSymbols, chrSymbols) {
22924    var index = -1,
22925        length = strSymbols.length;
22926
22927    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
22928    return index;
22929  }
22930
22931  /**
22932   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
22933   * that is not found in the character symbols.
22934   *
22935   * @private
22936   * @param {Array} strSymbols The string symbols to inspect.
22937   * @param {Array} chrSymbols The character symbols to find.
22938   * @returns {number} Returns the index of the last unmatched string symbol.
22939   */
22940  function charsEndIndex(strSymbols, chrSymbols) {
22941    var index = strSymbols.length;
22942
22943    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
22944    return index;
22945  }
22946
22947  /**
22948   * Gets the number of `placeholder` occurrences in `array`.
22949   *
22950   * @private
22951   * @param {Array} array The array to inspect.
22952   * @param {*} placeholder The placeholder to search for.
22953   * @returns {number} Returns the placeholder count.
22954   */
22955  function countHolders(array, placeholder) {
22956    var length = array.length,
22957        result = 0;
22958
22959    while (length--) {
22960      if (array[length] === placeholder) {
22961        ++result;
22962      }
22963    }
22964    return result;
22965  }
22966
22967  /**
22968   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
22969   * letters to basic Latin letters.
22970   *
22971   * @private
22972   * @param {string} letter The matched letter to deburr.
22973   * @returns {string} Returns the deburred letter.
22974   */
22975  var deburrLetter = basePropertyOf(deburredLetters);
22976
22977  /**
22978   * Used by `_.escape` to convert characters to HTML entities.
22979   *
22980   * @private
22981   * @param {string} chr The matched character to escape.
22982   * @returns {string} Returns the escaped character.
22983   */
22984  var escapeHtmlChar = basePropertyOf(htmlEscapes);
22985
22986  /**
22987   * Used by `_.template` to escape characters for inclusion in compiled string literals.
22988   *
22989   * @private
22990   * @param {string} chr The matched character to escape.
22991   * @returns {string} Returns the escaped character.
22992   */
22993  function escapeStringChar(chr) {
22994    return '\\' + stringEscapes[chr];
22995  }
22996
22997  /**
22998   * Gets the value at `key` of `object`.
22999   *
23000   * @private
23001   * @param {Object} [object] The object to query.
23002   * @param {string} key The key of the property to get.
23003   * @returns {*} Returns the property value.
23004   */
23005  function getValue(object, key) {
23006    return object == null ? undefined : object[key];
23007  }
23008
23009  /**
23010   * Checks if `string` contains Unicode symbols.
23011   *
23012   * @private
23013   * @param {string} string The string to inspect.
23014   * @returns {boolean} Returns `true` if a symbol is found, else `false`.
23015   */
23016  function hasUnicode(string) {
23017    return reHasUnicode.test(string);
23018  }
23019
23020  /**
23021   * Checks if `string` contains a word composed of Unicode symbols.
23022   *
23023   * @private
23024   * @param {string} string The string to inspect.
23025   * @returns {boolean} Returns `true` if a word is found, else `false`.
23026   */
23027  function hasUnicodeWord(string) {
23028    return reHasUnicodeWord.test(string);
23029  }
23030
23031  /**
23032   * Converts `iterator` to an array.
vendor: 8,214 bytes, lines 23033-23342
23033   *
23034   * @private
23035   * @param {Object} iterator The iterator to convert.
23036   * @returns {Array} Returns the converted array.
23037   */
23038  function iteratorToArray(iterator) {
23039    var data,
23040        result = [];
23041
23042    while (!(data = iterator.next()).done) {
23043      result.push(data.value);
23044    }
23045    return result;
23046  }
23047
23048  /**
23049   * Converts `map` to its key-value pairs.
23050   *
23051   * @private
23052   * @param {Object} map The map to convert.
23053   * @returns {Array} Returns the key-value pairs.
23054   */
23055  function mapToArray(map) {
23056    var index = -1,
23057        result = Array(map.size);
23058
23059    map.forEach(function(value, key) {
23060      result[++index] = [key, value];
23061    });
23062    return result;
23063  }
23064
23065  /**
23066   * Creates a unary function that invokes `func` with its argument transformed.
23067   *
23068   * @private
23069   * @param {Function} func The function to wrap.
23070   * @param {Function} transform The argument transform.
23071   * @returns {Function} Returns the new function.
23072   */
23073  function overArg(func, transform) {
23074    return function(arg) {
23075      return func(transform(arg));
23076    };
23077  }
23078
23079  /**
23080   * Replaces all `placeholder` elements in `array` with an internal placeholder
23081   * and returns an array of their indexes.
23082   *
23083   * @private
23084   * @param {Array} array The array to modify.
23085   * @param {*} placeholder The placeholder to replace.
23086   * @returns {Array} Returns the new array of placeholder indexes.
23087   */
23088  function replaceHolders(array, placeholder) {
23089    var index = -1,
23090        length = array.length,
23091        resIndex = 0,
23092        result = [];
23093
23094    while (++index < length) {
23095      var value = array[index];
23096      if (value === placeholder || value === PLACEHOLDER) {
23097        array[index] = PLACEHOLDER;
23098        result[resIndex++] = index;
23099      }
23100    }
23101    return result;
23102  }
23103
23104  /**
23105   * Converts `set` to an array of its values.
23106   *
23107   * @private
23108   * @param {Object} set The set to convert.
23109   * @returns {Array} Returns the values.
23110   */
23111  function setToArray(set) {
23112    var index = -1,
23113        result = Array(set.size);
23114
23115    set.forEach(function(value) {
23116      result[++index] = value;
23117    });
23118    return result;
23119  }
23120
23121  /**
23122   * Converts `set` to its value-value pairs.
23123   *
23124   * @private
23125   * @param {Object} set The set to convert.
23126   * @returns {Array} Returns the value-value pairs.
23127   */
23128  function setToPairs(set) {
23129    var index = -1,
23130        result = Array(set.size);
23131
23132    set.forEach(function(value) {
23133      result[++index] = [value, value];
23134    });
23135    return result;
23136  }
23137
23138  /**
23139   * A specialized version of `_.indexOf` which performs strict equality
23140   * comparisons of values, i.e. `===`.
23141   *
23142   * @private
23143   * @param {Array} array The array to inspect.
23144   * @param {*} value The value to search for.
23145   * @param {number} fromIndex The index to search from.
23146   * @returns {number} Returns the index of the matched value, else `-1`.
23147   */
23148  function strictIndexOf(array, value, fromIndex) {
23149    var index = fromIndex - 1,
23150        length = array.length;
23151
23152    while (++index < length) {
23153      if (array[index] === value) {
23154        return index;
23155      }
23156    }
23157    return -1;
23158  }
23159
23160  /**
23161   * A specialized version of `_.lastIndexOf` which performs strict equality
23162   * comparisons of values, i.e. `===`.
23163   *
23164   * @private
23165   * @param {Array} array The array to inspect.
23166   * @param {*} value The value to search for.
23167   * @param {number} fromIndex The index to search from.
23168   * @returns {number} Returns the index of the matched value, else `-1`.
23169   */
23170  function strictLastIndexOf(array, value, fromIndex) {
23171    var index = fromIndex + 1;
23172    while (index--) {
23173      if (array[index] === value) {
23174        return index;
23175      }
23176    }
23177    return index;
23178  }
23179
23180  /**
23181   * Gets the number of symbols in `string`.
23182   *
23183   * @private
23184   * @param {string} string The string to inspect.
23185   * @returns {number} Returns the string size.
23186   */
23187  function stringSize(string) {
23188    return hasUnicode(string)
23189      ? unicodeSize(string)
23190      : asciiSize(string);
23191  }
23192
23193  /**
23194   * Converts `string` to an array.
23195   *
23196   * @private
23197   * @param {string} string The string to convert.
23198   * @returns {Array} Returns the converted array.
23199   */
23200  function stringToArray(string) {
23201    return hasUnicode(string)
23202      ? unicodeToArray(string)
23203      : asciiToArray(string);
23204  }
23205
23206  /**
23207   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
23208   * character of `string`.
23209   *
23210   * @private
23211   * @param {string} string The string to inspect.
23212   * @returns {number} Returns the index of the last non-whitespace character.
23213   */
23214  function trimmedEndIndex(string) {
23215    var index = string.length;
23216
23217    while (index-- && reWhitespace.test(string.charAt(index))) {}
23218    return index;
23219  }
23220
23221  /**
23222   * Used by `_.unescape` to convert HTML entities to characters.
23223   *
23224   * @private
23225   * @param {string} chr The matched character to unescape.
23226   * @returns {string} Returns the unescaped character.
23227   */
23228  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
23229
23230  /**
23231   * Gets the size of a Unicode `string`.
23232   *
23233   * @private
23234   * @param {string} string The string inspect.
23235   * @returns {number} Returns the string size.
23236   */
23237  function unicodeSize(string) {
23238    var result = reUnicode.lastIndex = 0;
23239    while (reUnicode.test(string)) {
23240      ++result;
23241    }
23242    return result;
23243  }
23244
23245  /**
23246   * Converts a Unicode `string` to an array.
23247   *
23248   * @private
23249   * @param {string} string The string to convert.
23250   * @returns {Array} Returns the converted array.
23251   */
23252  function unicodeToArray(string) {
23253    return string.match(reUnicode) || [];
23254  }
23255
23256  /**
23257   * Splits a Unicode `string` into an array of its words.
23258   *
23259   * @private
23260   * @param {string} The string to inspect.
23261   * @returns {Array} Returns the words of `string`.
23262   */
23263  function unicodeWords(string) {
23264    return string.match(reUnicodeWord) || [];
23265  }
23266
23267  /*--------------------------------------------------------------------------*/
23268
23269  /**
23270   * Create a new pristine `lodash` function using the `context` object.
23271   *
23272   * @static
23273   * @memberOf _
23274   * @since 1.1.0
23275   * @category Util
23276   * @param {Object} [context=root] The context object.
23277   * @returns {Function} Returns a new `lodash` function.
23278   * @example
23279   *
23280   * _.mixin({ 'foo': _.constant('foo') });
23281   *
23282   * var lodash = _.runInContext();
23283   * lodash.mixin({ 'bar': lodash.constant('bar') });
23284   *
23285   * _.isFunction(_.foo);
23286   * // => true
23287   * _.isFunction(_.bar);
23288   * // => false
23289   *
23290   * lodash.isFunction(lodash.foo);
23291   * // => false
23292   * lodash.isFunction(lodash.bar);
23293   * // => true
23294   *
23295   * // Create a suped-up `defer` in Node.js.
23296   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
23297   */
23298  var runInContext = (function runInContext(context) {
23299    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
23300
23301    /** Built-in constructor references. */
23302    var Array = context.Array,
23303        Date = context.Date,
23304        Error = context.Error,
23305        Function = context.Function,
23306        Math = context.Math,
23307        Object = context.Object,
23308        RegExp = context.RegExp,
23309        String = context.String,
23310        TypeError = context.TypeError;
23311
23312    /** Used for built-in method references. */
23313    var arrayProto = Array.prototype,
23314        funcProto = Function.prototype,
23315        objectProto = Object.prototype;
23316
23317    /** Used to detect overreaching core-js shims. */
23318    var coreJsData = context['__core-js_shared__'];
23319
23320    /** Used to resolve the decompiled source of functions. */
23321    var funcToString = funcProto.toString;
23322
23323    /** Used to check objects for own properties. */
23324    var hasOwnProperty = objectProto.hasOwnProperty;
23325
23326    /** Used to generate unique IDs. */
23327    var idCounter = 0;
23328
23329    /** Used to detect methods masquerading as native. */
23330    var maskSrcKey = (function() {
23331      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
23332      return uid ? ('Symbol(src)_1.' + uid) : '';
23333    }());
23334
23335    /**
23336     * Used to resolve the
23337     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
23338     * of values.
23339     */
23340    var nativeObjectToString = objectProto.toString;
23341
23342    /** Used to infer the `Object` constructor. */
vendor: 25,659 bytes, lines 23343-24140
23343    var objectCtorString = funcToString.call(Object);
23344
23345    /** Used to restore the original `_` reference in `_.noConflict`. */
23346    var oldDash = root._;
23347
23348    /** Used to detect if a method is native. */
23349    var reIsNative = RegExp('^' +
23350      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
23351      .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
23352    );
23353
23354    /** Built-in value references. */
23355    var Buffer = moduleExports ? context.Buffer : undefined,
23356        Symbol = context.Symbol,
23357        Uint8Array = context.Uint8Array,
23358        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
23359        getPrototype = overArg(Object.getPrototypeOf, Object),
23360        objectCreate = Object.create,
23361        propertyIsEnumerable = objectProto.propertyIsEnumerable,
23362        splice = arrayProto.splice,
23363        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
23364        symIterator = Symbol ? Symbol.iterator : undefined,
23365        symToStringTag = Symbol ? Symbol.toStringTag : undefined;
23366
23367    var defineProperty = (function() {
23368      try {
23369        var func = getNative(Object, 'defineProperty');
23370        func({}, '', {});
23371        return func;
23372      } catch (e) {}
23373    }());
23374
23375    /** Mocked built-ins. */
23376    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
23377        ctxNow = Date && Date.now !== root.Date.now && Date.now,
23378        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
23379
23380    /* Built-in method references for those with the same name as other `lodash` methods. */
23381    var nativeCeil = Math.ceil,
23382        nativeFloor = Math.floor,
23383        nativeGetSymbols = Object.getOwnPropertySymbols,
23384        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
23385        nativeIsFinite = context.isFinite,
23386        nativeJoin = arrayProto.join,
23387        nativeKeys = overArg(Object.keys, Object),
23388        nativeMax = Math.max,
23389        nativeMin = Math.min,
23390        nativeNow = Date.now,
23391        nativeParseInt = context.parseInt,
23392        nativeRandom = Math.random,
23393        nativeReverse = arrayProto.reverse;
23394
23395    /* Built-in method references that are verified to be native. */
23396    var DataView = getNative(context, 'DataView'),
23397        Map = getNative(context, 'Map'),
23398        Promise = getNative(context, 'Promise'),
23399        Set = getNative(context, 'Set'),
23400        WeakMap = getNative(context, 'WeakMap'),
23401        nativeCreate = getNative(Object, 'create');
23402
23403    /** Used to store function metadata. */
23404    var metaMap = WeakMap && new WeakMap;
23405
23406    /** Used to lookup unminified function names. */
23407    var realNames = {};
23408
23409    /** Used to detect maps, sets, and weakmaps. */
23410    var dataViewCtorString = toSource(DataView),
23411        mapCtorString = toSource(Map),
23412        promiseCtorString = toSource(Promise),
23413        setCtorString = toSource(Set),
23414        weakMapCtorString = toSource(WeakMap);
23415
23416    /** Used to convert symbols to primitives and strings. */
23417    var symbolProto = Symbol ? Symbol.prototype : undefined,
23418        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
23419        symbolToString = symbolProto ? symbolProto.toString : undefined;
23420
23421    /*------------------------------------------------------------------------*/
23422
23423    /**
23424     * Creates a `lodash` object which wraps `value` to enable implicit method
23425     * chain sequences. Methods that operate on and return arrays, collections,
23426     * and functions can be chained together. Methods that retrieve a single value
23427     * or may return a primitive value will automatically end the chain sequence
23428     * and return the unwrapped value. Otherwise, the value must be unwrapped
23429     * with `_#value`.
23430     *
23431     * Explicit chain sequences, which must be unwrapped with `_#value`, may be
23432     * enabled using `_.chain`.
23433     *
23434     * The execution of chained methods is lazy, that is, it's deferred until
23435     * `_#value` is implicitly or explicitly called.
23436     *
23437     * Lazy evaluation allows several methods to support shortcut fusion.
23438     * Shortcut fusion is an optimization to merge iteratee calls; this avoids
23439     * the creation of intermediate arrays and can greatly reduce the number of
23440     * iteratee executions. Sections of a chain sequence qualify for shortcut
23441     * fusion if the section is applied to an array and iteratees accept only
23442     * one argument. The heuristic for whether a section qualifies for shortcut
23443     * fusion is subject to change.
23444     *
23445     * Chaining is supported in custom builds as long as the `_#value` method is
23446     * directly or indirectly included in the build.
23447     *
23448     * In addition to lodash methods, wrappers have `Array` and `String` methods.
23449     *
23450     * The wrapper `Array` methods are:
23451     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
23452     *
23453     * The wrapper `String` methods are:
23454     * `replace` and `split`
23455     *
23456     * The wrapper methods that support shortcut fusion are:
23457     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
23458     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
23459     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
23460     *
23461     * The chainable wrapper methods are:
23462     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
23463     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
23464     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
23465     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
23466     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
23467     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
23468     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
23469     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
23470     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
23471     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
23472     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
23473     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
23474     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
23475     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
23476     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
23477     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
23478     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
23479     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
23480     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
23481     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
23482     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
23483     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
23484     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
23485     * `zipObject`, `zipObjectDeep`, and `zipWith`
23486     *
23487     * The wrapper methods that are **not** chainable by default are:
23488     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
23489     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
23490     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
23491     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
23492     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
23493     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
23494     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
23495     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
23496     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
23497     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
23498     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
23499     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
23500     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
23501     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
23502     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
23503     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
23504     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
23505     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
23506     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
23507     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
23508     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
23509     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
23510     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
23511     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
23512     * `upperFirst`, `value`, and `words`
23513     *
23514     * @name _
23515     * @constructor
23516     * @category Seq
23517     * @param {*} value The value to wrap in a `lodash` instance.
23518     * @returns {Object} Returns the new `lodash` wrapper instance.
23519     * @example
23520     *
23521     * function square(n) {
23522     *   return n * n;
23523     * }
23524     *
23525     * var wrapped = _([1, 2, 3]);
23526     *
23527     * // Returns an unwrapped value.
23528     * wrapped.reduce(_.add);
23529     * // => 6
23530     *
23531     * // Returns a wrapped value.
23532     * var squares = wrapped.map(square);
23533     *
23534     * _.isArray(squares);
23535     * // => false
23536     *
23537     * _.isArray(squares.value());
23538     * // => true
23539     */
23540    function lodash(value) {
23541      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
23542        if (value instanceof LodashWrapper) {
23543          return value;
23544        }
23545        if (hasOwnProperty.call(value, '__wrapped__')) {
23546          return wrapperClone(value);
23547        }
23548      }
23549      return new LodashWrapper(value);
23550    }
23551
23552    /**
23553     * The base implementation of `_.create` without support for assigning
23554     * properties to the created object.
23555     *
23556     * @private
23557     * @param {Object} proto The object to inherit from.
23558     * @returns {Object} Returns the new object.
23559     */
23560    var baseCreate = (function() {
23561      function object() {}
23562      return function(proto) {
23563        if (!isObject(proto)) {
23564          return {};
23565        }
23566        if (objectCreate) {
23567          return objectCreate(proto);
23568        }
23569        object.prototype = proto;
23570        var result = new object;
23571        object.prototype = undefined;
23572        return result;
23573      };
23574    }());
23575
23576    /**
23577     * The function whose prototype chain sequence wrappers inherit from.
23578     *
23579     * @private
23580     */
23581    function baseLodash() {
23582      // No operation performed.
23583    }
23584
23585    /**
23586     * The base constructor for creating `lodash` wrapper objects.
23587     *
23588     * @private
23589     * @param {*} value The value to wrap.
23590     * @param {boolean} [chainAll] Enable explicit method chain sequences.
23591     */
23592    function LodashWrapper(value, chainAll) {
23593      this.__wrapped__ = value;
23594      this.__actions__ = [];
23595      this.__chain__ = !!chainAll;
23596      this.__index__ = 0;
23597      this.__values__ = undefined;
23598    }
23599
23600    /**
23601     * By default, the template delimiters used by lodash are like those in
23602     * embedded Ruby (ERB) as well as ES2015 template strings. Change the
23603     * following template settings to use alternative delimiters.
23604     *
23605     * @static
23606     * @memberOf _
23607     * @type {Object}
23608     */
23609    lodash.templateSettings = {
23610
23611      /**
23612       * Used to detect `data` property values to be HTML-escaped.
23613       *
23614       * @memberOf _.templateSettings
23615       * @type {RegExp}
23616       */
23617      'escape': reEscape,
23618
23619      /**
23620       * Used to detect code to be evaluated.
23621       *
23622       * @memberOf _.templateSettings
23623       * @type {RegExp}
23624       */
23625      'evaluate': reEvaluate,
23626
23627      /**
23628       * Used to detect `data` property values to inject.
23629       *
23630       * @memberOf _.templateSettings
23631       * @type {RegExp}
23632       */
23633      'interpolate': reInterpolate,
23634
23635      /**
23636       * Used to reference the data object in the template text.
23637       *
23638       * @memberOf _.templateSettings
23639       * @type {string}
23640       */
23641      'variable': '',
23642
23643      /**
23644       * Used to import variables into the compiled template.
23645       *
23646       * @memberOf _.templateSettings
23647       * @type {Object}
23648       */
23649      'imports': {
23650
23651        /**
23652         * A reference to the `lodash` function.
23653         *
23654         * @memberOf _.templateSettings.imports
23655         * @type {Function}
23656         */
23657        '_': lodash
23658      }
23659    };
23660
23661    // Ensure wrappers are instances of `baseLodash`.
23662    lodash.prototype = baseLodash.prototype;
23663    lodash.prototype.constructor = lodash;
23664
23665    LodashWrapper.prototype = baseCreate(baseLodash.prototype);
23666    LodashWrapper.prototype.constructor = LodashWrapper;
23667
23668    /*------------------------------------------------------------------------*/
23669
23670    /**
23671     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
23672     *
23673     * @private
23674     * @constructor
23675     * @param {*} value The value to wrap.
23676     */
23677    function LazyWrapper(value) {
23678      this.__wrapped__ = value;
23679      this.__actions__ = [];
23680      this.__dir__ = 1;
23681      this.__filtered__ = false;
23682      this.__iteratees__ = [];
23683      this.__takeCount__ = MAX_ARRAY_LENGTH;
23684      this.__views__ = [];
23685    }
23686
23687    /**
23688     * Creates a clone of the lazy wrapper object.
23689     *
23690     * @private
23691     * @name clone
23692     * @memberOf LazyWrapper
23693     * @returns {Object} Returns the cloned `LazyWrapper` object.
23694     */
23695    function lazyClone() {
23696      var result = new LazyWrapper(this.__wrapped__);
23697      result.__actions__ = copyArray(this.__actions__);
23698      result.__dir__ = this.__dir__;
23699      result.__filtered__ = this.__filtered__;
23700      result.__iteratees__ = copyArray(this.__iteratees__);
23701      result.__takeCount__ = this.__takeCount__;
23702      result.__views__ = copyArray(this.__views__);
23703      return result;
23704    }
23705
23706    /**
23707     * Reverses the direction of lazy iteration.
23708     *
23709     * @private
23710     * @name reverse
23711     * @memberOf LazyWrapper
23712     * @returns {Object} Returns the new reversed `LazyWrapper` object.
23713     */
23714    function lazyReverse() {
23715      if (this.__filtered__) {
23716        var result = new LazyWrapper(this);
23717        result.__dir__ = -1;
23718        result.__filtered__ = true;
23719      } else {
23720        result = this.clone();
23721        result.__dir__ *= -1;
23722      }
23723      return result;
23724    }
23725
23726    /**
23727     * Extracts the unwrapped value from its lazy wrapper.
23728     *
23729     * @private
23730     * @name value
23731     * @memberOf LazyWrapper
23732     * @returns {*} Returns the unwrapped value.
23733     */
23734    function lazyValue() {
23735      var array = this.__wrapped__.value(),
23736          dir = this.__dir__,
23737          isArr = isArray(array),
23738          isRight = dir < 0,
23739          arrLength = isArr ? array.length : 0,
23740          view = getView(0, arrLength, this.__views__),
23741          start = view.start,
23742          end = view.end,
23743          length = end - start,
23744          index = isRight ? end : (start - 1),
23745          iteratees = this.__iteratees__,
23746          iterLength = iteratees.length,
23747          resIndex = 0,
23748          takeCount = nativeMin(length, this.__takeCount__);
23749
23750      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
23751        return baseWrapperValue(array, this.__actions__);
23752      }
23753      var result = [];
23754
23755      outer:
23756      while (length-- && resIndex < takeCount) {
23757        index += dir;
23758
23759        var iterIndex = -1,
23760            value = array[index];
23761
23762        while (++iterIndex < iterLength) {
23763          var data = iteratees[iterIndex],
23764              iteratee = data.iteratee,
23765              type = data.type,
23766              computed = iteratee(value);
23767
23768          if (type == LAZY_MAP_FLAG) {
23769            value = computed;
23770          } else if (!computed) {
23771            if (type == LAZY_FILTER_FLAG) {
23772              continue outer;
23773            } else {
23774              break outer;
23775            }
23776          }
23777        }
23778        result[resIndex++] = value;
23779      }
23780      return result;
23781    }
23782
23783    // Ensure `LazyWrapper` is an instance of `baseLodash`.
23784    LazyWrapper.prototype = baseCreate(baseLodash.prototype);
23785    LazyWrapper.prototype.constructor = LazyWrapper;
23786
23787    /*------------------------------------------------------------------------*/
23788
23789    /**
23790     * Creates a hash object.
23791     *
23792     * @private
23793     * @constructor
23794     * @param {Array} [entries] The key-value pairs to cache.
23795     */
23796    function Hash(entries) {
23797      var index = -1,
23798          length = entries == null ? 0 : entries.length;
23799
23800      this.clear();
23801      while (++index < length) {
23802        var entry = entries[index];
23803        this.set(entry[0], entry[1]);
23804      }
23805    }
23806
23807    /**
23808     * Removes all key-value entries from the hash.
23809     *
23810     * @private
23811     * @name clear
23812     * @memberOf Hash
23813     */
23814    function hashClear() {
23815      this.__data__ = nativeCreate ? nativeCreate(null) : {};
23816      this.size = 0;
23817    }
23818
23819    /**
23820     * Removes `key` and its value from the hash.
23821     *
23822     * @private
23823     * @name delete
23824     * @memberOf Hash
23825     * @param {Object} hash The hash to modify.
23826     * @param {string} key The key of the value to remove.
23827     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
23828     */
23829    function hashDelete(key) {
23830      var result = this.has(key) && delete this.__data__[key];
23831      this.size -= result ? 1 : 0;
23832      return result;
23833    }
23834
23835    /**
23836     * Gets the hash value for `key`.
23837     *
23838     * @private
23839     * @name get
23840     * @memberOf Hash
23841     * @param {string} key The key of the value to get.
23842     * @returns {*} Returns the entry value.
23843     */
23844    function hashGet(key) {
23845      var data = this.__data__;
23846      if (nativeCreate) {
23847        var result = data[key];
23848        return result === HASH_UNDEFINED ? undefined : result;
23849      }
23850      return hasOwnProperty.call(data, key) ? data[key] : undefined;
23851    }
23852
23853    /**
23854     * Checks if a hash value for `key` exists.
23855     *
23856     * @private
23857     * @name has
23858     * @memberOf Hash
23859     * @param {string} key The key of the entry to check.
23860     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
23861     */
23862    function hashHas(key) {
23863      var data = this.__data__;
23864      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
23865    }
23866
23867    /**
23868     * Sets the hash `key` to `value`.
23869     *
23870     * @private
23871     * @name set
23872     * @memberOf Hash
23873     * @param {string} key The key of the value to set.
23874     * @param {*} value The value to set.
23875     * @returns {Object} Returns the hash instance.
23876     */
23877    function hashSet(key, value) {
23878      var data = this.__data__;
23879      this.size += this.has(key) ? 0 : 1;
23880      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
23881      return this;
23882    }
23883
23884    // Add methods to `Hash`.
23885    Hash.prototype.clear = hashClear;
23886    Hash.prototype['delete'] = hashDelete;
23887    Hash.prototype.get = hashGet;
23888    Hash.prototype.has = hashHas;
23889    Hash.prototype.set = hashSet;
23890
23891    /*------------------------------------------------------------------------*/
23892
23893    /**
23894     * Creates an list cache object.
23895     *
23896     * @private
23897     * @constructor
23898     * @param {Array} [entries] The key-value pairs to cache.
23899     */
23900    function ListCache(entries) {
23901      var index = -1,
23902          length = entries == null ? 0 : entries.length;
23903
23904      this.clear();
23905      while (++index < length) {
23906        var entry = entries[index];
23907        this.set(entry[0], entry[1]);
23908      }
23909    }
23910
23911    /**
23912     * Removes all key-value entries from the list cache.
23913     *
23914     * @private
23915     * @name clear
23916     * @memberOf ListCache
23917     */
23918    function listCacheClear() {
23919      this.__data__ = [];
23920      this.size = 0;
23921    }
23922
23923    /**
23924     * Removes `key` and its value from the list cache.
23925     *
23926     * @private
23927     * @name delete
23928     * @memberOf ListCache
23929     * @param {string} key The key of the value to remove.
23930     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
23931     */
23932    function listCacheDelete(key) {
23933      var data = this.__data__,
23934          index = assocIndexOf(data, key);
23935
23936      if (index < 0) {
23937        return false;
23938      }
23939      var lastIndex = data.length - 1;
23940      if (index == lastIndex) {
23941        data.pop();
23942      } else {
23943        splice.call(data, index, 1);
23944      }
23945      --this.size;
23946      return true;
23947    }
23948
23949    /**
23950     * Gets the list cache value for `key`.
23951     *
23952     * @private
23953     * @name get
23954     * @memberOf ListCache
23955     * @param {string} key The key of the value to get.
23956     * @returns {*} Returns the entry value.
23957     */
23958    function listCacheGet(key) {
23959      var data = this.__data__,
23960          index = assocIndexOf(data, key);
23961
23962      return index < 0 ? undefined : data[index][1];
23963    }
23964
23965    /**
23966     * Checks if a list cache value for `key` exists.
23967     *
23968     * @private
23969     * @name has
23970     * @memberOf ListCache
23971     * @param {string} key The key of the entry to check.
23972     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
23973     */
23974    function listCacheHas(key) {
23975      return assocIndexOf(this.__data__, key) > -1;
23976    }
23977
23978    /**
23979     * Sets the list cache `key` to `value`.
23980     *
23981     * @private
23982     * @name set
23983     * @memberOf ListCache
23984     * @param {string} key The key of the value to set.
23985     * @param {*} value The value to set.
23986     * @returns {Object} Returns the list cache instance.
23987     */
23988    function listCacheSet(key, value) {
23989      var data = this.__data__,
23990          index = assocIndexOf(data, key);
23991
23992      if (index < 0) {
23993        ++this.size;
23994        data.push([key, value]);
23995      } else {
23996        data[index][1] = value;
23997      }
23998      return this;
23999    }
24000
24001    // Add methods to `ListCache`.
24002    ListCache.prototype.clear = listCacheClear;
24003    ListCache.prototype['delete'] = listCacheDelete;
24004    ListCache.prototype.get = listCacheGet;
24005    ListCache.prototype.has = listCacheHas;
24006    ListCache.prototype.set = listCacheSet;
24007
24008    /*------------------------------------------------------------------------*/
24009
24010    /**
24011     * Creates a map cache object to store key-value pairs.
24012     *
24013     * @private
24014     * @constructor
24015     * @param {Array} [entries] The key-value pairs to cache.
24016     */
24017    function MapCache(entries) {
24018      var index = -1,
24019          length = entries == null ? 0 : entries.length;
24020
24021      this.clear();
24022      while (++index < length) {
24023        var entry = entries[index];
24024        this.set(entry[0], entry[1]);
24025      }
24026    }
24027
24028    /**
24029     * Removes all key-value entries from the map.
24030     *
24031     * @private
24032     * @name clear
24033     * @memberOf MapCache
24034     */
24035    function mapCacheClear() {
24036      this.size = 0;
24037      this.__data__ = {
24038        'hash': new Hash,
24039        'map': new (Map || ListCache),
24040        'string': new Hash
24041      };
24042    }
24043
24044    /**
24045     * Removes `key` and its value from the map.
24046     *
24047     * @private
24048     * @name delete
24049     * @memberOf MapCache
24050     * @param {string} key The key of the value to remove.
24051     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
24052     */
24053    function mapCacheDelete(key) {
24054      var result = getMapData(this, key)['delete'](key);
24055      this.size -= result ? 1 : 0;
24056      return result;
24057    }
24058
24059    /**
24060     * Gets the map value for `key`.
24061     *
24062     * @private
24063     * @name get
24064     * @memberOf MapCache
24065     * @param {string} key The key of the value to get.
24066     * @returns {*} Returns the entry value.
24067     */
24068    function mapCacheGet(key) {
24069      return getMapData(this, key).get(key);
24070    }
24071
24072    /**
24073     * Checks if a map value for `key` exists.
24074     *
24075     * @private
24076     * @name has
24077     * @memberOf MapCache
24078     * @param {string} key The key of the entry to check.
24079     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
24080     */
24081    function mapCacheHas(key) {
24082      return getMapData(this, key).has(key);
24083    }
24084
24085    /**
24086     * Sets the map `key` to `value`.
24087     *
24088     * @private
24089     * @name set
24090     * @memberOf MapCache
24091     * @param {string} key The key of the value to set.
24092     * @param {*} value The value to set.
24093     * @returns {Object} Returns the map cache instance.
24094     */
24095    function mapCacheSet(key, value) {
24096      var data = getMapData(this, key),
24097          size = data.size;
24098
24099      data.set(key, value);
24100      this.size += data.size == size ? 0 : 1;
24101      return this;
24102    }
24103
24104    // Add methods to `MapCache`.
24105    MapCache.prototype.clear = mapCacheClear;
24106    MapCache.prototype['delete'] = mapCacheDelete;
24107    MapCache.prototype.get = mapCacheGet;
24108    MapCache.prototype.has = mapCacheHas;
24109    MapCache.prototype.set = mapCacheSet;
24110
24111    /*------------------------------------------------------------------------*/
24112
24113    /**
24114     *
24115     * Creates an array cache object to store unique values.
24116     *
24117     * @private
24118     * @constructor
24119     * @param {Array} [values] The values to cache.
24120     */
24121    function SetCache(values) {
24122      var index = -1,
24123          length = values == null ? 0 : values.length;
24124
24125      this.__data__ = new MapCache;
24126      while (++index < length) {
24127        this.add(values[index]);
24128      }
24129    }
24130
24131    /**
24132     * Adds `value` to the array cache.
24133     *
24134     * @private
24135     * @name add
24136     * @memberOf SetCache
24137     * @alias push
24138     * @param {*} value The value to cache.
24139     * @returns {Object} Returns the cache instance.
24140     */
vendor: 3,741 bytes, lines 24141-24277
24141    function setCacheAdd(value) {
24142      this.__data__.set(value, HASH_UNDEFINED);
24143      return this;
24144    }
24145
24146    /**
24147     * Checks if `value` is in the array cache.
24148     *
24149     * @private
24150     * @name has
24151     * @memberOf SetCache
24152     * @param {*} value The value to search for.
24153     * @returns {number} Returns `true` if `value` is found, else `false`.
24154     */
24155    function setCacheHas(value) {
24156      return this.__data__.has(value);
24157    }
24158
24159    // Add methods to `SetCache`.
24160    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
24161    SetCache.prototype.has = setCacheHas;
24162
24163    /*------------------------------------------------------------------------*/
24164
24165    /**
24166     * Creates a stack cache object to store key-value pairs.
24167     *
24168     * @private
24169     * @constructor
24170     * @param {Array} [entries] The key-value pairs to cache.
24171     */
24172    function Stack(entries) {
24173      var data = this.__data__ = new ListCache(entries);
24174      this.size = data.size;
24175    }
24176
24177    /**
24178     * Removes all key-value entries from the stack.
24179     *
24180     * @private
24181     * @name clear
24182     * @memberOf Stack
24183     */
24184    function stackClear() {
24185      this.__data__ = new ListCache;
24186      this.size = 0;
24187    }
24188
24189    /**
24190     * Removes `key` and its value from the stack.
24191     *
24192     * @private
24193     * @name delete
24194     * @memberOf Stack
24195     * @param {string} key The key of the value to remove.
24196     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
24197     */
24198    function stackDelete(key) {
24199      var data = this.__data__,
24200          result = data['delete'](key);
24201
24202      this.size = data.size;
24203      return result;
24204    }
24205
24206    /**
24207     * Gets the stack value for `key`.
24208     *
24209     * @private
24210     * @name get
24211     * @memberOf Stack
24212     * @param {string} key The key of the value to get.
24213     * @returns {*} Returns the entry value.
24214     */
24215    function stackGet(key) {
24216      return this.__data__.get(key);
24217    }
24218
24219    /**
24220     * Checks if a stack value for `key` exists.
24221     *
24222     * @private
24223     * @name has
24224     * @memberOf Stack
24225     * @param {string} key The key of the entry to check.
24226     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
24227     */
24228    function stackHas(key) {
24229      return this.__data__.has(key);
24230    }
24231
24232    /**
24233     * Sets the stack `key` to `value`.
24234     *
24235     * @private
24236     * @name set
24237     * @memberOf Stack
24238     * @param {string} key The key of the value to set.
24239     * @param {*} value The value to set.
24240     * @returns {Object} Returns the stack cache instance.
24241     */
24242    function stackSet(key, value) {
24243      var data = this.__data__;
24244      if (data instanceof ListCache) {
24245        var pairs = data.__data__;
24246        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
24247          pairs.push([key, value]);
24248          this.size = ++data.size;
24249          return this;
24250        }
24251        data = this.__data__ = new MapCache(pairs);
24252      }
24253      data.set(key, value);
24254      this.size = data.size;
24255      return this;
24256    }
24257
24258    // Add methods to `Stack`.
24259    Stack.prototype.clear = stackClear;
24260    Stack.prototype['delete'] = stackDelete;
24261    Stack.prototype.get = stackGet;
24262    Stack.prototype.has = stackHas;
24263    Stack.prototype.set = stackSet;
24264
24265    /*------------------------------------------------------------------------*/
24266
24267    /**
24268     * Creates an array of the enumerable property names of the array-like `value`.
24269     *
24270     * @private
24271     * @param {*} value The value to query.
24272     * @param {boolean} inherited Specify returning inherited property names.
24273     * @returns {Array} Returns the array of property names.
24274     */
24275    function arrayLikeKeys(value, inherited) {
24276      var isArr = isArray(value),
24277          isArg = !isArr && isArguments(value),
vendor: 111,524 bytes, lines 24278-27571
24278          isBuff = !isArr && !isArg && isBuffer(value),
24279          isType = !isArr && !isArg && !isBuff && isTypedArray(value),
24280          skipIndexes = isArr || isArg || isBuff || isType,
24281          result = skipIndexes ? baseTimes(value.length, String) : [],
24282          length = result.length;
24283
24284      for (var key in value) {
24285        if ((inherited || hasOwnProperty.call(value, key)) &&
24286            !(skipIndexes && (
24287               // Safari 9 has enumerable `arguments.length` in strict mode.
24288               key == 'length' ||
24289               // Node.js 0.10 has enumerable non-index properties on buffers.
24290               (isBuff && (key == 'offset' || key == 'parent')) ||
24291               // PhantomJS 2 has enumerable non-index properties on typed arrays.
24292               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
24293               // Skip index properties.
24294               isIndex(key, length)
24295            ))) {
24296          result.push(key);
24297        }
24298      }
24299      return result;
24300    }
24301
24302    /**
24303     * A specialized version of `_.sample` for arrays.
24304     *
24305     * @private
24306     * @param {Array} array The array to sample.
24307     * @returns {*} Returns the random element.
24308     */
24309    function arraySample(array) {
24310      var length = array.length;
24311      return length ? array[baseRandom(0, length - 1)] : undefined;
24312    }
24313
24314    /**
24315     * A specialized version of `_.sampleSize` for arrays.
24316     *
24317     * @private
24318     * @param {Array} array The array to sample.
24319     * @param {number} n The number of elements to sample.
24320     * @returns {Array} Returns the random elements.
24321     */
24322    function arraySampleSize(array, n) {
24323      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
24324    }
24325
24326    /**
24327     * A specialized version of `_.shuffle` for arrays.
24328     *
24329     * @private
24330     * @param {Array} array The array to shuffle.
24331     * @returns {Array} Returns the new shuffled array.
24332     */
24333    function arrayShuffle(array) {
24334      return shuffleSelf(copyArray(array));
24335    }
24336
24337    /**
24338     * This function is like `assignValue` except that it doesn't assign
24339     * `undefined` values.
24340     *
24341     * @private
24342     * @param {Object} object The object to modify.
24343     * @param {string} key The key of the property to assign.
24344     * @param {*} value The value to assign.
24345     */
24346    function assignMergeValue(object, key, value) {
24347      if ((value !== undefined && !eq(object[key], value)) ||
24348          (value === undefined && !(key in object))) {
24349        baseAssignValue(object, key, value);
24350      }
24351    }
24352
24353    /**
24354     * Assigns `value` to `key` of `object` if the existing value is not equivalent
24355     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
24356     * for equality comparisons.
24357     *
24358     * @private
24359     * @param {Object} object The object to modify.
24360     * @param {string} key The key of the property to assign.
24361     * @param {*} value The value to assign.
24362     */
24363    function assignValue(object, key, value) {
24364      var objValue = object[key];
24365      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
24366          (value === undefined && !(key in object))) {
24367        baseAssignValue(object, key, value);
24368      }
24369    }
24370
24371    /**
24372     * Gets the index at which the `key` is found in `array` of key-value pairs.
24373     *
24374     * @private
24375     * @param {Array} array The array to inspect.
24376     * @param {*} key The key to search for.
24377     * @returns {number} Returns the index of the matched value, else `-1`.
24378     */
24379    function assocIndexOf(array, key) {
24380      var length = array.length;
24381      while (length--) {
24382        if (eq(array[length][0], key)) {
24383          return length;
24384        }
24385      }
24386      return -1;
24387    }
24388
24389    /**
24390     * Aggregates elements of `collection` on `accumulator` with keys transformed
24391     * by `iteratee` and values set by `setter`.
24392     *
24393     * @private
24394     * @param {Array|Object} collection The collection to iterate over.
24395     * @param {Function} setter The function to set `accumulator` values.
24396     * @param {Function} iteratee The iteratee to transform keys.
24397     * @param {Object} accumulator The initial aggregated object.
24398     * @returns {Function} Returns `accumulator`.
24399     */
24400    function baseAggregator(collection, setter, iteratee, accumulator) {
24401      baseEach(collection, function(value, key, collection) {
24402        setter(accumulator, value, iteratee(value), collection);
24403      });
24404      return accumulator;
24405    }
24406
24407    /**
24408     * The base implementation of `_.assign` without support for multiple sources
24409     * or `customizer` functions.
24410     *
24411     * @private
24412     * @param {Object} object The destination object.
24413     * @param {Object} source The source object.
24414     * @returns {Object} Returns `object`.
24415     */
24416    function baseAssign(object, source) {
24417      return object && copyObject(source, keys(source), object);
24418    }
24419
24420    /**
24421     * The base implementation of `_.assignIn` without support for multiple sources
24422     * or `customizer` functions.
24423     *
24424     * @private
24425     * @param {Object} object The destination object.
24426     * @param {Object} source The source object.
24427     * @returns {Object} Returns `object`.
24428     */
24429    function baseAssignIn(object, source) {
24430      return object && copyObject(source, keysIn(source), object);
24431    }
24432
24433    /**
24434     * The base implementation of `assignValue` and `assignMergeValue` without
24435     * value checks.
24436     *
24437     * @private
24438     * @param {Object} object The object to modify.
24439     * @param {string} key The key of the property to assign.
24440     * @param {*} value The value to assign.
24441     */
24442    function baseAssignValue(object, key, value) {
24443      if (key == '__proto__' && defineProperty) {
24444        defineProperty(object, key, {
24445          'configurable': true,
24446          'enumerable': true,
24447          'value': value,
24448          'writable': true
24449        });
24450      } else {
24451        object[key] = value;
24452      }
24453    }
24454
24455    /**
24456     * The base implementation of `_.at` without support for individual paths.
24457     *
24458     * @private
24459     * @param {Object} object The object to iterate over.
24460     * @param {string[]} paths The property paths to pick.
24461     * @returns {Array} Returns the picked elements.
24462     */
24463    function baseAt(object, paths) {
24464      var index = -1,
24465          length = paths.length,
24466          result = Array(length),
24467          skip = object == null;
24468
24469      while (++index < length) {
24470        result[index] = skip ? undefined : get(object, paths[index]);
24471      }
24472      return result;
24473    }
24474
24475    /**
24476     * The base implementation of `_.clamp` which doesn't coerce arguments.
24477     *
24478     * @private
24479     * @param {number} number The number to clamp.
24480     * @param {number} [lower] The lower bound.
24481     * @param {number} upper The upper bound.
24482     * @returns {number} Returns the clamped number.
24483     */
24484    function baseClamp(number, lower, upper) {
24485      if (number === number) {
24486        if (upper !== undefined) {
24487          number = number <= upper ? number : upper;
24488        }
24489        if (lower !== undefined) {
24490          number = number >= lower ? number : lower;
24491        }
24492      }
24493      return number;
24494    }
24495
24496    /**
24497     * The base implementation of `_.clone` and `_.cloneDeep` which tracks
24498     * traversed objects.
24499     *
24500     * @private
24501     * @param {*} value The value to clone.
24502     * @param {boolean} bitmask The bitmask flags.
24503     *  1 - Deep clone
24504     *  2 - Flatten inherited properties
24505     *  4 - Clone symbols
24506     * @param {Function} [customizer] The function to customize cloning.
24507     * @param {string} [key] The key of `value`.
24508     * @param {Object} [object] The parent object of `value`.
24509     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
24510     * @returns {*} Returns the cloned value.
24511     */
24512    function baseClone(value, bitmask, customizer, key, object, stack) {
24513      var result,
24514          isDeep = bitmask & CLONE_DEEP_FLAG,
24515          isFlat = bitmask & CLONE_FLAT_FLAG,
24516          isFull = bitmask & CLONE_SYMBOLS_FLAG;
24517
24518      if (customizer) {
24519        result = object ? customizer(value, key, object, stack) : customizer(value);
24520      }
24521      if (result !== undefined) {
24522        return result;
24523      }
24524      if (!isObject(value)) {
24525        return value;
24526      }
24527      var isArr = isArray(value);
24528      if (isArr) {
24529        result = initCloneArray(value);
24530        if (!isDeep) {
24531          return copyArray(value, result);
24532        }
24533      } else {
24534        var tag = getTag(value),
24535            isFunc = tag == funcTag || tag == genTag;
24536
24537        if (isBuffer(value)) {
24538          return cloneBuffer(value, isDeep);
24539        }
24540        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
24541          result = (isFlat || isFunc) ? {} : initCloneObject(value);
24542          if (!isDeep) {
24543            return isFlat
24544              ? copySymbolsIn(value, baseAssignIn(result, value))
24545              : copySymbols(value, baseAssign(result, value));
24546          }
24547        } else {
24548          if (!cloneableTags[tag]) {
24549            return object ? value : {};
24550          }
24551          result = initCloneByTag(value, tag, isDeep);
24552        }
24553      }
24554      // Check for circular references and return its corresponding clone.
24555      stack || (stack = new Stack);
24556      var stacked = stack.get(value);
24557      if (stacked) {
24558        return stacked;
24559      }
24560      stack.set(value, result);
24561
24562      if (isSet(value)) {
24563        value.forEach(function(subValue) {
24564          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
24565        });
24566      } else if (isMap(value)) {
24567        value.forEach(function(subValue, key) {
24568          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
24569        });
24570      }
24571
24572      var keysFunc = isFull
24573        ? (isFlat ? getAllKeysIn : getAllKeys)
24574        : (isFlat ? keysIn : keys);
24575
24576      var props = isArr ? undefined : keysFunc(value);
24577      arrayEach(props || value, function(subValue, key) {
24578        if (props) {
24579          key = subValue;
24580          subValue = value[key];
24581        }
24582        // Recursively populate clone (susceptible to call stack limits).
24583        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
24584      });
24585      return result;
24586    }
24587
24588    /**
24589     * The base implementation of `_.conforms` which doesn't clone `source`.
24590     *
24591     * @private
24592     * @param {Object} source The object of property predicates to conform to.
24593     * @returns {Function} Returns the new spec function.
24594     */
24595    function baseConforms(source) {
24596      var props = keys(source);
24597      return function(object) {
24598        return baseConformsTo(object, source, props);
24599      };
24600    }
24601
24602    /**
24603     * The base implementation of `_.conformsTo` which accepts `props` to check.
24604     *
24605     * @private
24606     * @param {Object} object The object to inspect.
24607     * @param {Object} source The object of property predicates to conform to.
24608     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
24609     */
24610    function baseConformsTo(object, source, props) {
24611      var length = props.length;
24612      if (object == null) {
24613        return !length;
24614      }
24615      object = Object(object);
24616      while (length--) {
24617        var key = props[length],
24618            predicate = source[key],
24619            value = object[key];
24620
24621        if ((value === undefined && !(key in object)) || !predicate(value)) {
24622          return false;
24623        }
24624      }
24625      return true;
24626    }
24627
24628    /**
24629     * The base implementation of `_.delay` and `_.defer` which accepts `args`
24630     * to provide to `func`.
24631     *
24632     * @private
24633     * @param {Function} func The function to delay.
24634     * @param {number} wait The number of milliseconds to delay invocation.
24635     * @param {Array} args The arguments to provide to `func`.
24636     * @returns {number|Object} Returns the timer id or timeout object.
24637     */
24638    function baseDelay(func, wait, args) {
24639      if (typeof func != 'function') {
24640        throw new TypeError(FUNC_ERROR_TEXT);
24641      }
24642      return setTimeout(function() { func.apply(undefined, args); }, wait);
24643    }
24644
24645    /**
24646     * The base implementation of methods like `_.difference` without support
24647     * for excluding multiple arrays or iteratee shorthands.
24648     *
24649     * @private
24650     * @param {Array} array The array to inspect.
24651     * @param {Array} values The values to exclude.
24652     * @param {Function} [iteratee] The iteratee invoked per element.
24653     * @param {Function} [comparator] The comparator invoked per element.
24654     * @returns {Array} Returns the new array of filtered values.
24655     */
24656    function baseDifference(array, values, iteratee, comparator) {
24657      var index = -1,
24658          includes = arrayIncludes,
24659          isCommon = true,
24660          length = array.length,
24661          result = [],
24662          valuesLength = values.length;
24663
24664      if (!length) {
24665        return result;
24666      }
24667      if (iteratee) {
24668        values = arrayMap(values, baseUnary(iteratee));
24669      }
24670      if (comparator) {
24671        includes = arrayIncludesWith;
24672        isCommon = false;
24673      }
24674      else if (values.length >= LARGE_ARRAY_SIZE) {
24675        includes = cacheHas;
24676        isCommon = false;
24677        values = new SetCache(values);
24678      }
24679      outer:
24680      while (++index < length) {
24681        var value = array[index],
24682            computed = iteratee == null ? value : iteratee(value);
24683
24684        value = (comparator || value !== 0) ? value : 0;
24685        if (isCommon && computed === computed) {
24686          var valuesIndex = valuesLength;
24687          while (valuesIndex--) {
24688            if (values[valuesIndex] === computed) {
24689              continue outer;
24690            }
24691          }
24692          result.push(value);
24693        }
24694        else if (!includes(values, computed, comparator)) {
24695          result.push(value);
24696        }
24697      }
24698      return result;
24699    }
24700
24701    /**
24702     * The base implementation of `_.forEach` without support for iteratee shorthands.
24703     *
24704     * @private
24705     * @param {Array|Object} collection The collection to iterate over.
24706     * @param {Function} iteratee The function invoked per iteration.
24707     * @returns {Array|Object} Returns `collection`.
24708     */
24709    var baseEach = createBaseEach(baseForOwn);
24710
24711    /**
24712     * The base implementation of `_.forEachRight` without support for iteratee shorthands.
24713     *
24714     * @private
24715     * @param {Array|Object} collection The collection to iterate over.
24716     * @param {Function} iteratee The function invoked per iteration.
24717     * @returns {Array|Object} Returns `collection`.
24718     */
24719    var baseEachRight = createBaseEach(baseForOwnRight, true);
24720
24721    /**
24722     * The base implementation of `_.every` without support for iteratee shorthands.
24723     *
24724     * @private
24725     * @param {Array|Object} collection The collection to iterate over.
24726     * @param {Function} predicate The function invoked per iteration.
24727     * @returns {boolean} Returns `true` if all elements pass the predicate check,
24728     *  else `false`
24729     */
24730    function baseEvery(collection, predicate) {
24731      var result = true;
24732      baseEach(collection, function(value, index, collection) {
24733        result = !!predicate(value, index, collection);
24734        return result;
24735      });
24736      return result;
24737    }
24738
24739    /**
24740     * The base implementation of methods like `_.max` and `_.min` which accepts a
24741     * `comparator` to determine the extremum value.
24742     *
24743     * @private
24744     * @param {Array} array The array to iterate over.
24745     * @param {Function} iteratee The iteratee invoked per iteration.
24746     * @param {Function} comparator The comparator used to compare values.
24747     * @returns {*} Returns the extremum value.
24748     */
24749    function baseExtremum(array, iteratee, comparator) {
24750      var index = -1,
24751          length = array.length;
24752
24753      while (++index < length) {
24754        var value = array[index],
24755            current = iteratee(value);
24756
24757        if (current != null && (computed === undefined
24758              ? (current === current && !isSymbol(current))
24759              : comparator(current, computed)
24760            )) {
24761          var computed = current,
24762              result = value;
24763        }
24764      }
24765      return result;
24766    }
24767
24768    /**
24769     * The base implementation of `_.fill` without an iteratee call guard.
24770     *
24771     * @private
24772     * @param {Array} array The array to fill.
24773     * @param {*} value The value to fill `array` with.
24774     * @param {number} [start=0] The start position.
24775     * @param {number} [end=array.length] The end position.
24776     * @returns {Array} Returns `array`.
24777     */
24778    function baseFill(array, value, start, end) {
24779      var length = array.length;
24780
24781      start = toInteger(start);
24782      if (start < 0) {
24783        start = -start > length ? 0 : (length + start);
24784      }
24785      end = (end === undefined || end > length) ? length : toInteger(end);
24786      if (end < 0) {
24787        end += length;
24788      }
24789      end = start > end ? 0 : toLength(end);
24790      while (start < end) {
24791        array[start++] = value;
24792      }
24793      return array;
24794    }
24795
24796    /**
24797     * The base implementation of `_.filter` without support for iteratee shorthands.
24798     *
24799     * @private
24800     * @param {Array|Object} collection The collection to iterate over.
24801     * @param {Function} predicate The function invoked per iteration.
24802     * @returns {Array} Returns the new filtered array.
24803     */
24804    function baseFilter(collection, predicate) {
24805      var result = [];
24806      baseEach(collection, function(value, index, collection) {
24807        if (predicate(value, index, collection)) {
24808          result.push(value);
24809        }
24810      });
24811      return result;
24812    }
24813
24814    /**
24815     * The base implementation of `_.flatten` with support for restricting flattening.
24816     *
24817     * @private
24818     * @param {Array} array The array to flatten.
24819     * @param {number} depth The maximum recursion depth.
24820     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
24821     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
24822     * @param {Array} [result=[]] The initial result value.
24823     * @returns {Array} Returns the new flattened array.
24824     */
24825    function baseFlatten(array, depth, predicate, isStrict, result) {
24826      var index = -1,
24827          length = array.length;
24828
24829      predicate || (predicate = isFlattenable);
24830      result || (result = []);
24831
24832      while (++index < length) {
24833        var value = array[index];
24834        if (depth > 0 && predicate(value)) {
24835          if (depth > 1) {
24836            // Recursively flatten arrays (susceptible to call stack limits).
24837            baseFlatten(value, depth - 1, predicate, isStrict, result);
24838          } else {
24839            arrayPush(result, value);
24840          }
24841        } else if (!isStrict) {
24842          result[result.length] = value;
24843        }
24844      }
24845      return result;
24846    }
24847
24848    /**
24849     * The base implementation of `baseForOwn` which iterates over `object`
24850     * properties returned by `keysFunc` and invokes `iteratee` for each property.
24851     * Iteratee functions may exit iteration early by explicitly returning `false`.
24852     *
24853     * @private
24854     * @param {Object} object The object to iterate over.
24855     * @param {Function} iteratee The function invoked per iteration.
24856     * @param {Function} keysFunc The function to get the keys of `object`.
24857     * @returns {Object} Returns `object`.
24858     */
24859    var baseFor = createBaseFor();
24860
24861    /**
24862     * This function is like `baseFor` except that it iterates over properties
24863     * in the opposite order.
24864     *
24865     * @private
24866     * @param {Object} object The object to iterate over.
24867     * @param {Function} iteratee The function invoked per iteration.
24868     * @param {Function} keysFunc The function to get the keys of `object`.
24869     * @returns {Object} Returns `object`.
24870     */
24871    var baseForRight = createBaseFor(true);
24872
24873    /**
24874     * The base implementation of `_.forOwn` without support for iteratee shorthands.
24875     *
24876     * @private
24877     * @param {Object} object The object to iterate over.
24878     * @param {Function} iteratee The function invoked per iteration.
24879     * @returns {Object} Returns `object`.
24880     */
24881    function baseForOwn(object, iteratee) {
24882      return object && baseFor(object, iteratee, keys);
24883    }
24884
24885    /**
24886     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
24887     *
24888     * @private
24889     * @param {Object} object The object to iterate over.
24890     * @param {Function} iteratee The function invoked per iteration.
24891     * @returns {Object} Returns `object`.
24892     */
24893    function baseForOwnRight(object, iteratee) {
24894      return object && baseForRight(object, iteratee, keys);
24895    }
24896
24897    /**
24898     * The base implementation of `_.functions` which creates an array of
24899     * `object` function property names filtered from `props`.
24900     *
24901     * @private
24902     * @param {Object} object The object to inspect.
24903     * @param {Array} props The property names to filter.
24904     * @returns {Array} Returns the function names.
24905     */
24906    function baseFunctions(object, props) {
24907      return arrayFilter(props, function(key) {
24908        return isFunction(object[key]);
24909      });
24910    }
24911
24912    /**
24913     * The base implementation of `_.get` without support for default values.
24914     *
24915     * @private
24916     * @param {Object} object The object to query.
24917     * @param {Array|string} path The path of the property to get.
24918     * @returns {*} Returns the resolved value.
24919     */
24920    function baseGet(object, path) {
24921      path = castPath(path, object);
24922
24923      var index = 0,
24924          length = path.length;
24925
24926      while (object != null && index < length) {
24927        object = object[toKey(path[index++])];
24928      }
24929      return (index && index == length) ? object : undefined;
24930    }
24931
24932    /**
24933     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
24934     * `keysFunc` and `symbolsFunc` to get the enumerable property names and
24935     * symbols of `object`.
24936     *
24937     * @private
24938     * @param {Object} object The object to query.
24939     * @param {Function} keysFunc The function to get the keys of `object`.
24940     * @param {Function} symbolsFunc The function to get the symbols of `object`.
24941     * @returns {Array} Returns the array of property names and symbols.
24942     */
24943    function baseGetAllKeys(object, keysFunc, symbolsFunc) {
24944      var result = keysFunc(object);
24945      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
24946    }
24947
24948    /**
24949     * The base implementation of `getTag` without fallbacks for buggy environments.
24950     *
24951     * @private
24952     * @param {*} value The value to query.
24953     * @returns {string} Returns the `toStringTag`.
24954     */
24955    function baseGetTag(value) {
24956      if (value == null) {
24957        return value === undefined ? undefinedTag : nullTag;
24958      }
24959      return (symToStringTag && symToStringTag in Object(value))
24960        ? getRawTag(value)
24961        : objectToString(value);
24962    }
24963
24964    /**
24965     * The base implementation of `_.gt` which doesn't coerce arguments.
24966     *
24967     * @private
24968     * @param {*} value The value to compare.
24969     * @param {*} other The other value to compare.
24970     * @returns {boolean} Returns `true` if `value` is greater than `other`,
24971     *  else `false`.
24972     */
24973    function baseGt(value, other) {
24974      return value > other;
24975    }
24976
24977    /**
24978     * The base implementation of `_.has` without support for deep paths.
24979     *
24980     * @private
24981     * @param {Object} [object] The object to query.
24982     * @param {Array|string} key The key to check.
24983     * @returns {boolean} Returns `true` if `key` exists, else `false`.
24984     */
24985    function baseHas(object, key) {
24986      return object != null && hasOwnProperty.call(object, key);
24987    }
24988
24989    /**
24990     * The base implementation of `_.hasIn` without support for deep paths.
24991     *
24992     * @private
24993     * @param {Object} [object] The object to query.
24994     * @param {Array|string} key The key to check.
24995     * @returns {boolean} Returns `true` if `key` exists, else `false`.
24996     */
24997    function baseHasIn(object, key) {
24998      return object != null && key in Object(object);
24999    }
25000
25001    /**
25002     * The base implementation of `_.inRange` which doesn't coerce arguments.
25003     *
25004     * @private
25005     * @param {number} number The number to check.
25006     * @param {number} start The start of the range.
25007     * @param {number} end The end of the range.
25008     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
25009     */
25010    function baseInRange(number, start, end) {
25011      return number >= nativeMin(start, end) && number < nativeMax(start, end);
25012    }
25013
25014    /**
25015     * The base implementation of methods like `_.intersection`, without support
25016     * for iteratee shorthands, that accepts an array of arrays to inspect.
25017     *
25018     * @private
25019     * @param {Array} arrays The arrays to inspect.
25020     * @param {Function} [iteratee] The iteratee invoked per element.
25021     * @param {Function} [comparator] The comparator invoked per element.
25022     * @returns {Array} Returns the new array of shared values.
25023     */
25024    function baseIntersection(arrays, iteratee, comparator) {
25025      var includes = comparator ? arrayIncludesWith : arrayIncludes,
25026          length = arrays[0].length,
25027          othLength = arrays.length,
25028          othIndex = othLength,
25029          caches = Array(othLength),
25030          maxLength = Infinity,
25031          result = [];
25032
25033      while (othIndex--) {
25034        var array = arrays[othIndex];
25035        if (othIndex && iteratee) {
25036          array = arrayMap(array, baseUnary(iteratee));
25037        }
25038        maxLength = nativeMin(array.length, maxLength);
25039        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
25040          ? new SetCache(othIndex && array)
25041          : undefined;
25042      }
25043      array = arrays[0];
25044
25045      var index = -1,
25046          seen = caches[0];
25047
25048      outer:
25049      while (++index < length && result.length < maxLength) {
25050        var value = array[index],
25051            computed = iteratee ? iteratee(value) : value;
25052
25053        value = (comparator || value !== 0) ? value : 0;
25054        if (!(seen
25055              ? cacheHas(seen, computed)
25056              : includes(result, computed, comparator)
25057            )) {
25058          othIndex = othLength;
25059          while (--othIndex) {
25060            var cache = caches[othIndex];
25061            if (!(cache
25062                  ? cacheHas(cache, computed)
25063                  : includes(arrays[othIndex], computed, comparator))
25064                ) {
25065              continue outer;
25066            }
25067          }
25068          if (seen) {
25069            seen.push(computed);
25070          }
25071          result.push(value);
25072        }
25073      }
25074      return result;
25075    }
25076
25077    /**
25078     * The base implementation of `_.invert` and `_.invertBy` which inverts
25079     * `object` with values transformed by `iteratee` and set by `setter`.
25080     *
25081     * @private
25082     * @param {Object} object The object to iterate over.
25083     * @param {Function} setter The function to set `accumulator` values.
25084     * @param {Function} iteratee The iteratee to transform values.
25085     * @param {Object} accumulator The initial inverted object.
25086     * @returns {Function} Returns `accumulator`.
25087     */
25088    function baseInverter(object, setter, iteratee, accumulator) {
25089      baseForOwn(object, function(value, key, object) {
25090        setter(accumulator, iteratee(value), key, object);
25091      });
25092      return accumulator;
25093    }
25094
25095    /**
25096     * The base implementation of `_.invoke` without support for individual
25097     * method arguments.
25098     *
25099     * @private
25100     * @param {Object} object The object to query.
25101     * @param {Array|string} path The path of the method to invoke.
25102     * @param {Array} args The arguments to invoke the method with.
25103     * @returns {*} Returns the result of the invoked method.
25104     */
25105    function baseInvoke(object, path, args) {
25106      path = castPath(path, object);
25107      object = parent(object, path);
25108      var func = object == null ? object : object[toKey(last(path))];
25109      return func == null ? undefined : apply(func, object, args);
25110    }
25111
25112    /**
25113     * The base implementation of `_.isArguments`.
25114     *
25115     * @private
25116     * @param {*} value The value to check.
25117     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
25118     */
25119    function baseIsArguments(value) {
25120      return isObjectLike(value) && baseGetTag(value) == argsTag;
25121    }
25122
25123    /**
25124     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
25125     *
25126     * @private
25127     * @param {*} value The value to check.
25128     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
25129     */
25130    function baseIsArrayBuffer(value) {
25131      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
25132    }
25133
25134    /**
25135     * The base implementation of `_.isDate` without Node.js optimizations.
25136     *
25137     * @private
25138     * @param {*} value The value to check.
25139     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
25140     */
25141    function baseIsDate(value) {
25142      return isObjectLike(value) && baseGetTag(value) == dateTag;
25143    }
25144
25145    /**
25146     * The base implementation of `_.isEqual` which supports partial comparisons
25147     * and tracks traversed objects.
25148     *
25149     * @private
25150     * @param {*} value The value to compare.
25151     * @param {*} other The other value to compare.
25152     * @param {boolean} bitmask The bitmask flags.
25153     *  1 - Unordered comparison
25154     *  2 - Partial comparison
25155     * @param {Function} [customizer] The function to customize comparisons.
25156     * @param {Object} [stack] Tracks traversed `value` and `other` objects.
25157     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
25158     */
25159    function baseIsEqual(value, other, bitmask, customizer, stack) {
25160      if (value === other) {
25161        return true;
25162      }
25163      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
25164        return value !== value && other !== other;
25165      }
25166      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
25167    }
25168
25169    /**
25170     * A specialized version of `baseIsEqual` for arrays and objects which performs
25171     * deep comparisons and tracks traversed objects enabling objects with circular
25172     * references to be compared.
25173     *
25174     * @private
25175     * @param {Object} object The object to compare.
25176     * @param {Object} other The other object to compare.
25177     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
25178     * @param {Function} customizer The function to customize comparisons.
25179     * @param {Function} equalFunc The function to determine equivalents of values.
25180     * @param {Object} [stack] Tracks traversed `object` and `other` objects.
25181     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
25182     */
25183    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
25184      var objIsArr = isArray(object),
25185          othIsArr = isArray(other),
25186          objTag = objIsArr ? arrayTag : getTag(object),
25187          othTag = othIsArr ? arrayTag : getTag(other);
25188
25189      objTag = objTag == argsTag ? objectTag : objTag;
25190      othTag = othTag == argsTag ? objectTag : othTag;
25191
25192      var objIsObj = objTag == objectTag,
25193          othIsObj = othTag == objectTag,
25194          isSameTag = objTag == othTag;
25195
25196      if (isSameTag && isBuffer(object)) {
25197        if (!isBuffer(other)) {
25198          return false;
25199        }
25200        objIsArr = true;
25201        objIsObj = false;
25202      }
25203      if (isSameTag && !objIsObj) {
25204        stack || (stack = new Stack);
25205        return (objIsArr || isTypedArray(object))
25206          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
25207          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
25208      }
25209      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
25210        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
25211            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
25212
25213        if (objIsWrapped || othIsWrapped) {
25214          var objUnwrapped = objIsWrapped ? object.value() : object,
25215              othUnwrapped = othIsWrapped ? other.value() : other;
25216
25217          stack || (stack = new Stack);
25218          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
25219        }
25220      }
25221      if (!isSameTag) {
25222        return false;
25223      }
25224      stack || (stack = new Stack);
25225      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
25226    }
25227
25228    /**
25229     * The base implementation of `_.isMap` without Node.js optimizations.
25230     *
25231     * @private
25232     * @param {*} value The value to check.
25233     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
25234     */
25235    function baseIsMap(value) {
25236      return isObjectLike(value) && getTag(value) == mapTag;
25237    }
25238
25239    /**
25240     * The base implementation of `_.isMatch` without support for iteratee shorthands.
25241     *
25242     * @private
25243     * @param {Object} object The object to inspect.
25244     * @param {Object} source The object of property values to match.
25245     * @param {Array} matchData The property names, values, and compare flags to match.
25246     * @param {Function} [customizer] The function to customize comparisons.
25247     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
25248     */
25249    function baseIsMatch(object, source, matchData, customizer) {
25250      var index = matchData.length,
25251          length = index,
25252          noCustomizer = !customizer;
25253
25254      if (object == null) {
25255        return !length;
25256      }
25257      object = Object(object);
25258      while (index--) {
25259        var data = matchData[index];
25260        if ((noCustomizer && data[2])
25261              ? data[1] !== object[data[0]]
25262              : !(data[0] in object)
25263            ) {
25264          return false;
25265        }
25266      }
25267      while (++index < length) {
25268        data = matchData[index];
25269        var key = data[0],
25270            objValue = object[key],
25271            srcValue = data[1];
25272
25273        if (noCustomizer && data[2]) {
25274          if (objValue === undefined && !(key in object)) {
25275            return false;
25276          }
25277        } else {
25278          var stack = new Stack;
25279          if (customizer) {
25280            var result = customizer(objValue, srcValue, key, object, source, stack);
25281          }
25282          if (!(result === undefined
25283                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
25284                : result
25285              )) {
25286            return false;
25287          }
25288        }
25289      }
25290      return true;
25291    }
25292
25293    /**
25294     * The base implementation of `_.isNative` without bad shim checks.
25295     *
25296     * @private
25297     * @param {*} value The value to check.
25298     * @returns {boolean} Returns `true` if `value` is a native function,
25299     *  else `false`.
25300     */
25301    function baseIsNative(value) {
25302      if (!isObject(value) || isMasked(value)) {
25303        return false;
25304      }
25305      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
25306      return pattern.test(toSource(value));
25307    }
25308
25309    /**
25310     * The base implementation of `_.isRegExp` without Node.js optimizations.
25311     *
25312     * @private
25313     * @param {*} value The value to check.
25314     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
25315     */
25316    function baseIsRegExp(value) {
25317      return isObjectLike(value) && baseGetTag(value) == regexpTag;
25318    }
25319
25320    /**
25321     * The base implementation of `_.isSet` without Node.js optimizations.
25322     *
25323     * @private
25324     * @param {*} value The value to check.
25325     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
25326     */
25327    function baseIsSet(value) {
25328      return isObjectLike(value) && getTag(value) == setTag;
25329    }
25330
25331    /**
25332     * The base implementation of `_.isTypedArray` without Node.js optimizations.
25333     *
25334     * @private
25335     * @param {*} value The value to check.
25336     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
25337     */
25338    function baseIsTypedArray(value) {
25339      return isObjectLike(value) &&
25340        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
25341    }
25342
25343    /**
25344     * The base implementation of `_.iteratee`.
25345     *
25346     * @private
25347     * @param {*} [value=_.identity] The value to convert to an iteratee.
25348     * @returns {Function} Returns the iteratee.
25349     */
25350    function baseIteratee(value) {
25351      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
25352      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
25353      if (typeof value == 'function') {
25354        return value;
25355      }
25356      if (value == null) {
25357        return identity;
25358      }
25359      if (typeof value == 'object') {
25360        return isArray(value)
25361          ? baseMatchesProperty(value[0], value[1])
25362          : baseMatches(value);
25363      }
25364      return property(value);
25365    }
25366
25367    /**
25368     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
25369     *
25370     * @private
25371     * @param {Object} object The object to query.
25372     * @returns {Array} Returns the array of property names.
25373     */
25374    function baseKeys(object) {
25375      if (!isPrototype(object)) {
25376        return nativeKeys(object);
25377      }
25378      var result = [];
25379      for (var key in Object(object)) {
25380        if (hasOwnProperty.call(object, key) && key != 'constructor') {
25381          result.push(key);
25382        }
25383      }
25384      return result;
25385    }
25386
25387    /**
25388     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
25389     *
25390     * @private
25391     * @param {Object} object The object to query.
25392     * @returns {Array} Returns the array of property names.
25393     */
25394    function baseKeysIn(object) {
25395      if (!isObject(object)) {
25396        return nativeKeysIn(object);
25397      }
25398      var isProto = isPrototype(object),
25399          result = [];
25400
25401      for (var key in object) {
25402        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
25403          result.push(key);
25404        }
25405      }
25406      return result;
25407    }
25408
25409    /**
25410     * The base implementation of `_.lt` which doesn't coerce arguments.
25411     *
25412     * @private
25413     * @param {*} value The value to compare.
25414     * @param {*} other The other value to compare.
25415     * @returns {boolean} Returns `true` if `value` is less than `other`,
25416     *  else `false`.
25417     */
25418    function baseLt(value, other) {
25419      return value < other;
25420    }
25421
25422    /**
25423     * The base implementation of `_.map` without support for iteratee shorthands.
25424     *
25425     * @private
25426     * @param {Array|Object} collection The collection to iterate over.
25427     * @param {Function} iteratee The function invoked per iteration.
25428     * @returns {Array} Returns the new mapped array.
25429     */
25430    function baseMap(collection, iteratee) {
25431      var index = -1,
25432          result = isArrayLike(collection) ? Array(collection.length) : [];
25433
25434      baseEach(collection, function(value, key, collection) {
25435        result[++index] = iteratee(value, key, collection);
25436      });
25437      return result;
25438    }
25439
25440    /**
25441     * The base implementation of `_.matches` which doesn't clone `source`.
25442     *
25443     * @private
25444     * @param {Object} source The object of property values to match.
25445     * @returns {Function} Returns the new spec function.
25446     */
25447    function baseMatches(source) {
25448      var matchData = getMatchData(source);
25449      if (matchData.length == 1 && matchData[0][2]) {
25450        return matchesStrictComparable(matchData[0][0], matchData[0][1]);
25451      }
25452      return function(object) {
25453        return object === source || baseIsMatch(object, source, matchData);
25454      };
25455    }
25456
25457    /**
25458     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
25459     *
25460     * @private
25461     * @param {string} path The path of the property to get.
25462     * @param {*} srcValue The value to match.
25463     * @returns {Function} Returns the new spec function.
25464     */
25465    function baseMatchesProperty(path, srcValue) {
25466      if (isKey(path) && isStrictComparable(srcValue)) {
25467        return matchesStrictComparable(toKey(path), srcValue);
25468      }
25469      return function(object) {
25470        var objValue = get(object, path);
25471        return (objValue === undefined && objValue === srcValue)
25472          ? hasIn(object, path)
25473          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
25474      };
25475    }
25476
25477    /**
25478     * The base implementation of `_.merge` without support for multiple sources.
25479     *
25480     * @private
25481     * @param {Object} object The destination object.
25482     * @param {Object} source The source object.
25483     * @param {number} srcIndex The index of `source`.
25484     * @param {Function} [customizer] The function to customize merged values.
25485     * @param {Object} [stack] Tracks traversed source values and their merged
25486     *  counterparts.
25487     */
25488    function baseMerge(object, source, srcIndex, customizer, stack) {
25489      if (object === source) {
25490        return;
25491      }
25492      baseFor(source, function(srcValue, key) {
25493        stack || (stack = new Stack);
25494        if (isObject(srcValue)) {
25495          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
25496        }
25497        else {
25498          var newValue = customizer
25499            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
25500            : undefined;
25501
25502          if (newValue === undefined) {
25503            newValue = srcValue;
25504          }
25505          assignMergeValue(object, key, newValue);
25506        }
25507      }, keysIn);
25508    }
25509
25510    /**
25511     * A specialized version of `baseMerge` for arrays and objects which performs
25512     * deep merges and tracks traversed objects enabling objects with circular
25513     * references to be merged.
25514     *
25515     * @private
25516     * @param {Object} object The destination object.
25517     * @param {Object} source The source object.
25518     * @param {string} key The key of the value to merge.
25519     * @param {number} srcIndex The index of `source`.
25520     * @param {Function} mergeFunc The function to merge values.
25521     * @param {Function} [customizer] The function to customize assigned values.
25522     * @param {Object} [stack] Tracks traversed source values and their merged
25523     *  counterparts.
25524     */
25525    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
25526      var objValue = safeGet(object, key),
25527          srcValue = safeGet(source, key),
25528          stacked = stack.get(srcValue);
25529
25530      if (stacked) {
25531        assignMergeValue(object, key, stacked);
25532        return;
25533      }
25534      var newValue = customizer
25535        ? customizer(objValue, srcValue, (key + ''), object, source, stack)
25536        : undefined;
25537
25538      var isCommon = newValue === undefined;
25539
25540      if (isCommon) {
25541        var isArr = isArray(srcValue),
25542            isBuff = !isArr && isBuffer(srcValue),
25543            isTyped = !isArr && !isBuff && isTypedArray(srcValue);
25544
25545        newValue = srcValue;
25546        if (isArr || isBuff || isTyped) {
25547          if (isArray(objValue)) {
25548            newValue = objValue;
25549          }
25550          else if (isArrayLikeObject(objValue)) {
25551            newValue = copyArray(objValue);
25552          }
25553          else if (isBuff) {
25554            isCommon = false;
25555            newValue = cloneBuffer(srcValue, true);
25556          }
25557          else if (isTyped) {
25558            isCommon = false;
25559            newValue = cloneTypedArray(srcValue, true);
25560          }
25561          else {
25562            newValue = [];
25563          }
25564        }
25565        else if (isPlainObject(srcValue) || isArguments(srcValue)) {
25566          newValue = objValue;
25567          if (isArguments(objValue)) {
25568            newValue = toPlainObject(objValue);
25569          }
25570          else if (!isObject(objValue) || isFunction(objValue)) {
25571            newValue = initCloneObject(srcValue);
25572          }
25573        }
25574        else {
25575          isCommon = false;
25576        }
25577      }
25578      if (isCommon) {
25579        // Recursively merge objects and arrays (susceptible to call stack limits).
25580        stack.set(srcValue, newValue);
25581        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
25582        stack['delete'](srcValue);
25583      }
25584      assignMergeValue(object, key, newValue);
25585    }
25586
25587    /**
25588     * The base implementation of `_.nth` which doesn't coerce arguments.
25589     *
25590     * @private
25591     * @param {Array} array The array to query.
25592     * @param {number} n The index of the element to return.
25593     * @returns {*} Returns the nth element of `array`.
25594     */
25595    function baseNth(array, n) {
25596      var length = array.length;
25597      if (!length) {
25598        return;
25599      }
25600      n += n < 0 ? length : 0;
25601      return isIndex(n, length) ? array[n] : undefined;
25602    }
25603
25604    /**
25605     * The base implementation of `_.orderBy` without param guards.
25606     *
25607     * @private
25608     * @param {Array|Object} collection The collection to iterate over.
25609     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
25610     * @param {string[]} orders The sort orders of `iteratees`.
25611     * @returns {Array} Returns the new sorted array.
25612     */
25613    function baseOrderBy(collection, iteratees, orders) {
25614      if (iteratees.length) {
25615        iteratees = arrayMap(iteratees, function(iteratee) {
25616          if (isArray(iteratee)) {
25617            return function(value) {
25618              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
25619            }
25620          }
25621          return iteratee;
25622        });
25623      } else {
25624        iteratees = [identity];
25625      }
25626
25627      var index = -1;
25628      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
25629
25630      var result = baseMap(collection, function(value, key, collection) {
25631        var criteria = arrayMap(iteratees, function(iteratee) {
25632          return iteratee(value);
25633        });
25634        return { 'criteria': criteria, 'index': ++index, 'value': value };
25635      });
25636
25637      return baseSortBy(result, function(object, other) {
25638        return compareMultiple(object, other, orders);
25639      });
25640    }
25641
25642    /**
25643     * The base implementation of `_.pick` without support for individual
25644     * property identifiers.
25645     *
25646     * @private
25647     * @param {Object} object The source object.
25648     * @param {string[]} paths The property paths to pick.
25649     * @returns {Object} Returns the new object.
25650     */
25651    function basePick(object, paths) {
25652      return basePickBy(object, paths, function(value, path) {
25653        return hasIn(object, path);
25654      });
25655    }
25656
25657    /**
25658     * The base implementation of  `_.pickBy` without support for iteratee shorthands.
25659     *
25660     * @private
25661     * @param {Object} object The source object.
25662     * @param {string[]} paths The property paths to pick.
25663     * @param {Function} predicate The function invoked per property.
25664     * @returns {Object} Returns the new object.
25665     */
25666    function basePickBy(object, paths, predicate) {
25667      var index = -1,
25668          length = paths.length,
25669          result = {};
25670
25671      while (++index < length) {
25672        var path = paths[index],
25673            value = baseGet(object, path);
25674
25675        if (predicate(value, path)) {
25676          baseSet(result, castPath(path, object), value);
25677        }
25678      }
25679      return result;
25680    }
25681
25682    /**
25683     * A specialized version of `baseProperty` which supports deep paths.
25684     *
25685     * @private
25686     * @param {Array|string} path The path of the property to get.
25687     * @returns {Function} Returns the new accessor function.
25688     */
25689    function basePropertyDeep(path) {
25690      return function(object) {
25691        return baseGet(object, path);
25692      };
25693    }
25694
25695    /**
25696     * The base implementation of `_.pullAllBy` without support for iteratee
25697     * shorthands.
25698     *
25699     * @private
25700     * @param {Array} array The array to modify.
25701     * @param {Array} values The values to remove.
25702     * @param {Function} [iteratee] The iteratee invoked per element.
25703     * @param {Function} [comparator] The comparator invoked per element.
25704     * @returns {Array} Returns `array`.
25705     */
25706    function basePullAll(array, values, iteratee, comparator) {
25707      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
25708          index = -1,
25709          length = values.length,
25710          seen = array;
25711
25712      if (array === values) {
25713        values = copyArray(values);
25714      }
25715      if (iteratee) {
25716        seen = arrayMap(array, baseUnary(iteratee));
25717      }
25718      while (++index < length) {
25719        var fromIndex = 0,
25720            value = values[index],
25721            computed = iteratee ? iteratee(value) : value;
25722
25723        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
25724          if (seen !== array) {
25725            splice.call(seen, fromIndex, 1);
25726          }
25727          splice.call(array, fromIndex, 1);
25728        }
25729      }
25730      return array;
25731    }
25732
25733    /**
25734     * The base implementation of `_.pullAt` without support for individual
25735     * indexes or capturing the removed elements.
25736     *
25737     * @private
25738     * @param {Array} array The array to modify.
25739     * @param {number[]} indexes The indexes of elements to remove.
25740     * @returns {Array} Returns `array`.
25741     */
25742    function basePullAt(array, indexes) {
25743      var length = array ? indexes.length : 0,
25744          lastIndex = length - 1;
25745
25746      while (length--) {
25747        var index = indexes[length];
25748        if (length == lastIndex || index !== previous) {
25749          var previous = index;
25750          if (isIndex(index)) {
25751            splice.call(array, index, 1);
25752          } else {
25753            baseUnset(array, index);
25754          }
25755        }
25756      }
25757      return array;
25758    }
25759
25760    /**
25761     * The base implementation of `_.random` without support for returning
25762     * floating-point numbers.
25763     *
25764     * @private
25765     * @param {number} lower The lower bound.
25766     * @param {number} upper The upper bound.
25767     * @returns {number} Returns the random number.
25768     */
25769    function baseRandom(lower, upper) {
25770      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
25771    }
25772
25773    /**
25774     * The base implementation of `_.range` and `_.rangeRight` which doesn't
25775     * coerce arguments.
25776     *
25777     * @private
25778     * @param {number} start The start of the range.
25779     * @param {number} end The end of the range.
25780     * @param {number} step The value to increment or decrement by.
25781     * @param {boolean} [fromRight] Specify iterating from right to left.
25782     * @returns {Array} Returns the range of numbers.
25783     */
25784    function baseRange(start, end, step, fromRight) {
25785      var index = -1,
25786          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
25787          result = Array(length);
25788
25789      while (length--) {
25790        result[fromRight ? length : ++index] = start;
25791        start += step;
25792      }
25793      return result;
25794    }
25795
25796    /**
25797     * The base implementation of `_.repeat` which doesn't coerce arguments.
25798     *
25799     * @private
25800     * @param {string} string The string to repeat.
25801     * @param {number} n The number of times to repeat the string.
25802     * @returns {string} Returns the repeated string.
25803     */
25804    function baseRepeat(string, n) {
25805      var result = '';
25806      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
25807        return result;
25808      }
25809      // Leverage the exponentiation by squaring algorithm for a faster repeat.
25810      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
25811      do {
25812        if (n % 2) {
25813          result += string;
25814        }
25815        n = nativeFloor(n / 2);
25816        if (n) {
25817          string += string;
25818        }
25819      } while (n);
25820
25821      return result;
25822    }
25823
25824    /**
25825     * The base implementation of `_.rest` which doesn't validate or coerce arguments.
25826     *
25827     * @private
25828     * @param {Function} func The function to apply a rest parameter to.
25829     * @param {number} [start=func.length-1] The start position of the rest parameter.
25830     * @returns {Function} Returns the new function.
25831     */
25832    function baseRest(func, start) {
25833      return setToString(overRest(func, start, identity), func + '');
25834    }
25835
25836    /**
25837     * The base implementation of `_.sample`.
25838     *
25839     * @private
25840     * @param {Array|Object} collection The collection to sample.
25841     * @returns {*} Returns the random element.
25842     */
25843    function baseSample(collection) {
25844      return arraySample(values(collection));
25845    }
25846
25847    /**
25848     * The base implementation of `_.sampleSize` without param guards.
25849     *
25850     * @private
25851     * @param {Array|Object} collection The collection to sample.
25852     * @param {number} n The number of elements to sample.
25853     * @returns {Array} Returns the random elements.
25854     */
25855    function baseSampleSize(collection, n) {
25856      var array = values(collection);
25857      return shuffleSelf(array, baseClamp(n, 0, array.length));
25858    }
25859
25860    /**
25861     * The base implementation of `_.set`.
25862     *
25863     * @private
25864     * @param {Object} object The object to modify.
25865     * @param {Array|string} path The path of the property to set.
25866     * @param {*} value The value to set.
25867     * @param {Function} [customizer] The function to customize path creation.
25868     * @returns {Object} Returns `object`.
25869     */
25870    function baseSet(object, path, value, customizer) {
25871      if (!isObject(object)) {
25872        return object;
25873      }
25874      path = castPath(path, object);
25875
25876      var index = -1,
25877          length = path.length,
25878          lastIndex = length - 1,
25879          nested = object;
25880
25881      while (nested != null && ++index < length) {
25882        var key = toKey(path[index]),
25883            newValue = value;
25884
25885        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
25886          return object;
25887        }
25888
25889        if (index != lastIndex) {
25890          var objValue = nested[key];
25891          newValue = customizer ? customizer(objValue, key, nested) : undefined;
25892          if (newValue === undefined) {
25893            newValue = isObject(objValue)
25894              ? objValue
25895              : (isIndex(path[index + 1]) ? [] : {});
25896          }
25897        }
25898        assignValue(nested, key, newValue);
25899        nested = nested[key];
25900      }
25901      return object;
25902    }
25903
25904    /**
25905     * The base implementation of `setData` without support for hot loop shorting.
25906     *
25907     * @private
25908     * @param {Function} func The function to associate metadata with.
25909     * @param {*} data The metadata.
25910     * @returns {Function} Returns `func`.
25911     */
25912    var baseSetData = !metaMap ? identity : function(func, data) {
25913      metaMap.set(func, data);
25914      return func;
25915    };
25916
25917    /**
25918     * The base implementation of `setToString` without support for hot loop shorting.
25919     *
25920     * @private
25921     * @param {Function} func The function to modify.
25922     * @param {Function} string The `toString` result.
25923     * @returns {Function} Returns `func`.
25924     */
25925    var baseSetToString = !defineProperty ? identity : function(func, string) {
25926      return defineProperty(func, 'toString', {
25927        'configurable': true,
25928        'enumerable': false,
25929        'value': constant(string),
25930        'writable': true
25931      });
25932    };
25933
25934    /**
25935     * The base implementation of `_.shuffle`.
25936     *
25937     * @private
25938     * @param {Array|Object} collection The collection to shuffle.
25939     * @returns {Array} Returns the new shuffled array.
25940     */
25941    function baseShuffle(collection) {
25942      return shuffleSelf(values(collection));
25943    }
25944
25945    /**
25946     * The base implementation of `_.slice` without an iteratee call guard.
25947     *
25948     * @private
25949     * @param {Array} array The array to slice.
25950     * @param {number} [start=0] The start position.
25951     * @param {number} [end=array.length] The end position.
25952     * @returns {Array} Returns the slice of `array`.
25953     */
25954    function baseSlice(array, start, end) {
25955      var index = -1,
25956          length = array.length;
25957
25958      if (start < 0) {
25959        start = -start > length ? 0 : (length + start);
25960      }
25961      end = end > length ? length : end;
25962      if (end < 0) {
25963        end += length;
25964      }
25965      length = start > end ? 0 : ((end - start) >>> 0);
25966      start >>>= 0;
25967
25968      var result = Array(length);
25969      while (++index < length) {
25970        result[index] = array[index + start];
25971      }
25972      return result;
25973    }
25974
25975    /**
25976     * The base implementation of `_.some` without support for iteratee shorthands.
25977     *
25978     * @private
25979     * @param {Array|Object} collection The collection to iterate over.
25980     * @param {Function} predicate The function invoked per iteration.
25981     * @returns {boolean} Returns `true` if any element passes the predicate check,
25982     *  else `false`.
25983     */
25984    function baseSome(collection, predicate) {
25985      var result;
25986
25987      baseEach(collection, function(value, index, collection) {
25988        result = predicate(value, index, collection);
25989        return !result;
25990      });
25991      return !!result;
25992    }
25993
25994    /**
25995     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
25996     * performs a binary search of `array` to determine the index at which `value`
25997     * should be inserted into `array` in order to maintain its sort order.
25998     *
25999     * @private
26000     * @param {Array} array The sorted array to inspect.
26001     * @param {*} value The value to evaluate.
26002     * @param {boolean} [retHighest] Specify returning the highest qualified index.
26003     * @returns {number} Returns the index at which `value` should be inserted
26004     *  into `array`.
26005     */
26006    function baseSortedIndex(array, value, retHighest) {
26007      var low = 0,
26008          high = array == null ? low : array.length;
26009
26010      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
26011        while (low < high) {
26012          var mid = (low + high) >>> 1,
26013              computed = array[mid];
26014
26015          if (computed !== null && !isSymbol(computed) &&
26016              (retHighest ? (computed <= value) : (computed < value))) {
26017            low = mid + 1;
26018          } else {
26019            high = mid;
26020          }
26021        }
26022        return high;
26023      }
26024      return baseSortedIndexBy(array, value, identity, retHighest);
26025    }
26026
26027    /**
26028     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
26029     * which invokes `iteratee` for `value` and each element of `array` to compute
26030     * their sort ranking. The iteratee is invoked with one argument; (value).
26031     *
26032     * @private
26033     * @param {Array} array The sorted array to inspect.
26034     * @param {*} value The value to evaluate.
26035     * @param {Function} iteratee The iteratee invoked per element.
26036     * @param {boolean} [retHighest] Specify returning the highest qualified index.
26037     * @returns {number} Returns the index at which `value` should be inserted
26038     *  into `array`.
26039     */
26040    function baseSortedIndexBy(array, value, iteratee, retHighest) {
26041      var low = 0,
26042          high = array == null ? 0 : array.length;
26043      if (high === 0) {
26044        return 0;
26045      }
26046
26047      value = iteratee(value);
26048      var valIsNaN = value !== value,
26049          valIsNull = value === null,
26050          valIsSymbol = isSymbol(value),
26051          valIsUndefined = value === undefined;
26052
26053      while (low < high) {
26054        var mid = nativeFloor((low + high) / 2),
26055            computed = iteratee(array[mid]),
26056            othIsDefined = computed !== undefined,
26057            othIsNull = computed === null,
26058            othIsReflexive = computed === computed,
26059            othIsSymbol = isSymbol(computed);
26060
26061        if (valIsNaN) {
26062          var setLow = retHighest || othIsReflexive;
26063        } else if (valIsUndefined) {
26064          setLow = othIsReflexive && (retHighest || othIsDefined);
26065        } else if (valIsNull) {
26066          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
26067        } else if (valIsSymbol) {
26068          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
26069        } else if (othIsNull || othIsSymbol) {
26070          setLow = false;
26071        } else {
26072          setLow = retHighest ? (computed <= value) : (computed < value);
26073        }
26074        if (setLow) {
26075          low = mid + 1;
26076        } else {
26077          high = mid;
26078        }
26079      }
26080      return nativeMin(high, MAX_ARRAY_INDEX);
26081    }
26082
26083    /**
26084     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
26085     * support for iteratee shorthands.
26086     *
26087     * @private
26088     * @param {Array} array The array to inspect.
26089     * @param {Function} [iteratee] The iteratee invoked per element.
26090     * @returns {Array} Returns the new duplicate free array.
26091     */
26092    function baseSortedUniq(array, iteratee) {
26093      var index = -1,
26094          length = array.length,
26095          resIndex = 0,
26096          result = [];
26097
26098      while (++index < length) {
26099        var value = array[index],
26100            computed = iteratee ? iteratee(value) : value;
26101
26102        if (!index || !eq(computed, seen)) {
26103          var seen = computed;
26104          result[resIndex++] = value === 0 ? 0 : value;
26105        }
26106      }
26107      return result;
26108    }
26109
26110    /**
26111     * The base implementation of `_.toNumber` which doesn't ensure correct
26112     * conversions of binary, hexadecimal, or octal string values.
26113     *
26114     * @private
26115     * @param {*} value The value to process.
26116     * @returns {number} Returns the number.
26117     */
26118    function baseToNumber(value) {
26119      if (typeof value == 'number') {
26120        return value;
26121      }
26122      if (isSymbol(value)) {
26123        return NAN;
26124      }
26125      return +value;
26126    }
26127
26128    /**
26129     * The base implementation of `_.toString` which doesn't convert nullish
26130     * values to empty strings.
26131     *
26132     * @private
26133     * @param {*} value The value to process.
26134     * @returns {string} Returns the string.
26135     */
26136    function baseToString(value) {
26137      // Exit early for strings to avoid a performance hit in some environments.
26138      if (typeof value == 'string') {
26139        return value;
26140      }
26141      if (isArray(value)) {
26142        // Recursively convert values (susceptible to call stack limits).
26143        return arrayMap(value, baseToString) + '';
26144      }
26145      if (isSymbol(value)) {
26146        return symbolToString ? symbolToString.call(value) : '';
26147      }
26148      var result = (value + '');
26149      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
26150    }
26151
26152    /**
26153     * The base implementation of `_.uniqBy` without support for iteratee shorthands.
26154     *
26155     * @private
26156     * @param {Array} array The array to inspect.
26157     * @param {Function} [iteratee] The iteratee invoked per element.
26158     * @param {Function} [comparator] The comparator invoked per element.
26159     * @returns {Array} Returns the new duplicate free array.
26160     */
26161    function baseUniq(array, iteratee, comparator) {
26162      var index = -1,
26163          includes = arrayIncludes,
26164          length = array.length,
26165          isCommon = true,
26166          result = [],
26167          seen = result;
26168
26169      if (comparator) {
26170        isCommon = false;
26171        includes = arrayIncludesWith;
26172      }
26173      else if (length >= LARGE_ARRAY_SIZE) {
26174        var set = iteratee ? null : createSet(array);
26175        if (set) {
26176          return setToArray(set);
26177        }
26178        isCommon = false;
26179        includes = cacheHas;
26180        seen = new SetCache;
26181      }
26182      else {
26183        seen = iteratee ? [] : result;
26184      }
26185      outer:
26186      while (++index < length) {
26187        var value = array[index],
26188            computed = iteratee ? iteratee(value) : value;
26189
26190        value = (comparator || value !== 0) ? value : 0;
26191        if (isCommon && computed === computed) {
26192          var seenIndex = seen.length;
26193          while (seenIndex--) {
26194            if (seen[seenIndex] === computed) {
26195              continue outer;
26196            }
26197          }
26198          if (iteratee) {
26199            seen.push(computed);
26200          }
26201          result.push(value);
26202        }
26203        else if (!includes(seen, computed, comparator)) {
26204          if (seen !== result) {
26205            seen.push(computed);
26206          }
26207          result.push(value);
26208        }
26209      }
26210      return result;
26211    }
26212
26213    /**
26214     * The base implementation of `_.unset`.
26215     *
26216     * @private
26217     * @param {Object} object The object to modify.
26218     * @param {Array|string} path The property path to unset.
26219     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
26220     */
26221    function baseUnset(object, path) {
26222      path = castPath(path, object);
26223      object = parent(object, path);
26224      return object == null || delete object[toKey(last(path))];
26225    }
26226
26227    /**
26228     * The base implementation of `_.update`.
26229     *
26230     * @private
26231     * @param {Object} object The object to modify.
26232     * @param {Array|string} path The path of the property to update.
26233     * @param {Function} updater The function to produce the updated value.
26234     * @param {Function} [customizer] The function to customize path creation.
26235     * @returns {Object} Returns `object`.
26236     */
26237    function baseUpdate(object, path, updater, customizer) {
26238      return baseSet(object, path, updater(baseGet(object, path)), customizer);
26239    }
26240
26241    /**
26242     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
26243     * without support for iteratee shorthands.
26244     *
26245     * @private
26246     * @param {Array} array The array to query.
26247     * @param {Function} predicate The function invoked per iteration.
26248     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
26249     * @param {boolean} [fromRight] Specify iterating from right to left.
26250     * @returns {Array} Returns the slice of `array`.
26251     */
26252    function baseWhile(array, predicate, isDrop, fromRight) {
26253      var length = array.length,
26254          index = fromRight ? length : -1;
26255
26256      while ((fromRight ? index-- : ++index < length) &&
26257        predicate(array[index], index, array)) {}
26258
26259      return isDrop
26260        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
26261        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
26262    }
26263
26264    /**
26265     * The base implementation of `wrapperValue` which returns the result of
26266     * performing a sequence of actions on the unwrapped `value`, where each
26267     * successive action is supplied the return value of the previous.
26268     *
26269     * @private
26270     * @param {*} value The unwrapped value.
26271     * @param {Array} actions Actions to perform to resolve the unwrapped value.
26272     * @returns {*} Returns the resolved value.
26273     */
26274    function baseWrapperValue(value, actions) {
26275      var result = value;
26276      if (result instanceof LazyWrapper) {
26277        result = result.value();
26278      }
26279      return arrayReduce(actions, function(result, action) {
26280        return action.func.apply(action.thisArg, arrayPush([result], action.args));
26281      }, result);
26282    }
26283
26284    /**
26285     * The base implementation of methods like `_.xor`, without support for
26286     * iteratee shorthands, that accepts an array of arrays to inspect.
26287     *
26288     * @private
26289     * @param {Array} arrays The arrays to inspect.
26290     * @param {Function} [iteratee] The iteratee invoked per element.
26291     * @param {Function} [comparator] The comparator invoked per element.
26292     * @returns {Array} Returns the new array of values.
26293     */
26294    function baseXor(arrays, iteratee, comparator) {
26295      var length = arrays.length;
26296      if (length < 2) {
26297        return length ? baseUniq(arrays[0]) : [];
26298      }
26299      var index = -1,
26300          result = Array(length);
26301
26302      while (++index < length) {
26303        var array = arrays[index],
26304            othIndex = -1;
26305
26306        while (++othIndex < length) {
26307          if (othIndex != index) {
26308            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
26309          }
26310        }
26311      }
26312      return baseUniq(baseFlatten(result, 1), iteratee, comparator);
26313    }
26314
26315    /**
26316     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
26317     *
26318     * @private
26319     * @param {Array} props The property identifiers.
26320     * @param {Array} values The property values.
26321     * @param {Function} assignFunc The function to assign values.
26322     * @returns {Object} Returns the new object.
26323     */
26324    function baseZipObject(props, values, assignFunc) {
26325      var index = -1,
26326          length = props.length,
26327          valsLength = values.length,
26328          result = {};
26329
26330      while (++index < length) {
26331        var value = index < valsLength ? values[index] : undefined;
26332        assignFunc(result, props[index], value);
26333      }
26334      return result;
26335    }
26336
26337    /**
26338     * Casts `value` to an empty array if it's not an array like object.
26339     *
26340     * @private
26341     * @param {*} value The value to inspect.
26342     * @returns {Array|Object} Returns the cast array-like object.
26343     */
26344    function castArrayLikeObject(value) {
26345      return isArrayLikeObject(value) ? value : [];
26346    }
26347
26348    /**
26349     * Casts `value` to `identity` if it's not a function.
26350     *
26351     * @private
26352     * @param {*} value The value to inspect.
26353     * @returns {Function} Returns cast function.
26354     */
26355    function castFunction(value) {
26356      return typeof value == 'function' ? value : identity;
26357    }
26358
26359    /**
26360     * Casts `value` to a path array if it's not one.
26361     *
26362     * @private
26363     * @param {*} value The value to inspect.
26364     * @param {Object} [object] The object to query keys on.
26365     * @returns {Array} Returns the cast property path array.
26366     */
26367    function castPath(value, object) {
26368      if (isArray(value)) {
26369        return value;
26370      }
26371      return isKey(value, object) ? [value] : stringToPath(toString(value));
26372    }
26373
26374    /**
26375     * A `baseRest` alias which can be replaced with `identity` by module
26376     * replacement plugins.
26377     *
26378     * @private
26379     * @type {Function}
26380     * @param {Function} func The function to apply a rest parameter to.
26381     * @returns {Function} Returns the new function.
26382     */
26383    var castRest = baseRest;
26384
26385    /**
26386     * Casts `array` to a slice if it's needed.
26387     *
26388     * @private
26389     * @param {Array} array The array to inspect.
26390     * @param {number} start The start position.
26391     * @param {number} [end=array.length] The end position.
26392     * @returns {Array} Returns the cast slice.
26393     */
26394    function castSlice(array, start, end) {
26395      var length = array.length;
26396      end = end === undefined ? length : end;
26397      return (!start && end >= length) ? array : baseSlice(array, start, end);
26398    }
26399
26400    /**
26401     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
26402     *
26403     * @private
26404     * @param {number|Object} id The timer id or timeout object of the timer to clear.
26405     */
26406    var clearTimeout = ctxClearTimeout || function(id) {
26407      return root.clearTimeout(id);
26408    };
26409
26410    /**
26411     * Creates a clone of  `buffer`.
26412     *
26413     * @private
26414     * @param {Buffer} buffer The buffer to clone.
26415     * @param {boolean} [isDeep] Specify a deep clone.
26416     * @returns {Buffer} Returns the cloned buffer.
26417     */
26418    function cloneBuffer(buffer, isDeep) {
26419      if (isDeep) {
26420        return buffer.slice();
26421      }
26422      var length = buffer.length,
26423          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
26424
26425      buffer.copy(result);
26426      return result;
26427    }
26428
26429    /**
26430     * Creates a clone of `arrayBuffer`.
26431     *
26432     * @private
26433     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
26434     * @returns {ArrayBuffer} Returns the cloned array buffer.
26435     */
26436    function cloneArrayBuffer(arrayBuffer) {
26437      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
26438      new Uint8Array(result).set(new Uint8Array(arrayBuffer));
26439      return result;
26440    }
26441
26442    /**
26443     * Creates a clone of `dataView`.
26444     *
26445     * @private
26446     * @param {Object} dataView The data view to clone.
26447     * @param {boolean} [isDeep] Specify a deep clone.
26448     * @returns {Object} Returns the cloned data view.
26449     */
26450    function cloneDataView(dataView, isDeep) {
26451      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
26452      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
26453    }
26454
26455    /**
26456     * Creates a clone of `regexp`.
26457     *
26458     * @private
26459     * @param {Object} regexp The regexp to clone.
26460     * @returns {Object} Returns the cloned regexp.
26461     */
26462    function cloneRegExp(regexp) {
26463      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
26464      result.lastIndex = regexp.lastIndex;
26465      return result;
26466    }
26467
26468    /**
26469     * Creates a clone of the `symbol` object.
26470     *
26471     * @private
26472     * @param {Object} symbol The symbol object to clone.
26473     * @returns {Object} Returns the cloned symbol object.
26474     */
26475    function cloneSymbol(symbol) {
26476      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
26477    }
26478
26479    /**
26480     * Creates a clone of `typedArray`.
26481     *
26482     * @private
26483     * @param {Object} typedArray The typed array to clone.
26484     * @param {boolean} [isDeep] Specify a deep clone.
26485     * @returns {Object} Returns the cloned typed array.
26486     */
26487    function cloneTypedArray(typedArray, isDeep) {
26488      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
26489      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
26490    }
26491
26492    /**
26493     * Compares values to sort them in ascending order.
26494     *
26495     * @private
26496     * @param {*} value The value to compare.
26497     * @param {*} other The other value to compare.
26498     * @returns {number} Returns the sort order indicator for `value`.
26499     */
26500    function compareAscending(value, other) {
26501      if (value !== other) {
26502        var valIsDefined = value !== undefined,
26503            valIsNull = value === null,
26504            valIsReflexive = value === value,
26505            valIsSymbol = isSymbol(value);
26506
26507        var othIsDefined = other !== undefined,
26508            othIsNull = other === null,
26509            othIsReflexive = other === other,
26510            othIsSymbol = isSymbol(other);
26511
26512        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
26513            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
26514            (valIsNull && othIsDefined && othIsReflexive) ||
26515            (!valIsDefined && othIsReflexive) ||
26516            !valIsReflexive) {
26517          return 1;
26518        }
26519        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
26520            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
26521            (othIsNull && valIsDefined && valIsReflexive) ||
26522            (!othIsDefined && valIsReflexive) ||
26523            !othIsReflexive) {
26524          return -1;
26525        }
26526      }
26527      return 0;
26528    }
26529
26530    /**
26531     * Used by `_.orderBy` to compare multiple properties of a value to another
26532     * and stable sort them.
26533     *
26534     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
26535     * specify an order of "desc" for descending or "asc" for ascending sort order
26536     * of corresponding values.
26537     *
26538     * @private
26539     * @param {Object} object The object to compare.
26540     * @param {Object} other The other object to compare.
26541     * @param {boolean[]|string[]} orders The order to sort by for each property.
26542     * @returns {number} Returns the sort order indicator for `object`.
26543     */
26544    function compareMultiple(object, other, orders) {
26545      var index = -1,
26546          objCriteria = object.criteria,
26547          othCriteria = other.criteria,
26548          length = objCriteria.length,
26549          ordersLength = orders.length;
26550
26551      while (++index < length) {
26552        var result = compareAscending(objCriteria[index], othCriteria[index]);
26553        if (result) {
26554          if (index >= ordersLength) {
26555            return result;
26556          }
26557          var order = orders[index];
26558          return result * (order == 'desc' ? -1 : 1);
26559        }
26560      }
26561      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
26562      // that causes it, under certain circumstances, to provide the same value for
26563      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
26564      // for more details.
26565      //
26566      // This also ensures a stable sort in V8 and other engines.
26567      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
26568      return object.index - other.index;
26569    }
26570
26571    /**
26572     * Creates an array that is the composition of partially applied arguments,
26573     * placeholders, and provided arguments into a single array of arguments.
26574     *
26575     * @private
26576     * @param {Array} args The provided arguments.
26577     * @param {Array} partials The arguments to prepend to those provided.
26578     * @param {Array} holders The `partials` placeholder indexes.
26579     * @params {boolean} [isCurried] Specify composing for a curried function.
26580     * @returns {Array} Returns the new array of composed arguments.
26581     */
26582    function composeArgs(args, partials, holders, isCurried) {
26583      var argsIndex = -1,
26584          argsLength = args.length,
26585          holdersLength = holders.length,
26586          leftIndex = -1,
26587          leftLength = partials.length,
26588          rangeLength = nativeMax(argsLength - holdersLength, 0),
26589          result = Array(leftLength + rangeLength),
26590          isUncurried = !isCurried;
26591
26592      while (++leftIndex < leftLength) {
26593        result[leftIndex] = partials[leftIndex];
26594      }
26595      while (++argsIndex < holdersLength) {
26596        if (isUncurried || argsIndex < argsLength) {
26597          result[holders[argsIndex]] = args[argsIndex];
26598        }
26599      }
26600      while (rangeLength--) {
26601        result[leftIndex++] = args[argsIndex++];
26602      }
26603      return result;
26604    }
26605
26606    /**
26607     * This function is like `composeArgs` except that the arguments composition
26608     * is tailored for `_.partialRight`.
26609     *
26610     * @private
26611     * @param {Array} args The provided arguments.
26612     * @param {Array} partials The arguments to append to those provided.
26613     * @param {Array} holders The `partials` placeholder indexes.
26614     * @params {boolean} [isCurried] Specify composing for a curried function.
26615     * @returns {Array} Returns the new array of composed arguments.
26616     */
26617    function composeArgsRight(args, partials, holders, isCurried) {
26618      var argsIndex = -1,
26619          argsLength = args.length,
26620          holdersIndex = -1,
26621          holdersLength = holders.length,
26622          rightIndex = -1,
26623          rightLength = partials.length,
26624          rangeLength = nativeMax(argsLength - holdersLength, 0),
26625          result = Array(rangeLength + rightLength),
26626          isUncurried = !isCurried;
26627
26628      while (++argsIndex < rangeLength) {
26629        result[argsIndex] = args[argsIndex];
26630      }
26631      var offset = argsIndex;
26632      while (++rightIndex < rightLength) {
26633        result[offset + rightIndex] = partials[rightIndex];
26634      }
26635      while (++holdersIndex < holdersLength) {
26636        if (isUncurried || argsIndex < argsLength) {
26637          result[offset + holders[holdersIndex]] = args[argsIndex++];
26638        }
26639      }
26640      return result;
26641    }
26642
26643    /**
26644     * Copies the values of `source` to `array`.
26645     *
26646     * @private
26647     * @param {Array} source The array to copy values from.
26648     * @param {Array} [array=[]] The array to copy values to.
26649     * @returns {Array} Returns `array`.
26650     */
26651    function copyArray(source, array) {
26652      var index = -1,
26653          length = source.length;
26654
26655      array || (array = Array(length));
26656      while (++index < length) {
26657        array[index] = source[index];
26658      }
26659      return array;
26660    }
26661
26662    /**
26663     * Copies properties of `source` to `object`.
26664     *
26665     * @private
26666     * @param {Object} source The object to copy properties from.
26667     * @param {Array} props The property identifiers to copy.
26668     * @param {Object} [object={}] The object to copy properties to.
26669     * @param {Function} [customizer] The function to customize copied values.
26670     * @returns {Object} Returns `object`.
26671     */
26672    function copyObject(source, props, object, customizer) {
26673      var isNew = !object;
26674      object || (object = {});
26675
26676      var index = -1,
26677          length = props.length;
26678
26679      while (++index < length) {
26680        var key = props[index];
26681
26682        var newValue = customizer
26683          ? customizer(object[key], source[key], key, object, source)
26684          : undefined;
26685
26686        if (newValue === undefined) {
26687          newValue = source[key];
26688        }
26689        if (isNew) {
26690          baseAssignValue(object, key, newValue);
26691        } else {
26692          assignValue(object, key, newValue);
26693        }
26694      }
26695      return object;
26696    }
26697
26698    /**
26699     * Copies own symbols of `source` to `object`.
26700     *
26701     * @private
26702     * @param {Object} source The object to copy symbols from.
26703     * @param {Object} [object={}] The object to copy symbols to.
26704     * @returns {Object} Returns `object`.
26705     */
26706    function copySymbols(source, object) {
26707      return copyObject(source, getSymbols(source), object);
26708    }
26709
26710    /**
26711     * Copies own and inherited symbols of `source` to `object`.
26712     *
26713     * @private
26714     * @param {Object} source The object to copy symbols from.
26715     * @param {Object} [object={}] The object to copy symbols to.
26716     * @returns {Object} Returns `object`.
26717     */
26718    function copySymbolsIn(source, object) {
26719      return copyObject(source, getSymbolsIn(source), object);
26720    }
26721
26722    /**
26723     * Creates a function like `_.groupBy`.
26724     *
26725     * @private
26726     * @param {Function} setter The function to set accumulator values.
26727     * @param {Function} [initializer] The accumulator object initializer.
26728     * @returns {Function} Returns the new aggregator function.
26729     */
26730    function createAggregator(setter, initializer) {
26731      return function(collection, iteratee) {
26732        var func = isArray(collection) ? arrayAggregator : baseAggregator,
26733            accumulator = initializer ? initializer() : {};
26734
26735        return func(collection, setter, getIteratee(iteratee, 2), accumulator);
26736      };
26737    }
26738
26739    /**
26740     * Creates a function like `_.assign`.
26741     *
26742     * @private
26743     * @param {Function} assigner The function to assign values.
26744     * @returns {Function} Returns the new assigner function.
26745     */
26746    function createAssigner(assigner) {
26747      return baseRest(function(object, sources) {
26748        var index = -1,
26749            length = sources.length,
26750            customizer = length > 1 ? sources[length - 1] : undefined,
26751            guard = length > 2 ? sources[2] : undefined;
26752
26753        customizer = (assigner.length > 3 && typeof customizer == 'function')
26754          ? (length--, customizer)
26755          : undefined;
26756
26757        if (guard && isIterateeCall(sources[0], sources[1], guard)) {
26758          customizer = length < 3 ? undefined : customizer;
26759          length = 1;
26760        }
26761        object = Object(object);
26762        while (++index < length) {
26763          var source = sources[index];
26764          if (source) {
26765            assigner(object, source, index, customizer);
26766          }
26767        }
26768        return object;
26769      });
26770    }
26771
26772    /**
26773     * Creates a `baseEach` or `baseEachRight` function.
26774     *
26775     * @private
26776     * @param {Function} eachFunc The function to iterate over a collection.
26777     * @param {boolean} [fromRight] Specify iterating from right to left.
26778     * @returns {Function} Returns the new base function.
26779     */
26780    function createBaseEach(eachFunc, fromRight) {
26781      return function(collection, iteratee) {
26782        if (collection == null) {
26783          return collection;
26784        }
26785        if (!isArrayLike(collection)) {
26786          return eachFunc(collection, iteratee);
26787        }
26788        var length = collection.length,
26789            index = fromRight ? length : -1,
26790            iterable = Object(collection);
26791
26792        while ((fromRight ? index-- : ++index < length)) {
26793          if (iteratee(iterable[index], index, iterable) === false) {
26794            break;
26795          }
26796        }
26797        return collection;
26798      };
26799    }
26800
26801    /**
26802     * Creates a base function for methods like `_.forIn` and `_.forOwn`.
26803     *
26804     * @private
26805     * @param {boolean} [fromRight] Specify iterating from right to left.
26806     * @returns {Function} Returns the new base function.
26807     */
26808    function createBaseFor(fromRight) {
26809      return function(object, iteratee, keysFunc) {
26810        var index = -1,
26811            iterable = Object(object),
26812            props = keysFunc(object),
26813            length = props.length;
26814
26815        while (length--) {
26816          var key = props[fromRight ? length : ++index];
26817          if (iteratee(iterable[key], key, iterable) === false) {
26818            break;
26819          }
26820        }
26821        return object;
26822      };
26823    }
26824
26825    /**
26826     * Creates a function that wraps `func` to invoke it with the optional `this`
26827     * binding of `thisArg`.
26828     *
26829     * @private
26830     * @param {Function} func The function to wrap.
26831     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
26832     * @param {*} [thisArg] The `this` binding of `func`.
26833     * @returns {Function} Returns the new wrapped function.
26834     */
26835    function createBind(func, bitmask, thisArg) {
26836      var isBind = bitmask & WRAP_BIND_FLAG,
26837          Ctor = createCtor(func);
26838
26839      function wrapper() {
26840        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
26841        return fn.apply(isBind ? thisArg : this, arguments);
26842      }
26843      return wrapper;
26844    }
26845
26846    /**
26847     * Creates a function like `_.lowerFirst`.
26848     *
26849     * @private
26850     * @param {string} methodName The name of the `String` case method to use.
26851     * @returns {Function} Returns the new case function.
26852     */
26853    function createCaseFirst(methodName) {
26854      return function(string) {
26855        string = toString(string);
26856
26857        var strSymbols = hasUnicode(string)
26858          ? stringToArray(string)
26859          : undefined;
26860
26861        var chr = strSymbols
26862          ? strSymbols[0]
26863          : string.charAt(0);
26864
26865        var trailing = strSymbols
26866          ? castSlice(strSymbols, 1).join('')
26867          : string.slice(1);
26868
26869        return chr[methodName]() + trailing;
26870      };
26871    }
26872
26873    /**
26874     * Creates a function like `_.camelCase`.
26875     *
26876     * @private
26877     * @param {Function} callback The function to combine each word.
26878     * @returns {Function} Returns the new compounder function.
26879     */
26880    function createCompounder(callback) {
26881      return function(string) {
26882        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
26883      };
26884    }
26885
26886    /**
26887     * Creates a function that produces an instance of `Ctor` regardless of
26888     * whether it was invoked as part of a `new` expression or by `call` or `apply`.
26889     *
26890     * @private
26891     * @param {Function} Ctor The constructor to wrap.
26892     * @returns {Function} Returns the new wrapped function.
26893     */
26894    function createCtor(Ctor) {
26895      return function() {
26896        // Use a `switch` statement to work with class constructors. See
26897        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
26898        // for more details.
26899        var args = arguments;
26900        switch (args.length) {
26901          case 0: return new Ctor;
26902          case 1: return new Ctor(args[0]);
26903          case 2: return new Ctor(args[0], args[1]);
26904          case 3: return new Ctor(args[0], args[1], args[2]);
26905          case 4: return new Ctor(args[0], args[1], args[2], args[3]);
26906          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
26907          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
26908          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
26909        }
26910        var thisBinding = baseCreate(Ctor.prototype),
26911            result = Ctor.apply(thisBinding, args);
26912
26913        // Mimic the constructor's `return` behavior.
26914        // See https://es5.github.io/#x13.2.2 for more details.
26915        return isObject(result) ? result : thisBinding;
26916      };
26917    }
26918
26919    /**
26920     * Creates a function that wraps `func` to enable currying.
26921     *
26922     * @private
26923     * @param {Function} func The function to wrap.
26924     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
26925     * @param {number} arity The arity of `func`.
26926     * @returns {Function} Returns the new wrapped function.
26927     */
26928    function createCurry(func, bitmask, arity) {
26929      var Ctor = createCtor(func);
26930
26931      function wrapper() {
26932        var length = arguments.length,
26933            args = Array(length),
26934            index = length,
26935            placeholder = getHolder(wrapper);
26936
26937        while (index--) {
26938          args[index] = arguments[index];
26939        }
26940        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
26941          ? []
26942          : replaceHolders(args, placeholder);
26943
26944        length -= holders.length;
26945        if (length < arity) {
26946          return createRecurry(
26947            func, bitmask, createHybrid, wrapper.placeholder, undefined,
26948            args, holders, undefined, undefined, arity - length);
26949        }
26950        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
26951        return apply(fn, this, args);
26952      }
26953      return wrapper;
26954    }
26955
26956    /**
26957     * Creates a `_.find` or `_.findLast` function.
26958     *
26959     * @private
26960     * @param {Function} findIndexFunc The function to find the collection index.
26961     * @returns {Function} Returns the new find function.
26962     */
26963    function createFind(findIndexFunc) {
26964      return function(collection, predicate, fromIndex) {
26965        var iterable = Object(collection);
26966        if (!isArrayLike(collection)) {
26967          var iteratee = getIteratee(predicate, 3);
26968          collection = keys(collection);
26969          predicate = function(key) { return iteratee(iterable[key], key, iterable); };
26970        }
26971        var index = findIndexFunc(collection, predicate, fromIndex);
26972        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
26973      };
26974    }
26975
26976    /**
26977     * Creates a `_.flow` or `_.flowRight` function.
26978     *
26979     * @private
26980     * @param {boolean} [fromRight] Specify iterating from right to left.
26981     * @returns {Function} Returns the new flow function.
26982     */
26983    function createFlow(fromRight) {
26984      return flatRest(function(funcs) {
26985        var length = funcs.length,
26986            index = length,
26987            prereq = LodashWrapper.prototype.thru;
26988
26989        if (fromRight) {
26990          funcs.reverse();
26991        }
26992        while (index--) {
26993          var func = funcs[index];
26994          if (typeof func != 'function') {
26995            throw new TypeError(FUNC_ERROR_TEXT);
26996          }
26997          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
26998            var wrapper = new LodashWrapper([], true);
26999          }
27000        }
27001        index = wrapper ? index : length;
27002        while (++index < length) {
27003          func = funcs[index];
27004
27005          var funcName = getFuncName(func),
27006              data = funcName == 'wrapper' ? getData(func) : undefined;
27007
27008          if (data && isLaziable(data[0]) &&
27009                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
27010                !data[4].length && data[9] == 1
27011              ) {
27012            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
27013          } else {
27014            wrapper = (func.length == 1 && isLaziable(func))
27015              ? wrapper[funcName]()
27016              : wrapper.thru(func);
27017          }
27018        }
27019        return function() {
27020          var args = arguments,
27021              value = args[0];
27022
27023          if (wrapper && args.length == 1 && isArray(value)) {
27024            return wrapper.plant(value).value();
27025          }
27026          var index = 0,
27027              result = length ? funcs[index].apply(this, args) : value;
27028
27029          while (++index < length) {
27030            result = funcs[index].call(this, result);
27031          }
27032          return result;
27033        };
27034      });
27035    }
27036
27037    /**
27038     * Creates a function that wraps `func` to invoke it with optional `this`
27039     * binding of `thisArg`, partial application, and currying.
27040     *
27041     * @private
27042     * @param {Function|string} func The function or method name to wrap.
27043     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
27044     * @param {*} [thisArg] The `this` binding of `func`.
27045     * @param {Array} [partials] The arguments to prepend to those provided to
27046     *  the new function.
27047     * @param {Array} [holders] The `partials` placeholder indexes.
27048     * @param {Array} [partialsRight] The arguments to append to those provided
27049     *  to the new function.
27050     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
27051     * @param {Array} [argPos] The argument positions of the new function.
27052     * @param {number} [ary] The arity cap of `func`.
27053     * @param {number} [arity] The arity of `func`.
27054     * @returns {Function} Returns the new wrapped function.
27055     */
27056    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
27057      var isAry = bitmask & WRAP_ARY_FLAG,
27058          isBind = bitmask & WRAP_BIND_FLAG,
27059          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
27060          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
27061          isFlip = bitmask & WRAP_FLIP_FLAG,
27062          Ctor = isBindKey ? undefined : createCtor(func);
27063
27064      function wrapper() {
27065        var length = arguments.length,
27066            args = Array(length),
27067            index = length;
27068
27069        while (index--) {
27070          args[index] = arguments[index];
27071        }
27072        if (isCurried) {
27073          var placeholder = getHolder(wrapper),
27074              holdersCount = countHolders(args, placeholder);
27075        }
27076        if (partials) {
27077          args = composeArgs(args, partials, holders, isCurried);
27078        }
27079        if (partialsRight) {
27080          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
27081        }
27082        length -= holdersCount;
27083        if (isCurried && length < arity) {
27084          var newHolders = replaceHolders(args, placeholder);
27085          return createRecurry(
27086            func, bitmask, createHybrid, wrapper.placeholder, thisArg,
27087            args, newHolders, argPos, ary, arity - length
27088          );
27089        }
27090        var thisBinding = isBind ? thisArg : this,
27091            fn = isBindKey ? thisBinding[func] : func;
27092
27093        length = args.length;
27094        if (argPos) {
27095          args = reorder(args, argPos);
27096        } else if (isFlip && length > 1) {
27097          args.reverse();
27098        }
27099        if (isAry && ary < length) {
27100          args.length = ary;
27101        }
27102        if (this && this !== root && this instanceof wrapper) {
27103          fn = Ctor || createCtor(fn);
27104        }
27105        return fn.apply(thisBinding, args);
27106      }
27107      return wrapper;
27108    }
27109
27110    /**
27111     * Creates a function like `_.invertBy`.
27112     *
27113     * @private
27114     * @param {Function} setter The function to set accumulator values.
27115     * @param {Function} toIteratee The function to resolve iteratees.
27116     * @returns {Function} Returns the new inverter function.
27117     */
27118    function createInverter(setter, toIteratee) {
27119      return function(object, iteratee) {
27120        return baseInverter(object, setter, toIteratee(iteratee), {});
27121      };
27122    }
27123
27124    /**
27125     * Creates a function that performs a mathematical operation on two values.
27126     *
27127     * @private
27128     * @param {Function} operator The function to perform the operation.
27129     * @param {number} [defaultValue] The value used for `undefined` arguments.
27130     * @returns {Function} Returns the new mathematical operation function.
27131     */
27132    function createMathOperation(operator, defaultValue) {
27133      return function(value, other) {
27134        var result;
27135        if (value === undefined && other === undefined) {
27136          return defaultValue;
27137        }
27138        if (value !== undefined) {
27139          result = value;
27140        }
27141        if (other !== undefined) {
27142          if (result === undefined) {
27143            return other;
27144          }
27145          if (typeof value == 'string' || typeof other == 'string') {
27146            value = baseToString(value);
27147            other = baseToString(other);
27148          } else {
27149            value = baseToNumber(value);
27150            other = baseToNumber(other);
27151          }
27152          result = operator(value, other);
27153        }
27154        return result;
27155      };
27156    }
27157
27158    /**
27159     * Creates a function like `_.over`.
27160     *
27161     * @private
27162     * @param {Function} arrayFunc The function to iterate over iteratees.
27163     * @returns {Function} Returns the new over function.
27164     */
27165    function createOver(arrayFunc) {
27166      return flatRest(function(iteratees) {
27167        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
27168        return baseRest(function(args) {
27169          var thisArg = this;
27170          return arrayFunc(iteratees, function(iteratee) {
27171            return apply(iteratee, thisArg, args);
27172          });
27173        });
27174      });
27175    }
27176
27177    /**
27178     * Creates the padding for `string` based on `length`. The `chars` string
27179     * is truncated if the number of characters exceeds `length`.
27180     *
27181     * @private
27182     * @param {number} length The padding length.
27183     * @param {string} [chars=' '] The string used as padding.
27184     * @returns {string} Returns the padding for `string`.
27185     */
27186    function createPadding(length, chars) {
27187      chars = chars === undefined ? ' ' : baseToString(chars);
27188
27189      var charsLength = chars.length;
27190      if (charsLength < 2) {
27191        return charsLength ? baseRepeat(chars, length) : chars;
27192      }
27193      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
27194      return hasUnicode(chars)
27195        ? castSlice(stringToArray(result), 0, length).join('')
27196        : result.slice(0, length);
27197    }
27198
27199    /**
27200     * Creates a function that wraps `func` to invoke it with the `this` binding
27201     * of `thisArg` and `partials` prepended to the arguments it receives.
27202     *
27203     * @private
27204     * @param {Function} func The function to wrap.
27205     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
27206     * @param {*} thisArg The `this` binding of `func`.
27207     * @param {Array} partials The arguments to prepend to those provided to
27208     *  the new function.
27209     * @returns {Function} Returns the new wrapped function.
27210     */
27211    function createPartial(func, bitmask, thisArg, partials) {
27212      var isBind = bitmask & WRAP_BIND_FLAG,
27213          Ctor = createCtor(func);
27214
27215      function wrapper() {
27216        var argsIndex = -1,
27217            argsLength = arguments.length,
27218            leftIndex = -1,
27219            leftLength = partials.length,
27220            args = Array(leftLength + argsLength),
27221            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
27222
27223        while (++leftIndex < leftLength) {
27224          args[leftIndex] = partials[leftIndex];
27225        }
27226        while (argsLength--) {
27227          args[leftIndex++] = arguments[++argsIndex];
27228        }
27229        return apply(fn, isBind ? thisArg : this, args);
27230      }
27231      return wrapper;
27232    }
27233
27234    /**
27235     * Creates a `_.range` or `_.rangeRight` function.
27236     *
27237     * @private
27238     * @param {boolean} [fromRight] Specify iterating from right to left.
27239     * @returns {Function} Returns the new range function.
27240     */
27241    function createRange(fromRight) {
27242      return function(start, end, step) {
27243        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
27244          end = step = undefined;
27245        }
27246        // Ensure the sign of `-0` is preserved.
27247        start = toFinite(start);
27248        if (end === undefined) {
27249          end = start;
27250          start = 0;
27251        } else {
27252          end = toFinite(end);
27253        }
27254        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
27255        return baseRange(start, end, step, fromRight);
27256      };
27257    }
27258
27259    /**
27260     * Creates a function that performs a relational operation on two values.
27261     *
27262     * @private
27263     * @param {Function} operator The function to perform the operation.
27264     * @returns {Function} Returns the new relational operation function.
27265     */
27266    function createRelationalOperation(operator) {
27267      return function(value, other) {
27268        if (!(typeof value == 'string' && typeof other == 'string')) {
27269          value = toNumber(value);
27270          other = toNumber(other);
27271        }
27272        return operator(value, other);
27273      };
27274    }
27275
27276    /**
27277     * Creates a function that wraps `func` to continue currying.
27278     *
27279     * @private
27280     * @param {Function} func The function to wrap.
27281     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
27282     * @param {Function} wrapFunc The function to create the `func` wrapper.
27283     * @param {*} placeholder The placeholder value.
27284     * @param {*} [thisArg] The `this` binding of `func`.
27285     * @param {Array} [partials] The arguments to prepend to those provided to
27286     *  the new function.
27287     * @param {Array} [holders] The `partials` placeholder indexes.
27288     * @param {Array} [argPos] The argument positions of the new function.
27289     * @param {number} [ary] The arity cap of `func`.
27290     * @param {number} [arity] The arity of `func`.
27291     * @returns {Function} Returns the new wrapped function.
27292     */
27293    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
27294      var isCurry = bitmask & WRAP_CURRY_FLAG,
27295          newHolders = isCurry ? holders : undefined,
27296          newHoldersRight = isCurry ? undefined : holders,
27297          newPartials = isCurry ? partials : undefined,
27298          newPartialsRight = isCurry ? undefined : partials;
27299
27300      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
27301      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
27302
27303      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
27304        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
27305      }
27306      var newData = [
27307        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
27308        newHoldersRight, argPos, ary, arity
27309      ];
27310
27311      var result = wrapFunc.apply(undefined, newData);
27312      if (isLaziable(func)) {
27313        setData(result, newData);
27314      }
27315      result.placeholder = placeholder;
27316      return setWrapToString(result, func, bitmask);
27317    }
27318
27319    /**
27320     * Creates a function like `_.round`.
27321     *
27322     * @private
27323     * @param {string} methodName The name of the `Math` method to use when rounding.
27324     * @returns {Function} Returns the new round function.
27325     */
27326    function createRound(methodName) {
27327      var func = Math[methodName];
27328      return function(number, precision) {
27329        number = toNumber(number);
27330        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
27331        if (precision && nativeIsFinite(number)) {
27332          // Shift with exponential notation to avoid floating-point issues.
27333          // See [MDN](https://mdn.io/round#Examples) for more details.
27334          var pair = (toString(number) + 'e').split('e'),
27335              value = func(pair[0] + 'e' + (+pair[1] + precision));
27336
27337          pair = (toString(value) + 'e').split('e');
27338          return +(pair[0] + 'e' + (+pair[1] - precision));
27339        }
27340        return func(number);
27341      };
27342    }
27343
27344    /**
27345     * Creates a set object of `values`.
27346     *
27347     * @private
27348     * @param {Array} values The values to add to the set.
27349     * @returns {Object} Returns the new set.
27350     */
27351    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
27352      return new Set(values);
27353    };
27354
27355    /**
27356     * Creates a `_.toPairs` or `_.toPairsIn` function.
27357     *
27358     * @private
27359     * @param {Function} keysFunc The function to get the keys of a given object.
27360     * @returns {Function} Returns the new pairs function.
27361     */
27362    function createToPairs(keysFunc) {
27363      return function(object) {
27364        var tag = getTag(object);
27365        if (tag == mapTag) {
27366          return mapToArray(object);
27367        }
27368        if (tag == setTag) {
27369          return setToPairs(object);
27370        }
27371        return baseToPairs(object, keysFunc(object));
27372      };
27373    }
27374
27375    /**
27376     * Creates a function that either curries or invokes `func` with optional
27377     * `this` binding and partially applied arguments.
27378     *
27379     * @private
27380     * @param {Function|string} func The function or method name to wrap.
27381     * @param {number} bitmask The bitmask flags.
27382     *    1 - `_.bind`
27383     *    2 - `_.bindKey`
27384     *    4 - `_.curry` or `_.curryRight` of a bound function
27385     *    8 - `_.curry`
27386     *   16 - `_.curryRight`
27387     *   32 - `_.partial`
27388     *   64 - `_.partialRight`
27389     *  128 - `_.rearg`
27390     *  256 - `_.ary`
27391     *  512 - `_.flip`
27392     * @param {*} [thisArg] The `this` binding of `func`.
27393     * @param {Array} [partials] The arguments to be partially applied.
27394     * @param {Array} [holders] The `partials` placeholder indexes.
27395     * @param {Array} [argPos] The argument positions of the new function.
27396     * @param {number} [ary] The arity cap of `func`.
27397     * @param {number} [arity] The arity of `func`.
27398     * @returns {Function} Returns the new wrapped function.
27399     */
27400    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
27401      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
27402      if (!isBindKey && typeof func != 'function') {
27403        throw new TypeError(FUNC_ERROR_TEXT);
27404      }
27405      var length = partials ? partials.length : 0;
27406      if (!length) {
27407        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
27408        partials = holders = undefined;
27409      }
27410      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
27411      arity = arity === undefined ? arity : toInteger(arity);
27412      length -= holders ? holders.length : 0;
27413
27414      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
27415        var partialsRight = partials,
27416            holdersRight = holders;
27417
27418        partials = holders = undefined;
27419      }
27420      var data = isBindKey ? undefined : getData(func);
27421
27422      var newData = [
27423        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
27424        argPos, ary, arity
27425      ];
27426
27427      if (data) {
27428        mergeData(newData, data);
27429      }
27430      func = newData[0];
27431      bitmask = newData[1];
27432      thisArg = newData[2];
27433      partials = newData[3];
27434      holders = newData[4];
27435      arity = newData[9] = newData[9] === undefined
27436        ? (isBindKey ? 0 : func.length)
27437        : nativeMax(newData[9] - length, 0);
27438
27439      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
27440        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
27441      }
27442      if (!bitmask || bitmask == WRAP_BIND_FLAG) {
27443        var result = createBind(func, bitmask, thisArg);
27444      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
27445        result = createCurry(func, bitmask, arity);
27446      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
27447        result = createPartial(func, bitmask, thisArg, partials);
27448      } else {
27449        result = createHybrid.apply(undefined, newData);
27450      }
27451      var setter = data ? baseSetData : setData;
27452      return setWrapToString(setter(result, newData), func, bitmask);
27453    }
27454
27455    /**
27456     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
27457     * of source objects to the destination object for all destination properties
27458     * that resolve to `undefined`.
27459     *
27460     * @private
27461     * @param {*} objValue The destination value.
27462     * @param {*} srcValue The source value.
27463     * @param {string} key The key of the property to assign.
27464     * @param {Object} object The parent object of `objValue`.
27465     * @returns {*} Returns the value to assign.
27466     */
27467    function customDefaultsAssignIn(objValue, srcValue, key, object) {
27468      if (objValue === undefined ||
27469          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
27470        return srcValue;
27471      }
27472      return objValue;
27473    }
27474
27475    /**
27476     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
27477     * objects into destination objects that are passed thru.
27478     *
27479     * @private
27480     * @param {*} objValue The destination value.
27481     * @param {*} srcValue The source value.
27482     * @param {string} key The key of the property to merge.
27483     * @param {Object} object The parent object of `objValue`.
27484     * @param {Object} source The parent object of `srcValue`.
27485     * @param {Object} [stack] Tracks traversed source values and their merged
27486     *  counterparts.
27487     * @returns {*} Returns the value to assign.
27488     */
27489    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
27490      if (isObject(objValue) && isObject(srcValue)) {
27491        // Recursively merge objects and arrays (susceptible to call stack limits).
27492        stack.set(srcValue, objValue);
27493        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
27494        stack['delete'](srcValue);
27495      }
27496      return objValue;
27497    }
27498
27499    /**
27500     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
27501     * objects.
27502     *
27503     * @private
27504     * @param {*} value The value to inspect.
27505     * @param {string} key The key of the property to inspect.
27506     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
27507     */
27508    function customOmitClone(value) {
27509      return isPlainObject(value) ? undefined : value;
27510    }
27511
27512    /**
27513     * A specialized version of `baseIsEqualDeep` for arrays with support for
27514     * partial deep comparisons.
27515     *
27516     * @private
27517     * @param {Array} array The array to compare.
27518     * @param {Array} other The other array to compare.
27519     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
27520     * @param {Function} customizer The function to customize comparisons.
27521     * @param {Function} equalFunc The function to determine equivalents of values.
27522     * @param {Object} stack Tracks traversed `array` and `other` objects.
27523     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
27524     */
27525    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
27526      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
27527          arrLength = array.length,
27528          othLength = other.length;
27529
27530      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
27531        return false;
27532      }
27533      // Check that cyclic values are equal.
27534      var arrStacked = stack.get(array);
27535      var othStacked = stack.get(other);
27536      if (arrStacked && othStacked) {
27537        return arrStacked == other && othStacked == array;
27538      }
27539      var index = -1,
27540          result = true,
27541          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
27542
27543      stack.set(array, other);
27544      stack.set(other, array);
27545
27546      // Ignore non-index properties.
27547      while (++index < arrLength) {
27548        var arrValue = array[index],
27549            othValue = other[index];
27550
27551        if (customizer) {
27552          var compared = isPartial
27553            ? customizer(othValue, arrValue, index, other, array, stack)
27554            : customizer(arrValue, othValue, index, array, other, stack);
27555        }
27556        if (compared !== undefined) {
27557          if (compared) {
27558            continue;
27559          }
27560          result = false;
27561          break;
27562        }
27563        // Recursively compare arrays (susceptible to call stack limits).
27564        if (seen) {
27565          if (!arraySome(other, function(othValue, othIndex) {
27566                if (!cacheHas(seen, othIndex) &&
27567                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
27568                  return seen.push(othIndex);
27569                }
27570              })) {
27571            result = false;
vendor: 4,179 bytes, lines 27572-27683
27572            break;
27573          }
27574        } else if (!(
27575              arrValue === othValue ||
27576                equalFunc(arrValue, othValue, bitmask, customizer, stack)
27577            )) {
27578          result = false;
27579          break;
27580        }
27581      }
27582      stack['delete'](array);
27583      stack['delete'](other);
27584      return result;
27585    }
27586
27587    /**
27588     * A specialized version of `baseIsEqualDeep` for comparing objects of
27589     * the same `toStringTag`.
27590     *
27591     * **Note:** This function only supports comparing values with tags of
27592     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
27593     *
27594     * @private
27595     * @param {Object} object The object to compare.
27596     * @param {Object} other The other object to compare.
27597     * @param {string} tag The `toStringTag` of the objects to compare.
27598     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
27599     * @param {Function} customizer The function to customize comparisons.
27600     * @param {Function} equalFunc The function to determine equivalents of values.
27601     * @param {Object} stack Tracks traversed `object` and `other` objects.
27602     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
27603     */
27604    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
27605      switch (tag) {
27606        case dataViewTag:
27607          if ((object.byteLength != other.byteLength) ||
27608              (object.byteOffset != other.byteOffset)) {
27609            return false;
27610          }
27611          object = object.buffer;
27612          other = other.buffer;
27613
27614        case arrayBufferTag:
27615          if ((object.byteLength != other.byteLength) ||
27616              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
27617            return false;
27618          }
27619          return true;
27620
27621        case boolTag:
27622        case dateTag:
27623        case numberTag:
27624          // Coerce booleans to `1` or `0` and dates to milliseconds.
27625          // Invalid dates are coerced to `NaN`.
27626          return eq(+object, +other);
27627
27628        case errorTag:
27629          return object.name == other.name && object.message == other.message;
27630
27631        case regexpTag:
27632        case stringTag:
27633          // Coerce regexes to strings and treat strings, primitives and objects,
27634          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
27635          // for more details.
27636          return object == (other + '');
27637
27638        case mapTag:
27639          var convert = mapToArray;
27640
27641        case setTag:
27642          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
27643          convert || (convert = setToArray);
27644
27645          if (object.size != other.size && !isPartial) {
27646            return false;
27647          }
27648          // Assume cyclic values are equal.
27649          var stacked = stack.get(object);
27650          if (stacked) {
27651            return stacked == other;
27652          }
27653          bitmask |= COMPARE_UNORDERED_FLAG;
27654
27655          // Recursively compare objects (susceptible to call stack limits).
27656          stack.set(object, other);
27657          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
27658          stack['delete'](object);
27659          return result;
27660
27661        case symbolTag:
27662          if (symbolValueOf) {
27663            return symbolValueOf.call(object) == symbolValueOf.call(other);
27664          }
27665      }
27666      return false;
27667    }
27668
27669    /**
27670     * A specialized version of `baseIsEqualDeep` for objects with support for
27671     * partial deep comparisons.
27672     *
27673     * @private
27674     * @param {Object} object The object to compare.
27675     * @param {Object} other The other object to compare.
27676     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
27677     * @param {Function} customizer The function to customize comparisons.
27678     * @param {Function} equalFunc The function to determine equivalents of values.
27679     * @param {Object} stack Tracks traversed `object` and `other` objects.
27680     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
27681     */
27682    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
27683      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
vendor: 9,614 bytes, lines 27684-27991
27684          objProps = getAllKeys(object),
27685          objLength = objProps.length,
27686          othProps = getAllKeys(other),
27687          othLength = othProps.length;
27688
27689      if (objLength != othLength && !isPartial) {
27690        return false;
27691      }
27692      var index = objLength;
27693      while (index--) {
27694        var key = objProps[index];
27695        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
27696          return false;
27697        }
27698      }
27699      // Check that cyclic values are equal.
27700      var objStacked = stack.get(object);
27701      var othStacked = stack.get(other);
27702      if (objStacked && othStacked) {
27703        return objStacked == other && othStacked == object;
27704      }
27705      var result = true;
27706      stack.set(object, other);
27707      stack.set(other, object);
27708
27709      var skipCtor = isPartial;
27710      while (++index < objLength) {
27711        key = objProps[index];
27712        var objValue = object[key],
27713            othValue = other[key];
27714
27715        if (customizer) {
27716          var compared = isPartial
27717            ? customizer(othValue, objValue, key, other, object, stack)
27718            : customizer(objValue, othValue, key, object, other, stack);
27719        }
27720        // Recursively compare objects (susceptible to call stack limits).
27721        if (!(compared === undefined
27722              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
27723              : compared
27724            )) {
27725          result = false;
27726          break;
27727        }
27728        skipCtor || (skipCtor = key == 'constructor');
27729      }
27730      if (result && !skipCtor) {
27731        var objCtor = object.constructor,
27732            othCtor = other.constructor;
27733
27734        // Non `Object` object instances with different constructors are not equal.
27735        if (objCtor != othCtor &&
27736            ('constructor' in object && 'constructor' in other) &&
27737            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
27738              typeof othCtor == 'function' && othCtor instanceof othCtor)) {
27739          result = false;
27740        }
27741      }
27742      stack['delete'](object);
27743      stack['delete'](other);
27744      return result;
27745    }
27746
27747    /**
27748     * A specialized version of `baseRest` which flattens the rest array.
27749     *
27750     * @private
27751     * @param {Function} func The function to apply a rest parameter to.
27752     * @returns {Function} Returns the new function.
27753     */
27754    function flatRest(func) {
27755      return setToString(overRest(func, undefined, flatten), func + '');
27756    }
27757
27758    /**
27759     * Creates an array of own enumerable property names and symbols of `object`.
27760     *
27761     * @private
27762     * @param {Object} object The object to query.
27763     * @returns {Array} Returns the array of property names and symbols.
27764     */
27765    function getAllKeys(object) {
27766      return baseGetAllKeys(object, keys, getSymbols);
27767    }
27768
27769    /**
27770     * Creates an array of own and inherited enumerable property names and
27771     * symbols of `object`.
27772     *
27773     * @private
27774     * @param {Object} object The object to query.
27775     * @returns {Array} Returns the array of property names and symbols.
27776     */
27777    function getAllKeysIn(object) {
27778      return baseGetAllKeys(object, keysIn, getSymbolsIn);
27779    }
27780
27781    /**
27782     * Gets metadata for `func`.
27783     *
27784     * @private
27785     * @param {Function} func The function to query.
27786     * @returns {*} Returns the metadata for `func`.
27787     */
27788    var getData = !metaMap ? noop : function(func) {
27789      return metaMap.get(func);
27790    };
27791
27792    /**
27793     * Gets the name of `func`.
27794     *
27795     * @private
27796     * @param {Function} func The function to query.
27797     * @returns {string} Returns the function name.
27798     */
27799    function getFuncName(func) {
27800      var result = (func.name + ''),
27801          array = realNames[result],
27802          length = hasOwnProperty.call(realNames, result) ? array.length : 0;
27803
27804      while (length--) {
27805        var data = array[length],
27806            otherFunc = data.func;
27807        if (otherFunc == null || otherFunc == func) {
27808          return data.name;
27809        }
27810      }
27811      return result;
27812    }
27813
27814    /**
27815     * Gets the argument placeholder value for `func`.
27816     *
27817     * @private
27818     * @param {Function} func The function to inspect.
27819     * @returns {*} Returns the placeholder value.
27820     */
27821    function getHolder(func) {
27822      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
27823      return object.placeholder;
27824    }
27825
27826    /**
27827     * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
27828     * this function returns the custom method, otherwise it returns `baseIteratee`.
27829     * If arguments are provided, the chosen function is invoked with them and
27830     * its result is returned.
27831     *
27832     * @private
27833     * @param {*} [value] The value to convert to an iteratee.
27834     * @param {number} [arity] The arity of the created iteratee.
27835     * @returns {Function} Returns the chosen function or its result.
27836     */
27837    function getIteratee() {
27838      var result = lodash.iteratee || iteratee;
27839      result = result === iteratee ? baseIteratee : result;
27840      return arguments.length ? result(arguments[0], arguments[1]) : result;
27841    }
27842
27843    /**
27844     * Gets the data for `map`.
27845     *
27846     * @private
27847     * @param {Object} map The map to query.
27848     * @param {string} key The reference key.
27849     * @returns {*} Returns the map data.
27850     */
27851    function getMapData(map, key) {
27852      var data = map.__data__;
27853      return isKeyable(key)
27854        ? data[typeof key == 'string' ? 'string' : 'hash']
27855        : data.map;
27856    }
27857
27858    /**
27859     * Gets the property names, values, and compare flags of `object`.
27860     *
27861     * @private
27862     * @param {Object} object The object to query.
27863     * @returns {Array} Returns the match data of `object`.
27864     */
27865    function getMatchData(object) {
27866      var result = keys(object),
27867          length = result.length;
27868
27869      while (length--) {
27870        var key = result[length],
27871            value = object[key];
27872
27873        result[length] = [key, value, isStrictComparable(value)];
27874      }
27875      return result;
27876    }
27877
27878    /**
27879     * Gets the native function at `key` of `object`.
27880     *
27881     * @private
27882     * @param {Object} object The object to query.
27883     * @param {string} key The key of the method to get.
27884     * @returns {*} Returns the function if it's native, else `undefined`.
27885     */
27886    function getNative(object, key) {
27887      var value = getValue(object, key);
27888      return baseIsNative(value) ? value : undefined;
27889    }
27890
27891    /**
27892     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
27893     *
27894     * @private
27895     * @param {*} value The value to query.
27896     * @returns {string} Returns the raw `toStringTag`.
27897     */
27898    function getRawTag(value) {
27899      var isOwn = hasOwnProperty.call(value, symToStringTag),
27900          tag = value[symToStringTag];
27901
27902      try {
27903        value[symToStringTag] = undefined;
27904        var unmasked = true;
27905      } catch (e) {}
27906
27907      var result = nativeObjectToString.call(value);
27908      if (unmasked) {
27909        if (isOwn) {
27910          value[symToStringTag] = tag;
27911        } else {
27912          delete value[symToStringTag];
27913        }
27914      }
27915      return result;
27916    }
27917
27918    /**
27919     * Creates an array of the own enumerable symbols of `object`.
27920     *
27921     * @private
27922     * @param {Object} object The object to query.
27923     * @returns {Array} Returns the array of symbols.
27924     */
27925    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
27926      if (object == null) {
27927        return [];
27928      }
27929      object = Object(object);
27930      return arrayFilter(nativeGetSymbols(object), function(symbol) {
27931        return propertyIsEnumerable.call(object, symbol);
27932      });
27933    };
27934
27935    /**
27936     * Creates an array of the own and inherited enumerable symbols of `object`.
27937     *
27938     * @private
27939     * @param {Object} object The object to query.
27940     * @returns {Array} Returns the array of symbols.
27941     */
27942    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
27943      var result = [];
27944      while (object) {
27945        arrayPush(result, getSymbols(object));
27946        object = getPrototype(object);
27947      }
27948      return result;
27949    };
27950
27951    /**
27952     * Gets the `toStringTag` of `value`.
27953     *
27954     * @private
27955     * @param {*} value The value to query.
27956     * @returns {string} Returns the `toStringTag`.
27957     */
27958    var getTag = baseGetTag;
27959
27960    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
27961    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
27962        (Map && getTag(new Map) != mapTag) ||
27963        (Promise && getTag(Promise.resolve()) != promiseTag) ||
27964        (Set && getTag(new Set) != setTag) ||
27965        (WeakMap && getTag(new WeakMap) != weakMapTag)) {
27966      getTag = function(value) {
27967        var result = baseGetTag(value),
27968            Ctor = result == objectTag ? value.constructor : undefined,
27969            ctorString = Ctor ? toSource(Ctor) : '';
27970
27971        if (ctorString) {
27972          switch (ctorString) {
27973            case dataViewCtorString: return dataViewTag;
27974            case mapCtorString: return mapTag;
27975            case promiseCtorString: return promiseTag;
27976            case setCtorString: return setTag;
27977            case weakMapCtorString: return weakMapTag;
27978          }
27979        }
27980        return result;
27981      };
27982    }
27983
27984    /**
27985     * Gets the view, applying any `transforms` to the `start` and `end` positions.
27986     *
27987     * @private
27988     * @param {number} start The start of the view.
27989     * @param {number} end The end of the view.
27990     * @param {Array} transforms The transformations to apply to the view.
27991     * @returns {Object}
vendor: 6,432 bytes, lines 27991-28196
27991 Returns an object containing the `start` and `end`
27992     *  positions of the view.
27993     */
27994    function getView(start, end, transforms) {
27995      var index = -1,
27996          length = transforms.length;
27997
27998      while (++index < length) {
27999        var data = transforms[index],
28000            size = data.size;
28001
28002        switch (data.type) {
28003          case 'drop':      start += size; break;
28004          case 'dropRight': end -= size; break;
28005          case 'take':      end = nativeMin(end, start + size); break;
28006          case 'takeRight': start = nativeMax(start, end - size); break;
28007        }
28008      }
28009      return { 'start': start, 'end': end };
28010    }
28011
28012    /**
28013     * Extracts wrapper details from the `source` body comment.
28014     *
28015     * @private
28016     * @param {string} source The source to inspect.
28017     * @returns {Array} Returns the wrapper details.
28018     */
28019    function getWrapDetails(source) {
28020      var match = source.match(reWrapDetails);
28021      return match ? match[1].split(reSplitDetails) : [];
28022    }
28023
28024    /**
28025     * Checks if `path` exists on `object`.
28026     *
28027     * @private
28028     * @param {Object} object The object to query.
28029     * @param {Array|string} path The path to check.
28030     * @param {Function} hasFunc The function to check properties.
28031     * @returns {boolean} Returns `true` if `path` exists, else `false`.
28032     */
28033    function hasPath(object, path, hasFunc) {
28034      path = castPath(path, object);
28035
28036      var index = -1,
28037          length = path.length,
28038          result = false;
28039
28040      while (++index < length) {
28041        var key = toKey(path[index]);
28042        if (!(result = object != null && hasFunc(object, key))) {
28043          break;
28044        }
28045        object = object[key];
28046      }
28047      if (result || ++index != length) {
28048        return result;
28049      }
28050      length = object == null ? 0 : object.length;
28051      return !!length && isLength(length) && isIndex(key, length) &&
28052        (isArray(object) || isArguments(object));
28053    }
28054
28055    /**
28056     * Initializes an array clone.
28057     *
28058     * @private
28059     * @param {Array} array The array to clone.
28060     * @returns {Array} Returns the initialized clone.
28061     */
28062    function initCloneArray(array) {
28063      var length = array.length,
28064          result = new array.constructor(length);
28065
28066      // Add properties assigned by `RegExp#exec`.
28067      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
28068        result.index = array.index;
28069        result.input = array.input;
28070      }
28071      return result;
28072    }
28073
28074    /**
28075     * Initializes an object clone.
28076     *
28077     * @private
28078     * @param {Object} object The object to clone.
28079     * @returns {Object} Returns the initialized clone.
28080     */
28081    function initCloneObject(object) {
28082      return (typeof object.constructor == 'function' && !isPrototype(object))
28083        ? baseCreate(getPrototype(object))
28084        : {};
28085    }
28086
28087    /**
28088     * Initializes an object clone based on its `toStringTag`.
28089     *
28090     * **Note:** This function only supports cloning values with tags of
28091     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
28092     *
28093     * @private
28094     * @param {Object} object The object to clone.
28095     * @param {string} tag The `toStringTag` of the object to clone.
28096     * @param {boolean} [isDeep] Specify a deep clone.
28097     * @returns {Object} Returns the initialized clone.
28098     */
28099    function initCloneByTag(object, tag, isDeep) {
28100      var Ctor = object.constructor;
28101      switch (tag) {
28102        case arrayBufferTag:
28103          return cloneArrayBuffer(object);
28104
28105        case boolTag:
28106        case dateTag:
28107          return new Ctor(+object);
28108
28109        case dataViewTag:
28110          return cloneDataView(object, isDeep);
28111
28112        case float32Tag: case float64Tag:
28113        case int8Tag: case int16Tag: case int32Tag:
28114        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
28115          return cloneTypedArray(object, isDeep);
28116
28117        case mapTag:
28118          return new Ctor;
28119
28120        case numberTag:
28121        case stringTag:
28122          return new Ctor(object);
28123
28124        case regexpTag:
28125          return cloneRegExp(object);
28126
28127        case setTag:
28128          return new Ctor;
28129
28130        case symbolTag:
28131          return cloneSymbol(object);
28132      }
28133    }
28134
28135    /**
28136     * Inserts wrapper `details` in a comment at the top of the `source` body.
28137     *
28138     * @private
28139     * @param {string} source The source to modify.
28140     * @returns {Array} details The details to insert.
28141     * @returns {string} Returns the modified source.
28142     */
28143    function insertWrapDetails(source, details) {
28144      var length = details.length;
28145      if (!length) {
28146        return source;
28147      }
28148      var lastIndex = length - 1;
28149      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
28150      details = details.join(length > 2 ? ', ' : ' ');
28151      return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
28152    }
28153
28154    /**
28155     * Checks if `value` is a flattenable `arguments` object or array.
28156     *
28157     * @private
28158     * @param {*} value The value to check.
28159     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
28160     */
28161    function isFlattenable(value) {
28162      return isArray(value) || isArguments(value) ||
28163        !!(spreadableSymbol && value && value[spreadableSymbol]);
28164    }
28165
28166    /**
28167     * Checks if `value` is a valid array-like index.
28168     *
28169     * @private
28170     * @param {*} value The value to check.
28171     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
28172     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
28173     */
28174    function isIndex(value, length) {
28175      var type = typeof value;
28176      length = length == null ? MAX_SAFE_INTEGER : length;
28177
28178      return !!length &&
28179        (type == 'number' ||
28180          (type != 'symbol' && reIsUint.test(value))) &&
28181            (value > -1 && value % 1 == 0 && value < length);
28182    }
28183
28184    /**
28185     * Checks if the given arguments are from an iteratee call.
28186     *
28187     * @private
28188     * @param {*} value The potential iteratee value argument.
28189     * @param {*} index The potential iteratee index or key argument.
28190     * @param {*} object The potential iteratee object argument.
28191     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
28192     *  else `false`.
28193     */
28194    function isIterateeCall(value, index, object) {
28195      if (!isObject(object)) {
28196        return false;
vendor: 14,387 bytes, lines 28197-28643
28197      }
28198      var type = typeof index;
28199      if (type == 'number'
28200            ? (isArrayLike(object) && isIndex(index, object.length))
28201            : (type == 'string' && index in object)
28202          ) {
28203        return eq(object[index], value);
28204      }
28205      return false;
28206    }
28207
28208    /**
28209     * Checks if `value` is a property name and not a property path.
28210     *
28211     * @private
28212     * @param {*} value The value to check.
28213     * @param {Object} [object] The object to query keys on.
28214     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
28215     */
28216    function isKey(value, object) {
28217      if (isArray(value)) {
28218        return false;
28219      }
28220      var type = typeof value;
28221      if (type == 'number' || type == 'symbol' || type == 'boolean' ||
28222          value == null || isSymbol(value)) {
28223        return true;
28224      }
28225      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
28226        (object != null && value in Object(object));
28227    }
28228
28229    /**
28230     * Checks if `value` is suitable for use as unique object key.
28231     *
28232     * @private
28233     * @param {*} value The value to check.
28234     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
28235     */
28236    function isKeyable(value) {
28237      var type = typeof value;
28238      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
28239        ? (value !== '__proto__')
28240        : (value === null);
28241    }
28242
28243    /**
28244     * Checks if `func` has a lazy counterpart.
28245     *
28246     * @private
28247     * @param {Function} func The function to check.
28248     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
28249     *  else `false`.
28250     */
28251    function isLaziable(func) {
28252      var funcName = getFuncName(func),
28253          other = lodash[funcName];
28254
28255      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
28256        return false;
28257      }
28258      if (func === other) {
28259        return true;
28260      }
28261      var data = getData(other);
28262      return !!data && func === data[0];
28263    }
28264
28265    /**
28266     * Checks if `func` has its source masked.
28267     *
28268     * @private
28269     * @param {Function} func The function to check.
28270     * @returns {boolean} Returns `true` if `func` is masked, else `false`.
28271     */
28272    function isMasked(func) {
28273      return !!maskSrcKey && (maskSrcKey in func);
28274    }
28275
28276    /**
28277     * Checks if `func` is capable of being masked.
28278     *
28279     * @private
28280     * @param {*} value The value to check.
28281     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
28282     */
28283    var isMaskable = coreJsData ? isFunction : stubFalse;
28284
28285    /**
28286     * Checks if `value` is likely a prototype object.
28287     *
28288     * @private
28289     * @param {*} value The value to check.
28290     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
28291     */
28292    function isPrototype(value) {
28293      var Ctor = value && value.constructor,
28294          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
28295
28296      return value === proto;
28297    }
28298
28299    /**
28300     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
28301     *
28302     * @private
28303     * @param {*} value The value to check.
28304     * @returns {boolean} Returns `true` if `value` if suitable for strict
28305     *  equality comparisons, else `false`.
28306     */
28307    function isStrictComparable(value) {
28308      return value === value && !isObject(value);
28309    }
28310
28311    /**
28312     * A specialized version of `matchesProperty` for source values suitable
28313     * for strict equality comparisons, i.e. `===`.
28314     *
28315     * @private
28316     * @param {string} key The key of the property to get.
28317     * @param {*} srcValue The value to match.
28318     * @returns {Function} Returns the new spec function.
28319     */
28320    function matchesStrictComparable(key, srcValue) {
28321      return function(object) {
28322        if (object == null) {
28323          return false;
28324        }
28325        return object[key] === srcValue &&
28326          (srcValue !== undefined || (key in Object(object)));
28327      };
28328    }
28329
28330    /**
28331     * A specialized version of `_.memoize` which clears the memoized function's
28332     * cache when it exceeds `MAX_MEMOIZE_SIZE`.
28333     *
28334     * @private
28335     * @param {Function} func The function to have its output memoized.
28336     * @returns {Function} Returns the new memoized function.
28337     */
28338    function memoizeCapped(func) {
28339      var result = memoize(func, function(key) {
28340        if (cache.size === MAX_MEMOIZE_SIZE) {
28341          cache.clear();
28342        }
28343        return key;
28344      });
28345
28346      var cache = result.cache;
28347      return result;
28348    }
28349
28350    /**
28351     * Merges the function metadata of `source` into `data`.
28352     *
28353     * Merging metadata reduces the number of wrappers used to invoke a function.
28354     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
28355     * may be applied regardless of execution order. Methods like `_.ary` and
28356     * `_.rearg` modify function arguments, making the order in which they are
28357     * executed important, preventing the merging of metadata. However, we make
28358     * an exception for a safe combined case where curried functions have `_.ary`
28359     * and or `_.rearg` applied.
28360     *
28361     * @private
28362     * @param {Array} data The destination metadata.
28363     * @param {Array} source The source metadata.
28364     * @returns {Array} Returns `data`.
28365     */
28366    function mergeData(data, source) {
28367      var bitmask = data[1],
28368          srcBitmask = source[1],
28369          newBitmask = bitmask | srcBitmask,
28370          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
28371
28372      var isCombo =
28373        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
28374        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
28375        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
28376
28377      // Exit early if metadata can't be merged.
28378      if (!(isCommon || isCombo)) {
28379        return data;
28380      }
28381      // Use source `thisArg` if available.
28382      if (srcBitmask & WRAP_BIND_FLAG) {
28383        data[2] = source[2];
28384        // Set when currying a bound function.
28385        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
28386      }
28387      // Compose partial arguments.
28388      var value = source[3];
28389      if (value) {
28390        var partials = data[3];
28391        data[3] = partials ? composeArgs(partials, value, source[4]) : value;
28392        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
28393      }
28394      // Compose partial right arguments.
28395      value = source[5];
28396      if (value) {
28397        partials = data[5];
28398        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
28399        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
28400      }
28401      // Use source `argPos` if available.
28402      value = source[7];
28403      if (value) {
28404        data[7] = value;
28405      }
28406      // Use source `ary` if it's smaller.
28407      if (srcBitmask & WRAP_ARY_FLAG) {
28408        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
28409      }
28410      // Use source `arity` if one is not provided.
28411      if (data[9] == null) {
28412        data[9] = source[9];
28413      }
28414      // Use source `func` and merge bitmasks.
28415      data[0] = source[0];
28416      data[1] = newBitmask;
28417
28418      return data;
28419    }
28420
28421    /**
28422     * This function is like
28423     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
28424     * except that it includes inherited enumerable properties.
28425     *
28426     * @private
28427     * @param {Object} object The object to query.
28428     * @returns {Array} Returns the array of property names.
28429     */
28430    function nativeKeysIn(object) {
28431      var result = [];
28432      if (object != null) {
28433        for (var key in Object(object)) {
28434          result.push(key);
28435        }
28436      }
28437      return result;
28438    }
28439
28440    /**
28441     * Converts `value` to a string using `Object.prototype.toString`.
28442     *
28443     * @private
28444     * @param {*} value The value to convert.
28445     * @returns {string} Returns the converted string.
28446     */
28447    function objectToString(value) {
28448      return nativeObjectToString.call(value);
28449    }
28450
28451    /**
28452     * A specialized version of `baseRest` which transforms the rest array.
28453     *
28454     * @private
28455     * @param {Function} func The function to apply a rest parameter to.
28456     * @param {number} [start=func.length-1] The start position of the rest parameter.
28457     * @param {Function} transform The rest array transform.
28458     * @returns {Function} Returns the new function.
28459     */
28460    function overRest(func, start, transform) {
28461      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
28462      return function() {
28463        var args = arguments,
28464            index = -1,
28465            length = nativeMax(args.length - start, 0),
28466            array = Array(length);
28467
28468        while (++index < length) {
28469          array[index] = args[start + index];
28470        }
28471        index = -1;
28472        var otherArgs = Array(start + 1);
28473        while (++index < start) {
28474          otherArgs[index] = args[index];
28475        }
28476        otherArgs[start] = transform(array);
28477        return apply(func, this, otherArgs);
28478      };
28479    }
28480
28481    /**
28482     * Gets the parent value at `path` of `object`.
28483     *
28484     * @private
28485     * @param {Object} object The object to query.
28486     * @param {Array} path The path to get the parent value of.
28487     * @returns {*} Returns the parent value.
28488     */
28489    function parent(object, path) {
28490      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
28491    }
28492
28493    /**
28494     * Reorder `array` according to the specified indexes where the element at
28495     * the first index is assigned as the first element, the element at
28496     * the second index is assigned as the second element, and so on.
28497     *
28498     * @private
28499     * @param {Array} array The array to reorder.
28500     * @param {Array} indexes The arranged array indexes.
28501     * @returns {Array} Returns `array`.
28502     */
28503    function reorder(array, indexes) {
28504      var arrLength = array.length,
28505          length = nativeMin(indexes.length, arrLength),
28506          oldArray = copyArray(array);
28507
28508      while (length--) {
28509        var index = indexes[length];
28510        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
28511      }
28512      return array;
28513    }
28514
28515    /**
28516     * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
28517     *
28518     * @private
28519     * @param {Object} object The object to query.
28520     * @param {string} key The key of the property to get.
28521     * @returns {*} Returns the property value.
28522     */
28523    function safeGet(object, key) {
28524      if (key === 'constructor' && typeof object[key] === 'function') {
28525        return;
28526      }
28527
28528      if (key == '__proto__') {
28529        return;
28530      }
28531
28532      return object[key];
28533    }
28534
28535    /**
28536     * Sets metadata for `func`.
28537     *
28538     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
28539     * period of time, it will trip its breaker and transition to an identity
28540     * function to avoid garbage collection pauses in V8. See
28541     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
28542     * for more details.
28543     *
28544     * @private
28545     * @param {Function} func The function to associate metadata with.
28546     * @param {*} data The metadata.
28547     * @returns {Function} Returns `func`.
28548     */
28549    var setData = shortOut(baseSetData);
28550
28551    /**
28552     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
28553     *
28554     * @private
28555     * @param {Function} func The function to delay.
28556     * @param {number} wait The number of milliseconds to delay invocation.
28557     * @returns {number|Object} Returns the timer id or timeout object.
28558     */
28559    var setTimeout = ctxSetTimeout || function(func, wait) {
28560      return root.setTimeout(func, wait);
28561    };
28562
28563    /**
28564     * Sets the `toString` method of `func` to return `string`.
28565     *
28566     * @private
28567     * @param {Function} func The function to modify.
28568     * @param {Function} string The `toString` result.
28569     * @returns {Function} Returns `func`.
28570     */
28571    var setToString = shortOut(baseSetToString);
28572
28573    /**
28574     * Sets the `toString` method of `wrapper` to mimic the source of `reference`
28575     * with wrapper details in a comment at the top of the source body.
28576     *
28577     * @private
28578     * @param {Function} wrapper The function to modify.
28579     * @param {Function} reference The reference function.
28580     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
28581     * @returns {Function} Returns `wrapper`.
28582     */
28583    function setWrapToString(wrapper, reference, bitmask) {
28584      var source = (reference + '');
28585      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
28586    }
28587
28588    /**
28589     * Creates a function that'll short out and invoke `identity` instead
28590     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
28591     * milliseconds.
28592     *
28593     * @private
28594     * @param {Function} func The function to restrict.
28595     * @returns {Function} Returns the new shortable function.
28596     */
28597    function shortOut(func) {
28598      var count = 0,
28599          lastCalled = 0;
28600
28601      return function() {
28602        var stamp = nativeNow(),
28603            remaining = HOT_SPAN - (stamp - lastCalled);
28604
28605        lastCalled = stamp;
28606        if (remaining > 0) {
28607          if (++count >= HOT_COUNT) {
28608            return arguments[0];
28609          }
28610        } else {
28611          count = 0;
28612        }
28613        return func.apply(undefined, arguments);
28614      };
28615    }
28616
28617    /**
28618     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
28619     *
28620     * @private
28621     * @param {Array} array The array to shuffle.
28622     * @param {number} [size=array.length] The size of `array`.
28623     * @returns {Array} Returns `array`.
28624     */
28625    function shuffleSelf(array, size) {
28626      var index = -1,
28627          length = array.length,
28628          lastIndex = length - 1;
28629
28630      size = size === undefined ? length : size;
28631      while (++index < size) {
28632        var rand = baseRandom(index, lastIndex),
28633            value = array[rand];
28634
28635        array[rand] = array[index];
28636        array[index] = value;
28637      }
28638      array.length = size;
28639      return array;
28640    }
28641
28642    /**
28643     * Converts `string` to a property path array.
vendor: 1,775 bytes, lines 28644-28704
28644     *
28645     * @private
28646     * @param {string} string The string to convert.
28647     * @returns {Array} Returns the property path array.
28648     */
28649    var stringToPath = memoizeCapped(function(string) {
28650      var result = [];
28651      if (string.charCodeAt(0) === 46 /* . */) {
28652        result.push('');
28653      }
28654      string.replace(rePropName, function(match, number, quote, subString) {
28655        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
28656      });
28657      return result;
28658    });
28659
28660    /**
28661     * Converts `value` to a string key if it's not a string or symbol.
28662     *
28663     * @private
28664     * @param {*} value The value to inspect.
28665     * @returns {string|symbol} Returns the key.
28666     */
28667    function toKey(value) {
28668      if (typeof value == 'string' || isSymbol(value)) {
28669        return value;
28670      }
28671      var result = (value + '');
28672      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
28673    }
28674
28675    /**
28676     * Converts `func` to its source code.
28677     *
28678     * @private
28679     * @param {Function} func The function to convert.
28680     * @returns {string} Returns the source code.
28681     */
28682    function toSource(func) {
28683      if (func != null) {
28684        try {
28685          return funcToString.call(func);
28686        } catch (e) {}
28687        try {
28688          return (func + '');
28689        } catch (e) {}
28690      }
28691      return '';
28692    }
28693
28694    /**
28695     * Updates wrapper `details` based on `bitmask` flags.
28696     *
28697     * @private
28698     * @returns {Array} details The details to modify.
28699     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
28700     * @returns {Array} Returns `details`.
28701     */
28702    function updateWrapDetails(details, bitmask) {
28703      arrayEach(wrapFlags, function(pair) {
28704        var value = '_.' + pair[0];
vendor: 80,381 bytes, lines 28705-31288
28705        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
28706          details.push(value);
28707        }
28708      });
28709      return details.sort();
28710    }
28711
28712    /**
28713     * Creates a clone of `wrapper`.
28714     *
28715     * @private
28716     * @param {Object} wrapper The wrapper to clone.
28717     * @returns {Object} Returns the cloned wrapper.
28718     */
28719    function wrapperClone(wrapper) {
28720      if (wrapper instanceof LazyWrapper) {
28721        return wrapper.clone();
28722      }
28723      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
28724      result.__actions__ = copyArray(wrapper.__actions__);
28725      result.__index__  = wrapper.__index__;
28726      result.__values__ = wrapper.__values__;
28727      return result;
28728    }
28729
28730    /*------------------------------------------------------------------------*/
28731
28732    /**
28733     * Creates an array of elements split into groups the length of `size`.
28734     * If `array` can't be split evenly, the final chunk will be the remaining
28735     * elements.
28736     *
28737     * @static
28738     * @memberOf _
28739     * @since 3.0.0
28740     * @category Array
28741     * @param {Array} array The array to process.
28742     * @param {number} [size=1] The length of each chunk
28743     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
28744     * @returns {Array} Returns the new array of chunks.
28745     * @example
28746     *
28747     * _.chunk(['a', 'b', 'c', 'd'], 2);
28748     * // => [['a', 'b'], ['c', 'd']]
28749     *
28750     * _.chunk(['a', 'b', 'c', 'd'], 3);
28751     * // => [['a', 'b', 'c'], ['d']]
28752     */
28753    function chunk(array, size, guard) {
28754      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
28755        size = 1;
28756      } else {
28757        size = nativeMax(toInteger(size), 0);
28758      }
28759      var length = array == null ? 0 : array.length;
28760      if (!length || size < 1) {
28761        return [];
28762      }
28763      var index = 0,
28764          resIndex = 0,
28765          result = Array(nativeCeil(length / size));
28766
28767      while (index < length) {
28768        result[resIndex++] = baseSlice(array, index, (index += size));
28769      }
28770      return result;
28771    }
28772
28773    /**
28774     * Creates an array with all falsey values removed. The values `false`, `null`,
28775     * `0`, `""`, `undefined`, and `NaN` are falsey.
28776     *
28777     * @static
28778     * @memberOf _
28779     * @since 0.1.0
28780     * @category Array
28781     * @param {Array} array The array to compact.
28782     * @returns {Array} Returns the new array of filtered values.
28783     * @example
28784     *
28785     * _.compact([0, 1, false, 2, '', 3]);
28786     * // => [1, 2, 3]
28787     */
28788    function compact(array) {
28789      var index = -1,
28790          length = array == null ? 0 : array.length,
28791          resIndex = 0,
28792          result = [];
28793
28794      while (++index < length) {
28795        var value = array[index];
28796        if (value) {
28797          result[resIndex++] = value;
28798        }
28799      }
28800      return result;
28801    }
28802
28803    /**
28804     * Creates a new array concatenating `array` with any additional arrays
28805     * and/or values.
28806     *
28807     * @static
28808     * @memberOf _
28809     * @since 4.0.0
28810     * @category Array
28811     * @param {Array} array The array to concatenate.
28812     * @param {...*} [values] The values to concatenate.
28813     * @returns {Array} Returns the new concatenated array.
28814     * @example
28815     *
28816     * var array = [1];
28817     * var other = _.concat(array, 2, [3], [[4]]);
28818     *
28819     * console.log(other);
28820     * // => [1, 2, 3, [4]]
28821     *
28822     * console.log(array);
28823     * // => [1]
28824     */
28825    function concat() {
28826      var length = arguments.length;
28827      if (!length) {
28828        return [];
28829      }
28830      var args = Array(length - 1),
28831          array = arguments[0],
28832          index = length;
28833
28834      while (index--) {
28835        args[index - 1] = arguments[index];
28836      }
28837      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
28838    }
28839
28840    /**
28841     * Creates an array of `array` values not included in the other given arrays
28842     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
28843     * for equality comparisons. The order and references of result values are
28844     * determined by the first array.
28845     *
28846     * **Note:** Unlike `_.pullAll`, this method returns a new array.
28847     *
28848     * @static
28849     * @memberOf _
28850     * @since 0.1.0
28851     * @category Array
28852     * @param {Array} array The array to inspect.
28853     * @param {...Array} [values] The values to exclude.
28854     * @returns {Array} Returns the new array of filtered values.
28855     * @see _.without, _.xor
28856     * @example
28857     *
28858     * _.difference([2, 1], [2, 3]);
28859     * // => [1]
28860     */
28861    var difference = baseRest(function(array, values) {
28862      return isArrayLikeObject(array)
28863        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
28864        : [];
28865    });
28866
28867    /**
28868     * This method is like `_.difference` except that it accepts `iteratee` which
28869     * is invoked for each element of `array` and `values` to generate the criterion
28870     * by which they're compared. The order and references of result values are
28871     * determined by the first array. The iteratee is invoked with one argument:
28872     * (value).
28873     *
28874     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
28875     *
28876     * @static
28877     * @memberOf _
28878     * @since 4.0.0
28879     * @category Array
28880     * @param {Array} array The array to inspect.
28881     * @param {...Array} [values] The values to exclude.
28882     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
28883     * @returns {Array} Returns the new array of filtered values.
28884     * @example
28885     *
28886     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
28887     * // => [1.2]
28888     *
28889     * // The `_.property` iteratee shorthand.
28890     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
28891     * // => [{ 'x': 2 }]
28892     */
28893    var differenceBy = baseRest(function(array, values) {
28894      var iteratee = last(values);
28895      if (isArrayLikeObject(iteratee)) {
28896        iteratee = undefined;
28897      }
28898      return isArrayLikeObject(array)
28899        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
28900        : [];
28901    });
28902
28903    /**
28904     * This method is like `_.difference` except that it accepts `comparator`
28905     * which is invoked to compare elements of `array` to `values`. The order and
28906     * references of result values are determined by the first array. The comparator
28907     * is invoked with two arguments: (arrVal, othVal).
28908     *
28909     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
28910     *
28911     * @static
28912     * @memberOf _
28913     * @since 4.0.0
28914     * @category Array
28915     * @param {Array} array The array to inspect.
28916     * @param {...Array} [values] The values to exclude.
28917     * @param {Function} [comparator] The comparator invoked per element.
28918     * @returns {Array} Returns the new array of filtered values.
28919     * @example
28920     *
28921     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
28922     *
28923     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
28924     * // => [{ 'x': 2, 'y': 1 }]
28925     */
28926    var differenceWith = baseRest(function(array, values) {
28927      var comparator = last(values);
28928      if (isArrayLikeObject(comparator)) {
28929        comparator = undefined;
28930      }
28931      return isArrayLikeObject(array)
28932        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
28933        : [];
28934    });
28935
28936    /**
28937     * Creates a slice of `array` with `n` elements dropped from the beginning.
28938     *
28939     * @static
28940     * @memberOf _
28941     * @since 0.5.0
28942     * @category Array
28943     * @param {Array} array The array to query.
28944     * @param {number} [n=1] The number of elements to drop.
28945     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
28946     * @returns {Array} Returns the slice of `array`.
28947     * @example
28948     *
28949     * _.drop([1, 2, 3]);
28950     * // => [2, 3]
28951     *
28952     * _.drop([1, 2, 3], 2);
28953     * // => [3]
28954     *
28955     * _.drop([1, 2, 3], 5);
28956     * // => []
28957     *
28958     * _.drop([1, 2, 3], 0);
28959     * // => [1, 2, 3]
28960     */
28961    function drop(array, n, guard) {
28962      var length = array == null ? 0 : array.length;
28963      if (!length) {
28964        return [];
28965      }
28966      n = (guard || n === undefined) ? 1 : toInteger(n);
28967      return baseSlice(array, n < 0 ? 0 : n, length);
28968    }
28969
28970    /**
28971     * Creates a slice of `array` with `n` elements dropped from the end.
28972     *
28973     * @static
28974     * @memberOf _
28975     * @since 3.0.0
28976     * @category Array
28977     * @param {Array} array The array to query.
28978     * @param {number} [n=1] The number of elements to drop.
28979     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
28980     * @returns {Array} Returns the slice of `array`.
28981     * @example
28982     *
28983     * _.dropRight([1, 2, 3]);
28984     * // => [1, 2]
28985     *
28986     * _.dropRight([1, 2, 3], 2);
28987     * // => [1]
28988     *
28989     * _.dropRight([1, 2, 3], 5);
28990     * // => []
28991     *
28992     * _.dropRight([1, 2, 3], 0);
28993     * // => [1, 2, 3]
28994     */
28995    function dropRight(array, n, guard) {
28996      var length = array == null ? 0 : array.length;
28997      if (!length) {
28998        return [];
28999      }
29000      n = (guard || n === undefined) ? 1 : toInteger(n);
29001      n = length - n;
29002      return baseSlice(array, 0, n < 0 ? 0 : n);
29003    }
29004
29005    /**
29006     * Creates a slice of `array` excluding elements dropped from the end.
29007     * Elements are dropped until `predicate` returns falsey. The predicate is
29008     * invoked with three arguments: (value, index, array).
29009     *
29010     * @static
29011     * @memberOf _
29012     * @since 3.0.0
29013     * @category Array
29014     * @param {Array} array The array to query.
29015     * @param {Function} [predicate=_.identity] The function invoked per iteration.
29016     * @returns {Array} Returns the slice of `array`.
29017     * @example
29018     *
29019     * var users = [
29020     *   { 'user': 'barney',  'active': true },
29021     *   { 'user': 'fred',    'active': false },
29022     *   { 'user': 'pebbles', 'active': false }
29023     * ];
29024     *
29025     * _.dropRightWhile(users, function(o) { return !o.active; });
29026     * // => objects for ['barney']
29027     *
29028     * // The `_.matches` iteratee shorthand.
29029     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
29030     * // => objects for ['barney', 'fred']
29031     *
29032     * // The `_.matchesProperty` iteratee shorthand.
29033     * _.dropRightWhile(users, ['active', false]);
29034     * // => objects for ['barney']
29035     *
29036     * // The `_.property` iteratee shorthand.
29037     * _.dropRightWhile(users, 'active');
29038     * // => objects for ['barney', 'fred', 'pebbles']
29039     */
29040    function dropRightWhile(array, predicate) {
29041      return (array && array.length)
29042        ? baseWhile(array, getIteratee(predicate, 3), true, true)
29043        : [];
29044    }
29045
29046    /**
29047     * Creates a slice of `array` excluding elements dropped from the beginning.
29048     * Elements are dropped until `predicate` returns falsey. The predicate is
29049     * invoked with three arguments: (value, index, array).
29050     *
29051     * @static
29052     * @memberOf _
29053     * @since 3.0.0
29054     * @category Array
29055     * @param {Array} array The array to query.
29056     * @param {Function} [predicate=_.identity] The function invoked per iteration.
29057     * @returns {Array} Returns the slice of `array`.
29058     * @example
29059     *
29060     * var users = [
29061     *   { 'user': 'barney',  'active': false },
29062     *   { 'user': 'fred',    'active': false },
29063     *   { 'user': 'pebbles', 'active': true }
29064     * ];
29065     *
29066     * _.dropWhile(users, function(o) { return !o.active; });
29067     * // => objects for ['pebbles']
29068     *
29069     * // The `_.matches` iteratee shorthand.
29070     * _.dropWhile(users, { 'user': 'barney', 'active': false });
29071     * // => objects for ['fred', 'pebbles']
29072     *
29073     * // The `_.matchesProperty` iteratee shorthand.
29074     * _.dropWhile(users, ['active', false]);
29075     * // => objects for ['pebbles']
29076     *
29077     * // The `_.property` iteratee shorthand.
29078     * _.dropWhile(users, 'active');
29079     * // => objects for ['barney', 'fred', 'pebbles']
29080     */
29081    function dropWhile(array, predicate) {
29082      return (array && array.length)
29083        ? baseWhile(array, getIteratee(predicate, 3), true)
29084        : [];
29085    }
29086
29087    /**
29088     * Fills elements of `array` with `value` from `start` up to, but not
29089     * including, `end`.
29090     *
29091     * **Note:** This method mutates `array`.
29092     *
29093     * @static
29094     * @memberOf _
29095     * @since 3.2.0
29096     * @category Array
29097     * @param {Array} array The array to fill.
29098     * @param {*} value The value to fill `array` with.
29099     * @param {number} [start=0] The start position.
29100     * @param {number} [end=array.length] The end position.
29101     * @returns {Array} Returns `array`.
29102     * @example
29103     *
29104     * var array = [1, 2, 3];
29105     *
29106     * _.fill(array, 'a');
29107     * console.log(array);
29108     * // => ['a', 'a', 'a']
29109     *
29110     * _.fill(Array(3), 2);
29111     * // => [2, 2, 2]
29112     *
29113     * _.fill([4, 6, 8, 10], '*', 1, 3);
29114     * // => [4, '*', '*', 10]
29115     */
29116    function fill(array, value, start, end) {
29117      var length = array == null ? 0 : array.length;
29118      if (!length) {
29119        return [];
29120      }
29121      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
29122        start = 0;
29123        end = length;
29124      }
29125      return baseFill(array, value, start, end);
29126    }
29127
29128    /**
29129     * This method is like `_.find` except that it returns the index of the first
29130     * element `predicate` returns truthy for instead of the element itself.
29131     *
29132     * @static
29133     * @memberOf _
29134     * @since 1.1.0
29135     * @category Array
29136     * @param {Array} array The array to inspect.
29137     * @param {Function} [predicate=_.identity] The function invoked per iteration.
29138     * @param {number} [fromIndex=0] The index to search from.
29139     * @returns {number} Returns the index of the found element, else `-1`.
29140     * @example
29141     *
29142     * var users = [
29143     *   { 'user': 'barney',  'active': false },
29144     *   { 'user': 'fred',    'active': false },
29145     *   { 'user': 'pebbles', 'active': true }
29146     * ];
29147     *
29148     * _.findIndex(users, function(o) { return o.user == 'barney'; });
29149     * // => 0
29150     *
29151     * // The `_.matches` iteratee shorthand.
29152     * _.findIndex(users, { 'user': 'fred', 'active': false });
29153     * // => 1
29154     *
29155     * // The `_.matchesProperty` iteratee shorthand.
29156     * _.findIndex(users, ['active', false]);
29157     * // => 0
29158     *
29159     * // The `_.property` iteratee shorthand.
29160     * _.findIndex(users, 'active');
29161     * // => 2
29162     */
29163    function findIndex(array, predicate, fromIndex) {
29164      var length = array == null ? 0 : array.length;
29165      if (!length) {
29166        return -1;
29167      }
29168      var index = fromIndex == null ? 0 : toInteger(fromIndex);
29169      if (index < 0) {
29170        index = nativeMax(length + index, 0);
29171      }
29172      return baseFindIndex(array, getIteratee(predicate, 3), index);
29173    }
29174
29175    /**
29176     * This method is like `_.findIndex` except that it iterates over elements
29177     * of `collection` from right to left.
29178     *
29179     * @static
29180     * @memberOf _
29181     * @since 2.0.0
29182     * @category Array
29183     * @param {Array} array The array to inspect.
29184     * @param {Function} [predicate=_.identity] The function invoked per iteration.
29185     * @param {number} [fromIndex=array.length-1] The index to search from.
29186     * @returns {number} Returns the index of the found element, else `-1`.
29187     * @example
29188     *
29189     * var users = [
29190     *   { 'user': 'barney',  'active': true },
29191     *   { 'user': 'fred',    'active': false },
29192     *   { 'user': 'pebbles', 'active': false }
29193     * ];
29194     *
29195     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
29196     * // => 2
29197     *
29198     * // The `_.matches` iteratee shorthand.
29199     * _.findLastIndex(users, { 'user': 'barney', 'active': true });
29200     * // => 0
29201     *
29202     * // The `_.matchesProperty` iteratee shorthand.
29203     * _.findLastIndex(users, ['active', false]);
29204     * // => 2
29205     *
29206     * // The `_.property` iteratee shorthand.
29207     * _.findLastIndex(users, 'active');
29208     * // => 0
29209     */
29210    function findLastIndex(array, predicate, fromIndex) {
29211      var length = array == null ? 0 : array.length;
29212      if (!length) {
29213        return -1;
29214      }
29215      var index = length - 1;
29216      if (fromIndex !== undefined) {
29217        index = toInteger(fromIndex);
29218        index = fromIndex < 0
29219          ? nativeMax(length + index, 0)
29220          : nativeMin(index, length - 1);
29221      }
29222      return baseFindIndex(array, getIteratee(predicate, 3), index, true);
29223    }
29224
29225    /**
29226     * Flattens `array` a single level deep.
29227     *
29228     * @static
29229     * @memberOf _
29230     * @since 0.1.0
29231     * @category Array
29232     * @param {Array} array The array to flatten.
29233     * @returns {Array} Returns the new flattened array.
29234     * @example
29235     *
29236     * _.flatten([1, [2, [3, [4]], 5]]);
29237     * // => [1, 2, [3, [4]], 5]
29238     */
29239    function flatten(array) {
29240      var length = array == null ? 0 : array.length;
29241      return length ? baseFlatten(array, 1) : [];
29242    }
29243
29244    /**
29245     * Recursively flattens `array`.
29246     *
29247     * @static
29248     * @memberOf _
29249     * @since 3.0.0
29250     * @category Array
29251     * @param {Array} array The array to flatten.
29252     * @returns {Array} Returns the new flattened array.
29253     * @example
29254     *
29255     * _.flattenDeep([1, [2, [3, [4]], 5]]);
29256     * // => [1, 2, 3, 4, 5]
29257     */
29258    function flattenDeep(array) {
29259      var length = array == null ? 0 : array.length;
29260      return length ? baseFlatten(array, INFINITY) : [];
29261    }
29262
29263    /**
29264     * Recursively flatten `array` up to `depth` times.
29265     *
29266     * @static
29267     * @memberOf _
29268     * @since 4.4.0
29269     * @category Array
29270     * @param {Array} array The array to flatten.
29271     * @param {number} [depth=1] The maximum recursion depth.
29272     * @returns {Array} Returns the new flattened array.
29273     * @example
29274     *
29275     * var array = [1, [2, [3, [4]], 5]];
29276     *
29277     * _.flattenDepth(array, 1);
29278     * // => [1, 2, [3, [4]], 5]
29279     *
29280     * _.flattenDepth(array, 2);
29281     * // => [1, 2, 3, [4], 5]
29282     */
29283    function flattenDepth(array, depth) {
29284      var length = array == null ? 0 : array.length;
29285      if (!length) {
29286        return [];
29287      }
29288      depth = depth === undefined ? 1 : toInteger(depth);
29289      return baseFlatten(array, depth);
29290    }
29291
29292    /**
29293     * The inverse of `_.toPairs`; this method returns an object composed
29294     * from key-value `pairs`.
29295     *
29296     * @static
29297     * @memberOf _
29298     * @since 4.0.0
29299     * @category Array
29300     * @param {Array} pairs The key-value pairs.
29301     * @returns {Object} Returns the new object.
29302     * @example
29303     *
29304     * _.fromPairs([['a', 1], ['b', 2]]);
29305     * // => { 'a': 1, 'b': 2 }
29306     */
29307    function fromPairs(pairs) {
29308      var index = -1,
29309          length = pairs == null ? 0 : pairs.length,
29310          result = {};
29311
29312      while (++index < length) {
29313        var pair = pairs[index];
29314        result[pair[0]] = pair[1];
29315      }
29316      return result;
29317    }
29318
29319    /**
29320     * Gets the first element of `array`.
29321     *
29322     * @static
29323     * @memberOf _
29324     * @since 0.1.0
29325     * @alias first
29326     * @category Array
29327     * @param {Array} array The array to query.
29328     * @returns {*} Returns the first element of `array`.
29329     * @example
29330     *
29331     * _.head([1, 2, 3]);
29332     * // => 1
29333     *
29334     * _.head([]);
29335     * // => undefined
29336     */
29337    function head(array) {
29338      return (array && array.length) ? array[0] : undefined;
29339    }
29340
29341    /**
29342     * Gets the index at which the first occurrence of `value` is found in `array`
29343     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
29344     * for equality comparisons. If `fromIndex` is negative, it's used as the
29345     * offset from the end of `array`.
29346     *
29347     * @static
29348     * @memberOf _
29349     * @since 0.1.0
29350     * @category Array
29351     * @param {Array} array The array to inspect.
29352     * @param {*} value The value to search for.
29353     * @param {number} [fromIndex=0] The index to search from.
29354     * @returns {number} Returns the index of the matched value, else `-1`.
29355     * @example
29356     *
29357     * _.indexOf([1, 2, 1, 2], 2);
29358     * // => 1
29359     *
29360     * // Search from the `fromIndex`.
29361     * _.indexOf([1, 2, 1, 2], 2, 2);
29362     * // => 3
29363     */
29364    function indexOf(array, value, fromIndex) {
29365      var length = array == null ? 0 : array.length;
29366      if (!length) {
29367        return -1;
29368      }
29369      var index = fromIndex == null ? 0 : toInteger(fromIndex);
29370      if (index < 0) {
29371        index = nativeMax(length + index, 0);
29372      }
29373      return baseIndexOf(array, value, index);
29374    }
29375
29376    /**
29377     * Gets all but the last element of `array`.
29378     *
29379     * @static
29380     * @memberOf _
29381     * @since 0.1.0
29382     * @category Array
29383     * @param {Array} array The array to query.
29384     * @returns {Array} Returns the slice of `array`.
29385     * @example
29386     *
29387     * _.initial([1, 2, 3]);
29388     * // => [1, 2]
29389     */
29390    function initial(array) {
29391      var length = array == null ? 0 : array.length;
29392      return length ? baseSlice(array, 0, -1) : [];
29393    }
29394
29395    /**
29396     * Creates an array of unique values that are included in all given arrays
29397     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
29398     * for equality comparisons. The order and references of result values are
29399     * determined by the first array.
29400     *
29401     * @static
29402     * @memberOf _
29403     * @since 0.1.0
29404     * @category Array
29405     * @param {...Array} [arrays] The arrays to inspect.
29406     * @returns {Array} Returns the new array of intersecting values.
29407     * @example
29408     *
29409     * _.intersection([2, 1], [2, 3]);
29410     * // => [2]
29411     */
29412    var intersection = baseRest(function(arrays) {
29413      var mapped = arrayMap(arrays, castArrayLikeObject);
29414      return (mapped.length && mapped[0] === arrays[0])
29415        ? baseIntersection(mapped)
29416        : [];
29417    });
29418
29419    /**
29420     * This method is like `_.intersection` except that it accepts `iteratee`
29421     * which is invoked for each element of each `arrays` to generate the criterion
29422     * by which they're compared. The order and references of result values are
29423     * determined by the first array. The iteratee is invoked with one argument:
29424     * (value).
29425     *
29426     * @static
29427     * @memberOf _
29428     * @since 4.0.0
29429     * @category Array
29430     * @param {...Array} [arrays] The arrays to inspect.
29431     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
29432     * @returns {Array} Returns the new array of intersecting values.
29433     * @example
29434     *
29435     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
29436     * // => [2.1]
29437     *
29438     * // The `_.property` iteratee shorthand.
29439     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
29440     * // => [{ 'x': 1 }]
29441     */
29442    var intersectionBy = baseRest(function(arrays) {
29443      var iteratee = last(arrays),
29444          mapped = arrayMap(arrays, castArrayLikeObject);
29445
29446      if (iteratee === last(mapped)) {
29447        iteratee = undefined;
29448      } else {
29449        mapped.pop();
29450      }
29451      return (mapped.length && mapped[0] === arrays[0])
29452        ? baseIntersection(mapped, getIteratee(iteratee, 2))
29453        : [];
29454    });
29455
29456    /**
29457     * This method is like `_.intersection` except that it accepts `comparator`
29458     * which is invoked to compare elements of `arrays`. The order and references
29459     * of result values are determined by the first array. The comparator is
29460     * invoked with two arguments: (arrVal, othVal).
29461     *
29462     * @static
29463     * @memberOf _
29464     * @since 4.0.0
29465     * @category Array
29466     * @param {...Array} [arrays] The arrays to inspect.
29467     * @param {Function} [comparator] The comparator invoked per element.
29468     * @returns {Array} Returns the new array of intersecting values.
29469     * @example
29470     *
29471     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
29472     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
29473     *
29474     * _.intersectionWith(objects, others, _.isEqual);
29475     * // => [{ 'x': 1, 'y': 2 }]
29476     */
29477    var intersectionWith = baseRest(function(arrays) {
29478      var comparator = last(arrays),
29479          mapped = arrayMap(arrays, castArrayLikeObject);
29480
29481      comparator = typeof comparator == 'function' ? comparator : undefined;
29482      if (comparator) {
29483        mapped.pop();
29484      }
29485      return (mapped.length && mapped[0] === arrays[0])
29486        ? baseIntersection(mapped, undefined, comparator)
29487        : [];
29488    });
29489
29490    /**
29491     * Converts all elements in `array` into a string separated by `separator`.
29492     *
29493     * @static
29494     * @memberOf _
29495     * @since 4.0.0
29496     * @category Array
29497     * @param {Array} array The array to convert.
29498     * @param {string} [separator=','] The element separator.
29499     * @returns {string} Returns the joined string.
29500     * @example
29501     *
29502     * _.join(['a', 'b', 'c'], '~');
29503     * // => 'a~b~c'
29504     */
29505    function join(array, separator) {
29506      return array == null ? '' : nativeJoin.call(array, separator);
29507    }
29508
29509    /**
29510     * Gets the last element of `array`.
29511     *
29512     * @static
29513     * @memberOf _
29514     * @since 0.1.0
29515     * @category Array
29516     * @param {Array} array The array to query.
29517     * @returns {*} Returns the last element of `array`.
29518     * @example
29519     *
29520     * _.last([1, 2, 3]);
29521     * // => 3
29522     */
29523    function last(array) {
29524      var length = array == null ? 0 : array.length;
29525      return length ? array[length - 1] : undefined;
29526    }
29527
29528    /**
29529     * This method is like `_.indexOf` except that it iterates over elements of
29530     * `array` from right to left.
29531     *
29532     * @static
29533     * @memberOf _
29534     * @since 0.1.0
29535     * @category Array
29536     * @param {Array} array The array to inspect.
29537     * @param {*} value The value to search for.
29538     * @param {number} [fromIndex=array.length-1] The index to search from.
29539     * @returns {number} Returns the index of the matched value, else `-1`.
29540     * @example
29541     *
29542     * _.lastIndexOf([1, 2, 1, 2], 2);
29543     * // => 3
29544     *
29545     * // Search from the `fromIndex`.
29546     * _.lastIndexOf([1, 2, 1, 2], 2, 2);
29547     * // => 1
29548     */
29549    function lastIndexOf(array, value, fromIndex) {
29550      var length = array == null ? 0 : array.length;
29551      if (!length) {
29552        return -1;
29553      }
29554      var index = length;
29555      if (fromIndex !== undefined) {
29556        index = toInteger(fromIndex);
29557        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
29558      }
29559      return value === value
29560        ? strictLastIndexOf(array, value, index)
29561        : baseFindIndex(array, baseIsNaN, index, true);
29562    }
29563
29564    /**
29565     * Gets the element at index `n` of `array`. If `n` is negative, the nth
29566     * element from the end is returned.
29567     *
29568     * @static
29569     * @memberOf _
29570     * @since 4.11.0
29571     * @category Array
29572     * @param {Array} array The array to query.
29573     * @param {number} [n=0] The index of the element to return.
29574     * @returns {*} Returns the nth element of `array`.
29575     * @example
29576     *
29577     * var array = ['a', 'b', 'c', 'd'];
29578     *
29579     * _.nth(array, 1);
29580     * // => 'b'
29581     *
29582     * _.nth(array, -2);
29583     * // => 'c';
29584     */
29585    function nth(array, n) {
29586      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
29587    }
29588
29589    /**
29590     * Removes all given values from `array` using
29591     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
29592     * for equality comparisons.
29593     *
29594     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
29595     * to remove elements from an array by predicate.
29596     *
29597     * @static
29598     * @memberOf _
29599     * @since 2.0.0
29600     * @category Array
29601     * @param {Array} array The array to modify.
29602     * @param {...*} [values] The values to remove.
29603     * @returns {Array} Returns `array`.
29604     * @example
29605     *
29606     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
29607     *
29608     * _.pull(array, 'a', 'c');
29609     * console.log(array);
29610     * // => ['b', 'b']
29611     */
29612    var pull = baseRest(pullAll);
29613
29614    /**
29615     * This method is like `_.pull` except that it accepts an array of values to remove.
29616     *
29617     * **Note:** Unlike `_.difference`, this method mutates `array`.
29618     *
29619     * @static
29620     * @memberOf _
29621     * @since 4.0.0
29622     * @category Array
29623     * @param {Array} array The array to modify.
29624     * @param {Array} values The values to remove.
29625     * @returns {Array} Returns `array`.
29626     * @example
29627     *
29628     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
29629     *
29630     * _.pullAll(array, ['a', 'c']);
29631     * console.log(array);
29632     * // => ['b', 'b']
29633     */
29634    function pullAll(array, values) {
29635      return (array && array.length && values && values.length)
29636        ? basePullAll(array, values)
29637        : array;
29638    }
29639
29640    /**
29641     * This method is like `_.pullAll` except that it accepts `iteratee` which is
29642     * invoked for each element of `array` and `values` to generate the criterion
29643     * by which they're compared. The iteratee is invoked with one argument: (value).
29644     *
29645     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
29646     *
29647     * @static
29648     * @memberOf _
29649     * @since 4.0.0
29650     * @category Array
29651     * @param {Array} array The array to modify.
29652     * @param {Array} values The values to remove.
29653     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
29654     * @returns {Array} Returns `array`.
29655     * @example
29656     *
29657     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
29658     *
29659     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
29660     * console.log(array);
29661     * // => [{ 'x': 2 }]
29662     */
29663    function pullAllBy(array, values, iteratee) {
29664      return (array && array.length && values && values.length)
29665        ? basePullAll(array, values, getIteratee(iteratee, 2))
29666        : array;
29667    }
29668
29669    /**
29670     * This method is like `_.pullAll` except that it accepts `comparator` which
29671     * is invoked to compare elements of `array` to `values`. The comparator is
29672     * invoked with two arguments: (arrVal, othVal).
29673     *
29674     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
29675     *
29676     * @static
29677     * @memberOf _
29678     * @since 4.6.0
29679     * @category Array
29680     * @param {Array} array The array to modify.
29681     * @param {Array} values The values to remove.
29682     * @param {Function} [comparator] The comparator invoked per element.
29683     * @returns {Array} Returns `array`.
29684     * @example
29685     *
29686     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
29687     *
29688     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
29689     * console.log(array);
29690     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
29691     */
29692    function pullAllWith(array, values, comparator) {
29693      return (array && array.length && values && values.length)
29694        ? basePullAll(array, values, undefined, comparator)
29695        : array;
29696    }
29697
29698    /**
29699     * Removes elements from `array` corresponding to `indexes` and returns an
29700     * array of removed elements.
29701     *
29702     * **Note:** Unlike `_.at`, this method mutates `array`.
29703     *
29704     * @static
29705     * @memberOf _
29706     * @since 3.0.0
29707     * @category Array
29708     * @param {Array} array The array to modify.
29709     * @param {...(number|number[])} [indexes] The indexes of elements to remove.
29710     * @returns {Array} Returns the new array of removed elements.
29711     * @example
29712     *
29713     * var array = ['a', 'b', 'c', 'd'];
29714     * var pulled = _.pullAt(array, [1, 3]);
29715     *
29716     * console.log(array);
29717     * // => ['a', 'c']
29718     *
29719     * console.log(pulled);
29720     * // => ['b', 'd']
29721     */
29722    var pullAt = flatRest(function(array, indexes) {
29723      var length = array == null ? 0 : array.length,
29724          result = baseAt(array, indexes);
29725
29726      basePullAt(array, arrayMap(indexes, function(index) {
29727        return isIndex(index, length) ? +index : index;
29728      }).sort(compareAscending));
29729
29730      return result;
29731    });
29732
29733    /**
29734     * Removes all elements from `array` that `predicate` returns truthy for
29735     * and returns an array of the removed elements. The predicate is invoked
29736     * with three arguments: (value, index, array).
29737     *
29738     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
29739     * to pull elements from an array by value.
29740     *
29741     * @static
29742     * @memberOf _
29743     * @since 2.0.0
29744     * @category Array
29745     * @param {Array} array The array to modify.
29746     * @param {Function} [predicate=_.identity] The function invoked per iteration.
29747     * @returns {Array} Returns the new array of removed elements.
29748     * @example
29749     *
29750     * var array = [1, 2, 3, 4];
29751     * var evens = _.remove(array, function(n) {
29752     *   return n % 2 == 0;
29753     * });
29754     *
29755     * console.log(array);
29756     * // => [1, 3]
29757     *
29758     * console.log(evens);
29759     * // => [2, 4]
29760     */
29761    function remove(array, predicate) {
29762      var result = [];
29763      if (!(array && array.length)) {
29764        return result;
29765      }
29766      var index = -1,
29767          indexes = [],
29768          length = array.length;
29769
29770      predicate = getIteratee(predicate, 3);
29771      while (++index < length) {
29772        var value = array[index];
29773        if (predicate(value, index, array)) {
29774          result.push(value);
29775          indexes.push(index);
29776        }
29777      }
29778      basePullAt(array, indexes);
29779      return result;
29780    }
29781
29782    /**
29783     * Reverses `array` so that the first element becomes the last, the second
29784     * element becomes the second to last, and so on.
29785     *
29786     * **Note:** This method mutates `array` and is based on
29787     * [`Array#reverse`](https://mdn.io/Array/reverse).
29788     *
29789     * @static
29790     * @memberOf _
29791     * @since 4.0.0
29792     * @category Array
29793     * @param {Array} array The array to modify.
29794     * @returns {Array} Returns `array`.
29795     * @example
29796     *
29797     * var array = [1, 2, 3];
29798     *
29799     * _.reverse(array);
29800     * // => [3, 2, 1]
29801     *
29802     * console.log(array);
29803     * // => [3, 2, 1]
29804     */
29805    function reverse(array) {
29806      return array == null ? array : nativeReverse.call(array);
29807    }
29808
29809    /**
29810     * Creates a slice of `array` from `start` up to, but not including, `end`.
29811     *
29812     * **Note:** This method is used instead of
29813     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
29814     * returned.
29815     *
29816     * @static
29817     * @memberOf _
29818     * @since 3.0.0
29819     * @category Array
29820     * @param {Array} array The array to slice.
29821     * @param {number} [start=0] The start position.
29822     * @param {number} [end=array.length] The end position.
29823     * @returns {Array} Returns the slice of `array`.
29824     */
29825    function slice(array, start, end) {
29826      var length = array == null ? 0 : array.length;
29827      if (!length) {
29828        return [];
29829      }
29830      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
29831        start = 0;
29832        end = length;
29833      }
29834      else {
29835        start = start == null ? 0 : toInteger(start);
29836        end = end === undefined ? length : toInteger(end);
29837      }
29838      return baseSlice(array, start, end);
29839    }
29840
29841    /**
29842     * Uses a binary search to determine the lowest index at which `value`
29843     * should be inserted into `array` in order to maintain its sort order.
29844     *
29845     * @static
29846     * @memberOf _
29847     * @since 0.1.0
29848     * @category Array
29849     * @param {Array} array The sorted array to inspect.
29850     * @param {*} value The value to evaluate.
29851     * @returns {number} Returns the index at which `value` should be inserted
29852     *  into `array`.
29853     * @example
29854     *
29855     * _.sortedIndex([30, 50], 40);
29856     * // => 1
29857     */
29858    function sortedIndex(array, value) {
29859      return baseSortedIndex(array, value);
29860    }
29861
29862    /**
29863     * This method is like `_.sortedIndex` except that it accepts `iteratee`
29864     * which is invoked for `value` and each element of `array` to compute their
29865     * sort ranking. The iteratee is invoked with one argument: (value).
29866     *
29867     * @static
29868     * @memberOf _
29869     * @since 4.0.0
29870     * @category Array
29871     * @param {Array} array The sorted array to inspect.
29872     * @param {*} value The value to evaluate.
29873     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
29874     * @returns {number} Returns the index at which `value` should be inserted
29875     *  into `array`.
29876     * @example
29877     *
29878     * var objects = [{ 'x': 4 }, { 'x': 5 }];
29879     *
29880     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
29881     * // => 0
29882     *
29883     * // The `_.property` iteratee shorthand.
29884     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
29885     * // => 0
29886     */
29887    function sortedIndexBy(array, value, iteratee) {
29888      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
29889    }
29890
29891    /**
29892     * This method is like `_.indexOf` except that it performs a binary
29893     * search on a sorted `array`.
29894     *
29895     * @static
29896     * @memberOf _
29897     * @since 4.0.0
29898     * @category Array
29899     * @param {Array} array The array to inspect.
29900     * @param {*} value The value to search for.
29901     * @returns {number} Returns the index of the matched value, else `-1`.
29902     * @example
29903     *
29904     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
29905     * // => 1
29906     */
29907    function sortedIndexOf(array, value) {
29908      var length = array == null ? 0 : array.length;
29909      if (length) {
29910        var index = baseSortedIndex(array, value);
29911        if (index < length && eq(array[index], value)) {
29912          return index;
29913        }
29914      }
29915      return -1;
29916    }
29917
29918    /**
29919     * This method is like `_.sortedIndex` except that it returns the highest
29920     * index at which `value` should be inserted into `array` in order to
29921     * maintain its sort order.
29922     *
29923     * @static
29924     * @memberOf _
29925     * @since 3.0.0
29926     * @category Array
29927     * @param {Array} array The sorted array to inspect.
29928     * @param {*} value The value to evaluate.
29929     * @returns {number} Returns the index at which `value` should be inserted
29930     *  into `array`.
29931     * @example
29932     *
29933     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
29934     * // => 4
29935     */
29936    function sortedLastIndex(array, value) {
29937      return baseSortedIndex(array, value, true);
29938    }
29939
29940    /**
29941     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
29942     * which is invoked for `value` and each element of `array` to compute their
29943     * sort ranking. The iteratee is invoked with one argument: (value).
29944     *
29945     * @static
29946     * @memberOf _
29947     * @since 4.0.0
29948     * @category Array
29949     * @param {Array} array The sorted array to inspect.
29950     * @param {*} value The value to evaluate.
29951     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
29952     * @returns {number} Returns the index at which `value` should be inserted
29953     *  into `array`.
29954     * @example
29955     *
29956     * var objects = [{ 'x': 4 }, { 'x': 5 }];
29957     *
29958     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
29959     * // => 1
29960     *
29961     * // The `_.property` iteratee shorthand.
29962     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
29963     * // => 1
29964     */
29965    function sortedLastIndexBy(array, value, iteratee) {
29966      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
29967    }
29968
29969    /**
29970     * This method is like `_.lastIndexOf` except that it performs a binary
29971     * search on a sorted `array`.
29972     *
29973     * @static
29974     * @memberOf _
29975     * @since 4.0.0
29976     * @category Array
29977     * @param {Array} array The array to inspect.
29978     * @param {*} value The value to search for.
29979     * @returns {number} Returns the index of the matched value, else `-1`.
29980     * @example
29981     *
29982     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
29983     * // => 3
29984     */
29985    function sortedLastIndexOf(array, value) {
29986      var length = array == null ? 0 : array.length;
29987      if (length) {
29988        var index = baseSortedIndex(array, value, true) - 1;
29989        if (eq(array[index], value)) {
29990          return index;
29991        }
29992      }
29993      return -1;
29994    }
29995
29996    /**
29997     * This method is like `_.uniq` except that it's designed and optimized
29998     * for sorted arrays.
29999     *
30000     * @static
30001     * @memberOf _
30002     * @since 4.0.0
30003     * @category Array
30004     * @param {Array} array The array to inspect.
30005     * @returns {Array} Returns the new duplicate free array.
30006     * @example
30007     *
30008     * _.sortedUniq([1, 1, 2]);
30009     * // => [1, 2]
30010     */
30011    function sortedUniq(array) {
30012      return (array && array.length)
30013        ? baseSortedUniq(array)
30014        : [];
30015    }
30016
30017    /**
30018     * This method is like `_.uniqBy` except that it's designed and optimized
30019     * for sorted arrays.
30020     *
30021     * @static
30022     * @memberOf _
30023     * @since 4.0.0
30024     * @category Array
30025     * @param {Array} array The array to inspect.
30026     * @param {Function} [iteratee] The iteratee invoked per element.
30027     * @returns {Array} Returns the new duplicate free array.
30028     * @example
30029     *
30030     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
30031     * // => [1.1, 2.3]
30032     */
30033    function sortedUniqBy(array, iteratee) {
30034      return (array && array.length)
30035        ? baseSortedUniq(array, getIteratee(iteratee, 2))
30036        : [];
30037    }
30038
30039    /**
30040     * Gets all but the first element of `array`.
30041     *
30042     * @static
30043     * @memberOf _
30044     * @since 4.0.0
30045     * @category Array
30046     * @param {Array} array The array to query.
30047     * @returns {Array} Returns the slice of `array`.
30048     * @example
30049     *
30050     * _.tail([1, 2, 3]);
30051     * // => [2, 3]
30052     */
30053    function tail(array) {
30054      var length = array == null ? 0 : array.length;
30055      return length ? baseSlice(array, 1, length) : [];
30056    }
30057
30058    /**
30059     * Creates a slice of `array` with `n` elements taken from the beginning.
30060     *
30061     * @static
30062     * @memberOf _
30063     * @since 0.1.0
30064     * @category Array
30065     * @param {Array} array The array to query.
30066     * @param {number} [n=1] The number of elements to take.
30067     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
30068     * @returns {Array} Returns the slice of `array`.
30069     * @example
30070     *
30071     * _.take([1, 2, 3]);
30072     * // => [1]
30073     *
30074     * _.take([1, 2, 3], 2);
30075     * // => [1, 2]
30076     *
30077     * _.take([1, 2, 3], 5);
30078     * // => [1, 2, 3]
30079     *
30080     * _.take([1, 2, 3], 0);
30081     * // => []
30082     */
30083    function take(array, n, guard) {
30084      if (!(array && array.length)) {
30085        return [];
30086      }
30087      n = (guard || n === undefined) ? 1 : toInteger(n);
30088      return baseSlice(array, 0, n < 0 ? 0 : n);
30089    }
30090
30091    /**
30092     * Creates a slice of `array` with `n` elements taken from the end.
30093     *
30094     * @static
30095     * @memberOf _
30096     * @since 3.0.0
30097     * @category Array
30098     * @param {Array} array The array to query.
30099     * @param {number} [n=1] The number of elements to take.
30100     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
30101     * @returns {Array} Returns the slice of `array`.
30102     * @example
30103     *
30104     * _.takeRight([1, 2, 3]);
30105     * // => [3]
30106     *
30107     * _.takeRight([1, 2, 3], 2);
30108     * // => [2, 3]
30109     *
30110     * _.takeRight([1, 2, 3], 5);
30111     * // => [1, 2, 3]
30112     *
30113     * _.takeRight([1, 2, 3], 0);
30114     * // => []
30115     */
30116    function takeRight(array, n, guard) {
30117      var length = array == null ? 0 : array.length;
30118      if (!length) {
30119        return [];
30120      }
30121      n = (guard || n === undefined) ? 1 : toInteger(n);
30122      n = length - n;
30123      return baseSlice(array, n < 0 ? 0 : n, length);
30124    }
30125
30126    /**
30127     * Creates a slice of `array` with elements taken from the end. Elements are
30128     * taken until `predicate` returns falsey. The predicate is invoked with
30129     * three arguments: (value, index, array).
30130     *
30131     * @static
30132     * @memberOf _
30133     * @since 3.0.0
30134     * @category Array
30135     * @param {Array} array The array to query.
30136     * @param {Function} [predicate=_.identity] The function invoked per iteration.
30137     * @returns {Array} Returns the slice of `array`.
30138     * @example
30139     *
30140     * var users = [
30141     *   { 'user': 'barney',  'active': true },
30142     *   { 'user': 'fred',    'active': false },
30143     *   { 'user': 'pebbles', 'active': false }
30144     * ];
30145     *
30146     * _.takeRightWhile(users, function(o) { return !o.active; });
30147     * // => objects for ['fred', 'pebbles']
30148     *
30149     * // The `_.matches` iteratee shorthand.
30150     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
30151     * // => objects for ['pebbles']
30152     *
30153     * // The `_.matchesProperty` iteratee shorthand.
30154     * _.takeRightWhile(users, ['active', false]);
30155     * // => objects for ['fred', 'pebbles']
30156     *
30157     * // The `_.property` iteratee shorthand.
30158     * _.takeRightWhile(users, 'active');
30159     * // => []
30160     */
30161    function takeRightWhile(array, predicate) {
30162      return (array && array.length)
30163        ? baseWhile(array, getIteratee(predicate, 3), false, true)
30164        : [];
30165    }
30166
30167    /**
30168     * Creates a slice of `array` with elements taken from the beginning. Elements
30169     * are taken until `predicate` returns falsey. The predicate is invoked with
30170     * three arguments: (value, index, array).
30171     *
30172     * @static
30173     * @memberOf _
30174     * @since 3.0.0
30175     * @category Array
30176     * @param {Array} array The array to query.
30177     * @param {Function} [predicate=_.identity] The function invoked per iteration.
30178     * @returns {Array} Returns the slice of `array`.
30179     * @example
30180     *
30181     * var users = [
30182     *   { 'user': 'barney',  'active': false },
30183     *   { 'user': 'fred',    'active': false },
30184     *   { 'user': 'pebbles', 'active': true }
30185     * ];
30186     *
30187     * _.takeWhile(users, function(o) { return !o.active; });
30188     * // => objects for ['barney', 'fred']
30189     *
30190     * // The `_.matches` iteratee shorthand.
30191     * _.takeWhile(users, { 'user': 'barney', 'active': false });
30192     * // => objects for ['barney']
30193     *
30194     * // The `_.matchesProperty` iteratee shorthand.
30195     * _.takeWhile(users, ['active', false]);
30196     * // => objects for ['barney', 'fred']
30197     *
30198     * // The `_.property` iteratee shorthand.
30199     * _.takeWhile(users, 'active');
30200     * // => []
30201     */
30202    function takeWhile(array, predicate) {
30203      return (array && array.length)
30204        ? baseWhile(array, getIteratee(predicate, 3))
30205        : [];
30206    }
30207
30208    /**
30209     * Creates an array of unique values, in order, from all given arrays using
30210     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
30211     * for equality comparisons.
30212     *
30213     * @static
30214     * @memberOf _
30215     * @since 0.1.0
30216     * @category Array
30217     * @param {...Array} [arrays] The arrays to inspect.
30218     * @returns {Array} Returns the new array of combined values.
30219     * @example
30220     *
30221     * _.union([2], [1, 2]);
30222     * // => [2, 1]
30223     */
30224    var union = baseRest(function(arrays) {
30225      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
30226    });
30227
30228    /**
30229     * This method is like `_.union` except that it accepts `iteratee` which is
30230     * invoked for each element of each `arrays` to generate the criterion by
30231     * which uniqueness is computed. Result values are chosen from the first
30232     * array in which the value occurs. The iteratee is invoked with one argument:
30233     * (value).
30234     *
30235     * @static
30236     * @memberOf _
30237     * @since 4.0.0
30238     * @category Array
30239     * @param {...Array} [arrays] The arrays to inspect.
30240     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
30241     * @returns {Array} Returns the new array of combined values.
30242     * @example
30243     *
30244     * _.unionBy([2.1], [1.2, 2.3], Math.floor);
30245     * // => [2.1, 1.2]
30246     *
30247     * // The `_.property` iteratee shorthand.
30248     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
30249     * // => [{ 'x': 1 }, { 'x': 2 }]
30250     */
30251    var unionBy = baseRest(function(arrays) {
30252      var iteratee = last(arrays);
30253      if (isArrayLikeObject(iteratee)) {
30254        iteratee = undefined;
30255      }
30256      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
30257    });
30258
30259    /**
30260     * This method is like `_.union` except that it accepts `comparator` which
30261     * is invoked to compare elements of `arrays`. Result values are chosen from
30262     * the first array in which the value occurs. The comparator is invoked
30263     * with two arguments: (arrVal, othVal).
30264     *
30265     * @static
30266     * @memberOf _
30267     * @since 4.0.0
30268     * @category Array
30269     * @param {...Array} [arrays] The arrays to inspect.
30270     * @param {Function} [comparator] The comparator invoked per element.
30271     * @returns {Array} Returns the new array of combined values.
30272     * @example
30273     *
30274     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
30275     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
30276     *
30277     * _.unionWith(objects, others, _.isEqual);
30278     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
30279     */
30280    var unionWith = baseRest(function(arrays) {
30281      var comparator = last(arrays);
30282      comparator = typeof comparator == 'function' ? comparator : undefined;
30283      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
30284    });
30285
30286    /**
30287     * Creates a duplicate-free version of an array, using
30288     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
30289     * for equality comparisons, in which only the first occurrence of each element
30290     * is kept. The order of result values is determined by the order they occur
30291     * in the array.
30292     *
30293     * @static
30294     * @memberOf _
30295     * @since 0.1.0
30296     * @category Array
30297     * @param {Array} array The array to inspect.
30298     * @returns {Array} Returns the new duplicate free array.
30299     * @example
30300     *
30301     * _.uniq([2, 1, 2]);
30302     * // => [2, 1]
30303     */
30304    function uniq(array) {
30305      return (array && array.length) ? baseUniq(array) : [];
30306    }
30307
30308    /**
30309     * This method is like `_.uniq` except that it accepts `iteratee` which is
30310     * invoked for each element in `array` to generate the criterion by which
30311     * uniqueness is computed. The order of result values is determined by the
30312     * order they occur in the array. The iteratee is invoked with one argument:
30313     * (value).
30314     *
30315     * @static
30316     * @memberOf _
30317     * @since 4.0.0
30318     * @category Array
30319     * @param {Array} array The array to inspect.
30320     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
30321     * @returns {Array} Returns the new duplicate free array.
30322     * @example
30323     *
30324     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
30325     * // => [2.1, 1.2]
30326     *
30327     * // The `_.property` iteratee shorthand.
30328     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
30329     * // => [{ 'x': 1 }, { 'x': 2 }]
30330     */
30331    function uniqBy(array, iteratee) {
30332      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
30333    }
30334
30335    /**
30336     * This method is like `_.uniq` except that it accepts `comparator` which
30337     * is invoked to compare elements of `array`. The order of result values is
30338     * determined by the order they occur in the array.The comparator is invoked
30339     * with two arguments: (arrVal, othVal).
30340     *
30341     * @static
30342     * @memberOf _
30343     * @since 4.0.0
30344     * @category Array
30345     * @param {Array} array The array to inspect.
30346     * @param {Function} [comparator] The comparator invoked per element.
30347     * @returns {Array} Returns the new duplicate free array.
30348     * @example
30349     *
30350     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
30351     *
30352     * _.uniqWith(objects, _.isEqual);
30353     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
30354     */
30355    function uniqWith(array, comparator) {
30356      comparator = typeof comparator == 'function' ? comparator : undefined;
30357      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
30358    }
30359
30360    /**
30361     * This method is like `_.zip` except that it accepts an array of grouped
30362     * elements and creates an array regrouping the elements to their pre-zip
30363     * configuration.
30364     *
30365     * @static
30366     * @memberOf _
30367     * @since 1.2.0
30368     * @category Array
30369     * @param {Array} array The array of grouped elements to process.
30370     * @returns {Array} Returns the new array of regrouped elements.
30371     * @example
30372     *
30373     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
30374     * // => [['a', 1, true], ['b', 2, false]]
30375     *
30376     * _.unzip(zipped);
30377     * // => [['a', 'b'], [1, 2], [true, false]]
30378     */
30379    function unzip(array) {
30380      if (!(array && array.length)) {
30381        return [];
30382      }
30383      var length = 0;
30384      array = arrayFilter(array, function(group) {
30385        if (isArrayLikeObject(group)) {
30386          length = nativeMax(group.length, length);
30387          return true;
30388        }
30389      });
30390      return baseTimes(length, function(index) {
30391        return arrayMap(array, baseProperty(index));
30392      });
30393    }
30394
30395    /**
30396     * This method is like `_.unzip` except that it accepts `iteratee` to specify
30397     * how regrouped values should be combined. The iteratee is invoked with the
30398     * elements of each group: (...group).
30399     *
30400     * @static
30401     * @memberOf _
30402     * @since 3.8.0
30403     * @category Array
30404     * @param {Array} array The array of grouped elements to process.
30405     * @param {Function} [iteratee=_.identity] The function to combine
30406     *  regrouped values.
30407     * @returns {Array} Returns the new array of regrouped elements.
30408     * @example
30409     *
30410     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
30411     * // => [[1, 10, 100], [2, 20, 200]]
30412     *
30413     * _.unzipWith(zipped, _.add);
30414     * // => [3, 30, 300]
30415     */
30416    function unzipWith(array, iteratee) {
30417      if (!(array && array.length)) {
30418        return [];
30419      }
30420      var result = unzip(array);
30421      if (iteratee == null) {
30422        return result;
30423      }
30424      return arrayMap(result, function(group) {
30425        return apply(iteratee, undefined, group);
30426      });
30427    }
30428
30429    /**
30430     * Creates an array excluding all given values using
30431     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
30432     * for equality comparisons.
30433     *
30434     * **Note:** Unlike `_.pull`, this method returns a new array.
30435     *
30436     * @static
30437     * @memberOf _
30438     * @since 0.1.0
30439     * @category Array
30440     * @param {Array} array The array to inspect.
30441     * @param {...*} [values] The values to exclude.
30442     * @returns {Array} Returns the new array of filtered values.
30443     * @see _.difference, _.xor
30444     * @example
30445     *
30446     * _.without([2, 1, 2, 3], 1, 2);
30447     * // => [3]
30448     */
30449    var without = baseRest(function(array, values) {
30450      return isArrayLikeObject(array)
30451        ? baseDifference(array, values)
30452        : [];
30453    });
30454
30455    /**
30456     * Creates an array of unique values that is the
30457     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
30458     * of the given arrays. The order of result values is determined by the order
30459     * they occur in the arrays.
30460     *
30461     * @static
30462     * @memberOf _
30463     * @since 2.4.0
30464     * @category Array
30465     * @param {...Array} [arrays] The arrays to inspect.
30466     * @returns {Array} Returns the new array of filtered values.
30467     * @see _.difference, _.without
30468     * @example
30469     *
30470     * _.xor([2, 1], [2, 3]);
30471     * // => [1, 3]
30472     */
30473    var xor = baseRest(function(arrays) {
30474      return baseXor(arrayFilter(arrays, isArrayLikeObject));
30475    });
30476
30477    /**
30478     * This method is like `_.xor` except that it accepts `iteratee` which is
30479     * invoked for each element of each `arrays` to generate the criterion by
30480     * which by which they're compared. The order of result values is determined
30481     * by the order they occur in the arrays. The iteratee is invoked with one
30482     * argument: (value).
30483     *
30484     * @static
30485     * @memberOf _
30486     * @since 4.0.0
30487     * @category Array
30488     * @param {...Array} [arrays] The arrays to inspect.
30489     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
30490     * @returns {Array} Returns the new array of filtered values.
30491     * @example
30492     *
30493     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
30494     * // => [1.2, 3.4]
30495     *
30496     * // The `_.property` iteratee shorthand.
30497     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
30498     * // => [{ 'x': 2 }]
30499     */
30500    var xorBy = baseRest(function(arrays) {
30501      var iteratee = last(arrays);
30502      if (isArrayLikeObject(iteratee)) {
30503        iteratee = undefined;
30504      }
30505      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
30506    });
30507
30508    /**
30509     * This method is like `_.xor` except that it accepts `comparator` which is
30510     * invoked to compare elements of `arrays`. The order of result values is
30511     * determined by the order they occur in the arrays. The comparator is invoked
30512     * with two arguments: (arrVal, othVal).
30513     *
30514     * @static
30515     * @memberOf _
30516     * @since 4.0.0
30517     * @category Array
30518     * @param {...Array} [arrays] The arrays to inspect.
30519     * @param {Function} [comparator] The comparator invoked per element.
30520     * @returns {Array} Returns the new array of filtered values.
30521     * @example
30522     *
30523     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
30524     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
30525     *
30526     * _.xorWith(objects, others, _.isEqual);
30527     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
30528     */
30529    var xorWith = baseRest(function(arrays) {
30530      var comparator = last(arrays);
30531      comparator = typeof comparator == 'function' ? comparator : undefined;
30532      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
30533    });
30534
30535    /**
30536     * Creates an array of grouped elements, the first of which contains the
30537     * first elements of the given arrays, the second of which contains the
30538     * second elements of the given arrays, and so on.
30539     *
30540     * @static
30541     * @memberOf _
30542     * @since 0.1.0
30543     * @category Array
30544     * @param {...Array} [arrays] The arrays to process.
30545     * @returns {Array} Returns the new array of grouped elements.
30546     * @example
30547     *
30548     * _.zip(['a', 'b'], [1, 2], [true, false]);
30549     * // => [['a', 1, true], ['b', 2, false]]
30550     */
30551    var zip = baseRest(unzip);
30552
30553    /**
30554     * This method is like `_.fromPairs` except that it accepts two arrays,
30555     * one of property identifiers and one of corresponding values.
30556     *
30557     * @static
30558     * @memberOf _
30559     * @since 0.4.0
30560     * @category Array
30561     * @param {Array} [props=[]] The property identifiers.
30562     * @param {Array} [values=[]] The property values.
30563     * @returns {Object} Returns the new object.
30564     * @example
30565     *
30566     * _.zipObject(['a', 'b'], [1, 2]);
30567     * // => { 'a': 1, 'b': 2 }
30568     */
30569    function zipObject(props, values) {
30570      return baseZipObject(props || [], values || [], assignValue);
30571    }
30572
30573    /**
30574     * This method is like `_.zipObject` except that it supports property paths.
30575     *
30576     * @static
30577     * @memberOf _
30578     * @since 4.1.0
30579     * @category Array
30580     * @param {Array} [props=[]] The property identifiers.
30581     * @param {Array} [values=[]] The property values.
30582     * @returns {Object} Returns the new object.
30583     * @example
30584     *
30585     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
30586     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
30587     */
30588    function zipObjectDeep(props, values) {
30589      return baseZipObject(props || [], values || [], baseSet);
30590    }
30591
30592    /**
30593     * This method is like `_.zip` except that it accepts `iteratee` to specify
30594     * how grouped values should be combined. The iteratee is invoked with the
30595     * elements of each group: (...group).
30596     *
30597     * @static
30598     * @memberOf _
30599     * @since 3.8.0
30600     * @category Array
30601     * @param {...Array} [arrays] The arrays to process.
30602     * @param {Function} [iteratee=_.identity] The function to combine
30603     *  grouped values.
30604     * @returns {Array} Returns the new array of grouped elements.
30605     * @example
30606     *
30607     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
30608     *   return a + b + c;
30609     * });
30610     * // => [111, 222]
30611     */
30612    var zipWith = baseRest(function(arrays) {
30613      var length = arrays.length,
30614          iteratee = length > 1 ? arrays[length - 1] : undefined;
30615
30616      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
30617      return unzipWith(arrays, iteratee);
30618    });
30619
30620    /*------------------------------------------------------------------------*/
30621
30622    /**
30623     * Creates a `lodash` wrapper instance that wraps `value` with explicit method
30624     * chain sequences enabled. The result of such sequences must be unwrapped
30625     * with `_#value`.
30626     *
30627     * @static
30628     * @memberOf _
30629     * @since 1.3.0
30630     * @category Seq
30631     * @param {*} value The value to wrap.
30632     * @returns {Object} Returns the new `lodash` wrapper instance.
30633     * @example
30634     *
30635     * var users = [
30636     *   { 'user': 'barney',  'age': 36 },
30637     *   { 'user': 'fred',    'age': 40 },
30638     *   { 'user': 'pebbles', 'age': 1 }
30639     * ];
30640     *
30641     * var youngest = _
30642     *   .chain(users)
30643     *   .sortBy('age')
30644     *   .map(function(o) {
30645     *     return o.user + ' is ' + o.age;
30646     *   })
30647     *   .head()
30648     *   .value();
30649     * // => 'pebbles is 1'
30650     */
30651    function chain(value) {
30652      var result = lodash(value);
30653      result.__chain__ = true;
30654      return result;
30655    }
30656
30657    /**
30658     * This method invokes `interceptor` and returns `value`. The interceptor
30659     * is invoked with one argument; (value). The purpose of this method is to
30660     * "tap into" a method chain sequence in order to modify intermediate results.
30661     *
30662     * @static
30663     * @memberOf _
30664     * @since 0.1.0
30665     * @category Seq
30666     * @param {*} value The value to provide to `interceptor`.
30667     * @param {Function} interceptor The function to invoke.
30668     * @returns {*} Returns `value`.
30669     * @example
30670     *
30671     * _([1, 2, 3])
30672     *  .tap(function(array) {
30673     *    // Mutate input array.
30674     *    array.pop();
30675     *  })
30676     *  .reverse()
30677     *  .value();
30678     * // => [2, 1]
30679     */
30680    function tap(value, interceptor) {
30681      interceptor(value);
30682      return value;
30683    }
30684
30685    /**
30686     * This method is like `_.tap` except that it returns the result of `interceptor`.
30687     * The purpose of this method is to "pass thru" values replacing intermediate
30688     * results in a method chain sequence.
30689     *
30690     * @static
30691     * @memberOf _
30692     * @since 3.0.0
30693     * @category Seq
30694     * @param {*} value The value to provide to `interceptor`.
30695     * @param {Function} interceptor The function to invoke.
30696     * @returns {*} Returns the result of `interceptor`.
30697     * @example
30698     *
30699     * _('  abc  ')
30700     *  .chain()
30701     *  .trim()
30702     *  .thru(function(value) {
30703     *    return [value];
30704     *  })
30705     *  .value();
30706     * // => ['abc']
30707     */
30708    function thru(value, interceptor) {
30709      return interceptor(value);
30710    }
30711
30712    /**
30713     * This method is the wrapper version of `_.at`.
30714     *
30715     * @name at
30716     * @memberOf _
30717     * @since 1.0.0
30718     * @category Seq
30719     * @param {...(string|string[])} [paths] The property paths to pick.
30720     * @returns {Object} Returns the new `lodash` wrapper instance.
30721     * @example
30722     *
30723     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
30724     *
30725     * _(object).at(['a[0].b.c', 'a[1]']).value();
30726     * // => [3, 4]
30727     */
30728    var wrapperAt = flatRest(function(paths) {
30729      var length = paths.length,
30730          start = length ? paths[0] : 0,
30731          value = this.__wrapped__,
30732          interceptor = function(object) { return baseAt(object, paths); };
30733
30734      if (length > 1 || this.__actions__.length ||
30735          !(value instanceof LazyWrapper) || !isIndex(start)) {
30736        return this.thru(interceptor);
30737      }
30738      value = value.slice(start, +start + (length ? 1 : 0));
30739      value.__actions__.push({
30740        'func': thru,
30741        'args': [interceptor],
30742        'thisArg': undefined
30743      });
30744      return new LodashWrapper(value, this.__chain__).thru(function(array) {
30745        if (length && !array.length) {
30746          array.push(undefined);
30747        }
30748        return array;
30749      });
30750    });
30751
30752    /**
30753     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
30754     *
30755     * @name chain
30756     * @memberOf _
30757     * @since 0.1.0
30758     * @category Seq
30759     * @returns {Object} Returns the new `lodash` wrapper instance.
30760     * @example
30761     *
30762     * var users = [
30763     *   { 'user': 'barney', 'age': 36 },
30764     *   { 'user': 'fred',   'age': 40 }
30765     * ];
30766     *
30767     * // A sequence without explicit chaining.
30768     * _(users).head();
30769     * // => { 'user': 'barney', 'age': 36 }
30770     *
30771     * // A sequence with explicit chaining.
30772     * _(users)
30773     *   .chain()
30774     *   .head()
30775     *   .pick('user')
30776     *   .value();
30777     * // => { 'user': 'barney' }
30778     */
30779    function wrapperChain() {
30780      return chain(this);
30781    }
30782
30783    /**
30784     * Executes the chain sequence and returns the wrapped result.
30785     *
30786     * @name commit
30787     * @memberOf _
30788     * @since 3.2.0
30789     * @category Seq
30790     * @returns {Object} Returns the new `lodash` wrapper instance.
30791     * @example
30792     *
30793     * var array = [1, 2];
30794     * var wrapped = _(array).push(3);
30795     *
30796     * console.log(array);
30797     * // => [1, 2]
30798     *
30799     * wrapped = wrapped.commit();
30800     * console.log(array);
30801     * // => [1, 2, 3]
30802     *
30803     * wrapped.last();
30804     * // => 3
30805     *
30806     * console.log(array);
30807     * // => [1, 2, 3]
30808     */
30809    function wrapperCommit() {
30810      return new LodashWrapper(this.value(), this.__chain__);
30811    }
30812
30813    /**
30814     * Gets the next value on a wrapped object following the
30815     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
30816     *
30817     * @name next
30818     * @memberOf _
30819     * @since 4.0.0
30820     * @category Seq
30821     * @returns {Object} Returns the next iterator value.
30822     * @example
30823     *
30824     * var wrapped = _([1, 2]);
30825     *
30826     * wrapped.next();
30827     * // => { 'done': false, 'value': 1 }
30828     *
30829     * wrapped.next();
30830     * // => { 'done': false, 'value': 2 }
30831     *
30832     * wrapped.next();
30833     * // => { 'done': true, 'value': undefined }
30834     */
30835    function wrapperNext() {
30836      if (this.__values__ === undefined) {
30837        this.__values__ = toArray(this.value());
30838      }
30839      var done = this.__index__ >= this.__values__.length,
30840          value = done ? undefined : this.__values__[this.__index__++];
30841
30842      return { 'done': done, 'value': value };
30843    }
30844
30845    /**
30846     * Enables the wrapper to be iterable.
30847     *
30848     * @name Symbol.iterator
30849     * @memberOf _
30850     * @since 4.0.0
30851     * @category Seq
30852     * @returns {Object} Returns the wrapper object.
30853     * @example
30854     *
30855     * var wrapped = _([1, 2]);
30856     *
30857     * wrapped[Symbol.iterator]() === wrapped;
30858     * // => true
30859     *
30860     * Array.from(wrapped);
30861     * // => [1, 2]
30862     */
30863    function wrapperToIterator() {
30864      return this;
30865    }
30866
30867    /**
30868     * Creates a clone of the chain sequence planting `value` as the wrapped value.
30869     *
30870     * @name plant
30871     * @memberOf _
30872     * @since 3.2.0
30873     * @category Seq
30874     * @param {*} value The value to plant.
30875     * @returns {Object} Returns the new `lodash` wrapper instance.
30876     * @example
30877     *
30878     * function square(n) {
30879     *   return n * n;
30880     * }
30881     *
30882     * var wrapped = _([1, 2]).map(square);
30883     * var other = wrapped.plant([3, 4]);
30884     *
30885     * other.value();
30886     * // => [9, 16]
30887     *
30888     * wrapped.value();
30889     * // => [1, 4]
30890     */
30891    function wrapperPlant(value) {
30892      var result,
30893          parent = this;
30894
30895      while (parent instanceof baseLodash) {
30896        var clone = wrapperClone(parent);
30897        clone.__index__ = 0;
30898        clone.__values__ = undefined;
30899        if (result) {
30900          previous.__wrapped__ = clone;
30901        } else {
30902          result = clone;
30903        }
30904        var previous = clone;
30905        parent = parent.__wrapped__;
30906      }
30907      previous.__wrapped__ = value;
30908      return result;
30909    }
30910
30911    /**
30912     * This method is the wrapper version of `_.reverse`.
30913     *
30914     * **Note:** This method mutates the wrapped array.
30915     *
30916     * @name reverse
30917     * @memberOf _
30918     * @since 0.1.0
30919     * @category Seq
30920     * @returns {Object} Returns the new `lodash` wrapper instance.
30921     * @example
30922     *
30923     * var array = [1, 2, 3];
30924     *
30925     * _(array).reverse().value()
30926     * // => [3, 2, 1]
30927     *
30928     * console.log(array);
30929     * // => [3, 2, 1]
30930     */
30931    function wrapperReverse() {
30932      var value = this.__wrapped__;
30933      if (value instanceof LazyWrapper) {
30934        var wrapped = value;
30935        if (this.__actions__.length) {
30936          wrapped = new LazyWrapper(this);
30937        }
30938        wrapped = wrapped.reverse();
30939        wrapped.__actions__.push({
30940          'func': thru,
30941          'args': [reverse],
30942          'thisArg': undefined
30943        });
30944        return new LodashWrapper(wrapped, this.__chain__);
30945      }
30946      return this.thru(reverse);
30947    }
30948
30949    /**
30950     * Executes the chain sequence to resolve the unwrapped value.
30951     *
30952     * @name value
30953     * @memberOf _
30954     * @since 0.1.0
30955     * @alias toJSON, valueOf
30956     * @category Seq
30957     * @returns {*} Returns the resolved unwrapped value.
30958     * @example
30959     *
30960     * _([1, 2, 3]).value();
30961     * // => [1, 2, 3]
30962     */
30963    function wrapperValue() {
30964      return baseWrapperValue(this.__wrapped__, this.__actions__);
30965    }
30966
30967    /*------------------------------------------------------------------------*/
30968
30969    /**
30970     * Creates an object composed of keys generated from the results of running
30971     * each element of `collection` thru `iteratee`. The corresponding value of
30972     * each key is the number of times the key was returned by `iteratee`. The
30973     * iteratee is invoked with one argument: (value).
30974     *
30975     * @static
30976     * @memberOf _
30977     * @since 0.5.0
30978     * @category Collection
30979     * @param {Array|Object} collection The collection to iterate over.
30980     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
30981     * @returns {Object} Returns the composed aggregate object.
30982     * @example
30983     *
30984     * _.countBy([6.1, 4.2, 6.3], Math.floor);
30985     * // => { '4': 1, '6': 2 }
30986     *
30987     * // The `_.property` iteratee shorthand.
30988     * _.countBy(['one', 'two', 'three'], 'length');
30989     * // => { '3': 2, '5': 1 }
30990     */
30991    var countBy = createAggregator(function(result, value, key) {
30992      if (hasOwnProperty.call(result, key)) {
30993        ++result[key];
30994      } else {
30995        baseAssignValue(result, key, 1);
30996      }
30997    });
30998
30999    /**
31000     * Checks if `predicate` returns truthy for **all** elements of `collection`.
31001     * Iteration is stopped once `predicate` returns falsey. The predicate is
31002     * invoked with three arguments: (value, index|key, collection).
31003     *
31004     * **Note:** This method returns `true` for
31005     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
31006     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
31007     * elements of empty collections.
31008     *
31009     * @static
31010     * @memberOf _
31011     * @since 0.1.0
31012     * @category Collection
31013     * @param {Array|Object} collection The collection to iterate over.
31014     * @param {Function} [predicate=_.identity] The function invoked per iteration.
31015     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
31016     * @returns {boolean} Returns `true` if all elements pass the predicate check,
31017     *  else `false`.
31018     * @example
31019     *
31020     * _.every([true, 1, null, 'yes'], Boolean);
31021     * // => false
31022     *
31023     * var users = [
31024     *   { 'user': 'barney', 'age': 36, 'active': false },
31025     *   { 'user': 'fred',   'age': 40, 'active': false }
31026     * ];
31027     *
31028     * // The `_.matches` iteratee shorthand.
31029     * _.every(users, { 'user': 'barney', 'active': false });
31030     * // => false
31031     *
31032     * // The `_.matchesProperty` iteratee shorthand.
31033     * _.every(users, ['active', false]);
31034     * // => true
31035     *
31036     * // The `_.property` iteratee shorthand.
31037     * _.every(users, 'active');
31038     * // => false
31039     */
31040    function every(collection, predicate, guard) {
31041      var func = isArray(collection) ? arrayEvery : baseEvery;
31042      if (guard && isIterateeCall(collection, predicate, guard)) {
31043        predicate = undefined;
31044      }
31045      return func(collection, getIteratee(predicate, 3));
31046    }
31047
31048    /**
31049     * Iterates over elements of `collection`, returning an array of all elements
31050     * `predicate` returns truthy for. The predicate is invoked with three
31051     * arguments: (value, index|key, collection).
31052     *
31053     * **Note:** Unlike `_.remove`, this method returns a new array.
31054     *
31055     * @static
31056     * @memberOf _
31057     * @since 0.1.0
31058     * @category Collection
31059     * @param {Array|Object} collection The collection to iterate over.
31060     * @param {Function} [predicate=_.identity] The function invoked per iteration.
31061     * @returns {Array} Returns the new filtered array.
31062     * @see _.reject
31063     * @example
31064     *
31065     * var users = [
31066     *   { 'user': 'barney', 'age': 36, 'active': true },
31067     *   { 'user': 'fred',   'age': 40, 'active': false }
31068     * ];
31069     *
31070     * _.filter(users, function(o) { return !o.active; });
31071     * // => objects for ['fred']
31072     *
31073     * // The `_.matches` iteratee shorthand.
31074     * _.filter(users, { 'age': 36, 'active': true });
31075     * // => objects for ['barney']
31076     *
31077     * // The `_.matchesProperty` iteratee shorthand.
31078     * _.filter(users, ['active', false]);
31079     * // => objects for ['fred']
31080     *
31081     * // The `_.property` iteratee shorthand.
31082     * _.filter(users, 'active');
31083     * // => objects for ['barney']
31084     *
31085     * // Combining several predicates using `_.overEvery` or `_.overSome`.
31086     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
31087     * // => objects for ['fred', 'barney']
31088     */
31089    function filter(collection, predicate) {
31090      var func = isArray(collection) ? arrayFilter : baseFilter;
31091      return func(collection, getIteratee(predicate, 3));
31092    }
31093
31094    /**
31095     * Iterates over elements of `collection`, returning the first element
31096     * `predicate` returns truthy for. The predicate is invoked with three
31097     * arguments: (value, index|key, collection).
31098     *
31099     * @static
31100     * @memberOf _
31101     * @since 0.1.0
31102     * @category Collection
31103     * @param {Array|Object} collection The collection to inspect.
31104     * @param {Function} [predicate=_.identity] The function invoked per iteration.
31105     * @param {number} [fromIndex=0] The index to search from.
31106     * @returns {*} Returns the matched element, else `undefined`.
31107     * @example
31108     *
31109     * var users = [
31110     *   { 'user': 'barney',  'age': 36, 'active': true },
31111     *   { 'user': 'fred',    'age': 40, 'active': false },
31112     *   { 'user': 'pebbles', 'age': 1,  'active': true }
31113     * ];
31114     *
31115     * _.find(users, function(o) { return o.age < 40; });
31116     * // => object for 'barney'
31117     *
31118     * // The `_.matches` iteratee shorthand.
31119     * _.find(users, { 'age': 1, 'active': true });
31120     * // => object for 'pebbles'
31121     *
31122     * // The `_.matchesProperty` iteratee shorthand.
31123     * _.find(users, ['active', false]);
31124     * // => object for 'fred'
31125     *
31126     * // The `_.property` iteratee shorthand.
31127     * _.find(users, 'active');
31128     * // => object for 'barney'
31129     */
31130    var find = createFind(findIndex);
31131
31132    /**
31133     * This method is like `_.find` except that it iterates over elements of
31134     * `collection` from right to left.
31135     *
31136     * @static
31137     * @memberOf _
31138     * @since 2.0.0
31139     * @category Collection
31140     * @param {Array|Object} collection The collection to inspect.
31141     * @param {Function} [predicate=_.identity] The function invoked per iteration.
31142     * @param {number} [fromIndex=collection.length-1] The index to search from.
31143     * @returns {*} Returns the matched element, else `undefined`.
31144     * @example
31145     *
31146     * _.findLast([1, 2, 3, 4], function(n) {
31147     *   return n % 2 == 1;
31148     * });
31149     * // => 3
31150     */
31151    var findLast = createFind(findLastIndex);
31152
31153    /**
31154     * Creates a flattened array of values by running each element in `collection`
31155     * thru `iteratee` and flattening the mapped results. The iteratee is invoked
31156     * with three arguments: (value, index|key, collection).
31157     *
31158     * @static
31159     * @memberOf _
31160     * @since 4.0.0
31161     * @category Collection
31162     * @param {Array|Object} collection The collection to iterate over.
31163     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
31164     * @returns {Array} Returns the new flattened array.
31165     * @example
31166     *
31167     * function duplicate(n) {
31168     *   return [n, n];
31169     * }
31170     *
31171     * _.flatMap([1, 2], duplicate);
31172     * // => [1, 1, 2, 2]
31173     */
31174    function flatMap(collection, iteratee) {
31175      return baseFlatten(map(collection, iteratee), 1);
31176    }
31177
31178    /**
31179     * This method is like `_.flatMap` except that it recursively flattens the
31180     * mapped results.
31181     *
31182     * @static
31183     * @memberOf _
31184     * @since 4.7.0
31185     * @category Collection
31186     * @param {Array|Object} collection The collection to iterate over.
31187     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
31188     * @returns {Array} Returns the new flattened array.
31189     * @example
31190     *
31191     * function duplicate(n) {
31192     *   return [[[n, n]]];
31193     * }
31194     *
31195     * _.flatMapDeep([1, 2], duplicate);
31196     * // => [1, 1, 2, 2]
31197     */
31198    function flatMapDeep(collection, iteratee) {
31199      return baseFlatten(map(collection, iteratee), INFINITY);
31200    }
31201
31202    /**
31203     * This method is like `_.flatMap` except that it recursively flattens the
31204     * mapped results up to `depth` times.
31205     *
31206     * @static
31207     * @memberOf _
31208     * @since 4.7.0
31209     * @category Collection
31210     * @param {Array|Object} collection The collection to iterate over.
31211     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
31212     * @param {number} [depth=1] The maximum recursion depth.
31213     * @returns {Array} Returns the new flattened array.
31214     * @example
31215     *
31216     * function duplicate(n) {
31217     *   return [[[n, n]]];
31218     * }
31219     *
31220     * _.flatMapDepth([1, 2], duplicate, 2);
31221     * // => [[1, 1], [2, 2]]
31222     */
31223    function flatMapDepth(collection, iteratee, depth) {
31224      depth = depth === undefined ? 1 : toInteger(depth);
31225      return baseFlatten(map(collection, iteratee), depth);
31226    }
31227
31228    /**
31229     * Iterates over elements of `collection` and invokes `iteratee` for each element.
31230     * The iteratee is invoked with three arguments: (value, index|key, collection).
31231     * Iteratee functions may exit iteration early by explicitly returning `false`.
31232     *
31233     * **Note:** As with other "Collections" methods, objects with a "length"
31234     * property are iterated like arrays. To avoid this behavior use `_.forIn`
31235     * or `_.forOwn` for object iteration.
31236     *
31237     * @static
31238     * @memberOf _
31239     * @since 0.1.0
31240     * @alias each
31241     * @category Collection
31242     * @param {Array|Object} collection The collection to iterate over.
31243     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
31244     * @returns {Array|Object} Returns `collection`.
31245     * @see _.forEachRight
31246     * @example
31247     *
31248     * _.forEach([1, 2], function(value) {
31249     *   console.log(value);
31250     * });
31251     * // => Logs `1` then `2`.
31252     *
31253     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
31254     *   console.log(key);
31255     * });
31256     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
31257     */
31258    function forEach(collection, iteratee) {
31259      var func = isArray(collection) ? arrayEach : baseEach;
31260      return func(collection, getIteratee(iteratee, 3));
31261    }
31262
31263    /**
31264     * This method is like `_.forEach` except that it iterates over elements of
31265     * `collection` from right to left.
31266     *
31267     * @static
31268     * @memberOf _
31269     * @since 2.0.0
31270     * @alias eachRight
31271     * @category Collection
31272     * @param {Array|Object} collection The collection to iterate over.
31273     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
31274     * @returns {Array|Object} Returns `collection`.
31275     * @see _.forEach
31276     * @example
31277     *
31278     * _.forEachRight([1, 2], function(value) {
31279     *   console.log(value);
31280     * });
31281     * // => Logs `2` then `1`.
31282     */
31283    function forEachRight(collection, iteratee) {
31284      var func = isArray(collection) ? arrayEachRight : baseEachRight;
31285      return func(collection, getIteratee(iteratee, 3));
31286    }
31287
31288    /**
vendor: 4,136 bytes, lines 31289-31396
31289     * Creates an object composed of keys generated from the results of running
31290     * each element of `collection` thru `iteratee`. The order of grouped values
31291     * is determined by the order they occur in `collection`. The corresponding
31292     * value of each key is an array of elements responsible for generating the
31293     * key. The iteratee is invoked with one argument: (value).
31294     *
31295     * @static
31296     * @memberOf _
31297     * @since 0.1.0
31298     * @category Collection
31299     * @param {Array|Object} collection The collection to iterate over.
31300     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
31301     * @returns {Object} Returns the composed aggregate object.
31302     * @example
31303     *
31304     * _.groupBy([6.1, 4.2, 6.3], Math.floor);
31305     * // => { '4': [4.2], '6': [6.1, 6.3] }
31306     *
31307     * // The `_.property` iteratee shorthand.
31308     * _.groupBy(['one', 'two', 'three'], 'length');
31309     * // => { '3': ['one', 'two'], '5': ['three'] }
31310     */
31311    var groupBy = createAggregator(function(result, value, key) {
31312      if (hasOwnProperty.call(result, key)) {
31313        result[key].push(value);
31314      } else {
31315        baseAssignValue(result, key, [value]);
31316      }
31317    });
31318
31319    /**
31320     * Checks if `value` is in `collection`. If `collection` is a string, it's
31321     * checked for a substring of `value`, otherwise
31322     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
31323     * is used for equality comparisons. If `fromIndex` is negative, it's used as
31324     * the offset from the end of `collection`.
31325     *
31326     * @static
31327     * @memberOf _
31328     * @since 0.1.0
31329     * @category Collection
31330     * @param {Array|Object|string} collection The collection to inspect.
31331     * @param {*} value The value to search for.
31332     * @param {number} [fromIndex=0] The index to search from.
31333     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
31334     * @returns {boolean} Returns `true` if `value` is found, else `false`.
31335     * @example
31336     *
31337     * _.includes([1, 2, 3], 1);
31338     * // => true
31339     *
31340     * _.includes([1, 2, 3], 1, 2);
31341     * // => false
31342     *
31343     * _.includes({ 'a': 1, 'b': 2 }, 1);
31344     * // => true
31345     *
31346     * _.includes('abcd', 'bc');
31347     * // => true
31348     */
31349    function includes(collection, value, fromIndex, guard) {
31350      collection = isArrayLike(collection) ? collection : values(collection);
31351      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
31352
31353      var length = collection.length;
31354      if (fromIndex < 0) {
31355        fromIndex = nativeMax(length + fromIndex, 0);
31356      }
31357      return isString(collection)
31358        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
31359        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
31360    }
31361
31362    /**
31363     * Invokes the method at `path` of each element in `collection`, returning
31364     * an array of the results of each invoked method. Any additional arguments
31365     * are provided to each invoked method. If `path` is a function, it's invoked
31366     * for, and `this` bound to, each element in `collection`.
31367     *
31368     * @static
31369     * @memberOf _
31370     * @since 4.0.0
31371     * @category Collection
31372     * @param {Array|Object} collection The collection to iterate over.
31373     * @param {Array|Function|string} path The path of the method to invoke or
31374     *  the function invoked per iteration.
31375     * @param {...*} [args] The arguments to invoke each method with.
31376     * @returns {Array} Returns the array of results.
31377     * @example
31378     *
31379     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
31380     * // => [[1, 5, 7], [1, 2, 3]]
31381     *
31382     * _.invokeMap([123, 456], String.prototype.split, '');
31383     * // => [['1', '2', '3'], ['4', '5', '6']]
31384     */
31385    var invokeMap = baseRest(function(collection, path, args) {
31386      var index = -1,
31387          isFunc = typeof path == 'function',
31388          result = isArrayLike(collection) ? Array(collection.length) : [];
31389
31390      baseEach(collection, function(value) {
31391        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
31392      });
31393      return result;
31394    });
31395
31396    /**
vendor: 68,500 bytes, lines 31397-33511
31397     * Creates an object composed of keys generated from the results of running
31398     * each element of `collection` thru `iteratee`. The corresponding value of
31399     * each key is the last element responsible for generating the key. The
31400     * iteratee is invoked with one argument: (value).
31401     *
31402     * @static
31403     * @memberOf _
31404     * @since 4.0.0
31405     * @category Collection
31406     * @param {Array|Object} collection The collection to iterate over.
31407     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
31408     * @returns {Object} Returns the composed aggregate object.
31409     * @example
31410     *
31411     * var array = [
31412     *   { 'dir': 'left', 'code': 97 },
31413     *   { 'dir': 'right', 'code': 100 }
31414     * ];
31415     *
31416     * _.keyBy(array, function(o) {
31417     *   return String.fromCharCode(o.code);
31418     * });
31419     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
31420     *
31421     * _.keyBy(array, 'dir');
31422     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
31423     */
31424    var keyBy = createAggregator(function(result, value, key) {
31425      baseAssignValue(result, key, value);
31426    });
31427
31428    /**
31429     * Creates an array of values by running each element in `collection` thru
31430     * `iteratee`. The iteratee is invoked with three arguments:
31431     * (value, index|key, collection).
31432     *
31433     * Many lodash methods are guarded to work as iteratees for methods like
31434     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
31435     *
31436     * The guarded methods are:
31437     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
31438     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
31439     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
31440     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
31441     *
31442     * @static
31443     * @memberOf _
31444     * @since 0.1.0
31445     * @category Collection
31446     * @param {Array|Object} collection The collection to iterate over.
31447     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
31448     * @returns {Array} Returns the new mapped array.
31449     * @example
31450     *
31451     * function square(n) {
31452     *   return n * n;
31453     * }
31454     *
31455     * _.map([4, 8], square);
31456     * // => [16, 64]
31457     *
31458     * _.map({ 'a': 4, 'b': 8 }, square);
31459     * // => [16, 64] (iteration order is not guaranteed)
31460     *
31461     * var users = [
31462     *   { 'user': 'barney' },
31463     *   { 'user': 'fred' }
31464     * ];
31465     *
31466     * // The `_.property` iteratee shorthand.
31467     * _.map(users, 'user');
31468     * // => ['barney', 'fred']
31469     */
31470    function map(collection, iteratee) {
31471      var func = isArray(collection) ? arrayMap : baseMap;
31472      return func(collection, getIteratee(iteratee, 3));
31473    }
31474
31475    /**
31476     * This method is like `_.sortBy` except that it allows specifying the sort
31477     * orders of the iteratees to sort by. If `orders` is unspecified, all values
31478     * are sorted in ascending order. Otherwise, specify an order of "desc" for
31479     * descending or "asc" for ascending sort order of corresponding values.
31480     *
31481     * @static
31482     * @memberOf _
31483     * @since 4.0.0
31484     * @category Collection
31485     * @param {Array|Object} collection The collection to iterate over.
31486     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
31487     *  The iteratees to sort by.
31488     * @param {string[]} [orders] The sort orders of `iteratees`.
31489     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
31490     * @returns {Array} Returns the new sorted array.
31491     * @example
31492     *
31493     * var users = [
31494     *   { 'user': 'fred',   'age': 48 },
31495     *   { 'user': 'barney', 'age': 34 },
31496     *   { 'user': 'fred',   'age': 40 },
31497     *   { 'user': 'barney', 'age': 36 }
31498     * ];
31499     *
31500     * // Sort by `user` in ascending order and by `age` in descending order.
31501     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
31502     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
31503     */
31504    function orderBy(collection, iteratees, orders, guard) {
31505      if (collection == null) {
31506        return [];
31507      }
31508      if (!isArray(iteratees)) {
31509        iteratees = iteratees == null ? [] : [iteratees];
31510      }
31511      orders = guard ? undefined : orders;
31512      if (!isArray(orders)) {
31513        orders = orders == null ? [] : [orders];
31514      }
31515      return baseOrderBy(collection, iteratees, orders);
31516    }
31517
31518    /**
31519     * Creates an array of elements split into two groups, the first of which
31520     * contains elements `predicate` returns truthy for, the second of which
31521     * contains elements `predicate` returns falsey for. The predicate is
31522     * invoked with one argument: (value).
31523     *
31524     * @static
31525     * @memberOf _
31526     * @since 3.0.0
31527     * @category Collection
31528     * @param {Array|Object} collection The collection to iterate over.
31529     * @param {Function} [predicate=_.identity] The function invoked per iteration.
31530     * @returns {Array} Returns the array of grouped elements.
31531     * @example
31532     *
31533     * var users = [
31534     *   { 'user': 'barney',  'age': 36, 'active': false },
31535     *   { 'user': 'fred',    'age': 40, 'active': true },
31536     *   { 'user': 'pebbles', 'age': 1,  'active': false }
31537     * ];
31538     *
31539     * _.partition(users, function(o) { return o.active; });
31540     * // => objects for [['fred'], ['barney', 'pebbles']]
31541     *
31542     * // The `_.matches` iteratee shorthand.
31543     * _.partition(users, { 'age': 1, 'active': false });
31544     * // => objects for [['pebbles'], ['barney', 'fred']]
31545     *
31546     * // The `_.matchesProperty` iteratee shorthand.
31547     * _.partition(users, ['active', false]);
31548     * // => objects for [['barney', 'pebbles'], ['fred']]
31549     *
31550     * // The `_.property` iteratee shorthand.
31551     * _.partition(users, 'active');
31552     * // => objects for [['fred'], ['barney', 'pebbles']]
31553     */
31554    var partition = createAggregator(function(result, value, key) {
31555      result[key ? 0 : 1].push(value);
31556    }, function() { return [[], []]; });
31557
31558    /**
31559     * Reduces `collection` to a value which is the accumulated result of running
31560     * each element in `collection` thru `iteratee`, where each successive
31561     * invocation is supplied the return value of the previous. If `accumulator`
31562     * is not given, the first element of `collection` is used as the initial
31563     * value. The iteratee is invoked with four arguments:
31564     * (accumulator, value, index|key, collection).
31565     *
31566     * Many lodash methods are guarded to work as iteratees for methods like
31567     * `_.reduce`, `_.reduceRight`, and `_.transform`.
31568     *
31569     * The guarded methods are:
31570     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
31571     * and `sortBy`
31572     *
31573     * @static
31574     * @memberOf _
31575     * @since 0.1.0
31576     * @category Collection
31577     * @param {Array|Object} collection The collection to iterate over.
31578     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
31579     * @param {*} [accumulator] The initial value.
31580     * @returns {*} Returns the accumulated value.
31581     * @see _.reduceRight
31582     * @example
31583     *
31584     * _.reduce([1, 2], function(sum, n) {
31585     *   return sum + n;
31586     * }, 0);
31587     * // => 3
31588     *
31589     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
31590     *   (result[value] || (result[value] = [])).push(key);
31591     *   return result;
31592     * }, {});
31593     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
31594     */
31595    function reduce(collection, iteratee, accumulator) {
31596      var func = isArray(collection) ? arrayReduce : baseReduce,
31597          initAccum = arguments.length < 3;
31598
31599      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
31600    }
31601
31602    /**
31603     * This method is like `_.reduce` except that it iterates over elements of
31604     * `collection` from right to left.
31605     *
31606     * @static
31607     * @memberOf _
31608     * @since 0.1.0
31609     * @category Collection
31610     * @param {Array|Object} collection The collection to iterate over.
31611     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
31612     * @param {*} [accumulator] The initial value.
31613     * @returns {*} Returns the accumulated value.
31614     * @see _.reduce
31615     * @example
31616     *
31617     * var array = [[0, 1], [2, 3], [4, 5]];
31618     *
31619     * _.reduceRight(array, function(flattened, other) {
31620     *   return flattened.concat(other);
31621     * }, []);
31622     * // => [4, 5, 2, 3, 0, 1]
31623     */
31624    function reduceRight(collection, iteratee, accumulator) {
31625      var func = isArray(collection) ? arrayReduceRight : baseReduce,
31626          initAccum = arguments.length < 3;
31627
31628      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
31629    }
31630
31631    /**
31632     * The opposite of `_.filter`; this method returns the elements of `collection`
31633     * that `predicate` does **not** return truthy for.
31634     *
31635     * @static
31636     * @memberOf _
31637     * @since 0.1.0
31638     * @category Collection
31639     * @param {Array|Object} collection The collection to iterate over.
31640     * @param {Function} [predicate=_.identity] The function invoked per iteration.
31641     * @returns {Array} Returns the new filtered array.
31642     * @see _.filter
31643     * @example
31644     *
31645     * var users = [
31646     *   { 'user': 'barney', 'age': 36, 'active': false },
31647     *   { 'user': 'fred',   'age': 40, 'active': true }
31648     * ];
31649     *
31650     * _.reject(users, function(o) { return !o.active; });
31651     * // => objects for ['fred']
31652     *
31653     * // The `_.matches` iteratee shorthand.
31654     * _.reject(users, { 'age': 40, 'active': true });
31655     * // => objects for ['barney']
31656     *
31657     * // The `_.matchesProperty` iteratee shorthand.
31658     * _.reject(users, ['active', false]);
31659     * // => objects for ['fred']
31660     *
31661     * // The `_.property` iteratee shorthand.
31662     * _.reject(users, 'active');
31663     * // => objects for ['barney']
31664     */
31665    function reject(collection, predicate) {
31666      var func = isArray(collection) ? arrayFilter : baseFilter;
31667      return func(collection, negate(getIteratee(predicate, 3)));
31668    }
31669
31670    /**
31671     * Gets a random element from `collection`.
31672     *
31673     * @static
31674     * @memberOf _
31675     * @since 2.0.0
31676     * @category Collection
31677     * @param {Array|Object} collection The collection to sample.
31678     * @returns {*} Returns the random element.
31679     * @example
31680     *
31681     * _.sample([1, 2, 3, 4]);
31682     * // => 2
31683     */
31684    function sample(collection) {
31685      var func = isArray(collection) ? arraySample : baseSample;
31686      return func(collection);
31687    }
31688
31689    /**
31690     * Gets `n` random elements at unique keys from `collection` up to the
31691     * size of `collection`.
31692     *
31693     * @static
31694     * @memberOf _
31695     * @since 4.0.0
31696     * @category Collection
31697     * @param {Array|Object} collection The collection to sample.
31698     * @param {number} [n=1] The number of elements to sample.
31699     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
31700     * @returns {Array} Returns the random elements.
31701     * @example
31702     *
31703     * _.sampleSize([1, 2, 3], 2);
31704     * // => [3, 1]
31705     *
31706     * _.sampleSize([1, 2, 3], 4);
31707     * // => [2, 3, 1]
31708     */
31709    function sampleSize(collection, n, guard) {
31710      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
31711        n = 1;
31712      } else {
31713        n = toInteger(n);
31714      }
31715      var func = isArray(collection) ? arraySampleSize : baseSampleSize;
31716      return func(collection, n);
31717    }
31718
31719    /**
31720     * Creates an array of shuffled values, using a version of the
31721     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
31722     *
31723     * @static
31724     * @memberOf _
31725     * @since 0.1.0
31726     * @category Collection
31727     * @param {Array|Object} collection The collection to shuffle.
31728     * @returns {Array} Returns the new shuffled array.
31729     * @example
31730     *
31731     * _.shuffle([1, 2, 3, 4]);
31732     * // => [4, 1, 3, 2]
31733     */
31734    function shuffle(collection) {
31735      var func = isArray(collection) ? arrayShuffle : baseShuffle;
31736      return func(collection);
31737    }
31738
31739    /**
31740     * Gets the size of `collection` by returning its length for array-like
31741     * values or the number of own enumerable string keyed properties for objects.
31742     *
31743     * @static
31744     * @memberOf _
31745     * @since 0.1.0
31746     * @category Collection
31747     * @param {Array|Object|string} collection The collection to inspect.
31748     * @returns {number} Returns the collection size.
31749     * @example
31750     *
31751     * _.size([1, 2, 3]);
31752     * // => 3
31753     *
31754     * _.size({ 'a': 1, 'b': 2 });
31755     * // => 2
31756     *
31757     * _.size('pebbles');
31758     * // => 7
31759     */
31760    function size(collection) {
31761      if (collection == null) {
31762        return 0;
31763      }
31764      if (isArrayLike(collection)) {
31765        return isString(collection) ? stringSize(collection) : collection.length;
31766      }
31767      var tag = getTag(collection);
31768      if (tag == mapTag || tag == setTag) {
31769        return collection.size;
31770      }
31771      return baseKeys(collection).length;
31772    }
31773
31774    /**
31775     * Checks if `predicate` returns truthy for **any** element of `collection`.
31776     * Iteration is stopped once `predicate` returns truthy. The predicate is
31777     * invoked with three arguments: (value, index|key, collection).
31778     *
31779     * @static
31780     * @memberOf _
31781     * @since 0.1.0
31782     * @category Collection
31783     * @param {Array|Object} collection The collection to iterate over.
31784     * @param {Function} [predicate=_.identity] The function invoked per iteration.
31785     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
31786     * @returns {boolean} Returns `true` if any element passes the predicate check,
31787     *  else `false`.
31788     * @example
31789     *
31790     * _.some([null, 0, 'yes', false], Boolean);
31791     * // => true
31792     *
31793     * var users = [
31794     *   { 'user': 'barney', 'active': true },
31795     *   { 'user': 'fred',   'active': false }
31796     * ];
31797     *
31798     * // The `_.matches` iteratee shorthand.
31799     * _.some(users, { 'user': 'barney', 'active': false });
31800     * // => false
31801     *
31802     * // The `_.matchesProperty` iteratee shorthand.
31803     * _.some(users, ['active', false]);
31804     * // => true
31805     *
31806     * // The `_.property` iteratee shorthand.
31807     * _.some(users, 'active');
31808     * // => true
31809     */
31810    function some(collection, predicate, guard) {
31811      var func = isArray(collection) ? arraySome : baseSome;
31812      if (guard && isIterateeCall(collection, predicate, guard)) {
31813        predicate = undefined;
31814      }
31815      return func(collection, getIteratee(predicate, 3));
31816    }
31817
31818    /**
31819     * Creates an array of elements, sorted in ascending order by the results of
31820     * running each element in a collection thru each iteratee. This method
31821     * performs a stable sort, that is, it preserves the original sort order of
31822     * equal elements. The iteratees are invoked with one argument: (value).
31823     *
31824     * @static
31825     * @memberOf _
31826     * @since 0.1.0
31827     * @category Collection
31828     * @param {Array|Object} collection The collection to iterate over.
31829     * @param {...(Function|Function[])} [iteratees=[_.identity]]
31830     *  The iteratees to sort by.
31831     * @returns {Array} Returns the new sorted array.
31832     * @example
31833     *
31834     * var users = [
31835     *   { 'user': 'fred',   'age': 48 },
31836     *   { 'user': 'barney', 'age': 36 },
31837     *   { 'user': 'fred',   'age': 30 },
31838     *   { 'user': 'barney', 'age': 34 }
31839     * ];
31840     *
31841     * _.sortBy(users, [function(o) { return o.user; }]);
31842     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
31843     *
31844     * _.sortBy(users, ['user', 'age']);
31845     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
31846     */
31847    var sortBy = baseRest(function(collection, iteratees) {
31848      if (collection == null) {
31849        return [];
31850      }
31851      var length = iteratees.length;
31852      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
31853        iteratees = [];
31854      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
31855        iteratees = [iteratees[0]];
31856      }
31857      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
31858    });
31859
31860    /*------------------------------------------------------------------------*/
31861
31862    /**
31863     * Gets the timestamp of the number of milliseconds that have elapsed since
31864     * the Unix epoch (1 January 1970 00:00:00 UTC).
31865     *
31866     * @static
31867     * @memberOf _
31868     * @since 2.4.0
31869     * @category Date
31870     * @returns {number} Returns the timestamp.
31871     * @example
31872     *
31873     * _.defer(function(stamp) {
31874     *   console.log(_.now() - stamp);
31875     * }, _.now());
31876     * // => Logs the number of milliseconds it took for the deferred invocation.
31877     */
31878    var now = ctxNow || function() {
31879      return root.Date.now();
31880    };
31881
31882    /*------------------------------------------------------------------------*/
31883
31884    /**
31885     * The opposite of `_.before`; this method creates a function that invokes
31886     * `func` once it's called `n` or more times.
31887     *
31888     * @static
31889     * @memberOf _
31890     * @since 0.1.0
31891     * @category Function
31892     * @param {number} n The number of calls before `func` is invoked.
31893     * @param {Function} func The function to restrict.
31894     * @returns {Function} Returns the new restricted function.
31895     * @example
31896     *
31897     * var saves = ['profile', 'settings'];
31898     *
31899     * var done = _.after(saves.length, function() {
31900     *   console.log('done saving!');
31901     * });
31902     *
31903     * _.forEach(saves, function(type) {
31904     *   asyncSave({ 'type': type, 'complete': done });
31905     * });
31906     * // => Logs 'done saving!' after the two async saves have completed.
31907     */
31908    function after(n, func) {
31909      if (typeof func != 'function') {
31910        throw new TypeError(FUNC_ERROR_TEXT);
31911      }
31912      n = toInteger(n);
31913      return function() {
31914        if (--n < 1) {
31915          return func.apply(this, arguments);
31916        }
31917      };
31918    }
31919
31920    /**
31921     * Creates a function that invokes `func`, with up to `n` arguments,
31922     * ignoring any additional arguments.
31923     *
31924     * @static
31925     * @memberOf _
31926     * @since 3.0.0
31927     * @category Function
31928     * @param {Function} func The function to cap arguments for.
31929     * @param {number} [n=func.length] The arity cap.
31930     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
31931     * @returns {Function} Returns the new capped function.
31932     * @example
31933     *
31934     * _.map(['6', '8', '10'], _.ary(parseInt, 1));
31935     * // => [6, 8, 10]
31936     */
31937    function ary(func, n, guard) {
31938      n = guard ? undefined : n;
31939      n = (func && n == null) ? func.length : n;
31940      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
31941    }
31942
31943    /**
31944     * Creates a function that invokes `func`, with the `this` binding and arguments
31945     * of the created function, while it's called less than `n` times. Subsequent
31946     * calls to the created function return the result of the last `func` invocation.
31947     *
31948     * @static
31949     * @memberOf _
31950     * @since 3.0.0
31951     * @category Function
31952     * @param {number} n The number of calls at which `func` is no longer invoked.
31953     * @param {Function} func The function to restrict.
31954     * @returns {Function} Returns the new restricted function.
31955     * @example
31956     *
31957     * jQuery(element).on('click', _.before(5, addContactToList));
31958     * // => Allows adding up to 4 contacts to the list.
31959     */
31960    function before(n, func) {
31961      var result;
31962      if (typeof func != 'function') {
31963        throw new TypeError(FUNC_ERROR_TEXT);
31964      }
31965      n = toInteger(n);
31966      return function() {
31967        if (--n > 0) {
31968          result = func.apply(this, arguments);
31969        }
31970        if (n <= 1) {
31971          func = undefined;
31972        }
31973        return result;
31974      };
31975    }
31976
31977    /**
31978     * Creates a function that invokes `func` with the `this` binding of `thisArg`
31979     * and `partials` prepended to the arguments it receives.
31980     *
31981     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
31982     * may be used as a placeholder for partially applied arguments.
31983     *
31984     * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
31985     * property of bound functions.
31986     *
31987     * @static
31988     * @memberOf _
31989     * @since 0.1.0
31990     * @category Function
31991     * @param {Function} func The function to bind.
31992     * @param {*} thisArg The `this` binding of `func`.
31993     * @param {...*} [partials] The arguments to be partially applied.
31994     * @returns {Function} Returns the new bound function.
31995     * @example
31996     *
31997     * function greet(greeting, punctuation) {
31998     *   return greeting + ' ' + this.user + punctuation;
31999     * }
32000     *
32001     * var object = { 'user': 'fred' };
32002     *
32003     * var bound = _.bind(greet, object, 'hi');
32004     * bound('!');
32005     * // => 'hi fred!'
32006     *
32007     * // Bound with placeholders.
32008     * var bound = _.bind(greet, object, _, '!');
32009     * bound('hi');
32010     * // => 'hi fred!'
32011     */
32012    var bind = baseRest(function(func, thisArg, partials) {
32013      var bitmask = WRAP_BIND_FLAG;
32014      if (partials.length) {
32015        var holders = replaceHolders(partials, getHolder(bind));
32016        bitmask |= WRAP_PARTIAL_FLAG;
32017      }
32018      return createWrap(func, bitmask, thisArg, partials, holders);
32019    });
32020
32021    /**
32022     * Creates a function that invokes the method at `object[key]` with `partials`
32023     * prepended to the arguments it receives.
32024     *
32025     * This method differs from `_.bind` by allowing bound functions to reference
32026     * methods that may be redefined or don't yet exist. See
32027     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
32028     * for more details.
32029     *
32030     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
32031     * builds, may be used as a placeholder for partially applied arguments.
32032     *
32033     * @static
32034     * @memberOf _
32035     * @since 0.10.0
32036     * @category Function
32037     * @param {Object} object The object to invoke the method on.
32038     * @param {string} key The key of the method.
32039     * @param {...*} [partials] The arguments to be partially applied.
32040     * @returns {Function} Returns the new bound function.
32041     * @example
32042     *
32043     * var object = {
32044     *   'user': 'fred',
32045     *   'greet': function(greeting, punctuation) {
32046     *     return greeting + ' ' + this.user + punctuation;
32047     *   }
32048     * };
32049     *
32050     * var bound = _.bindKey(object, 'greet', 'hi');
32051     * bound('!');
32052     * // => 'hi fred!'
32053     *
32054     * object.greet = function(greeting, punctuation) {
32055     *   return greeting + 'ya ' + this.user + punctuation;
32056     * };
32057     *
32058     * bound('!');
32059     * // => 'hiya fred!'
32060     *
32061     * // Bound with placeholders.
32062     * var bound = _.bindKey(object, 'greet', _, '!');
32063     * bound('hi');
32064     * // => 'hiya fred!'
32065     */
32066    var bindKey = baseRest(function(object, key, partials) {
32067      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
32068      if (partials.length) {
32069        var holders = replaceHolders(partials, getHolder(bindKey));
32070        bitmask |= WRAP_PARTIAL_FLAG;
32071      }
32072      return createWrap(key, bitmask, object, partials, holders);
32073    });
32074
32075    /**
32076     * Creates a function that accepts arguments of `func` and either invokes
32077     * `func` returning its result, if at least `arity` number of arguments have
32078     * been provided, or returns a function that accepts the remaining `func`
32079     * arguments, and so on. The arity of `func` may be specified if `func.length`
32080     * is not sufficient.
32081     *
32082     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
32083     * may be used as a placeholder for provided arguments.
32084     *
32085     * **Note:** This method doesn't set the "length" property of curried functions.
32086     *
32087     * @static
32088     * @memberOf _
32089     * @since 2.0.0
32090     * @category Function
32091     * @param {Function} func The function to curry.
32092     * @param {number} [arity=func.length] The arity of `func`.
32093     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
32094     * @returns {Function} Returns the new curried function.
32095     * @example
32096     *
32097     * var abc = function(a, b, c) {
32098     *   return [a, b, c];
32099     * };
32100     *
32101     * var curried = _.curry(abc);
32102     *
32103     * curried(1)(2)(3);
32104     * // => [1, 2, 3]
32105     *
32106     * curried(1, 2)(3);
32107     * // => [1, 2, 3]
32108     *
32109     * curried(1, 2, 3);
32110     * // => [1, 2, 3]
32111     *
32112     * // Curried with placeholders.
32113     * curried(1)(_, 3)(2);
32114     * // => [1, 2, 3]
32115     */
32116    function curry(func, arity, guard) {
32117      arity = guard ? undefined : arity;
32118      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
32119      result.placeholder = curry.placeholder;
32120      return result;
32121    }
32122
32123    /**
32124     * This method is like `_.curry` except that arguments are applied to `func`
32125     * in the manner of `_.partialRight` instead of `_.partial`.
32126     *
32127     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
32128     * builds, may be used as a placeholder for provided arguments.
32129     *
32130     * **Note:** This method doesn't set the "length" property of curried functions.
32131     *
32132     * @static
32133     * @memberOf _
32134     * @since 3.0.0
32135     * @category Function
32136     * @param {Function} func The function to curry.
32137     * @param {number} [arity=func.length] The arity of `func`.
32138     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
32139     * @returns {Function} Returns the new curried function.
32140     * @example
32141     *
32142     * var abc = function(a, b, c) {
32143     *   return [a, b, c];
32144     * };
32145     *
32146     * var curried = _.curryRight(abc);
32147     *
32148     * curried(3)(2)(1);
32149     * // => [1, 2, 3]
32150     *
32151     * curried(2, 3)(1);
32152     * // => [1, 2, 3]
32153     *
32154     * curried(1, 2, 3);
32155     * // => [1, 2, 3]
32156     *
32157     * // Curried with placeholders.
32158     * curried(3)(1, _)(2);
32159     * // => [1, 2, 3]
32160     */
32161    function curryRight(func, arity, guard) {
32162      arity = guard ? undefined : arity;
32163      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
32164      result.placeholder = curryRight.placeholder;
32165      return result;
32166    }
32167
32168    /**
32169     * Creates a debounced function that delays invoking `func` until after `wait`
32170     * milliseconds have elapsed since the last time the debounced function was
32171     * invoked. The debounced function comes with a `cancel` method to cancel
32172     * delayed `func` invocations and a `flush` method to immediately invoke them.
32173     * Provide `options` to indicate whether `func` should be invoked on the
32174     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
32175     * with the last arguments provided to the debounced function. Subsequent
32176     * calls to the debounced function return the result of the last `func`
32177     * invocation.
32178     *
32179     * **Note:** If `leading` and `trailing` options are `true`, `func` is
32180     * invoked on the trailing edge of the timeout only if the debounced function
32181     * is invoked more than once during the `wait` timeout.
32182     *
32183     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
32184     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
32185     *
32186     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
32187     * for details over the differences between `_.debounce` and `_.throttle`.
32188     *
32189     * @static
32190     * @memberOf _
32191     * @since 0.1.0
32192     * @category Function
32193     * @param {Function} func The function to debounce.
32194     * @param {number} [wait=0] The number of milliseconds to delay.
32195     * @param {Object} [options={}] The options object.
32196     * @param {boolean} [options.leading=false]
32197     *  Specify invoking on the leading edge of the timeout.
32198     * @param {number} [options.maxWait]
32199     *  The maximum time `func` is allowed to be delayed before it's invoked.
32200     * @param {boolean} [options.trailing=true]
32201     *  Specify invoking on the trailing edge of the timeout.
32202     * @returns {Function} Returns the new debounced function.
32203     * @example
32204     *
32205     * // Avoid costly calculations while the window size is in flux.
32206     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
32207     *
32208     * // Invoke `sendMail` when clicked, debouncing subsequent calls.
32209     * jQuery(element).on('click', _.debounce(sendMail, 300, {
32210     *   'leading': true,
32211     *   'trailing': false
32212     * }));
32213     *
32214     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
32215     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
32216     * var source = new EventSource('/stream');
32217     * jQuery(source).on('message', debounced);
32218     *
32219     * // Cancel the trailing debounced invocation.
32220     * jQuery(window).on('popstate', debounced.cancel);
32221     */
32222    function debounce(func, wait, options) {
32223      var lastArgs,
32224          lastThis,
32225          maxWait,
32226          result,
32227          timerId,
32228          lastCallTime,
32229          lastInvokeTime = 0,
32230          leading = false,
32231          maxing = false,
32232          trailing = true;
32233
32234      if (typeof func != 'function') {
32235        throw new TypeError(FUNC_ERROR_TEXT);
32236      }
32237      wait = toNumber(wait) || 0;
32238      if (isObject(options)) {
32239        leading = !!options.leading;
32240        maxing = 'maxWait' in options;
32241        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
32242        trailing = 'trailing' in options ? !!options.trailing : trailing;
32243      }
32244
32245      function invokeFunc(time) {
32246        var args = lastArgs,
32247            thisArg = lastThis;
32248
32249        lastArgs = lastThis = undefined;
32250        lastInvokeTime = time;
32251        result = func.apply(thisArg, args);
32252        return result;
32253      }
32254
32255      function leadingEdge(time) {
32256        // Reset any `maxWait` timer.
32257        lastInvokeTime = time;
32258        // Start the timer for the trailing edge.
32259        timerId = setTimeout(timerExpired, wait);
32260        // Invoke the leading edge.
32261        return leading ? invokeFunc(time) : result;
32262      }
32263
32264      function remainingWait(time) {
32265        var timeSinceLastCall = time - lastCallTime,
32266            timeSinceLastInvoke = time - lastInvokeTime,
32267            timeWaiting = wait - timeSinceLastCall;
32268
32269        return maxing
32270          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
32271          : timeWaiting;
32272      }
32273
32274      function shouldInvoke(time) {
32275        var timeSinceLastCall = time - lastCallTime,
32276            timeSinceLastInvoke = time - lastInvokeTime;
32277
32278        // Either this is the first call, activity has stopped and we're at the
32279        // trailing edge, the system time has gone backwards and we're treating
32280        // it as the trailing edge, or we've hit the `maxWait` limit.
32281        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
32282          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
32283      }
32284
32285      function timerExpired() {
32286        var time = now();
32287        if (shouldInvoke(time)) {
32288          return trailingEdge(time);
32289        }
32290        // Restart the timer.
32291        timerId = setTimeout(timerExpired, remainingWait(time));
32292      }
32293
32294      function trailingEdge(time) {
32295        timerId = undefined;
32296
32297        // Only invoke if we have `lastArgs` which means `func` has been
32298        // debounced at least once.
32299        if (trailing && lastArgs) {
32300          return invokeFunc(time);
32301        }
32302        lastArgs = lastThis = undefined;
32303        return result;
32304      }
32305
32306      function cancel() {
32307        if (timerId !== undefined) {
32308          clearTimeout(timerId);
32309        }
32310        lastInvokeTime = 0;
32311        lastArgs = lastCallTime = lastThis = timerId = undefined;
32312      }
32313
32314      function flush() {
32315        return timerId === undefined ? result : trailingEdge(now());
32316      }
32317
32318      function debounced() {
32319        var time = now(),
32320            isInvoking = shouldInvoke(time);
32321
32322        lastArgs = arguments;
32323        lastThis = this;
32324        lastCallTime = time;
32325
32326        if (isInvoking) {
32327          if (timerId === undefined) {
32328            return leadingEdge(lastCallTime);
32329          }
32330          if (maxing) {
32331            // Handle invocations in a tight loop.
32332            clearTimeout(timerId);
32333            timerId = setTimeout(timerExpired, wait);
32334            return invokeFunc(lastCallTime);
32335          }
32336        }
32337        if (timerId === undefined) {
32338          timerId = setTimeout(timerExpired, wait);
32339        }
32340        return result;
32341      }
32342      debounced.cancel = cancel;
32343      debounced.flush = flush;
32344      return debounced;
32345    }
32346
32347    /**
32348     * Defers invoking the `func` until the current call stack has cleared. Any
32349     * additional arguments are provided to `func` when it's invoked.
32350     *
32351     * @static
32352     * @memberOf _
32353     * @since 0.1.0
32354     * @category Function
32355     * @param {Function} func The function to defer.
32356     * @param {...*} [args] The arguments to invoke `func` with.
32357     * @returns {number} Returns the timer id.
32358     * @example
32359     *
32360     * _.defer(function(text) {
32361     *   console.log(text);
32362     * }, 'deferred');
32363     * // => Logs 'deferred' after one millisecond.
32364     */
32365    var defer = baseRest(function(func, args) {
32366      return baseDelay(func, 1, args);
32367    });
32368
32369    /**
32370     * Invokes `func` after `wait` milliseconds. Any additional arguments are
32371     * provided to `func` when it's invoked.
32372     *
32373     * @static
32374     * @memberOf _
32375     * @since 0.1.0
32376     * @category Function
32377     * @param {Function} func The function to delay.
32378     * @param {number} wait The number of milliseconds to delay invocation.
32379     * @param {...*} [args] The arguments to invoke `func` with.
32380     * @returns {number} Returns the timer id.
32381     * @example
32382     *
32383     * _.delay(function(text) {
32384     *   console.log(text);
32385     * }, 1000, 'later');
32386     * // => Logs 'later' after one second.
32387     */
32388    var delay = baseRest(function(func, wait, args) {
32389      return baseDelay(func, toNumber(wait) || 0, args);
32390    });
32391
32392    /**
32393     * Creates a function that invokes `func` with arguments reversed.
32394     *
32395     * @static
32396     * @memberOf _
32397     * @since 4.0.0
32398     * @category Function
32399     * @param {Function} func The function to flip arguments for.
32400     * @returns {Function} Returns the new flipped function.
32401     * @example
32402     *
32403     * var flipped = _.flip(function() {
32404     *   return _.toArray(arguments);
32405     * });
32406     *
32407     * flipped('a', 'b', 'c', 'd');
32408     * // => ['d', 'c', 'b', 'a']
32409     */
32410    function flip(func) {
32411      return createWrap(func, WRAP_FLIP_FLAG);
32412    }
32413
32414    /**
32415     * Creates a function that memoizes the result of `func`. If `resolver` is
32416     * provided, it determines the cache key for storing the result based on the
32417     * arguments provided to the memoized function. By default, the first argument
32418     * provided to the memoized function is used as the map cache key. The `func`
32419     * is invoked with the `this` binding of the memoized function.
32420     *
32421     * **Note:** The cache is exposed as the `cache` property on the memoized
32422     * function. Its creation may be customized by replacing the `_.memoize.Cache`
32423     * constructor with one whose instances implement the
32424     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
32425     * method interface of `clear`, `delete`, `get`, `has`, and `set`.
32426     *
32427     * @static
32428     * @memberOf _
32429     * @since 0.1.0
32430     * @category Function
32431     * @param {Function} func The function to have its output memoized.
32432     * @param {Function} [resolver] The function to resolve the cache key.
32433     * @returns {Function} Returns the new memoized function.
32434     * @example
32435     *
32436     * var object = { 'a': 1, 'b': 2 };
32437     * var other = { 'c': 3, 'd': 4 };
32438     *
32439     * var values = _.memoize(_.values);
32440     * values(object);
32441     * // => [1, 2]
32442     *
32443     * values(other);
32444     * // => [3, 4]
32445     *
32446     * object.a = 2;
32447     * values(object);
32448     * // => [1, 2]
32449     *
32450     * // Modify the result cache.
32451     * values.cache.set(object, ['a', 'b']);
32452     * values(object);
32453     * // => ['a', 'b']
32454     *
32455     * // Replace `_.memoize.Cache`.
32456     * _.memoize.Cache = WeakMap;
32457     */
32458    function memoize(func, resolver) {
32459      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
32460        throw new TypeError(FUNC_ERROR_TEXT);
32461      }
32462      var memoized = function() {
32463        var args = arguments,
32464            key = resolver ? resolver.apply(this, args) : args[0],
32465            cache = memoized.cache;
32466
32467        if (cache.has(key)) {
32468          return cache.get(key);
32469        }
32470        var result = func.apply(this, args);
32471        memoized.cache = cache.set(key, result) || cache;
32472        return result;
32473      };
32474      memoized.cache = new (memoize.Cache || MapCache);
32475      return memoized;
32476    }
32477
32478    // Expose `MapCache`.
32479    memoize.Cache = MapCache;
32480
32481    /**
32482     * Creates a function that negates the result of the predicate `func`. The
32483     * `func` predicate is invoked with the `this` binding and arguments of the
32484     * created function.
32485     *
32486     * @static
32487     * @memberOf _
32488     * @since 3.0.0
32489     * @category Function
32490     * @param {Function} predicate The predicate to negate.
32491     * @returns {Function} Returns the new negated function.
32492     * @example
32493     *
32494     * function isEven(n) {
32495     *   return n % 2 == 0;
32496     * }
32497     *
32498     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
32499     * // => [1, 3, 5]
32500     */
32501    function negate(predicate) {
32502      if (typeof predicate != 'function') {
32503        throw new TypeError(FUNC_ERROR_TEXT);
32504      }
32505      return function() {
32506        var args = arguments;
32507        switch (args.length) {
32508          case 0: return !predicate.call(this);
32509          case 1: return !predicate.call(this, args[0]);
32510          case 2: return !predicate.call(this, args[0], args[1]);
32511          case 3: return !predicate.call(this, args[0], args[1], args[2]);
32512        }
32513        return !predicate.apply(this, args);
32514      };
32515    }
32516
32517    /**
32518     * Creates a function that is restricted to invoking `func` once. Repeat calls
32519     * to the function return the value of the first invocation. The `func` is
32520     * invoked with the `this` binding and arguments of the created function.
32521     *
32522     * @static
32523     * @memberOf _
32524     * @since 0.1.0
32525     * @category Function
32526     * @param {Function} func The function to restrict.
32527     * @returns {Function} Returns the new restricted function.
32528     * @example
32529     *
32530     * var initialize = _.once(createApplication);
32531     * initialize();
32532     * initialize();
32533     * // => `createApplication` is invoked once
32534     */
32535    function once(func) {
32536      return before(2, func);
32537    }
32538
32539    /**
32540     * Creates a function that invokes `func` with its arguments transformed.
32541     *
32542     * @static
32543     * @since 4.0.0
32544     * @memberOf _
32545     * @category Function
32546     * @param {Function} func The function to wrap.
32547     * @param {...(Function|Function[])} [transforms=[_.identity]]
32548     *  The argument transforms.
32549     * @returns {Function} Returns the new function.
32550     * @example
32551     *
32552     * function doubled(n) {
32553     *   return n * 2;
32554     * }
32555     *
32556     * function square(n) {
32557     *   return n * n;
32558     * }
32559     *
32560     * var func = _.overArgs(function(x, y) {
32561     *   return [x, y];
32562     * }, [square, doubled]);
32563     *
32564     * func(9, 3);
32565     * // => [81, 6]
32566     *
32567     * func(10, 5);
32568     * // => [100, 10]
32569     */
32570    var overArgs = castRest(function(func, transforms) {
32571      transforms = (transforms.length == 1 && isArray(transforms[0]))
32572        ? arrayMap(transforms[0], baseUnary(getIteratee()))
32573        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
32574
32575      var funcsLength = transforms.length;
32576      return baseRest(function(args) {
32577        var index = -1,
32578            length = nativeMin(args.length, funcsLength);
32579
32580        while (++index < length) {
32581          args[index] = transforms[index].call(this, args[index]);
32582        }
32583        return apply(func, this, args);
32584      });
32585    });
32586
32587    /**
32588     * Creates a function that invokes `func` with `partials` prepended to the
32589     * arguments it receives. This method is like `_.bind` except it does **not**
32590     * alter the `this` binding.
32591     *
32592     * The `_.partial.placeholder` value, which defaults to `_` in monolithic
32593     * builds, may be used as a placeholder for partially applied arguments.
32594     *
32595     * **Note:** This method doesn't set the "length" property of partially
32596     * applied functions.
32597     *
32598     * @static
32599     * @memberOf _
32600     * @since 0.2.0
32601     * @category Function
32602     * @param {Function} func The function to partially apply arguments to.
32603     * @param {...*} [partials] The arguments to be partially applied.
32604     * @returns {Function} Returns the new partially applied function.
32605     * @example
32606     *
32607     * function greet(greeting, name) {
32608     *   return greeting + ' ' + name;
32609     * }
32610     *
32611     * var sayHelloTo = _.partial(greet, 'hello');
32612     * sayHelloTo('fred');
32613     * // => 'hello fred'
32614     *
32615     * // Partially applied with placeholders.
32616     * var greetFred = _.partial(greet, _, 'fred');
32617     * greetFred('hi');
32618     * // => 'hi fred'
32619     */
32620    var partial = baseRest(function(func, partials) {
32621      var holders = replaceHolders(partials, getHolder(partial));
32622      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
32623    });
32624
32625    /**
32626     * This method is like `_.partial` except that partially applied arguments
32627     * are appended to the arguments it receives.
32628     *
32629     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
32630     * builds, may be used as a placeholder for partially applied arguments.
32631     *
32632     * **Note:** This method doesn't set the "length" property of partially
32633     * applied functions.
32634     *
32635     * @static
32636     * @memberOf _
32637     * @since 1.0.0
32638     * @category Function
32639     * @param {Function} func The function to partially apply arguments to.
32640     * @param {...*} [partials] The arguments to be partially applied.
32641     * @returns {Function} Returns the new partially applied function.
32642     * @example
32643     *
32644     * function greet(greeting, name) {
32645     *   return greeting + ' ' + name;
32646     * }
32647     *
32648     * var greetFred = _.partialRight(greet, 'fred');
32649     * greetFred('hi');
32650     * // => 'hi fred'
32651     *
32652     * // Partially applied with placeholders.
32653     * var sayHelloTo = _.partialRight(greet, 'hello', _);
32654     * sayHelloTo('fred');
32655     * // => 'hello fred'
32656     */
32657    var partialRight = baseRest(function(func, partials) {
32658      var holders = replaceHolders(partials, getHolder(partialRight));
32659      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
32660    });
32661
32662    /**
32663     * Creates a function that invokes `func` with arguments arranged according
32664     * to the specified `indexes` where the argument value at the first index is
32665     * provided as the first argument, the argument value at the second index is
32666     * provided as the second argument, and so on.
32667     *
32668     * @static
32669     * @memberOf _
32670     * @since 3.0.0
32671     * @category Function
32672     * @param {Function} func The function to rearrange arguments for.
32673     * @param {...(number|number[])} indexes The arranged argument indexes.
32674     * @returns {Function} Returns the new function.
32675     * @example
32676     *
32677     * var rearged = _.rearg(function(a, b, c) {
32678     *   return [a, b, c];
32679     * }, [2, 0, 1]);
32680     *
32681     * rearged('b', 'c', 'a')
32682     * // => ['a', 'b', 'c']
32683     */
32684    var rearg = flatRest(function(func, indexes) {
32685      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
32686    });
32687
32688    /**
32689     * Creates a function that invokes `func` with the `this` binding of the
32690     * created function and arguments from `start` and beyond provided as
32691     * an array.
32692     *
32693     * **Note:** This method is based on the
32694     * [rest parameter](https://mdn.io/rest_parameters).
32695     *
32696     * @static
32697     * @memberOf _
32698     * @since 4.0.0
32699     * @category Function
32700     * @param {Function} func The function to apply a rest parameter to.
32701     * @param {number} [start=func.length-1] The start position of the rest parameter.
32702     * @returns {Function} Returns the new function.
32703     * @example
32704     *
32705     * var say = _.rest(function(what, names) {
32706     *   return what + ' ' + _.initial(names).join(', ') +
32707     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
32708     * });
32709     *
32710     * say('hello', 'fred', 'barney', 'pebbles');
32711     * // => 'hello fred, barney, & pebbles'
32712     */
32713    function rest(func, start) {
32714      if (typeof func != 'function') {
32715        throw new TypeError(FUNC_ERROR_TEXT);
32716      }
32717      start = start === undefined ? start : toInteger(start);
32718      return baseRest(func, start);
32719    }
32720
32721    /**
32722     * Creates a function that invokes `func` with the `this` binding of the
32723     * create function and an array of arguments much like
32724     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
32725     *
32726     * **Note:** This method is based on the
32727     * [spread operator](https://mdn.io/spread_operator).
32728     *
32729     * @static
32730     * @memberOf _
32731     * @since 3.2.0
32732     * @category Function
32733     * @param {Function} func The function to spread arguments over.
32734     * @param {number} [start=0] The start position of the spread.
32735     * @returns {Function} Returns the new function.
32736     * @example
32737     *
32738     * var say = _.spread(function(who, what) {
32739     *   return who + ' says ' + what;
32740     * });
32741     *
32742     * say(['fred', 'hello']);
32743     * // => 'fred says hello'
32744     *
32745     * var numbers = Promise.all([
32746     *   Promise.resolve(40),
32747     *   Promise.resolve(36)
32748     * ]);
32749     *
32750     * numbers.then(_.spread(function(x, y) {
32751     *   return x + y;
32752     * }));
32753     * // => a Promise of 76
32754     */
32755    function spread(func, start) {
32756      if (typeof func != 'function') {
32757        throw new TypeError(FUNC_ERROR_TEXT);
32758      }
32759      start = start == null ? 0 : nativeMax(toInteger(start), 0);
32760      return baseRest(function(args) {
32761        var array = args[start],
32762            otherArgs = castSlice(args, 0, start);
32763
32764        if (array) {
32765          arrayPush(otherArgs, array);
32766        }
32767        return apply(func, this, otherArgs);
32768      });
32769    }
32770
32771    /**
32772     * Creates a throttled function that only invokes `func` at most once per
32773     * every `wait` milliseconds. The throttled function comes with a `cancel`
32774     * method to cancel delayed `func` invocations and a `flush` method to
32775     * immediately invoke them. Provide `options` to indicate whether `func`
32776     * should be invoked on the leading and/or trailing edge of the `wait`
32777     * timeout. The `func` is invoked with the last arguments provided to the
32778     * throttled function. Subsequent calls to the throttled function return the
32779     * result of the last `func` invocation.
32780     *
32781     * **Note:** If `leading` and `trailing` options are `true`, `func` is
32782     * invoked on the trailing edge of the timeout only if the throttled function
32783     * is invoked more than once during the `wait` timeout.
32784     *
32785     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
32786     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
32787     *
32788     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
32789     * for details over the differences between `_.throttle` and `_.debounce`.
32790     *
32791     * @static
32792     * @memberOf _
32793     * @since 0.1.0
32794     * @category Function
32795     * @param {Function} func The function to throttle.
32796     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
32797     * @param {Object} [options={}] The options object.
32798     * @param {boolean} [options.leading=true]
32799     *  Specify invoking on the leading edge of the timeout.
32800     * @param {boolean} [options.trailing=true]
32801     *  Specify invoking on the trailing edge of the timeout.
32802     * @returns {Function} Returns the new throttled function.
32803     * @example
32804     *
32805     * // Avoid excessively updating the position while scrolling.
32806     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
32807     *
32808     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
32809     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
32810     * jQuery(element).on('click', throttled);
32811     *
32812     * // Cancel the trailing throttled invocation.
32813     * jQuery(window).on('popstate', throttled.cancel);
32814     */
32815    function throttle(func, wait, options) {
32816      var leading = true,
32817          trailing = true;
32818
32819      if (typeof func != 'function') {
32820        throw new TypeError(FUNC_ERROR_TEXT);
32821      }
32822      if (isObject(options)) {
32823        leading = 'leading' in options ? !!options.leading : leading;
32824        trailing = 'trailing' in options ? !!options.trailing : trailing;
32825      }
32826      return debounce(func, wait, {
32827        'leading': leading,
32828        'maxWait': wait,
32829        'trailing': trailing
32830      });
32831    }
32832
32833    /**
32834     * Creates a function that accepts up to one argument, ignoring any
32835     * additional arguments.
32836     *
32837     * @static
32838     * @memberOf _
32839     * @since 4.0.0
32840     * @category Function
32841     * @param {Function} func The function to cap arguments for.
32842     * @returns {Function} Returns the new capped function.
32843     * @example
32844     *
32845     * _.map(['6', '8', '10'], _.unary(parseInt));
32846     * // => [6, 8, 10]
32847     */
32848    function unary(func) {
32849      return ary(func, 1);
32850    }
32851
32852    /**
32853     * Creates a function that provides `value` to `wrapper` as its first
32854     * argument. Any additional arguments provided to the function are appended
32855     * to those provided to the `wrapper`. The wrapper is invoked with the `this`
32856     * binding of the created function.
32857     *
32858     * @static
32859     * @memberOf _
32860     * @since 0.1.0
32861     * @category Function
32862     * @param {*} value The value to wrap.
32863     * @param {Function} [wrapper=identity] The wrapper function.
32864     * @returns {Function} Returns the new function.
32865     * @example
32866     *
32867     * var p = _.wrap(_.escape, function(func, text) {
32868     *   return '<p>' + func(text) + '</p>';
32869     * });
32870     *
32871     * p('fred, barney, & pebbles');
32872     * // => '<p>fred, barney, &amp; pebbles</p>'
32873     */
32874    function wrap(value, wrapper) {
32875      return partial(castFunction(wrapper), value);
32876    }
32877
32878    /*------------------------------------------------------------------------*/
32879
32880    /**
32881     * Casts `value` as an array if it's not one.
32882     *
32883     * @static
32884     * @memberOf _
32885     * @since 4.4.0
32886     * @category Lang
32887     * @param {*} value The value to inspect.
32888     * @returns {Array} Returns the cast array.
32889     * @example
32890     *
32891     * _.castArray(1);
32892     * // => [1]
32893     *
32894     * _.castArray({ 'a': 1 });
32895     * // => [{ 'a': 1 }]
32896     *
32897     * _.castArray('abc');
32898     * // => ['abc']
32899     *
32900     * _.castArray(null);
32901     * // => [null]
32902     *
32903     * _.castArray(undefined);
32904     * // => [undefined]
32905     *
32906     * _.castArray();
32907     * // => []
32908     *
32909     * var array = [1, 2, 3];
32910     * console.log(_.castArray(array) === array);
32911     * // => true
32912     */
32913    function castArray() {
32914      if (!arguments.length) {
32915        return [];
32916      }
32917      var value = arguments[0];
32918      return isArray(value) ? value : [value];
32919    }
32920
32921    /**
32922     * Creates a shallow clone of `value`.
32923     *
32924     * **Note:** This method is loosely based on the
32925     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
32926     * and supports cloning arrays, array buffers, booleans, date objects, maps,
32927     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
32928     * arrays. The own enumerable properties of `arguments` objects are cloned
32929     * as plain objects. An empty object is returned for uncloneable values such
32930     * as error objects, functions, DOM nodes, and WeakMaps.
32931     *
32932     * @static
32933     * @memberOf _
32934     * @since 0.1.0
32935     * @category Lang
32936     * @param {*} value The value to clone.
32937     * @returns {*} Returns the cloned value.
32938     * @see _.cloneDeep
32939     * @example
32940     *
32941     * var objects = [{ 'a': 1 }, { 'b': 2 }];
32942     *
32943     * var shallow = _.clone(objects);
32944     * console.log(shallow[0] === objects[0]);
32945     * // => true
32946     */
32947    function clone(value) {
32948      return baseClone(value, CLONE_SYMBOLS_FLAG);
32949    }
32950
32951    /**
32952     * This method is like `_.clone` except that it accepts `customizer` which
32953     * is invoked to produce the cloned value. If `customizer` returns `undefined`,
32954     * cloning is handled by the method instead. The `customizer` is invoked with
32955     * up to four arguments; (value [, index|key, object, stack]).
32956     *
32957     * @static
32958     * @memberOf _
32959     * @since 4.0.0
32960     * @category Lang
32961     * @param {*} value The value to clone.
32962     * @param {Function} [customizer] The function to customize cloning.
32963     * @returns {*} Returns the cloned value.
32964     * @see _.cloneDeepWith
32965     * @example
32966     *
32967     * function customizer(value) {
32968     *   if (_.isElement(value)) {
32969     *     return value.cloneNode(false);
32970     *   }
32971     * }
32972     *
32973     * var el = _.cloneWith(document.body, customizer);
32974     *
32975     * console.log(el === document.body);
32976     * // => false
32977     * console.log(el.nodeName);
32978     * // => 'BODY'
32979     * console.log(el.childNodes.length);
32980     * // => 0
32981     */
32982    function cloneWith(value, customizer) {
32983      customizer = typeof customizer == 'function' ? customizer : undefined;
32984      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
32985    }
32986
32987    /**
32988     * This method is like `_.clone` except that it recursively clones `value`.
32989     *
32990     * @static
32991     * @memberOf _
32992     * @since 1.0.0
32993     * @category Lang
32994     * @param {*} value The value to recursively clone.
32995     * @returns {*} Returns the deep cloned value.
32996     * @see _.clone
32997     * @example
32998     *
32999     * var objects = [{ 'a': 1 }, { 'b': 2 }];
33000     *
33001     * var deep = _.cloneDeep(objects);
33002     * console.log(deep[0] === objects[0]);
33003     * // => false
33004     */
33005    function cloneDeep(value) {
33006      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
33007    }
33008
33009    /**
33010     * This method is like `_.cloneWith` except that it recursively clones `value`.
33011     *
33012     * @static
33013     * @memberOf _
33014     * @since 4.0.0
33015     * @category Lang
33016     * @param {*} value The value to recursively clone.
33017     * @param {Function} [customizer] The function to customize cloning.
33018     * @returns {*} Returns the deep cloned value.
33019     * @see _.cloneWith
33020     * @example
33021     *
33022     * function customizer(value) {
33023     *   if (_.isElement(value)) {
33024     *     return value.cloneNode(true);
33025     *   }
33026     * }
33027     *
33028     * var el = _.cloneDeepWith(document.body, customizer);
33029     *
33030     * console.log(el === document.body);
33031     * // => false
33032     * console.log(el.nodeName);
33033     * // => 'BODY'
33034     * console.log(el.childNodes.length);
33035     * // => 20
33036     */
33037    function cloneDeepWith(value, customizer) {
33038      customizer = typeof customizer == 'function' ? customizer : undefined;
33039      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
33040    }
33041
33042    /**
33043     * Checks if `object` conforms to `source` by invoking the predicate
33044     * properties of `source` with the corresponding property values of `object`.
33045     *
33046     * **Note:** This method is equivalent to `_.conforms` when `source` is
33047     * partially applied.
33048     *
33049     * @static
33050     * @memberOf _
33051     * @since 4.14.0
33052     * @category Lang
33053     * @param {Object} object The object to inspect.
33054     * @param {Object} source The object of property predicates to conform to.
33055     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
33056     * @example
33057     *
33058     * var object = { 'a': 1, 'b': 2 };
33059     *
33060     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
33061     * // => true
33062     *
33063     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
33064     * // => false
33065     */
33066    function conformsTo(object, source) {
33067      return source == null || baseConformsTo(object, source, keys(source));
33068    }
33069
33070    /**
33071     * Performs a
33072     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
33073     * comparison between two values to determine if they are equivalent.
33074     *
33075     * @static
33076     * @memberOf _
33077     * @since 4.0.0
33078     * @category Lang
33079     * @param {*} value The value to compare.
33080     * @param {*} other The other value to compare.
33081     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
33082     * @example
33083     *
33084     * var object = { 'a': 1 };
33085     * var other = { 'a': 1 };
33086     *
33087     * _.eq(object, object);
33088     * // => true
33089     *
33090     * _.eq(object, other);
33091     * // => false
33092     *
33093     * _.eq('a', 'a');
33094     * // => true
33095     *
33096     * _.eq('a', Object('a'));
33097     * // => false
33098     *
33099     * _.eq(NaN, NaN);
33100     * // => true
33101     */
33102    function eq(value, other) {
33103      return value === other || (value !== value && other !== other);
33104    }
33105
33106    /**
33107     * Checks if `value` is greater than `other`.
33108     *
33109     * @static
33110     * @memberOf _
33111     * @since 3.9.0
33112     * @category Lang
33113     * @param {*} value The value to compare.
33114     * @param {*} other The other value to compare.
33115     * @returns {boolean} Returns `true` if `value` is greater than `other`,
33116     *  else `false`.
33117     * @see _.lt
33118     * @example
33119     *
33120     * _.gt(3, 1);
33121     * // => true
33122     *
33123     * _.gt(3, 3);
33124     * // => false
33125     *
33126     * _.gt(1, 3);
33127     * // => false
33128     */
33129    var gt = createRelationalOperation(baseGt);
33130
33131    /**
33132     * Checks if `value` is greater than or equal to `other`.
33133     *
33134     * @static
33135     * @memberOf _
33136     * @since 3.9.0
33137     * @category Lang
33138     * @param {*} value The value to compare.
33139     * @param {*} other The other value to compare.
33140     * @returns {boolean} Returns `true` if `value` is greater than or equal to
33141     *  `other`, else `false`.
33142     * @see _.lte
33143     * @example
33144     *
33145     * _.gte(3, 1);
33146     * // => true
33147     *
33148     * _.gte(3, 3);
33149     * // => true
33150     *
33151     * _.gte(1, 3);
33152     * // => false
33153     */
33154    var gte = createRelationalOperation(function(value, other) {
33155      return value >= other;
33156    });
33157
33158    /**
33159     * Checks if `value` is likely an `arguments` object.
33160     *
33161     * @static
33162     * @memberOf _
33163     * @since 0.1.0
33164     * @category Lang
33165     * @param {*} value The value to check.
33166     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
33167     *  else `false`.
33168     * @example
33169     *
33170     * _.isArguments(function() { return arguments; }());
33171     * // => true
33172     *
33173     * _.isArguments([1, 2, 3]);
33174     * // => false
33175     */
33176    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
33177      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
33178        !propertyIsEnumerable.call(value, 'callee');
33179    };
33180
33181    /**
33182     * Checks if `value` is classified as an `Array` object.
33183     *
33184     * @static
33185     * @memberOf _
33186     * @since 0.1.0
33187     * @category Lang
33188     * @param {*} value The value to check.
33189     * @returns {boolean} Returns `true` if `value` is an array, else `false`.
33190     * @example
33191     *
33192     * _.isArray([1, 2, 3]);
33193     * // => true
33194     *
33195     * _.isArray(document.body.children);
33196     * // => false
33197     *
33198     * _.isArray('abc');
33199     * // => false
33200     *
33201     * _.isArray(_.noop);
33202     * // => false
33203     */
33204    var isArray = Array.isArray;
33205
33206    /**
33207     * Checks if `value` is classified as an `ArrayBuffer` object.
33208     *
33209     * @static
33210     * @memberOf _
33211     * @since 4.3.0
33212     * @category Lang
33213     * @param {*} value The value to check.
33214     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
33215     * @example
33216     *
33217     * _.isArrayBuffer(new ArrayBuffer(2));
33218     * // => true
33219     *
33220     * _.isArrayBuffer(new Array(2));
33221     * // => false
33222     */
33223    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
33224
33225    /**
33226     * Checks if `value` is array-like. A value is considered array-like if it's
33227     * not a function and has a `value.length` that's an integer greater than or
33228     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
33229     *
33230     * @static
33231     * @memberOf _
33232     * @since 4.0.0
33233     * @category Lang
33234     * @param {*} value The value to check.
33235     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
33236     * @example
33237     *
33238     * _.isArrayLike([1, 2, 3]);
33239     * // => true
33240     *
33241     * _.isArrayLike(document.body.children);
33242     * // => true
33243     *
33244     * _.isArrayLike('abc');
33245     * // => true
33246     *
33247     * _.isArrayLike(_.noop);
33248     * // => false
33249     */
33250    function isArrayLike(value) {
33251      return value != null && isLength(value.length) && !isFunction(value);
33252    }
33253
33254    /**
33255     * This method is like `_.isArrayLike` except that it also checks if `value`
33256     * is an object.
33257     *
33258     * @static
33259     * @memberOf _
33260     * @since 4.0.0
33261     * @category Lang
33262     * @param {*} value The value to check.
33263     * @returns {boolean} Returns `true` if `value` is an array-like object,
33264     *  else `false`.
33265     * @example
33266     *
33267     * _.isArrayLikeObject([1, 2, 3]);
33268     * // => true
33269     *
33270     * _.isArrayLikeObject(document.body.children);
33271     * // => true
33272     *
33273     * _.isArrayLikeObject('abc');
33274     * // => false
33275     *
33276     * _.isArrayLikeObject(_.noop);
33277     * // => false
33278     */
33279    function isArrayLikeObject(value) {
33280      return isObjectLike(value) && isArrayLike(value);
33281    }
33282
33283    /**
33284     * Checks if `value` is classified as a boolean primitive or object.
33285     *
33286     * @static
33287     * @memberOf _
33288     * @since 0.1.0
33289     * @category Lang
33290     * @param {*} value The value to check.
33291     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
33292     * @example
33293     *
33294     * _.isBoolean(false);
33295     * // => true
33296     *
33297     * _.isBoolean(null);
33298     * // => false
33299     */
33300    function isBoolean(value) {
33301      return value === true || value === false ||
33302        (isObjectLike(value) && baseGetTag(value) == boolTag);
33303    }
33304
33305    /**
33306     * Checks if `value` is a buffer.
33307     *
33308     * @static
33309     * @memberOf _
33310     * @since 4.3.0
33311     * @category Lang
33312     * @param {*} value The value to check.
33313     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
33314     * @example
33315     *
33316     * _.isBuffer(new Buffer(2));
33317     * // => true
33318     *
33319     * _.isBuffer(new Uint8Array(2));
33320     * // => false
33321     */
33322    var isBuffer = nativeIsBuffer || stubFalse;
33323
33324    /**
33325     * Checks if `value` is classified as a `Date` object.
33326     *
33327     * @static
33328     * @memberOf _
33329     * @since 0.1.0
33330     * @category Lang
33331     * @param {*} value The value to check.
33332     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
33333     * @example
33334     *
33335     * _.isDate(new Date);
33336     * // => true
33337     *
33338     * _.isDate('Mon April 23 2012');
33339     * // => false
33340     */
33341    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
33342
33343    /**
33344     * Checks if `value` is likely a DOM element.
33345     *
33346     * @static
33347     * @memberOf _
33348     * @since 0.1.0
33349     * @category Lang
33350     * @param {*} value The value to check.
33351     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
33352     * @example
33353     *
33354     * _.isElement(document.body);
33355     * // => true
33356     *
33357     * _.isElement('<body>');
33358     * // => false
33359     */
33360    function isElement(value) {
33361      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
33362    }
33363
33364    /**
33365     * Checks if `value` is an empty object, collection, map, or set.
33366     *
33367     * Objects are considered empty if they have no own enumerable string keyed
33368     * properties.
33369     *
33370     * Array-like values such as `arguments` objects, arrays, buffers, strings, or
33371     * jQuery-like collections are considered empty if they have a `length` of `0`.
33372     * Similarly, maps and sets are considered empty if they have a `size` of `0`.
33373     *
33374     * @static
33375     * @memberOf _
33376     * @since 0.1.0
33377     * @category Lang
33378     * @param {*} value The value to check.
33379     * @returns {boolean} Returns `true` if `value` is empty, else `false`.
33380     * @example
33381     *
33382     * _.isEmpty(null);
33383     * // => true
33384     *
33385     * _.isEmpty(true);
33386     * // => true
33387     *
33388     * _.isEmpty(1);
33389     * // => true
33390     *
33391     * _.isEmpty([1, 2, 3]);
33392     * // => false
33393     *
33394     * _.isEmpty({ 'a': 1 });
33395     * // => false
33396     */
33397    function isEmpty(value) {
33398      if (value == null) {
33399        return true;
33400      }
33401      if (isArrayLike(value) &&
33402          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
33403            isBuffer(value) || isTypedArray(value) || isArguments(value))) {
33404        return !value.length;
33405      }
33406      var tag = getTag(value);
33407      if (tag == mapTag || tag == setTag) {
33408        return !value.size;
33409      }
33410      if (isPrototype(value)) {
33411        return !baseKeys(value).length;
33412      }
33413      for (var key in value) {
33414        if (hasOwnProperty.call(value, key)) {
33415          return false;
33416        }
33417      }
33418      return true;
33419    }
33420
33421    /**
33422     * Performs a deep comparison between two values to determine if they are
33423     * equivalent.
33424     *
33425     * **Note:** This method supports comparing arrays, array buffers, booleans,
33426     * date objects, error objects, maps, numbers, `Object` objects, regexes,
33427     * sets, strings, symbols, and typed arrays. `Object` objects are compared
33428     * by their own, not inherited, enumerable properties. Functions and DOM
33429     * nodes are compared by strict equality, i.e. `===`.
33430     *
33431     * @static
33432     * @memberOf _
33433     * @since 0.1.0
33434     * @category Lang
33435     * @param {*} value The value to compare.
33436     * @param {*} other The other value to compare.
33437     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
33438     * @example
33439     *
33440     * var object = { 'a': 1 };
33441     * var other = { 'a': 1 };
33442     *
33443     * _.isEqual(object, other);
33444     * // => true
33445     *
33446     * object === other;
33447     * // => false
33448     */
33449    function isEqual(value, other) {
33450      return baseIsEqual(value, other);
33451    }
33452
33453    /**
33454     * This method is like `_.isEqual` except that it accepts `customizer` which
33455     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
33456     * are handled by the method instead. The `customizer` is invoked with up to
33457     * six arguments: (objValue, othValue [, index|key, object, other, stack]).
33458     *
33459     * @static
33460     * @memberOf _
33461     * @since 4.0.0
33462     * @category Lang
33463     * @param {*} value The value to compare.
33464     * @param {*} other The other value to compare.
33465     * @param {Function} [customizer] The function to customize comparisons.
33466     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
33467     * @example
33468     *
33469     * function isGreeting(value) {
33470     *   return /^h(?:i|ello)$/.test(value);
33471     * }
33472     *
33473     * function customizer(objValue, othValue) {
33474     *   if (isGreeting(objValue) && isGreeting(othValue)) {
33475     *     return true;
33476     *   }
33477     * }
33478     *
33479     * var array = ['hello', 'goodbye'];
33480     * var other = ['hi', 'goodbye'];
33481     *
33482     * _.isEqualWith(array, other, customizer);
33483     * // => true
33484     */
33485    function isEqualWith(value, other, customizer) {
33486      customizer = typeof customizer == 'function' ? customizer : undefined;
33487      var result = customizer ? customizer(value, other) : undefined;
33488      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
33489    }
33490
33491    /**
33492     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
33493     * `SyntaxError`, `TypeError`, or `URIError` object.
33494     *
33495     * @static
33496     * @memberOf _
33497     * @since 3.0.0
33498     * @category Lang
33499     * @param {*} value The value to check.
33500     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
33501     * @example
33502     *
33503     * _.isError(new Error);
33504     * // => true
33505     *
33506     * _.isError(Error);
33507     * // => false
33508     */
33509    function isError(value) {
33510      if (!isObjectLike(value)) {
33511        return false;
vendor: 6,607 bytes, lines 33512-33749
33512      }
33513      var tag = baseGetTag(value);
33514      return tag == errorTag || tag == domExcTag ||
33515        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
33516    }
33517
33518    /**
33519     * Checks if `value` is a finite primitive number.
33520     *
33521     * **Note:** This method is based on
33522     * [`Number.isFinite`](https://mdn.io/Number/isFinite).
33523     *
33524     * @static
33525     * @memberOf _
33526     * @since 0.1.0
33527     * @category Lang
33528     * @param {*} value The value to check.
33529     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
33530     * @example
33531     *
33532     * _.isFinite(3);
33533     * // => true
33534     *
33535     * _.isFinite(Number.MIN_VALUE);
33536     * // => true
33537     *
33538     * _.isFinite(Infinity);
33539     * // => false
33540     *
33541     * _.isFinite('3');
33542     * // => false
33543     */
33544    function isFinite(value) {
33545      return typeof value == 'number' && nativeIsFinite(value);
33546    }
33547
33548    /**
33549     * Checks if `value` is classified as a `Function` object.
33550     *
33551     * @static
33552     * @memberOf _
33553     * @since 0.1.0
33554     * @category Lang
33555     * @param {*} value The value to check.
33556     * @returns {boolean} Returns `true` if `value` is a function, else `false`.
33557     * @example
33558     *
33559     * _.isFunction(_);
33560     * // => true
33561     *
33562     * _.isFunction(/abc/);
33563     * // => false
33564     */
33565    function isFunction(value) {
33566      if (!isObject(value)) {
33567        return false;
33568      }
33569      // The use of `Object#toString` avoids issues with the `typeof` operator
33570      // in Safari 9 which returns 'object' for typed arrays and other constructors.
33571      var tag = baseGetTag(value);
33572      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
33573    }
33574
33575    /**
33576     * Checks if `value` is an integer.
33577     *
33578     * **Note:** This method is based on
33579     * [`Number.isInteger`](https://mdn.io/Number/isInteger).
33580     *
33581     * @static
33582     * @memberOf _
33583     * @since 4.0.0
33584     * @category Lang
33585     * @param {*} value The value to check.
33586     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
33587     * @example
33588     *
33589     * _.isInteger(3);
33590     * // => true
33591     *
33592     * _.isInteger(Number.MIN_VALUE);
33593     * // => false
33594     *
33595     * _.isInteger(Infinity);
33596     * // => false
33597     *
33598     * _.isInteger('3');
33599     * // => false
33600     */
33601    function isInteger(value) {
33602      return typeof value == 'number' && value == toInteger(value);
33603    }
33604
33605    /**
33606     * Checks if `value` is a valid array-like length.
33607     *
33608     * **Note:** This method is loosely based on
33609     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
33610     *
33611     * @static
33612     * @memberOf _
33613     * @since 4.0.0
33614     * @category Lang
33615     * @param {*} value The value to check.
33616     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
33617     * @example
33618     *
33619     * _.isLength(3);
33620     * // => true
33621     *
33622     * _.isLength(Number.MIN_VALUE);
33623     * // => false
33624     *
33625     * _.isLength(Infinity);
33626     * // => false
33627     *
33628     * _.isLength('3');
33629     * // => false
33630     */
33631    function isLength(value) {
33632      return typeof value == 'number' &&
33633        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
33634    }
33635
33636    /**
33637     * Checks if `value` is the
33638     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
33639     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
33640     *
33641     * @static
33642     * @memberOf _
33643     * @since 0.1.0
33644     * @category Lang
33645     * @param {*} value The value to check.
33646     * @returns {boolean} Returns `true` if `value` is an object, else `false`.
33647     * @example
33648     *
33649     * _.isObject({});
33650     * // => true
33651     *
33652     * _.isObject([1, 2, 3]);
33653     * // => true
33654     *
33655     * _.isObject(_.noop);
33656     * // => true
33657     *
33658     * _.isObject(null);
33659     * // => false
33660     */
33661    function isObject(value) {
33662      var type = typeof value;
33663      return value != null && (type == 'object' || type == 'function');
33664    }
33665
33666    /**
33667     * Checks if `value` is object-like. A value is object-like if it's not `null`
33668     * and has a `typeof` result of "object".
33669     *
33670     * @static
33671     * @memberOf _
33672     * @since 4.0.0
33673     * @category Lang
33674     * @param {*} value The value to check.
33675     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
33676     * @example
33677     *
33678     * _.isObjectLike({});
33679     * // => true
33680     *
33681     * _.isObjectLike([1, 2, 3]);
33682     * // => true
33683     *
33684     * _.isObjectLike(_.noop);
33685     * // => false
33686     *
33687     * _.isObjectLike(null);
33688     * // => false
33689     */
33690    function isObjectLike(value) {
33691      return value != null && typeof value == 'object';
33692    }
33693
33694    /**
33695     * Checks if `value` is classified as a `Map` object.
33696     *
33697     * @static
33698     * @memberOf _
33699     * @since 4.3.0
33700     * @category Lang
33701     * @param {*} value The value to check.
33702     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
33703     * @example
33704     *
33705     * _.isMap(new Map);
33706     * // => true
33707     *
33708     * _.isMap(new WeakMap);
33709     * // => false
33710     */
33711    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
33712
33713    /**
33714     * Performs a partial deep comparison between `object` and `source` to
33715     * determine if `object` contains equivalent property values.
33716     *
33717     * **Note:** This method is equivalent to `_.matches` when `source` is
33718     * partially applied.
33719     *
33720     * Partial comparisons will match empty array and empty object `source`
33721     * values against any array or object value, respectively. See `_.isEqual`
33722     * for a list of supported value comparisons.
33723     *
33724     * @static
33725     * @memberOf _
33726     * @since 3.0.0
33727     * @category Lang
33728     * @param {Object} object The object to inspect.
33729     * @param {Object} source The object of property values to match.
33730     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
33731     * @example
33732     *
33733     * var object = { 'a': 1, 'b': 2 };
33734     *
33735     * _.isMatch(object, { 'b': 2 });
33736     * // => true
33737     *
33738     * _.isMatch(object, { 'b': 1 });
33739     * // => false
33740     */
33741    function isMatch(object, source) {
33742      return object === source || baseIsMatch(object, source, getMatchData(source));
33743    }
33744
33745    /**
33746     * This method is like `_.isMatch` except that it accepts `customizer` which
33747     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
33748     * are handled by the method instead. The `customizer` is invoked with five
33749     * arguments: (objValue, srcValue, index|key, object, source).
vendor: 12,241 bytes, lines 33750-34215
33750     *
33751     * @static
33752     * @memberOf _
33753     * @since 4.0.0
33754     * @category Lang
33755     * @param {Object} object The object to inspect.
33756     * @param {Object} source The object of property values to match.
33757     * @param {Function} [customizer] The function to customize comparisons.
33758     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
33759     * @example
33760     *
33761     * function isGreeting(value) {
33762     *   return /^h(?:i|ello)$/.test(value);
33763     * }
33764     *
33765     * function customizer(objValue, srcValue) {
33766     *   if (isGreeting(objValue) && isGreeting(srcValue)) {
33767     *     return true;
33768     *   }
33769     * }
33770     *
33771     * var object = { 'greeting': 'hello' };
33772     * var source = { 'greeting': 'hi' };
33773     *
33774     * _.isMatchWith(object, source, customizer);
33775     * // => true
33776     */
33777    function isMatchWith(object, source, customizer) {
33778      customizer = typeof customizer == 'function' ? customizer : undefined;
33779      return baseIsMatch(object, source, getMatchData(source), customizer);
33780    }
33781
33782    /**
33783     * Checks if `value` is `NaN`.
33784     *
33785     * **Note:** This method is based on
33786     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
33787     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
33788     * `undefined` and other non-number values.
33789     *
33790     * @static
33791     * @memberOf _
33792     * @since 0.1.0
33793     * @category Lang
33794     * @param {*} value The value to check.
33795     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
33796     * @example
33797     *
33798     * _.isNaN(NaN);
33799     * // => true
33800     *
33801     * _.isNaN(new Number(NaN));
33802     * // => true
33803     *
33804     * isNaN(undefined);
33805     * // => true
33806     *
33807     * _.isNaN(undefined);
33808     * // => false
33809     */
33810    function isNaN(value) {
33811      // An `NaN` primitive is the only value that is not equal to itself.
33812      // Perform the `toStringTag` check first to avoid errors with some
33813      // ActiveX objects in IE.
33814      return isNumber(value) && value != +value;
33815    }
33816
33817    /**
33818     * Checks if `value` is a pristine native function.
33819     *
33820     * **Note:** This method can't reliably detect native functions in the presence
33821     * of the core-js package because core-js circumvents this kind of detection.
33822     * Despite multiple requests, the core-js maintainer has made it clear: any
33823     * attempt to fix the detection will be obstructed. As a result, we're left
33824     * with little choice but to throw an error. Unfortunately, this also affects
33825     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
33826     * which rely on core-js.
33827     *
33828     * @static
33829     * @memberOf _
33830     * @since 3.0.0
33831     * @category Lang
33832     * @param {*} value The value to check.
33833     * @returns {boolean} Returns `true` if `value` is a native function,
33834     *  else `false`.
33835     * @example
33836     *
33837     * _.isNative(Array.prototype.push);
33838     * // => true
33839     *
33840     * _.isNative(_);
33841     * // => false
33842     */
33843    function isNative(value) {
33844      if (isMaskable(value)) {
33845        throw new Error(CORE_ERROR_TEXT);
33846      }
33847      return baseIsNative(value);
33848    }
33849
33850    /**
33851     * Checks if `value` is `null`.
33852     *
33853     * @static
33854     * @memberOf _
33855     * @since 0.1.0
33856     * @category Lang
33857     * @param {*} value The value to check.
33858     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
33859     * @example
33860     *
33861     * _.isNull(null);
33862     * // => true
33863     *
33864     * _.isNull(void 0);
33865     * // => false
33866     */
33867    function isNull(value) {
33868      return value === null;
33869    }
33870
33871    /**
33872     * Checks if `value` is `null` or `undefined`.
33873     *
33874     * @static
33875     * @memberOf _
33876     * @since 4.0.0
33877     * @category Lang
33878     * @param {*} value The value to check.
33879     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
33880     * @example
33881     *
33882     * _.isNil(null);
33883     * // => true
33884     *
33885     * _.isNil(void 0);
33886     * // => true
33887     *
33888     * _.isNil(NaN);
33889     * // => false
33890     */
33891    function isNil(value) {
33892      return value == null;
33893    }
33894
33895    /**
33896     * Checks if `value` is classified as a `Number` primitive or object.
33897     *
33898     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
33899     * classified as numbers, use the `_.isFinite` method.
33900     *
33901     * @static
33902     * @memberOf _
33903     * @since 0.1.0
33904     * @category Lang
33905     * @param {*} value The value to check.
33906     * @returns {boolean} Returns `true` if `value` is a number, else `false`.
33907     * @example
33908     *
33909     * _.isNumber(3);
33910     * // => true
33911     *
33912     * _.isNumber(Number.MIN_VALUE);
33913     * // => true
33914     *
33915     * _.isNumber(Infinity);
33916     * // => true
33917     *
33918     * _.isNumber('3');
33919     * // => false
33920     */
33921    function isNumber(value) {
33922      return typeof value == 'number' ||
33923        (isObjectLike(value) && baseGetTag(value) == numberTag);
33924    }
33925
33926    /**
33927     * Checks if `value` is a plain object, that is, an object created by the
33928     * `Object` constructor or one with a `[[Prototype]]` of `null`.
33929     *
33930     * @static
33931     * @memberOf _
33932     * @since 0.8.0
33933     * @category Lang
33934     * @param {*} value The value to check.
33935     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
33936     * @example
33937     *
33938     * function Foo() {
33939     *   this.a = 1;
33940     * }
33941     *
33942     * _.isPlainObject(new Foo);
33943     * // => false
33944     *
33945     * _.isPlainObject([1, 2, 3]);
33946     * // => false
33947     *
33948     * _.isPlainObject({ 'x': 0, 'y': 0 });
33949     * // => true
33950     *
33951     * _.isPlainObject(Object.create(null));
33952     * // => true
33953     */
33954    function isPlainObject(value) {
33955      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
33956        return false;
33957      }
33958      var proto = getPrototype(value);
33959      if (proto === null) {
33960        return true;
33961      }
33962      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
33963      return typeof Ctor == 'function' && Ctor instanceof Ctor &&
33964        funcToString.call(Ctor) == objectCtorString;
33965    }
33966
33967    /**
33968     * Checks if `value` is classified as a `RegExp` object.
33969     *
33970     * @static
33971     * @memberOf _
33972     * @since 0.1.0
33973     * @category Lang
33974     * @param {*} value The value to check.
33975     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
33976     * @example
33977     *
33978     * _.isRegExp(/abc/);
33979     * // => true
33980     *
33981     * _.isRegExp('/abc/');
33982     * // => false
33983     */
33984    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
33985
33986    /**
33987     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
33988     * double precision number which isn't the result of a rounded unsafe integer.
33989     *
33990     * **Note:** This method is based on
33991     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
33992     *
33993     * @static
33994     * @memberOf _
33995     * @since 4.0.0
33996     * @category Lang
33997     * @param {*} value The value to check.
33998     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
33999     * @example
34000     *
34001     * _.isSafeInteger(3);
34002     * // => true
34003     *
34004     * _.isSafeInteger(Number.MIN_VALUE);
34005     * // => false
34006     *
34007     * _.isSafeInteger(Infinity);
34008     * // => false
34009     *
34010     * _.isSafeInteger('3');
34011     * // => false
34012     */
34013    function isSafeInteger(value) {
34014      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
34015    }
34016
34017    /**
34018     * Checks if `value` is classified as a `Set` object.
34019     *
34020     * @static
34021     * @memberOf _
34022     * @since 4.3.0
34023     * @category Lang
34024     * @param {*} value The value to check.
34025     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
34026     * @example
34027     *
34028     * _.isSet(new Set);
34029     * // => true
34030     *
34031     * _.isSet(new WeakSet);
34032     * // => false
34033     */
34034    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
34035
34036    /**
34037     * Checks if `value` is classified as a `String` primitive or object.
34038     *
34039     * @static
34040     * @since 0.1.0
34041     * @memberOf _
34042     * @category Lang
34043     * @param {*} value The value to check.
34044     * @returns {boolean} Returns `true` if `value` is a string, else `false`.
34045     * @example
34046     *
34047     * _.isString('abc');
34048     * // => true
34049     *
34050     * _.isString(1);
34051     * // => false
34052     */
34053    function isString(value) {
34054      return typeof value == 'string' ||
34055        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
34056    }
34057
34058    /**
34059     * Checks if `value` is classified as a `Symbol` primitive or object.
34060     *
34061     * @static
34062     * @memberOf _
34063     * @since 4.0.0
34064     * @category Lang
34065     * @param {*} value The value to check.
34066     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
34067     * @example
34068     *
34069     * _.isSymbol(Symbol.iterator);
34070     * // => true
34071     *
34072     * _.isSymbol('abc');
34073     * // => false
34074     */
34075    function isSymbol(value) {
34076      return typeof value == 'symbol' ||
34077        (isObjectLike(value) && baseGetTag(value) == symbolTag);
34078    }
34079
34080    /**
34081     * Checks if `value` is classified as a typed array.
34082     *
34083     * @static
34084     * @memberOf _
34085     * @since 3.0.0
34086     * @category Lang
34087     * @param {*} value The value to check.
34088     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
34089     * @example
34090     *
34091     * _.isTypedArray(new Uint8Array);
34092     * // => true
34093     *
34094     * _.isTypedArray([]);
34095     * // => false
34096     */
34097    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
34098
34099    /**
34100     * Checks if `value` is `undefined`.
34101     *
34102     * @static
34103     * @since 0.1.0
34104     * @memberOf _
34105     * @category Lang
34106     * @param {*} value The value to check.
34107     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
34108     * @example
34109     *
34110     * _.isUndefined(void 0);
34111     * // => true
34112     *
34113     * _.isUndefined(null);
34114     * // => false
34115     */
34116    function isUndefined(value) {
34117      return value === undefined;
34118    }
34119
34120    /**
34121     * Checks if `value` is classified as a `WeakMap` object.
34122     *
34123     * @static
34124     * @memberOf _
34125     * @since 4.3.0
34126     * @category Lang
34127     * @param {*} value The value to check.
34128     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
34129     * @example
34130     *
34131     * _.isWeakMap(new WeakMap);
34132     * // => true
34133     *
34134     * _.isWeakMap(new Map);
34135     * // => false
34136     */
34137    function isWeakMap(value) {
34138      return isObjectLike(value) && getTag(value) == weakMapTag;
34139    }
34140
34141    /**
34142     * Checks if `value` is classified as a `WeakSet` object.
34143     *
34144     * @static
34145     * @memberOf _
34146     * @since 4.3.0
34147     * @category Lang
34148     * @param {*} value The value to check.
34149     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
34150     * @example
34151     *
34152     * _.isWeakSet(new WeakSet);
34153     * // => true
34154     *
34155     * _.isWeakSet(new Set);
34156     * // => false
34157     */
34158    function isWeakSet(value) {
34159      return isObjectLike(value) && baseGetTag(value) == weakSetTag;
34160    }
34161
34162    /**
34163     * Checks if `value` is less than `other`.
34164     *
34165     * @static
34166     * @memberOf _
34167     * @since 3.9.0
34168     * @category Lang
34169     * @param {*} value The value to compare.
34170     * @param {*} other The other value to compare.
34171     * @returns {boolean} Returns `true` if `value` is less than `other`,
34172     *  else `false`.
34173     * @see _.gt
34174     * @example
34175     *
34176     * _.lt(1, 3);
34177     * // => true
34178     *
34179     * _.lt(3, 3);
34180     * // => false
34181     *
34182     * _.lt(3, 1);
34183     * // => false
34184     */
34185    var lt = createRelationalOperation(baseLt);
34186
34187    /**
34188     * Checks if `value` is less than or equal to `other`.
34189     *
34190     * @static
34191     * @memberOf _
34192     * @since 3.9.0
34193     * @category Lang
34194     * @param {*} value The value to compare.
34195     * @param {*} other The other value to compare.
34196     * @returns {boolean} Returns `true` if `value` is less than or equal to
34197     *  `other`, else `false`.
34198     * @see _.gte
34199     * @example
34200     *
34201     * _.lte(1, 3);
34202     * // => true
34203     *
34204     * _.lte(3, 3);
34205     * // => true
34206     *
34207     * _.lte(3, 1);
34208     * // => false
34209     */
34210    var lte = createRelationalOperation(function(value, other) {
34211      return value <= other;
34212    });
34213
34214    /**
34215     * Converts `value` to an array.
vendor: 11,756 bytes, lines 34216-34645
34216     *
34217     * @static
34218     * @since 0.1.0
34219     * @memberOf _
34220     * @category Lang
34221     * @param {*} value The value to convert.
34222     * @returns {Array} Returns the converted array.
34223     * @example
34224     *
34225     * _.toArray({ 'a': 1, 'b': 2 });
34226     * // => [1, 2]
34227     *
34228     * _.toArray('abc');
34229     * // => ['a', 'b', 'c']
34230     *
34231     * _.toArray(1);
34232     * // => []
34233     *
34234     * _.toArray(null);
34235     * // => []
34236     */
34237    function toArray(value) {
34238      if (!value) {
34239        return [];
34240      }
34241      if (isArrayLike(value)) {
34242        return isString(value) ? stringToArray(value) : copyArray(value);
34243      }
34244      if (symIterator && value[symIterator]) {
34245        return iteratorToArray(value[symIterator]());
34246      }
34247      var tag = getTag(value),
34248          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
34249
34250      return func(value);
34251    }
34252
34253    /**
34254     * Converts `value` to a finite number.
34255     *
34256     * @static
34257     * @memberOf _
34258     * @since 4.12.0
34259     * @category Lang
34260     * @param {*} value The value to convert.
34261     * @returns {number} Returns the converted number.
34262     * @example
34263     *
34264     * _.toFinite(3.2);
34265     * // => 3.2
34266     *
34267     * _.toFinite(Number.MIN_VALUE);
34268     * // => 5e-324
34269     *
34270     * _.toFinite(Infinity);
34271     * // => 1.7976931348623157e+308
34272     *
34273     * _.toFinite('3.2');
34274     * // => 3.2
34275     */
34276    function toFinite(value) {
34277      if (!value) {
34278        return value === 0 ? value : 0;
34279      }
34280      value = toNumber(value);
34281      if (value === INFINITY || value === -INFINITY) {
34282        var sign = (value < 0 ? -1 : 1);
34283        return sign * MAX_INTEGER;
34284      }
34285      return value === value ? value : 0;
34286    }
34287
34288    /**
34289     * Converts `value` to an integer.
34290     *
34291     * **Note:** This method is loosely based on
34292     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
34293     *
34294     * @static
34295     * @memberOf _
34296     * @since 4.0.0
34297     * @category Lang
34298     * @param {*} value The value to convert.
34299     * @returns {number} Returns the converted integer.
34300     * @example
34301     *
34302     * _.toInteger(3.2);
34303     * // => 3
34304     *
34305     * _.toInteger(Number.MIN_VALUE);
34306     * // => 0
34307     *
34308     * _.toInteger(Infinity);
34309     * // => 1.7976931348623157e+308
34310     *
34311     * _.toInteger('3.2');
34312     * // => 3
34313     */
34314    function toInteger(value) {
34315      var result = toFinite(value),
34316          remainder = result % 1;
34317
34318      return result === result ? (remainder ? result - remainder : result) : 0;
34319    }
34320
34321    /**
34322     * Converts `value` to an integer suitable for use as the length of an
34323     * array-like object.
34324     *
34325     * **Note:** This method is based on
34326     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
34327     *
34328     * @static
34329     * @memberOf _
34330     * @since 4.0.0
34331     * @category Lang
34332     * @param {*} value The value to convert.
34333     * @returns {number} Returns the converted integer.
34334     * @example
34335     *
34336     * _.toLength(3.2);
34337     * // => 3
34338     *
34339     * _.toLength(Number.MIN_VALUE);
34340     * // => 0
34341     *
34342     * _.toLength(Infinity);
34343     * // => 4294967295
34344     *
34345     * _.toLength('3.2');
34346     * // => 3
34347     */
34348    function toLength(value) {
34349      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
34350    }
34351
34352    /**
34353     * Converts `value` to a number.
34354     *
34355     * @static
34356     * @memberOf _
34357     * @since 4.0.0
34358     * @category Lang
34359     * @param {*} value The value to process.
34360     * @returns {number} Returns the number.
34361     * @example
34362     *
34363     * _.toNumber(3.2);
34364     * // => 3.2
34365     *
34366     * _.toNumber(Number.MIN_VALUE);
34367     * // => 5e-324
34368     *
34369     * _.toNumber(Infinity);
34370     * // => Infinity
34371     *
34372     * _.toNumber('3.2');
34373     * // => 3.2
34374     */
34375    function toNumber(value) {
34376      if (typeof value == 'number') {
34377        return value;
34378      }
34379      if (isSymbol(value)) {
34380        return NAN;
34381      }
34382      if (isObject(value)) {
34383        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
34384        value = isObject(other) ? (other + '') : other;
34385      }
34386      if (typeof value != 'string') {
34387        return value === 0 ? value : +value;
34388      }
34389      value = baseTrim(value);
34390      var isBinary = reIsBinary.test(value);
34391      return (isBinary || reIsOctal.test(value))
34392        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
34393        : (reIsBadHex.test(value) ? NAN : +value);
34394    }
34395
34396    /**
34397     * Converts `value` to a plain object flattening inherited enumerable string
34398     * keyed properties of `value` to own properties of the plain object.
34399     *
34400     * @static
34401     * @memberOf _
34402     * @since 3.0.0
34403     * @category Lang
34404     * @param {*} value The value to convert.
34405     * @returns {Object} Returns the converted plain object.
34406     * @example
34407     *
34408     * function Foo() {
34409     *   this.b = 2;
34410     * }
34411     *
34412     * Foo.prototype.c = 3;
34413     *
34414     * _.assign({ 'a': 1 }, new Foo);
34415     * // => { 'a': 1, 'b': 2 }
34416     *
34417     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
34418     * // => { 'a': 1, 'b': 2, 'c': 3 }
34419     */
34420    function toPlainObject(value) {
34421      return copyObject(value, keysIn(value));
34422    }
34423
34424    /**
34425     * Converts `value` to a safe integer. A safe integer can be compared and
34426     * represented correctly.
34427     *
34428     * @static
34429     * @memberOf _
34430     * @since 4.0.0
34431     * @category Lang
34432     * @param {*} value The value to convert.
34433     * @returns {number} Returns the converted integer.
34434     * @example
34435     *
34436     * _.toSafeInteger(3.2);
34437     * // => 3
34438     *
34439     * _.toSafeInteger(Number.MIN_VALUE);
34440     * // => 0
34441     *
34442     * _.toSafeInteger(Infinity);
34443     * // => 9007199254740991
34444     *
34445     * _.toSafeInteger('3.2');
34446     * // => 3
34447     */
34448    function toSafeInteger(value) {
34449      return value
34450        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
34451        : (value === 0 ? value : 0);
34452    }
34453
34454    /**
34455     * Converts `value` to a string. An empty string is returned for `null`
34456     * and `undefined` values. The sign of `-0` is preserved.
34457     *
34458     * @static
34459     * @memberOf _
34460     * @since 4.0.0
34461     * @category Lang
34462     * @param {*} value The value to convert.
34463     * @returns {string} Returns the converted string.
34464     * @example
34465     *
34466     * _.toString(null);
34467     * // => ''
34468     *
34469     * _.toString(-0);
34470     * // => '-0'
34471     *
34472     * _.toString([1, 2, 3]);
34473     * // => '1,2,3'
34474     */
34475    function toString(value) {
34476      return value == null ? '' : baseToString(value);
34477    }
34478
34479    /*------------------------------------------------------------------------*/
34480
34481    /**
34482     * Assigns own enumerable string keyed properties of source objects to the
34483     * destination object. Source objects are applied from left to right.
34484     * Subsequent sources overwrite property assignments of previous sources.
34485     *
34486     * **Note:** This method mutates `object` and is loosely based on
34487     * [`Object.assign`](https://mdn.io/Object/assign).
34488     *
34489     * @static
34490     * @memberOf _
34491     * @since 0.10.0
34492     * @category Object
34493     * @param {Object} object The destination object.
34494     * @param {...Object} [sources] The source objects.
34495     * @returns {Object} Returns `object`.
34496     * @see _.assignIn
34497     * @example
34498     *
34499     * function Foo() {
34500     *   this.a = 1;
34501     * }
34502     *
34503     * function Bar() {
34504     *   this.c = 3;
34505     * }
34506     *
34507     * Foo.prototype.b = 2;
34508     * Bar.prototype.d = 4;
34509     *
34510     * _.assign({ 'a': 0 }, new Foo, new Bar);
34511     * // => { 'a': 1, 'c': 3 }
34512     */
34513    var assign = createAssigner(function(object, source) {
34514      if (isPrototype(source) || isArrayLike(source)) {
34515        copyObject(source, keys(source), object);
34516        return;
34517      }
34518      for (var key in source) {
34519        if (hasOwnProperty.call(source, key)) {
34520          assignValue(object, key, source[key]);
34521        }
34522      }
34523    });
34524
34525    /**
34526     * This method is like `_.assign` except that it iterates over own and
34527     * inherited source properties.
34528     *
34529     * **Note:** This method mutates `object`.
34530     *
34531     * @static
34532     * @memberOf _
34533     * @since 4.0.0
34534     * @alias extend
34535     * @category Object
34536     * @param {Object} object The destination object.
34537     * @param {...Object} [sources] The source objects.
34538     * @returns {Object} Returns `object`.
34539     * @see _.assign
34540     * @example
34541     *
34542     * function Foo() {
34543     *   this.a = 1;
34544     * }
34545     *
34546     * function Bar() {
34547     *   this.c = 3;
34548     * }
34549     *
34550     * Foo.prototype.b = 2;
34551     * Bar.prototype.d = 4;
34552     *
34553     * _.assignIn({ 'a': 0 }, new Foo, new Bar);
34554     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
34555     */
34556    var assignIn = createAssigner(function(object, source) {
34557      copyObject(source, keysIn(source), object);
34558    });
34559
34560    /**
34561     * This method is like `_.assignIn` except that it accepts `customizer`
34562     * which is invoked to produce the assigned values. If `customizer` returns
34563     * `undefined`, assignment is handled by the method instead. The `customizer`
34564     * is invoked with five arguments: (objValue, srcValue, key, object, source).
34565     *
34566     * **Note:** This method mutates `object`.
34567     *
34568     * @static
34569     * @memberOf _
34570     * @since 4.0.0
34571     * @alias extendWith
34572     * @category Object
34573     * @param {Object} object The destination object.
34574     * @param {...Object} sources The source objects.
34575     * @param {Function} [customizer] The function to customize assigned values.
34576     * @returns {Object} Returns `object`.
34577     * @see _.assignWith
34578     * @example
34579     *
34580     * function customizer(objValue, srcValue) {
34581     *   return _.isUndefined(objValue) ? srcValue : objValue;
34582     * }
34583     *
34584     * var defaults = _.partialRight(_.assignInWith, customizer);
34585     *
34586     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
34587     * // => { 'a': 1, 'b': 2 }
34588     */
34589    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
34590      copyObject(source, keysIn(source), object, customizer);
34591    });
34592
34593    /**
34594     * This method is like `_.assign` except that it accepts `customizer`
34595     * which is invoked to produce the assigned values. If `customizer` returns
34596     * `undefined`, assignment is handled by the method instead. The `customizer`
34597     * is invoked with five arguments: (objValue, srcValue, key, object, source).
34598     *
34599     * **Note:** This method mutates `object`.
34600     *
34601     * @static
34602     * @memberOf _
34603     * @since 4.0.0
34604     * @category Object
34605     * @param {Object} object The destination object.
34606     * @param {...Object} sources The source objects.
34607     * @param {Function} [customizer] The function to customize assigned values.
34608     * @returns {Object} Returns `object`.
34609     * @see _.assignInWith
34610     * @example
34611     *
34612     * function customizer(objValue, srcValue) {
34613     *   return _.isUndefined(objValue) ? srcValue : objValue;
34614     * }
34615     *
34616     * var defaults = _.partialRight(_.assignWith, customizer);
34617     *
34618     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
34619     * // => { 'a': 1, 'b': 2 }
34620     */
34621    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
34622      copyObject(source, keys(source), object, customizer);
34623    });
34624
34625    /**
34626     * Creates an array of values corresponding to `paths` of `object`.
34627     *
34628     * @static
34629     * @memberOf _
34630     * @since 1.0.0
34631     * @category Object
34632     * @param {Object} object The object to iterate over.
34633     * @param {...(string|string[])} [paths] The property paths to pick.
34634     * @returns {Array} Returns the picked values.
34635     * @example
34636     *
34637     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
34638     *
34639     * _.at(object, ['a[0].b.c', 'a[1]']);
34640     * // => [3, 4]
34641     */
34642    var at = flatRest(baseAt);
34643
34644    /**
34645     * Creates an object that inherits from the `prototype` object. If a
vendor: 13,619 bytes, lines 34646-35110
34646     * `properties` object is given, its own enumerable string keyed properties
34647     * are assigned to the created object.
34648     *
34649     * @static
34650     * @memberOf _
34651     * @since 2.3.0
34652     * @category Object
34653     * @param {Object} prototype The object to inherit from.
34654     * @param {Object} [properties] The properties to assign to the object.
34655     * @returns {Object} Returns the new object.
34656     * @example
34657     *
34658     * function Shape() {
34659     *   this.x = 0;
34660     *   this.y = 0;
34661     * }
34662     *
34663     * function Circle() {
34664     *   Shape.call(this);
34665     * }
34666     *
34667     * Circle.prototype = _.create(Shape.prototype, {
34668     *   'constructor': Circle
34669     * });
34670     *
34671     * var circle = new Circle;
34672     * circle instanceof Circle;
34673     * // => true
34674     *
34675     * circle instanceof Shape;
34676     * // => true
34677     */
34678    function create(prototype, properties) {
34679      var result = baseCreate(prototype);
34680      return properties == null ? result : baseAssign(result, properties);
34681    }
34682
34683    /**
34684     * Assigns own and inherited enumerable string keyed properties of source
34685     * objects to the destination object for all destination properties that
34686     * resolve to `undefined`. Source objects are applied from left to right.
34687     * Once a property is set, additional values of the same property are ignored.
34688     *
34689     * **Note:** This method mutates `object`.
34690     *
34691     * @static
34692     * @since 0.1.0
34693     * @memberOf _
34694     * @category Object
34695     * @param {Object} object The destination object.
34696     * @param {...Object} [sources] The source objects.
34697     * @returns {Object} Returns `object`.
34698     * @see _.defaultsDeep
34699     * @example
34700     *
34701     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
34702     * // => { 'a': 1, 'b': 2 }
34703     */
34704    var defaults = baseRest(function(object, sources) {
34705      object = Object(object);
34706
34707      var index = -1;
34708      var length = sources.length;
34709      var guard = length > 2 ? sources[2] : undefined;
34710
34711      if (guard && isIterateeCall(sources[0], sources[1], guard)) {
34712        length = 1;
34713      }
34714
34715      while (++index < length) {
34716        var source = sources[index];
34717        var props = keysIn(source);
34718        var propsIndex = -1;
34719        var propsLength = props.length;
34720
34721        while (++propsIndex < propsLength) {
34722          var key = props[propsIndex];
34723          var value = object[key];
34724
34725          if (value === undefined ||
34726              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
34727            object[key] = source[key];
34728          }
34729        }
34730      }
34731
34732      return object;
34733    });
34734
34735    /**
34736     * This method is like `_.defaults` except that it recursively assigns
34737     * default properties.
34738     *
34739     * **Note:** This method mutates `object`.
34740     *
34741     * @static
34742     * @memberOf _
34743     * @since 3.10.0
34744     * @category Object
34745     * @param {Object} object The destination object.
34746     * @param {...Object} [sources] The source objects.
34747     * @returns {Object} Returns `object`.
34748     * @see _.defaults
34749     * @example
34750     *
34751     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
34752     * // => { 'a': { 'b': 2, 'c': 3 } }
34753     */
34754    var defaultsDeep = baseRest(function(args) {
34755      args.push(undefined, customDefaultsMerge);
34756      return apply(mergeWith, undefined, args);
34757    });
34758
34759    /**
34760     * This method is like `_.find` except that it returns the key of the first
34761     * element `predicate` returns truthy for instead of the element itself.
34762     *
34763     * @static
34764     * @memberOf _
34765     * @since 1.1.0
34766     * @category Object
34767     * @param {Object} object The object to inspect.
34768     * @param {Function} [predicate=_.identity] The function invoked per iteration.
34769     * @returns {string|undefined} Returns the key of the matched element,
34770     *  else `undefined`.
34771     * @example
34772     *
34773     * var users = {
34774     *   'barney':  { 'age': 36, 'active': true },
34775     *   'fred':    { 'age': 40, 'active': false },
34776     *   'pebbles': { 'age': 1,  'active': true }
34777     * };
34778     *
34779     * _.findKey(users, function(o) { return o.age < 40; });
34780     * // => 'barney' (iteration order is not guaranteed)
34781     *
34782     * // The `_.matches` iteratee shorthand.
34783     * _.findKey(users, { 'age': 1, 'active': true });
34784     * // => 'pebbles'
34785     *
34786     * // The `_.matchesProperty` iteratee shorthand.
34787     * _.findKey(users, ['active', false]);
34788     * // => 'fred'
34789     *
34790     * // The `_.property` iteratee shorthand.
34791     * _.findKey(users, 'active');
34792     * // => 'barney'
34793     */
34794    function findKey(object, predicate) {
34795      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
34796    }
34797
34798    /**
34799     * This method is like `_.findKey` except that it iterates over elements of
34800     * a collection in the opposite order.
34801     *
34802     * @static
34803     * @memberOf _
34804     * @since 2.0.0
34805     * @category Object
34806     * @param {Object} object The object to inspect.
34807     * @param {Function} [predicate=_.identity] The function invoked per iteration.
34808     * @returns {string|undefined} Returns the key of the matched element,
34809     *  else `undefined`.
34810     * @example
34811     *
34812     * var users = {
34813     *   'barney':  { 'age': 36, 'active': true },
34814     *   'fred':    { 'age': 40, 'active': false },
34815     *   'pebbles': { 'age': 1,  'active': true }
34816     * };
34817     *
34818     * _.findLastKey(users, function(o) { return o.age < 40; });
34819     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
34820     *
34821     * // The `_.matches` iteratee shorthand.
34822     * _.findLastKey(users, { 'age': 36, 'active': true });
34823     * // => 'barney'
34824     *
34825     * // The `_.matchesProperty` iteratee shorthand.
34826     * _.findLastKey(users, ['active', false]);
34827     * // => 'fred'
34828     *
34829     * // The `_.property` iteratee shorthand.
34830     * _.findLastKey(users, 'active');
34831     * // => 'pebbles'
34832     */
34833    function findLastKey(object, predicate) {
34834      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
34835    }
34836
34837    /**
34838     * Iterates over own and inherited enumerable string keyed properties of an
34839     * object and invokes `iteratee` for each property. The iteratee is invoked
34840     * with three arguments: (value, key, object). Iteratee functions may exit
34841     * iteration early by explicitly returning `false`.
34842     *
34843     * @static
34844     * @memberOf _
34845     * @since 0.3.0
34846     * @category Object
34847     * @param {Object} object The object to iterate over.
34848     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
34849     * @returns {Object} Returns `object`.
34850     * @see _.forInRight
34851     * @example
34852     *
34853     * function Foo() {
34854     *   this.a = 1;
34855     *   this.b = 2;
34856     * }
34857     *
34858     * Foo.prototype.c = 3;
34859     *
34860     * _.forIn(new Foo, function(value, key) {
34861     *   console.log(key);
34862     * });
34863     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
34864     */
34865    function forIn(object, iteratee) {
34866      return object == null
34867        ? object
34868        : baseFor(object, getIteratee(iteratee, 3), keysIn);
34869    }
34870
34871    /**
34872     * This method is like `_.forIn` except that it iterates over properties of
34873     * `object` in the opposite order.
34874     *
34875     * @static
34876     * @memberOf _
34877     * @since 2.0.0
34878     * @category Object
34879     * @param {Object} object The object to iterate over.
34880     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
34881     * @returns {Object} Returns `object`.
34882     * @see _.forIn
34883     * @example
34884     *
34885     * function Foo() {
34886     *   this.a = 1;
34887     *   this.b = 2;
34888     * }
34889     *
34890     * Foo.prototype.c = 3;
34891     *
34892     * _.forInRight(new Foo, function(value, key) {
34893     *   console.log(key);
34894     * });
34895     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
34896     */
34897    function forInRight(object, iteratee) {
34898      return object == null
34899        ? object
34900        : baseForRight(object, getIteratee(iteratee, 3), keysIn);
34901    }
34902
34903    /**
34904     * Iterates over own enumerable string keyed properties of an object and
34905     * invokes `iteratee` for each property. The iteratee is invoked with three
34906     * arguments: (value, key, object). Iteratee functions may exit iteration
34907     * early by explicitly returning `false`.
34908     *
34909     * @static
34910     * @memberOf _
34911     * @since 0.3.0
34912     * @category Object
34913     * @param {Object} object The object to iterate over.
34914     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
34915     * @returns {Object} Returns `object`.
34916     * @see _.forOwnRight
34917     * @example
34918     *
34919     * function Foo() {
34920     *   this.a = 1;
34921     *   this.b = 2;
34922     * }
34923     *
34924     * Foo.prototype.c = 3;
34925     *
34926     * _.forOwn(new Foo, function(value, key) {
34927     *   console.log(key);
34928     * });
34929     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
34930     */
34931    function forOwn(object, iteratee) {
34932      return object && baseForOwn(object, getIteratee(iteratee, 3));
34933    }
34934
34935    /**
34936     * This method is like `_.forOwn` except that it iterates over properties of
34937     * `object` in the opposite order.
34938     *
34939     * @static
34940     * @memberOf _
34941     * @since 2.0.0
34942     * @category Object
34943     * @param {Object} object The object to iterate over.
34944     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
34945     * @returns {Object} Returns `object`.
34946     * @see _.forOwn
34947     * @example
34948     *
34949     * function Foo() {
34950     *   this.a = 1;
34951     *   this.b = 2;
34952     * }
34953     *
34954     * Foo.prototype.c = 3;
34955     *
34956     * _.forOwnRight(new Foo, function(value, key) {
34957     *   console.log(key);
34958     * });
34959     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
34960     */
34961    function forOwnRight(object, iteratee) {
34962      return object && baseForOwnRight(object, getIteratee(iteratee, 3));
34963    }
34964
34965    /**
34966     * Creates an array of function property names from own enumerable properties
34967     * of `object`.
34968     *
34969     * @static
34970     * @since 0.1.0
34971     * @memberOf _
34972     * @category Object
34973     * @param {Object} object The object to inspect.
34974     * @returns {Array} Returns the function names.
34975     * @see _.functionsIn
34976     * @example
34977     *
34978     * function Foo() {
34979     *   this.a = _.constant('a');
34980     *   this.b = _.constant('b');
34981     * }
34982     *
34983     * Foo.prototype.c = _.constant('c');
34984     *
34985     * _.functions(new Foo);
34986     * // => ['a', 'b']
34987     */
34988    function functions(object) {
34989      return object == null ? [] : baseFunctions(object, keys(object));
34990    }
34991
34992    /**
34993     * Creates an array of function property names from own and inherited
34994     * enumerable properties of `object`.
34995     *
34996     * @static
34997     * @memberOf _
34998     * @since 4.0.0
34999     * @category Object
35000     * @param {Object} object The object to inspect.
35001     * @returns {Array} Returns the function names.
35002     * @see _.functions
35003     * @example
35004     *
35005     * function Foo() {
35006     *   this.a = _.constant('a');
35007     *   this.b = _.constant('b');
35008     * }
35009     *
35010     * Foo.prototype.c = _.constant('c');
35011     *
35012     * _.functionsIn(new Foo);
35013     * // => ['a', 'b', 'c']
35014     */
35015    function functionsIn(object) {
35016      return object == null ? [] : baseFunctions(object, keysIn(object));
35017    }
35018
35019    /**
35020     * Gets the value at `path` of `object`. If the resolved value is
35021     * `undefined`, the `defaultValue` is returned in its place.
35022     *
35023     * @static
35024     * @memberOf _
35025     * @since 3.7.0
35026     * @category Object
35027     * @param {Object} object The object to query.
35028     * @param {Array|string} path The path of the property to get.
35029     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
35030     * @returns {*} Returns the resolved value.
35031     * @example
35032     *
35033     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
35034     *
35035     * _.get(object, 'a[0].b.c');
35036     * // => 3
35037     *
35038     * _.get(object, ['a', '0', 'b', 'c']);
35039     * // => 3
35040     *
35041     * _.get(object, 'a.b.c', 'default');
35042     * // => 'default'
35043     */
35044    function get(object, path, defaultValue) {
35045      var result = object == null ? undefined : baseGet(object, path);
35046      return result === undefined ? defaultValue : result;
35047    }
35048
35049    /**
35050     * Checks if `path` is a direct property of `object`.
35051     *
35052     * @static
35053     * @since 0.1.0
35054     * @memberOf _
35055     * @category Object
35056     * @param {Object} object The object to query.
35057     * @param {Array|string} path The path to check.
35058     * @returns {boolean} Returns `true` if `path` exists, else `false`.
35059     * @example
35060     *
35061     * var object = { 'a': { 'b': 2 } };
35062     * var other = _.create({ 'a': _.create({ 'b': 2 }) });
35063     *
35064     * _.has(object, 'a');
35065     * // => true
35066     *
35067     * _.has(object, 'a.b');
35068     * // => true
35069     *
35070     * _.has(object, ['a', 'b']);
35071     * // => true
35072     *
35073     * _.has(other, 'a');
35074     * // => false
35075     */
35076    function has(object, path) {
35077      return object != null && hasPath(object, path, baseHas);
35078    }
35079
35080    /**
35081     * Checks if `path` is a direct or inherited property of `object`.
35082     *
35083     * @static
35084     * @memberOf _
35085     * @since 4.0.0
35086     * @category Object
35087     * @param {Object} object The object to query.
35088     * @param {Array|string} path The path to check.
35089     * @returns {boolean} Returns `true` if `path` exists, else `false`.
35090     * @example
35091     *
35092     * var object = _.create({ 'a': _.create({ 'b': 2 }) });
35093     *
35094     * _.hasIn(object, 'a');
35095     * // => true
35096     *
35097     * _.hasIn(object, 'a.b');
35098     * // => true
35099     *
35100     * _.hasIn(object, ['a', 'b']);
35101     * // => true
35102     *
35103     * _.hasIn(object, 'b');
35104     * // => false
35105     */
35106    function hasIn(object, path) {
35107      return object != null && hasPath(object, path, baseHasIn);
35108    }
35109
35110    /**
vendor: 11,848 bytes, lines 35111-35481
35111     * Creates an object composed of the inverted keys and values of `object`.
35112     * If `object` contains duplicate values, subsequent values overwrite
35113     * property assignments of previous values.
35114     *
35115     * @static
35116     * @memberOf _
35117     * @since 0.7.0
35118     * @category Object
35119     * @param {Object} object The object to invert.
35120     * @returns {Object} Returns the new inverted object.
35121     * @example
35122     *
35123     * var object = { 'a': 1, 'b': 2, 'c': 1 };
35124     *
35125     * _.invert(object);
35126     * // => { '1': 'c', '2': 'b' }
35127     */
35128    var invert = createInverter(function(result, value, key) {
35129      if (value != null &&
35130          typeof value.toString != 'function') {
35131        value = nativeObjectToString.call(value);
35132      }
35133
35134      result[value] = key;
35135    }, constant(identity));
35136
35137    /**
35138     * This method is like `_.invert` except that the inverted object is generated
35139     * from the results of running each element of `object` thru `iteratee`. The
35140     * corresponding inverted value of each inverted key is an array of keys
35141     * responsible for generating the inverted value. The iteratee is invoked
35142     * with one argument: (value).
35143     *
35144     * @static
35145     * @memberOf _
35146     * @since 4.1.0
35147     * @category Object
35148     * @param {Object} object The object to invert.
35149     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
35150     * @returns {Object} Returns the new inverted object.
35151     * @example
35152     *
35153     * var object = { 'a': 1, 'b': 2, 'c': 1 };
35154     *
35155     * _.invertBy(object);
35156     * // => { '1': ['a', 'c'], '2': ['b'] }
35157     *
35158     * _.invertBy(object, function(value) {
35159     *   return 'group' + value;
35160     * });
35161     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
35162     */
35163    var invertBy = createInverter(function(result, value, key) {
35164      if (value != null &&
35165          typeof value.toString != 'function') {
35166        value = nativeObjectToString.call(value);
35167      }
35168
35169      if (hasOwnProperty.call(result, value)) {
35170        result[value].push(key);
35171      } else {
35172        result[value] = [key];
35173      }
35174    }, getIteratee);
35175
35176    /**
35177     * Invokes the method at `path` of `object`.
35178     *
35179     * @static
35180     * @memberOf _
35181     * @since 4.0.0
35182     * @category Object
35183     * @param {Object} object The object to query.
35184     * @param {Array|string} path The path of the method to invoke.
35185     * @param {...*} [args] The arguments to invoke the method with.
35186     * @returns {*} Returns the result of the invoked method.
35187     * @example
35188     *
35189     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
35190     *
35191     * _.invoke(object, 'a[0].b.c.slice', 1, 3);
35192     * // => [2, 3]
35193     */
35194    var invoke = baseRest(baseInvoke);
35195
35196    /**
35197     * Creates an array of the own enumerable property names of `object`.
35198     *
35199     * **Note:** Non-object values are coerced to objects. See the
35200     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
35201     * for more details.
35202     *
35203     * @static
35204     * @since 0.1.0
35205     * @memberOf _
35206     * @category Object
35207     * @param {Object} object The object to query.
35208     * @returns {Array} Returns the array of property names.
35209     * @example
35210     *
35211     * function Foo() {
35212     *   this.a = 1;
35213     *   this.b = 2;
35214     * }
35215     *
35216     * Foo.prototype.c = 3;
35217     *
35218     * _.keys(new Foo);
35219     * // => ['a', 'b'] (iteration order is not guaranteed)
35220     *
35221     * _.keys('hi');
35222     * // => ['0', '1']
35223     */
35224    function keys(object) {
35225      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
35226    }
35227
35228    /**
35229     * Creates an array of the own and inherited enumerable property names of `object`.
35230     *
35231     * **Note:** Non-object values are coerced to objects.
35232     *
35233     * @static
35234     * @memberOf _
35235     * @since 3.0.0
35236     * @category Object
35237     * @param {Object} object The object to query.
35238     * @returns {Array} Returns the array of property names.
35239     * @example
35240     *
35241     * function Foo() {
35242     *   this.a = 1;
35243     *   this.b = 2;
35244     * }
35245     *
35246     * Foo.prototype.c = 3;
35247     *
35248     * _.keysIn(new Foo);
35249     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
35250     */
35251    function keysIn(object) {
35252      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
35253    }
35254
35255    /**
35256     * The opposite of `_.mapValues`; this method creates an object with the
35257     * same values as `object` and keys generated by running each own enumerable
35258     * string keyed property of `object` thru `iteratee`. The iteratee is invoked
35259     * with three arguments: (value, key, object).
35260     *
35261     * @static
35262     * @memberOf _
35263     * @since 3.8.0
35264     * @category Object
35265     * @param {Object} object The object to iterate over.
35266     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
35267     * @returns {Object} Returns the new mapped object.
35268     * @see _.mapValues
35269     * @example
35270     *
35271     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
35272     *   return key + value;
35273     * });
35274     * // => { 'a1': 1, 'b2': 2 }
35275     */
35276    function mapKeys(object, iteratee) {
35277      var result = {};
35278      iteratee = getIteratee(iteratee, 3);
35279
35280      baseForOwn(object, function(value, key, object) {
35281        baseAssignValue(result, iteratee(value, key, object), value);
35282      });
35283      return result;
35284    }
35285
35286    /**
35287     * Creates an object with the same keys as `object` and values generated
35288     * by running each own enumerable string keyed property of `object` thru
35289     * `iteratee`. The iteratee is invoked with three arguments:
35290     * (value, key, object).
35291     *
35292     * @static
35293     * @memberOf _
35294     * @since 2.4.0
35295     * @category Object
35296     * @param {Object} object The object to iterate over.
35297     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
35298     * @returns {Object} Returns the new mapped object.
35299     * @see _.mapKeys
35300     * @example
35301     *
35302     * var users = {
35303     *   'fred':    { 'user': 'fred',    'age': 40 },
35304     *   'pebbles': { 'user': 'pebbles', 'age': 1 }
35305     * };
35306     *
35307     * _.mapValues(users, function(o) { return o.age; });
35308     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
35309     *
35310     * // The `_.property` iteratee shorthand.
35311     * _.mapValues(users, 'age');
35312     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
35313     */
35314    function mapValues(object, iteratee) {
35315      var result = {};
35316      iteratee = getIteratee(iteratee, 3);
35317
35318      baseForOwn(object, function(value, key, object) {
35319        baseAssignValue(result, key, iteratee(value, key, object));
35320      });
35321      return result;
35322    }
35323
35324    /**
35325     * This method is like `_.assign` except that it recursively merges own and
35326     * inherited enumerable string keyed properties of source objects into the
35327     * destination object. Source properties that resolve to `undefined` are
35328     * skipped if a destination value exists. Array and plain object properties
35329     * are merged recursively. Other objects and value types are overridden by
35330     * assignment. Source objects are applied from left to right. Subsequent
35331     * sources overwrite property assignments of previous sources.
35332     *
35333     * **Note:** This method mutates `object`.
35334     *
35335     * @static
35336     * @memberOf _
35337     * @since 0.5.0
35338     * @category Object
35339     * @param {Object} object The destination object.
35340     * @param {...Object} [sources] The source objects.
35341     * @returns {Object} Returns `object`.
35342     * @example
35343     *
35344     * var object = {
35345     *   'a': [{ 'b': 2 }, { 'd': 4 }]
35346     * };
35347     *
35348     * var other = {
35349     *   'a': [{ 'c': 3 }, { 'e': 5 }]
35350     * };
35351     *
35352     * _.merge(object, other);
35353     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
35354     */
35355    var merge = createAssigner(function(object, source, srcIndex) {
35356      baseMerge(object, source, srcIndex);
35357    });
35358
35359    /**
35360     * This method is like `_.merge` except that it accepts `customizer` which
35361     * is invoked to produce the merged values of the destination and source
35362     * properties. If `customizer` returns `undefined`, merging is handled by the
35363     * method instead. The `customizer` is invoked with six arguments:
35364     * (objValue, srcValue, key, object, source, stack).
35365     *
35366     * **Note:** This method mutates `object`.
35367     *
35368     * @static
35369     * @memberOf _
35370     * @since 4.0.0
35371     * @category Object
35372     * @param {Object} object The destination object.
35373     * @param {...Object} sources The source objects.
35374     * @param {Function} customizer The function to customize assigned values.
35375     * @returns {Object} Returns `object`.
35376     * @example
35377     *
35378     * function customizer(objValue, srcValue) {
35379     *   if (_.isArray(objValue)) {
35380     *     return objValue.concat(srcValue);
35381     *   }
35382     * }
35383     *
35384     * var object = { 'a': [1], 'b': [2] };
35385     * var other = { 'a': [3], 'b': [4] };
35386     *
35387     * _.mergeWith(object, other, customizer);
35388     * // => { 'a': [1, 3], 'b': [2, 4] }
35389     */
35390    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
35391      baseMerge(object, source, srcIndex, customizer);
35392    });
35393
35394    /**
35395     * The opposite of `_.pick`; this method creates an object composed of the
35396     * own and inherited enumerable property paths of `object` that are not omitted.
35397     *
35398     * **Note:** This method is considerably slower than `_.pick`.
35399     *
35400     * @static
35401     * @since 0.1.0
35402     * @memberOf _
35403     * @category Object
35404     * @param {Object} object The source object.
35405     * @param {...(string|string[])} [paths] The property paths to omit.
35406     * @returns {Object} Returns the new object.
35407     * @example
35408     *
35409     * var object = { 'a': 1, 'b': '2', 'c': 3 };
35410     *
35411     * _.omit(object, ['a', 'c']);
35412     * // => { 'b': '2' }
35413     */
35414    var omit = flatRest(function(object, paths) {
35415      var result = {};
35416      if (object == null) {
35417        return result;
35418      }
35419      var isDeep = false;
35420      paths = arrayMap(paths, function(path) {
35421        path = castPath(path, object);
35422        isDeep || (isDeep = path.length > 1);
35423        return path;
35424      });
35425      copyObject(object, getAllKeysIn(object), result);
35426      if (isDeep) {
35427        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
35428      }
35429      var length = paths.length;
35430      while (length--) {
35431        baseUnset(result, paths[length]);
35432      }
35433      return result;
35434    });
35435
35436    /**
35437     * The opposite of `_.pickBy`; this method creates an object composed of
35438     * the own and inherited enumerable string keyed properties of `object` that
35439     * `predicate` doesn't return truthy for. The predicate is invoked with two
35440     * arguments: (value, key).
35441     *
35442     * @static
35443     * @memberOf _
35444     * @since 4.0.0
35445     * @category Object
35446     * @param {Object} object The source object.
35447     * @param {Function} [predicate=_.identity] The function invoked per property.
35448     * @returns {Object} Returns the new object.
35449     * @example
35450     *
35451     * var object = { 'a': 1, 'b': '2', 'c': 3 };
35452     *
35453     * _.omitBy(object, _.isNumber);
35454     * // => { 'b': '2' }
35455     */
35456    function omitBy(object, predicate) {
35457      return pickBy(object, negate(getIteratee(predicate)));
35458    }
35459
35460    /**
35461     * Creates an object composed of the picked `object` properties.
35462     *
35463     * @static
35464     * @since 0.1.0
35465     * @memberOf _
35466     * @category Object
35467     * @param {Object} object The source object.
35468     * @param {...(string|string[])} [paths] The property paths to pick.
35469     * @returns {Object} Returns the new object.
35470     * @example
35471     *
35472     * var object = { 'a': 1, 'b': '2', 'c': 3 };
35473     *
35474     * _.pick(object, ['a', 'c']);
35475     * // => { 'a': 1, 'c': 3 }
35476     */
35477    var pick = flatRest(function(object, paths) {
35478      return object == null ? {} : basePick(object, paths);
35479    });
35480
35481    /**
vendor: 11,160 bytes, lines 35482-35820
35482     * Creates an object composed of the `object` properties `predicate` returns
35483     * truthy for. The predicate is invoked with two arguments: (value, key).
35484     *
35485     * @static
35486     * @memberOf _
35487     * @since 4.0.0
35488     * @category Object
35489     * @param {Object} object The source object.
35490     * @param {Function} [predicate=_.identity] The function invoked per property.
35491     * @returns {Object} Returns the new object.
35492     * @example
35493     *
35494     * var object = { 'a': 1, 'b': '2', 'c': 3 };
35495     *
35496     * _.pickBy(object, _.isNumber);
35497     * // => { 'a': 1, 'c': 3 }
35498     */
35499    function pickBy(object, predicate) {
35500      if (object == null) {
35501        return {};
35502      }
35503      var props = arrayMap(getAllKeysIn(object), function(prop) {
35504        return [prop];
35505      });
35506      predicate = getIteratee(predicate);
35507      return basePickBy(object, props, function(value, path) {
35508        return predicate(value, path[0]);
35509      });
35510    }
35511
35512    /**
35513     * This method is like `_.get` except that if the resolved value is a
35514     * function it's invoked with the `this` binding of its parent object and
35515     * its result is returned.
35516     *
35517     * @static
35518     * @since 0.1.0
35519     * @memberOf _
35520     * @category Object
35521     * @param {Object} object The object to query.
35522     * @param {Array|string} path The path of the property to resolve.
35523     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
35524     * @returns {*} Returns the resolved value.
35525     * @example
35526     *
35527     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
35528     *
35529     * _.result(object, 'a[0].b.c1');
35530     * // => 3
35531     *
35532     * _.result(object, 'a[0].b.c2');
35533     * // => 4
35534     *
35535     * _.result(object, 'a[0].b.c3', 'default');
35536     * // => 'default'
35537     *
35538     * _.result(object, 'a[0].b.c3', _.constant('default'));
35539     * // => 'default'
35540     */
35541    function result(object, path, defaultValue) {
35542      path = castPath(path, object);
35543
35544      var index = -1,
35545          length = path.length;
35546
35547      // Ensure the loop is entered when path is empty.
35548      if (!length) {
35549        length = 1;
35550        object = undefined;
35551      }
35552      while (++index < length) {
35553        var value = object == null ? undefined : object[toKey(path[index])];
35554        if (value === undefined) {
35555          index = length;
35556          value = defaultValue;
35557        }
35558        object = isFunction(value) ? value.call(object) : value;
35559      }
35560      return object;
35561    }
35562
35563    /**
35564     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
35565     * it's created. Arrays are created for missing index properties while objects
35566     * are created for all other missing properties. Use `_.setWith` to customize
35567     * `path` creation.
35568     *
35569     * **Note:** This method mutates `object`.
35570     *
35571     * @static
35572     * @memberOf _
35573     * @since 3.7.0
35574     * @category Object
35575     * @param {Object} object The object to modify.
35576     * @param {Array|string} path The path of the property to set.
35577     * @param {*} value The value to set.
35578     * @returns {Object} Returns `object`.
35579     * @example
35580     *
35581     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
35582     *
35583     * _.set(object, 'a[0].b.c', 4);
35584     * console.log(object.a[0].b.c);
35585     * // => 4
35586     *
35587     * _.set(object, ['x', '0', 'y', 'z'], 5);
35588     * console.log(object.x[0].y.z);
35589     * // => 5
35590     */
35591    function set(object, path, value) {
35592      return object == null ? object : baseSet(object, path, value);
35593    }
35594
35595    /**
35596     * This method is like `_.set` except that it accepts `customizer` which is
35597     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
35598     * path creation is handled by the method instead. The `customizer` is invoked
35599     * with three arguments: (nsValue, key, nsObject).
35600     *
35601     * **Note:** This method mutates `object`.
35602     *
35603     * @static
35604     * @memberOf _
35605     * @since 4.0.0
35606     * @category Object
35607     * @param {Object} object The object to modify.
35608     * @param {Array|string} path The path of the property to set.
35609     * @param {*} value The value to set.
35610     * @param {Function} [customizer] The function to customize assigned values.
35611     * @returns {Object} Returns `object`.
35612     * @example
35613     *
35614     * var object = {};
35615     *
35616     * _.setWith(object, '[0][1]', 'a', Object);
35617     * // => { '0': { '1': 'a' } }
35618     */
35619    function setWith(object, path, value, customizer) {
35620      customizer = typeof customizer == 'function' ? customizer : undefined;
35621      return object == null ? object : baseSet(object, path, value, customizer);
35622    }
35623
35624    /**
35625     * Creates an array of own enumerable string keyed-value pairs for `object`
35626     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
35627     * entries are returned.
35628     *
35629     * @static
35630     * @memberOf _
35631     * @since 4.0.0
35632     * @alias entries
35633     * @category Object
35634     * @param {Object} object The object to query.
35635     * @returns {Array} Returns the key-value pairs.
35636     * @example
35637     *
35638     * function Foo() {
35639     *   this.a = 1;
35640     *   this.b = 2;
35641     * }
35642     *
35643     * Foo.prototype.c = 3;
35644     *
35645     * _.toPairs(new Foo);
35646     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
35647     */
35648    var toPairs = createToPairs(keys);
35649
35650    /**
35651     * Creates an array of own and inherited enumerable string keyed-value pairs
35652     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
35653     * or set, its entries are returned.
35654     *
35655     * @static
35656     * @memberOf _
35657     * @since 4.0.0
35658     * @alias entriesIn
35659     * @category Object
35660     * @param {Object} object The object to query.
35661     * @returns {Array} Returns the key-value pairs.
35662     * @example
35663     *
35664     * function Foo() {
35665     *   this.a = 1;
35666     *   this.b = 2;
35667     * }
35668     *
35669     * Foo.prototype.c = 3;
35670     *
35671     * _.toPairsIn(new Foo);
35672     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
35673     */
35674    var toPairsIn = createToPairs(keysIn);
35675
35676    /**
35677     * An alternative to `_.reduce`; this method transforms `object` to a new
35678     * `accumulator` object which is the result of running each of its own
35679     * enumerable string keyed properties thru `iteratee`, with each invocation
35680     * potentially mutating the `accumulator` object. If `accumulator` is not
35681     * provided, a new object with the same `[[Prototype]]` will be used. The
35682     * iteratee is invoked with four arguments: (accumulator, value, key, object).
35683     * Iteratee functions may exit iteration early by explicitly returning `false`.
35684     *
35685     * @static
35686     * @memberOf _
35687     * @since 1.3.0
35688     * @category Object
35689     * @param {Object} object The object to iterate over.
35690     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
35691     * @param {*} [accumulator] The custom accumulator value.
35692     * @returns {*} Returns the accumulated value.
35693     * @example
35694     *
35695     * _.transform([2, 3, 4], function(result, n) {
35696     *   result.push(n *= n);
35697     *   return n % 2 == 0;
35698     * }, []);
35699     * // => [4, 9]
35700     *
35701     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
35702     *   (result[value] || (result[value] = [])).push(key);
35703     * }, {});
35704     * // => { '1': ['a', 'c'], '2': ['b'] }
35705     */
35706    function transform(object, iteratee, accumulator) {
35707      var isArr = isArray(object),
35708          isArrLike = isArr || isBuffer(object) || isTypedArray(object);
35709
35710      iteratee = getIteratee(iteratee, 4);
35711      if (accumulator == null) {
35712        var Ctor = object && object.constructor;
35713        if (isArrLike) {
35714          accumulator = isArr ? new Ctor : [];
35715        }
35716        else if (isObject(object)) {
35717          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
35718        }
35719        else {
35720          accumulator = {};
35721        }
35722      }
35723      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
35724        return iteratee(accumulator, value, index, object);
35725      });
35726      return accumulator;
35727    }
35728
35729    /**
35730     * Removes the property at `path` of `object`.
35731     *
35732     * **Note:** This method mutates `object`.
35733     *
35734     * @static
35735     * @memberOf _
35736     * @since 4.0.0
35737     * @category Object
35738     * @param {Object} object The object to modify.
35739     * @param {Array|string} path The path of the property to unset.
35740     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
35741     * @example
35742     *
35743     * var object = { 'a': [{ 'b': { 'c': 7 } }] };
35744     * _.unset(object, 'a[0].b.c');
35745     * // => true
35746     *
35747     * console.log(object);
35748     * // => { 'a': [{ 'b': {} }] };
35749     *
35750     * _.unset(object, ['a', '0', 'b', 'c']);
35751     * // => true
35752     *
35753     * console.log(object);
35754     * // => { 'a': [{ 'b': {} }] };
35755     */
35756    function unset(object, path) {
35757      return object == null ? true : baseUnset(object, path);
35758    }
35759
35760    /**
35761     * This method is like `_.set` except that accepts `updater` to produce the
35762     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
35763     * is invoked with one argument: (value).
35764     *
35765     * **Note:** This method mutates `object`.
35766     *
35767     * @static
35768     * @memberOf _
35769     * @since 4.6.0
35770     * @category Object
35771     * @param {Object} object The object to modify.
35772     * @param {Array|string} path The path of the property to set.
35773     * @param {Function} updater The function to produce the updated value.
35774     * @returns {Object} Returns `object`.
35775     * @example
35776     *
35777     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
35778     *
35779     * _.update(object, 'a[0].b.c', function(n) { return n * n; });
35780     * console.log(object.a[0].b.c);
35781     * // => 9
35782     *
35783     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
35784     * console.log(object.x[0].y.z);
35785     * // => 0
35786     */
35787    function update(object, path, updater) {
35788      return object == null ? object : baseUpdate(object, path, castFunction(updater));
35789    }
35790
35791    /**
35792     * This method is like `_.update` except that it accepts `customizer` which is
35793     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
35794     * path creation is handled by the method instead. The `customizer` is invoked
35795     * with three arguments: (nsValue, key, nsObject).
35796     *
35797     * **Note:** This method mutates `object`.
35798     *
35799     * @static
35800     * @memberOf _
35801     * @since 4.6.0
35802     * @category Object
35803     * @param {Object} object The object to modify.
35804     * @param {Array|string} path The path of the property to set.
35805     * @param {Function} updater The function to produce the updated value.
35806     * @param {Function} [customizer] The function to customize assigned values.
35807     * @returns {Object} Returns `object`.
35808     * @example
35809     *
35810     * var object = {};
35811     *
35812     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
35813     * // => { '0': { '1': 'a' } }
35814     */
35815    function updateWith(object, path, updater, customizer) {
35816      customizer = typeof customizer == 'function' ? customizer : undefined;
35817      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
35818    }
35819
35820    /**
vendor: 1,263 bytes, lines 35821-35870
35821     * Creates an array of the own enumerable string keyed property values of `object`.
35822     *
35823     * **Note:** Non-object values are coerced to objects.
35824     *
35825     * @static
35826     * @since 0.1.0
35827     * @memberOf _
35828     * @category Object
35829     * @param {Object} object The object to query.
35830     * @returns {Array} Returns the array of property values.
35831     * @example
35832     *
35833     * function Foo() {
35834     *   this.a = 1;
35835     *   this.b = 2;
35836     * }
35837     *
35838     * Foo.prototype.c = 3;
35839     *
35840     * _.values(new Foo);
35841     * // => [1, 2] (iteration order is not guaranteed)
35842     *
35843     * _.values('hi');
35844     * // => ['h', 'i']
35845     */
35846    function values(object) {
35847      return object == null ? [] : baseValues(object, keys(object));
35848    }
35849
35850    /**
35851     * Creates an array of the own and inherited enumerable string keyed property
35852     * values of `object`.
35853     *
35854     * **Note:** Non-object values are coerced to objects.
35855     *
35856     * @static
35857     * @memberOf _
35858     * @since 3.0.0
35859     * @category Object
35860     * @param {Object} object The object to query.
35861     * @returns {Array} Returns the array of property values.
35862     * @example
35863     *
35864     * function Foo() {
35865     *   this.a = 1;
35866     *   this.b = 2;
35867     * }
35868     *
35869     * Foo.prototype.c = 3;
35870     *
vendor: 9,679 bytes, lines 35871-36191
35871     * _.valuesIn(new Foo);
35872     * // => [1, 2, 3] (iteration order is not guaranteed)
35873     */
35874    function valuesIn(object) {
35875      return object == null ? [] : baseValues(object, keysIn(object));
35876    }
35877
35878    /*------------------------------------------------------------------------*/
35879
35880    /**
35881     * Clamps `number` within the inclusive `lower` and `upper` bounds.
35882     *
35883     * @static
35884     * @memberOf _
35885     * @since 4.0.0
35886     * @category Number
35887     * @param {number} number The number to clamp.
35888     * @param {number} [lower] The lower bound.
35889     * @param {number} upper The upper bound.
35890     * @returns {number} Returns the clamped number.
35891     * @example
35892     *
35893     * _.clamp(-10, -5, 5);
35894     * // => -5
35895     *
35896     * _.clamp(10, -5, 5);
35897     * // => 5
35898     */
35899    function clamp(number, lower, upper) {
35900      if (upper === undefined) {
35901        upper = lower;
35902        lower = undefined;
35903      }
35904      if (upper !== undefined) {
35905        upper = toNumber(upper);
35906        upper = upper === upper ? upper : 0;
35907      }
35908      if (lower !== undefined) {
35909        lower = toNumber(lower);
35910        lower = lower === lower ? lower : 0;
35911      }
35912      return baseClamp(toNumber(number), lower, upper);
35913    }
35914
35915    /**
35916     * Checks if `n` is between `start` and up to, but not including, `end`. If
35917     * `end` is not specified, it's set to `start` with `start` then set to `0`.
35918     * If `start` is greater than `end` the params are swapped to support
35919     * negative ranges.
35920     *
35921     * @static
35922     * @memberOf _
35923     * @since 3.3.0
35924     * @category Number
35925     * @param {number} number The number to check.
35926     * @param {number} [start=0] The start of the range.
35927     * @param {number} end The end of the range.
35928     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
35929     * @see _.range, _.rangeRight
35930     * @example
35931     *
35932     * _.inRange(3, 2, 4);
35933     * // => true
35934     *
35935     * _.inRange(4, 8);
35936     * // => true
35937     *
35938     * _.inRange(4, 2);
35939     * // => false
35940     *
35941     * _.inRange(2, 2);
35942     * // => false
35943     *
35944     * _.inRange(1.2, 2);
35945     * // => true
35946     *
35947     * _.inRange(5.2, 4);
35948     * // => false
35949     *
35950     * _.inRange(-3, -2, -6);
35951     * // => true
35952     */
35953    function inRange(number, start, end) {
35954      start = toFinite(start);
35955      if (end === undefined) {
35956        end = start;
35957        start = 0;
35958      } else {
35959        end = toFinite(end);
35960      }
35961      number = toNumber(number);
35962      return baseInRange(number, start, end);
35963    }
35964
35965    /**
35966     * Produces a random number between the inclusive `lower` and `upper` bounds.
35967     * If only one argument is provided a number between `0` and the given number
35968     * is returned. If `floating` is `true`, or either `lower` or `upper` are
35969     * floats, a floating-point number is returned instead of an integer.
35970     *
35971     * **Note:** JavaScript follows the IEEE-754 standard for resolving
35972     * floating-point values which can produce unexpected results.
35973     *
35974     * @static
35975     * @memberOf _
35976     * @since 0.7.0
35977     * @category Number
35978     * @param {number} [lower=0] The lower bound.
35979     * @param {number} [upper=1] The upper bound.
35980     * @param {boolean} [floating] Specify returning a floating-point number.
35981     * @returns {number} Returns the random number.
35982     * @example
35983     *
35984     * _.random(0, 5);
35985     * // => an integer between 0 and 5
35986     *
35987     * _.random(5);
35988     * // => also an integer between 0 and 5
35989     *
35990     * _.random(5, true);
35991     * // => a floating-point number between 0 and 5
35992     *
35993     * _.random(1.2, 5.2);
35994     * // => a floating-point number between 1.2 and 5.2
35995     */
35996    function random(lower, upper, floating) {
35997      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
35998        upper = floating = undefined;
35999      }
36000      if (floating === undefined) {
36001        if (typeof upper == 'boolean') {
36002          floating = upper;
36003          upper = undefined;
36004        }
36005        else if (typeof lower == 'boolean') {
36006          floating = lower;
36007          lower = undefined;
36008        }
36009      }
36010      if (lower === undefined && upper === undefined) {
36011        lower = 0;
36012        upper = 1;
36013      }
36014      else {
36015        lower = toFinite(lower);
36016        if (upper === undefined) {
36017          upper = lower;
36018          lower = 0;
36019        } else {
36020          upper = toFinite(upper);
36021        }
36022      }
36023      if (lower > upper) {
36024        var temp = lower;
36025        lower = upper;
36026        upper = temp;
36027      }
36028      if (floating || lower % 1 || upper % 1) {
36029        var rand = nativeRandom();
36030        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
36031      }
36032      return baseRandom(lower, upper);
36033    }
36034
36035    /*------------------------------------------------------------------------*/
36036
36037    /**
36038     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
36039     *
36040     * @static
36041     * @memberOf _
36042     * @since 3.0.0
36043     * @category String
36044     * @param {string} [string=''] The string to convert.
36045     * @returns {string} Returns the camel cased string.
36046     * @example
36047     *
36048     * _.camelCase('Foo Bar');
36049     * // => 'fooBar'
36050     *
36051     * _.camelCase('--foo-bar--');
36052     * // => 'fooBar'
36053     *
36054     * _.camelCase('__FOO_BAR__');
36055     * // => 'fooBar'
36056     */
36057    var camelCase = createCompounder(function(result, word, index) {
36058      word = word.toLowerCase();
36059      return result + (index ? capitalize(word) : word);
36060    });
36061
36062    /**
36063     * Converts the first character of `string` to upper case and the remaining
36064     * to lower case.
36065     *
36066     * @static
36067     * @memberOf _
36068     * @since 3.0.0
36069     * @category String
36070     * @param {string} [string=''] The string to capitalize.
36071     * @returns {string} Returns the capitalized string.
36072     * @example
36073     *
36074     * _.capitalize('FRED');
36075     * // => 'Fred'
36076     */
36077    function capitalize(string) {
36078      return upperFirst(toString(string).toLowerCase());
36079    }
36080
36081    /**
36082     * Deburrs `string` by converting
36083     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
36084     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
36085     * letters to basic Latin letters and removing
36086     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
36087     *
36088     * @static
36089     * @memberOf _
36090     * @since 3.0.0
36091     * @category String
36092     * @param {string} [string=''] The string to deburr.
36093     * @returns {string} Returns the deburred string.
36094     * @example
36095     *
36096     * _.deburr('déjà vu');
36097     * // => 'deja vu'
36098     */
36099    function deburr(string) {
36100      string = toString(string);
36101      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
36102    }
36103
36104    /**
36105     * Checks if `string` ends with the given target string.
36106     *
36107     * @static
36108     * @memberOf _
36109     * @since 3.0.0
36110     * @category String
36111     * @param {string} [string=''] The string to inspect.
36112     * @param {string} [target] The string to search for.
36113     * @param {number} [position=string.length] The position to search up to.
36114     * @returns {boolean} Returns `true` if `string` ends with `target`,
36115     *  else `false`.
36116     * @example
36117     *
36118     * _.endsWith('abc', 'c');
36119     * // => true
36120     *
36121     * _.endsWith('abc', 'b');
36122     * // => false
36123     *
36124     * _.endsWith('abc', 'b', 2);
36125     * // => true
36126     */
36127    function endsWith(string, target, position) {
36128      string = toString(string);
36129      target = baseToString(target);
36130
36131      var length = string.length;
36132      position = position === undefined
36133        ? length
36134        : baseClamp(toInteger(position), 0, length);
36135
36136      var end = position;
36137      position -= target.length;
36138      return position >= 0 && string.slice(position, end) == target;
36139    }
36140
36141    /**
36142     * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
36143     * corresponding HTML entities.
36144     *
36145     * **Note:** No other characters are escaped. To escape additional
36146     * characters use a third-party library like [_he_](https://mths.be/he).
36147     *
36148     * Though the ">" character is escaped for symmetry, characters like
36149     * ">" and "/" don't need escaping in HTML and have no special meaning
36150     * unless they're part of a tag or unquoted attribute value. See
36151     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
36152     * (under "semi-related fun fact") for more details.
36153     *
36154     * When working with HTML you should always
36155     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
36156     * XSS vectors.
36157     *
36158     * @static
36159     * @since 0.1.0
36160     * @memberOf _
36161     * @category String
36162     * @param {string} [string=''] The string to escape.
36163     * @returns {string} Returns the escaped string.
36164     * @example
36165     *
36166     * _.escape('fred, barney, & pebbles');
36167     * // => 'fred, barney, &amp; pebbles'
36168     */
36169    function escape(string) {
36170      string = toString(string);
36171      return (string && reHasUnescapedHtml.test(string))
36172        ? string.replace(reUnescapedHtml, escapeHtmlChar)
36173        : string;
36174    }
36175
36176    /**
36177     * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
36178     * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
36179     *
36180     * @static
36181     * @memberOf _
36182     * @since 3.0.0
36183     * @category String
36184     * @param {string} [string=''] The string to escape.
36185     * @returns {string} Returns the escaped string.
36186     * @example
36187     *
36188     * _.escapeRegExp('[lodash](https://lodash.com/)');
36189     * // => '\[lodash\]\(https://lodash\.com/\)'
36190     */
36191    function escapeRegExp(string) {
vendor: 4,658 bytes, lines 36192-36361
36192      string = toString(string);
36193      return (string && reHasRegExpChar.test(string))
36194        ? string.replace(reRegExpChar, '\\$&')
36195        : string;
36196    }
36197
36198    /**
36199     * Converts `string` to
36200     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
36201     *
36202     * @static
36203     * @memberOf _
36204     * @since 3.0.0
36205     * @category String
36206     * @param {string} [string=''] The string to convert.
36207     * @returns {string} Returns the kebab cased string.
36208     * @example
36209     *
36210     * _.kebabCase('Foo Bar');
36211     * // => 'foo-bar'
36212     *
36213     * _.kebabCase('fooBar');
36214     * // => 'foo-bar'
36215     *
36216     * _.kebabCase('__FOO_BAR__');
36217     * // => 'foo-bar'
36218     */
36219    var kebabCase = createCompounder(function(result, word, index) {
36220      return result + (index ? '-' : '') + word.toLowerCase();
36221    });
36222
36223    /**
36224     * Converts `string`, as space separated words, to lower case.
36225     *
36226     * @static
36227     * @memberOf _
36228     * @since 4.0.0
36229     * @category String
36230     * @param {string} [string=''] The string to convert.
36231     * @returns {string} Returns the lower cased string.
36232     * @example
36233     *
36234     * _.lowerCase('--Foo-Bar--');
36235     * // => 'foo bar'
36236     *
36237     * _.lowerCase('fooBar');
36238     * // => 'foo bar'
36239     *
36240     * _.lowerCase('__FOO_BAR__');
36241     * // => 'foo bar'
36242     */
36243    var lowerCase = createCompounder(function(result, word, index) {
36244      return result + (index ? ' ' : '') + word.toLowerCase();
36245    });
36246
36247    /**
36248     * Converts the first character of `string` to lower case.
36249     *
36250     * @static
36251     * @memberOf _
36252     * @since 4.0.0
36253     * @category String
36254     * @param {string} [string=''] The string to convert.
36255     * @returns {string} Returns the converted string.
36256     * @example
36257     *
36258     * _.lowerFirst('Fred');
36259     * // => 'fred'
36260     *
36261     * _.lowerFirst('FRED');
36262     * // => 'fRED'
36263     */
36264    var lowerFirst = createCaseFirst('toLowerCase');
36265
36266    /**
36267     * Pads `string` on the left and right sides if it's shorter than `length`.
36268     * Padding characters are truncated if they can't be evenly divided by `length`.
36269     *
36270     * @static
36271     * @memberOf _
36272     * @since 3.0.0
36273     * @category String
36274     * @param {string} [string=''] The string to pad.
36275     * @param {number} [length=0] The padding length.
36276     * @param {string} [chars=' '] The string used as padding.
36277     * @returns {string} Returns the padded string.
36278     * @example
36279     *
36280     * _.pad('abc', 8);
36281     * // => '  abc   '
36282     *
36283     * _.pad('abc', 8, '_-');
36284     * // => '_-abc_-_'
36285     *
36286     * _.pad('abc', 3);
36287     * // => 'abc'
36288     */
36289    function pad(string, length, chars) {
36290      string = toString(string);
36291      length = toInteger(length);
36292
36293      var strLength = length ? stringSize(string) : 0;
36294      if (!length || strLength >= length) {
36295        return string;
36296      }
36297      var mid = (length - strLength) / 2;
36298      return (
36299        createPadding(nativeFloor(mid), chars) +
36300        string +
36301        createPadding(nativeCeil(mid), chars)
36302      );
36303    }
36304
36305    /**
36306     * Pads `string` on the right side if it's shorter than `length`. Padding
36307     * characters are truncated if they exceed `length`.
36308     *
36309     * @static
36310     * @memberOf _
36311     * @since 4.0.0
36312     * @category String
36313     * @param {string} [string=''] The string to pad.
36314     * @param {number} [length=0] The padding length.
36315     * @param {string} [chars=' '] The string used as padding.
36316     * @returns {string} Returns the padded string.
36317     * @example
36318     *
36319     * _.padEnd('abc', 6);
36320     * // => 'abc   '
36321     *
36322     * _.padEnd('abc', 6, '_-');
36323     * // => 'abc_-_'
36324     *
36325     * _.padEnd('abc', 3);
36326     * // => 'abc'
36327     */
36328    function padEnd(string, length, chars) {
36329      string = toString(string);
36330      length = toInteger(length);
36331
36332      var strLength = length ? stringSize(string) : 0;
36333      return (length && strLength < length)
36334        ? (string + createPadding(length - strLength, chars))
36335        : string;
36336    }
36337
36338    /**
36339     * Pads `string` on the left side if it's shorter than `length`. Padding
36340     * characters are truncated if they exceed `length`.
36341     *
36342     * @static
36343     * @memberOf _
36344     * @since 4.0.0
36345     * @category String
36346     * @param {string} [string=''] The string to pad.
36347     * @param {number} [length=0] The padding length.
36348     * @param {string} [chars=' '] The string used as padding.
36349     * @returns {string} Returns the padded string.
36350     * @example
36351     *
36352     * _.padStart('abc', 6);
36353     * // => '   abc'
36354     *
36355     * _.padStart('abc', 6, '_-');
36356     * // => '_-_abc'
36357     *
36358     * _.padStart('abc', 3);
36359     * // => 'abc'
36360     */
36361    function padStart(string, length, chars) {
vendor: 29,827 bytes, lines 36362-37259
36362      string = toString(string);
36363      length = toInteger(length);
36364
36365      var strLength = length ? stringSize(string) : 0;
36366      return (length && strLength < length)
36367        ? (createPadding(length - strLength, chars) + string)
36368        : string;
36369    }
36370
36371    /**
36372     * Converts `string` to an integer of the specified radix. If `radix` is
36373     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
36374     * hexadecimal, in which case a `radix` of `16` is used.
36375     *
36376     * **Note:** This method aligns with the
36377     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
36378     *
36379     * @static
36380     * @memberOf _
36381     * @since 1.1.0
36382     * @category String
36383     * @param {string} string The string to convert.
36384     * @param {number} [radix=10] The radix to interpret `value` by.
36385     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
36386     * @returns {number} Returns the converted integer.
36387     * @example
36388     *
36389     * _.parseInt('08');
36390     * // => 8
36391     *
36392     * _.map(['6', '08', '10'], _.parseInt);
36393     * // => [6, 8, 10]
36394     */
36395    function parseInt(string, radix, guard) {
36396      if (guard || radix == null) {
36397        radix = 0;
36398      } else if (radix) {
36399        radix = +radix;
36400      }
36401      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
36402    }
36403
36404    /**
36405     * Repeats the given string `n` times.
36406     *
36407     * @static
36408     * @memberOf _
36409     * @since 3.0.0
36410     * @category String
36411     * @param {string} [string=''] The string to repeat.
36412     * @param {number} [n=1] The number of times to repeat the string.
36413     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
36414     * @returns {string} Returns the repeated string.
36415     * @example
36416     *
36417     * _.repeat('*', 3);
36418     * // => '***'
36419     *
36420     * _.repeat('abc', 2);
36421     * // => 'abcabc'
36422     *
36423     * _.repeat('abc', 0);
36424     * // => ''
36425     */
36426    function repeat(string, n, guard) {
36427      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
36428        n = 1;
36429      } else {
36430        n = toInteger(n);
36431      }
36432      return baseRepeat(toString(string), n);
36433    }
36434
36435    /**
36436     * Replaces matches for `pattern` in `string` with `replacement`.
36437     *
36438     * **Note:** This method is based on
36439     * [`String#replace`](https://mdn.io/String/replace).
36440     *
36441     * @static
36442     * @memberOf _
36443     * @since 4.0.0
36444     * @category String
36445     * @param {string} [string=''] The string to modify.
36446     * @param {RegExp|string} pattern The pattern to replace.
36447     * @param {Function|string} replacement The match replacement.
36448     * @returns {string} Returns the modified string.
36449     * @example
36450     *
36451     * _.replace('Hi Fred', 'Fred', 'Barney');
36452     * // => 'Hi Barney'
36453     */
36454    function replace() {
36455      var args = arguments,
36456          string = toString(args[0]);
36457
36458      return args.length < 3 ? string : string.replace(args[1], args[2]);
36459    }
36460
36461    /**
36462     * Converts `string` to
36463     * [snake case](https://en.wikipedia.org/wiki/Snake_case).
36464     *
36465     * @static
36466     * @memberOf _
36467     * @since 3.0.0
36468     * @category String
36469     * @param {string} [string=''] The string to convert.
36470     * @returns {string} Returns the snake cased string.
36471     * @example
36472     *
36473     * _.snakeCase('Foo Bar');
36474     * // => 'foo_bar'
36475     *
36476     * _.snakeCase('fooBar');
36477     * // => 'foo_bar'
36478     *
36479     * _.snakeCase('--FOO-BAR--');
36480     * // => 'foo_bar'
36481     */
36482    var snakeCase = createCompounder(function(result, word, index) {
36483      return result + (index ? '_' : '') + word.toLowerCase();
36484    });
36485
36486    /**
36487     * Splits `string` by `separator`.
36488     *
36489     * **Note:** This method is based on
36490     * [`String#split`](https://mdn.io/String/split).
36491     *
36492     * @static
36493     * @memberOf _
36494     * @since 4.0.0
36495     * @category String
36496     * @param {string} [string=''] The string to split.
36497     * @param {RegExp|string} separator The separator pattern to split by.
36498     * @param {number} [limit] The length to truncate results to.
36499     * @returns {Array} Returns the string segments.
36500     * @example
36501     *
36502     * _.split('a-b-c', '-', 2);
36503     * // => ['a', 'b']
36504     */
36505    function split(string, separator, limit) {
36506      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
36507        separator = limit = undefined;
36508      }
36509      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
36510      if (!limit) {
36511        return [];
36512      }
36513      string = toString(string);
36514      if (string && (
36515            typeof separator == 'string' ||
36516            (separator != null && !isRegExp(separator))
36517          )) {
36518        separator = baseToString(separator);
36519        if (!separator && hasUnicode(string)) {
36520          return castSlice(stringToArray(string), 0, limit);
36521        }
36522      }
36523      return string.split(separator, limit);
36524    }
36525
36526    /**
36527     * Converts `string` to
36528     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
36529     *
36530     * @static
36531     * @memberOf _
36532     * @since 3.1.0
36533     * @category String
36534     * @param {string} [string=''] The string to convert.
36535     * @returns {string} Returns the start cased string.
36536     * @example
36537     *
36538     * _.startCase('--foo-bar--');
36539     * // => 'Foo Bar'
36540     *
36541     * _.startCase('fooBar');
36542     * // => 'Foo Bar'
36543     *
36544     * _.startCase('__FOO_BAR__');
36545     * // => 'FOO BAR'
36546     */
36547    var startCase = createCompounder(function(result, word, index) {
36548      return result + (index ? ' ' : '') + upperFirst(word);
36549    });
36550
36551    /**
36552     * Checks if `string` starts with the given target string.
36553     *
36554     * @static
36555     * @memberOf _
36556     * @since 3.0.0
36557     * @category String
36558     * @param {string} [string=''] The string to inspect.
36559     * @param {string} [target] The string to search for.
36560     * @param {number} [position=0] The position to search from.
36561     * @returns {boolean} Returns `true` if `string` starts with `target`,
36562     *  else `false`.
36563     * @example
36564     *
36565     * _.startsWith('abc', 'a');
36566     * // => true
36567     *
36568     * _.startsWith('abc', 'b');
36569     * // => false
36570     *
36571     * _.startsWith('abc', 'b', 1);
36572     * // => true
36573     */
36574    function startsWith(string, target, position) {
36575      string = toString(string);
36576      position = position == null
36577        ? 0
36578        : baseClamp(toInteger(position), 0, string.length);
36579
36580      target = baseToString(target);
36581      return string.slice(position, position + target.length) == target;
36582    }
36583
36584    /**
36585     * Creates a compiled template function that can interpolate data properties
36586     * in "interpolate" delimiters, HTML-escape interpolated data properties in
36587     * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
36588     * properties may be accessed as free variables in the template. If a setting
36589     * object is given, it takes precedence over `_.templateSettings` values.
36590     *
36591     * **Note:** In the development build `_.template` utilizes
36592     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
36593     * for easier debugging.
36594     *
36595     * For more information on precompiling templates see
36596     * [lodash's custom builds documentation](https://lodash.com/custom-builds).
36597     *
36598     * For more information on Chrome extension sandboxes see
36599     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
36600     *
36601     * @static
36602     * @since 0.1.0
36603     * @memberOf _
36604     * @category String
36605     * @param {string} [string=''] The template string.
36606     * @param {Object} [options={}] The options object.
36607     * @param {RegExp} [options.escape=_.templateSettings.escape]
36608     *  The HTML "escape" delimiter.
36609     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
36610     *  The "evaluate" delimiter.
36611     * @param {Object} [options.imports=_.templateSettings.imports]
36612     *  An object to import into the template as free variables.
36613     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
36614     *  The "interpolate" delimiter.
36615     * @param {string} [options.sourceURL='lodash.templateSources[n]']
36616     *  The sourceURL of the compiled template.
36617     * @param {string} [options.variable='obj']
36618     *  The data object variable name.
36619     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
36620     * @returns {Function} Returns the compiled template function.
36621     * @example
36622     *
36623     * // Use the "interpolate" delimiter to create a compiled template.
36624     * var compiled = _.template('hello <%= user %>!');
36625     * compiled({ 'user': 'fred' });
36626     * // => 'hello fred!'
36627     *
36628     * // Use the HTML "escape" delimiter to escape data property values.
36629     * var compiled = _.template('<b><%- value %></b>');
36630     * compiled({ 'value': '<script>' });
36631     * // => '<b>&lt;script&gt;</b>'
36632     *
36633     * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
36634     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
36635     * compiled({ 'users': ['fred', 'barney'] });
36636     * // => '<li>fred</li><li>barney</li>'
36637     *
36638     * // Use the internal `print` function in "evaluate" delimiters.
36639     * var compiled = _.template('<% print("hello " + user); %>!');
36640     * compiled({ 'user': 'barney' });
36641     * // => 'hello barney!'
36642     *
36643     * // Use the ES template literal delimiter as an "interpolate" delimiter.
36644     * // Disable support by replacing the "interpolate" delimiter.
36645     * var compiled = _.template('hello ${ user }!');
36646     * compiled({ 'user': 'pebbles' });
36647     * // => 'hello pebbles!'
36648     *
36649     * // Use backslashes to treat delimiters as plain text.
36650     * var compiled = _.template('<%= "\\<%- value %\\>" %>');
36651     * compiled({ 'value': 'ignored' });
36652     * // => '<%- value %>'
36653     *
36654     * // Use the `imports` option to import `jQuery` as `jq`.
36655     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
36656     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
36657     * compiled({ 'users': ['fred', 'barney'] });
36658     * // => '<li>fred</li><li>barney</li>'
36659     *
36660     * // Use the `sourceURL` option to specify a custom sourceURL for the template.
36661     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
36662     * compiled(data);
36663     * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
36664     *
36665     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
36666     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
36667     * compiled.source;
36668     * // => function(data) {
36669     * //   var __t, __p = '';
36670     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
36671     * //   return __p;
36672     * // }
36673     *
36674     * // Use custom template delimiters.
36675     * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
36676     * var compiled = _.template('hello {{ user }}!');
36677     * compiled({ 'user': 'mustache' });
36678     * // => 'hello mustache!'
36679     *
36680     * // Use the `source` property to inline compiled templates for meaningful
36681     * // line numbers in error messages and stack traces.
36682     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
36683     *   var JST = {\
36684     *     "main": ' + _.template(mainText).source + '\
36685     *   };\
36686     * ');
36687     */
36688    function template(string, options, guard) {
36689      // Based on John Resig's `tmpl` implementation
36690      // (http://ejohn.org/blog/javascript-micro-templating/)
36691      // and Laura Doktorova's doT.js (https://github.com/olado/doT).
36692      var settings = lodash.templateSettings;
36693
36694      if (guard && isIterateeCall(string, options, guard)) {
36695        options = undefined;
36696      }
36697      string = toString(string);
36698      options = assignInWith({}, options, settings, customDefaultsAssignIn);
36699
36700      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
36701          importsKeys = keys(imports),
36702          importsValues = baseValues(imports, importsKeys);
36703
36704      var isEscaping,
36705          isEvaluating,
36706          index = 0,
36707          interpolate = options.interpolate || reNoMatch,
36708          source = "__p += '";
36709
36710      // Compile the regexp to match each delimiter.
36711      var reDelimiters = RegExp(
36712        (options.escape || reNoMatch).source + '|' +
36713        interpolate.source + '|' +
36714        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
36715        (options.evaluate || reNoMatch).source + '|$'
36716      , 'g');
36717
36718      // Use a sourceURL for easier debugging.
36719      // The sourceURL gets injected into the source that's eval-ed, so be careful
36720      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
36721      // and escape the comment, thus injecting code that gets evaled.
36722      var sourceURL = '//# sourceURL=' +
36723        (hasOwnProperty.call(options, 'sourceURL')
36724          ? (options.sourceURL + '').replace(/\s/g, ' ')
36725          : ('lodash.templateSources[' + (++templateCounter) + ']')
36726        ) + '\n';
36727
36728      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
36729        interpolateValue || (interpolateValue = esTemplateValue);
36730
36731        // Escape characters that can't be included in string literals.
36732        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
36733
36734        // Replace delimiters with snippets.
36735        if (escapeValue) {
36736          isEscaping = true;
36737          source += "' +\n__e(" + escapeValue + ") +\n'";
36738        }
36739        if (evaluateValue) {
36740          isEvaluating = true;
36741          source += "';\n" + evaluateValue + ";\n__p += '";
36742        }
36743        if (interpolateValue) {
36744          source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
36745        }
36746        index = offset + match.length;
36747
36748        // The JS engine embedded in Adobe products needs `match` returned in
36749        // order to produce the correct `offset` value.
36750        return match;
36751      });
36752
36753      source += "';\n";
36754
36755      // If `variable` is not specified wrap a with-statement around the generated
36756      // code to add the data object to the top of the scope chain.
36757      var variable = hasOwnProperty.call(options, 'variable') && options.variable;
36758      if (!variable) {
36759        source = 'with (obj) {\n' + source + '\n}\n';
36760      }
36761      // Throw an error if a forbidden character was found in `variable`, to prevent
36762      // potential command injection attacks.
36763      else if (reForbiddenIdentifierChars.test(variable)) {
36764        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
36765      }
36766
36767      // Cleanup code by stripping empty strings.
36768      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
36769        .replace(reEmptyStringMiddle, '$1')
36770        .replace(reEmptyStringTrailing, '$1;');
36771
36772      // Frame code as the function body.
36773      source = 'function(' + (variable || 'obj') + ') {\n' +
36774        (variable
36775          ? ''
36776          : 'obj || (obj = {});\n'
36777        ) +
36778        "var __t, __p = ''" +
36779        (isEscaping
36780           ? ', __e = _.escape'
36781           : ''
36782        ) +
36783        (isEvaluating
36784          ? ', __j = Array.prototype.join;\n' +
36785            "function print() { __p += __j.call(arguments, '') }\n"
36786          : ';\n'
36787        ) +
36788        source +
36789        'return __p\n}';
36790
36791      var result = attempt(function() {
36792        return Function(importsKeys, sourceURL + 'return ' + source)
36793          .apply(undefined, importsValues);
36794      });
36795
36796      // Provide the compiled function's source by its `toString` method or
36797      // the `source` property as a convenience for inlining compiled templates.
36798      result.source = source;
36799      if (isError(result)) {
36800        throw result;
36801      }
36802      return result;
36803    }
36804
36805    /**
36806     * Converts `string`, as a whole, to lower case just like
36807     * [String#toLowerCase](https://mdn.io/toLowerCase).
36808     *
36809     * @static
36810     * @memberOf _
36811     * @since 4.0.0
36812     * @category String
36813     * @param {string} [string=''] The string to convert.
36814     * @returns {string} Returns the lower cased string.
36815     * @example
36816     *
36817     * _.toLower('--Foo-Bar--');
36818     * // => '--foo-bar--'
36819     *
36820     * _.toLower('fooBar');
36821     * // => 'foobar'
36822     *
36823     * _.toLower('__FOO_BAR__');
36824     * // => '__foo_bar__'
36825     */
36826    function toLower(value) {
36827      return toString(value).toLowerCase();
36828    }
36829
36830    /**
36831     * Converts `string`, as a whole, to upper case just like
36832     * [String#toUpperCase](https://mdn.io/toUpperCase).
36833     *
36834     * @static
36835     * @memberOf _
36836     * @since 4.0.0
36837     * @category String
36838     * @param {string} [string=''] The string to convert.
36839     * @returns {string} Returns the upper cased string.
36840     * @example
36841     *
36842     * _.toUpper('--foo-bar--');
36843     * // => '--FOO-BAR--'
36844     *
36845     * _.toUpper('fooBar');
36846     * // => 'FOOBAR'
36847     *
36848     * _.toUpper('__foo_bar__');
36849     * // => '__FOO_BAR__'
36850     */
36851    function toUpper(value) {
36852      return toString(value).toUpperCase();
36853    }
36854
36855    /**
36856     * Removes leading and trailing whitespace or specified characters from `string`.
36857     *
36858     * @static
36859     * @memberOf _
36860     * @since 3.0.0
36861     * @category String
36862     * @param {string} [string=''] The string to trim.
36863     * @param {string} [chars=whitespace] The characters to trim.
36864     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
36865     * @returns {string} Returns the trimmed string.
36866     * @example
36867     *
36868     * _.trim('  abc  ');
36869     * // => 'abc'
36870     *
36871     * _.trim('-_-abc-_-', '_-');
36872     * // => 'abc'
36873     *
36874     * _.map(['  foo  ', '  bar  '], _.trim);
36875     * // => ['foo', 'bar']
36876     */
36877    function trim(string, chars, guard) {
36878      string = toString(string);
36879      if (string && (guard || chars === undefined)) {
36880        return baseTrim(string);
36881      }
36882      if (!string || !(chars = baseToString(chars))) {
36883        return string;
36884      }
36885      var strSymbols = stringToArray(string),
36886          chrSymbols = stringToArray(chars),
36887          start = charsStartIndex(strSymbols, chrSymbols),
36888          end = charsEndIndex(strSymbols, chrSymbols) + 1;
36889
36890      return castSlice(strSymbols, start, end).join('');
36891    }
36892
36893    /**
36894     * Removes trailing whitespace or specified characters from `string`.
36895     *
36896     * @static
36897     * @memberOf _
36898     * @since 4.0.0
36899     * @category String
36900     * @param {string} [string=''] The string to trim.
36901     * @param {string} [chars=whitespace] The characters to trim.
36902     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
36903     * @returns {string} Returns the trimmed string.
36904     * @example
36905     *
36906     * _.trimEnd('  abc  ');
36907     * // => '  abc'
36908     *
36909     * _.trimEnd('-_-abc-_-', '_-');
36910     * // => '-_-abc'
36911     */
36912    function trimEnd(string, chars, guard) {
36913      string = toString(string);
36914      if (string && (guard || chars === undefined)) {
36915        return string.slice(0, trimmedEndIndex(string) + 1);
36916      }
36917      if (!string || !(chars = baseToString(chars))) {
36918        return string;
36919      }
36920      var strSymbols = stringToArray(string),
36921          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
36922
36923      return castSlice(strSymbols, 0, end).join('');
36924    }
36925
36926    /**
36927     * Removes leading whitespace or specified characters from `string`.
36928     *
36929     * @static
36930     * @memberOf _
36931     * @since 4.0.0
36932     * @category String
36933     * @param {string} [string=''] The string to trim.
36934     * @param {string} [chars=whitespace] The characters to trim.
36935     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
36936     * @returns {string} Returns the trimmed string.
36937     * @example
36938     *
36939     * _.trimStart('  abc  ');
36940     * // => 'abc  '
36941     *
36942     * _.trimStart('-_-abc-_-', '_-');
36943     * // => 'abc-_-'
36944     */
36945    function trimStart(string, chars, guard) {
36946      string = toString(string);
36947      if (string && (guard || chars === undefined)) {
36948        return string.replace(reTrimStart, '');
36949      }
36950      if (!string || !(chars = baseToString(chars))) {
36951        return string;
36952      }
36953      var strSymbols = stringToArray(string),
36954          start = charsStartIndex(strSymbols, stringToArray(chars));
36955
36956      return castSlice(strSymbols, start).join('');
36957    }
36958
36959    /**
36960     * Truncates `string` if it's longer than the given maximum string length.
36961     * The last characters of the truncated string are replaced with the omission
36962     * string which defaults to "...".
36963     *
36964     * @static
36965     * @memberOf _
36966     * @since 4.0.0
36967     * @category String
36968     * @param {string} [string=''] The string to truncate.
36969     * @param {Object} [options={}] The options object.
36970     * @param {number} [options.length=30] The maximum string length.
36971     * @param {string} [options.omission='...'] The string to indicate text is omitted.
36972     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
36973     * @returns {string} Returns the truncated string.
36974     * @example
36975     *
36976     * _.truncate('hi-diddly-ho there, neighborino');
36977     * // => 'hi-diddly-ho there, neighbo...'
36978     *
36979     * _.truncate('hi-diddly-ho there, neighborino', {
36980     *   'length': 24,
36981     *   'separator': ' '
36982     * });
36983     * // => 'hi-diddly-ho there,...'
36984     *
36985     * _.truncate('hi-diddly-ho there, neighborino', {
36986     *   'length': 24,
36987     *   'separator': /,? +/
36988     * });
36989     * // => 'hi-diddly-ho there...'
36990     *
36991     * _.truncate('hi-diddly-ho there, neighborino', {
36992     *   'omission': ' [...]'
36993     * });
36994     * // => 'hi-diddly-ho there, neig [...]'
36995     */
36996    function truncate(string, options) {
36997      var length = DEFAULT_TRUNC_LENGTH,
36998          omission = DEFAULT_TRUNC_OMISSION;
36999
37000      if (isObject(options)) {
37001        var separator = 'separator' in options ? options.separator : separator;
37002        length = 'length' in options ? toInteger(options.length) : length;
37003        omission = 'omission' in options ? baseToString(options.omission) : omission;
37004      }
37005      string = toString(string);
37006
37007      var strLength = string.length;
37008      if (hasUnicode(string)) {
37009        var strSymbols = stringToArray(string);
37010        strLength = strSymbols.length;
37011      }
37012      if (length >= strLength) {
37013        return string;
37014      }
37015      var end = length - stringSize(omission);
37016      if (end < 1) {
37017        return omission;
37018      }
37019      var result = strSymbols
37020        ? castSlice(strSymbols, 0, end).join('')
37021        : string.slice(0, end);
37022
37023      if (separator === undefined) {
37024        return result + omission;
37025      }
37026      if (strSymbols) {
37027        end += (result.length - end);
37028      }
37029      if (isRegExp(separator)) {
37030        if (string.slice(end).search(separator)) {
37031          var match,
37032              substring = result;
37033
37034          if (!separator.global) {
37035            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
37036          }
37037          separator.lastIndex = 0;
37038          while ((match = separator.exec(substring))) {
37039            var newEnd = match.index;
37040          }
37041          result = result.slice(0, newEnd === undefined ? end : newEnd);
37042        }
37043      } else if (string.indexOf(baseToString(separator), end) != end) {
37044        var index = result.lastIndexOf(separator);
37045        if (index > -1) {
37046          result = result.slice(0, index);
37047        }
37048      }
37049      return result + omission;
37050    }
37051
37052    /**
37053     * The inverse of `_.escape`; this method converts the HTML entities
37054     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
37055     * their corresponding characters.
37056     *
37057     * **Note:** No other HTML entities are unescaped. To unescape additional
37058     * HTML entities use a third-party library like [_he_](https://mths.be/he).
37059     *
37060     * @static
37061     * @memberOf _
37062     * @since 0.6.0
37063     * @category String
37064     * @param {string} [string=''] The string to unescape.
37065     * @returns {string} Returns the unescaped string.
37066     * @example
37067     *
37068     * _.unescape('fred, barney, &amp; pebbles');
37069     * // => 'fred, barney, & pebbles'
37070     */
37071    function unescape(string) {
37072      string = toString(string);
37073      return (string && reHasEscapedHtml.test(string))
37074        ? string.replace(reEscapedHtml, unescapeHtmlChar)
37075        : string;
37076    }
37077
37078    /**
37079     * Converts `string`, as space separated words, to upper case.
37080     *
37081     * @static
37082     * @memberOf _
37083     * @since 4.0.0
37084     * @category String
37085     * @param {string} [string=''] The string to convert.
37086     * @returns {string} Returns the upper cased string.
37087     * @example
37088     *
37089     * _.upperCase('--foo-bar');
37090     * // => 'FOO BAR'
37091     *
37092     * _.upperCase('fooBar');
37093     * // => 'FOO BAR'
37094     *
37095     * _.upperCase('__foo_bar__');
37096     * // => 'FOO BAR'
37097     */
37098    var upperCase = createCompounder(function(result, word, index) {
37099      return result + (index ? ' ' : '') + word.toUpperCase();
37100    });
37101
37102    /**
37103     * Converts the first character of `string` to upper case.
37104     *
37105     * @static
37106     * @memberOf _
37107     * @since 4.0.0
37108     * @category String
37109     * @param {string} [string=''] The string to convert.
37110     * @returns {string} Returns the converted string.
37111     * @example
37112     *
37113     * _.upperFirst('fred');
37114     * // => 'Fred'
37115     *
37116     * _.upperFirst('FRED');
37117     * // => 'FRED'
37118     */
37119    var upperFirst = createCaseFirst('toUpperCase');
37120
37121    /**
37122     * Splits `string` into an array of its words.
37123     *
37124     * @static
37125     * @memberOf _
37126     * @since 3.0.0
37127     * @category String
37128     * @param {string} [string=''] The string to inspect.
37129     * @param {RegExp|string} [pattern] The pattern to match words.
37130     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
37131     * @returns {Array} Returns the words of `string`.
37132     * @example
37133     *
37134     * _.words('fred, barney, & pebbles');
37135     * // => ['fred', 'barney', 'pebbles']
37136     *
37137     * _.words('fred, barney, & pebbles', /[^, ]+/g);
37138     * // => ['fred', 'barney', '&', 'pebbles']
37139     */
37140    function words(string, pattern, guard) {
37141      string = toString(string);
37142      pattern = guard ? undefined : pattern;
37143
37144      if (pattern === undefined) {
37145        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
37146      }
37147      return string.match(pattern) || [];
37148    }
37149
37150    /*------------------------------------------------------------------------*/
37151
37152    /**
37153     * Attempts to invoke `func`, returning either the result or the caught error
37154     * object. Any additional arguments are provided to `func` when it's invoked.
37155     *
37156     * @static
37157     * @memberOf _
37158     * @since 3.0.0
37159     * @category Util
37160     * @param {Function} func The function to attempt.
37161     * @param {...*} [args] The arguments to invoke `func` with.
37162     * @returns {*} Returns the `func` result or error object.
37163     * @example
37164     *
37165     * // Avoid throwing errors for invalid selectors.
37166     * var elements = _.attempt(function(selector) {
37167     *   return document.querySelectorAll(selector);
37168     * }, '>_>');
37169     *
37170     * if (_.isError(elements)) {
37171     *   elements = [];
37172     * }
37173     */
37174    var attempt = baseRest(function(func, args) {
37175      try {
37176        return apply(func, undefined, args);
37177      } catch (e) {
37178        return isError(e) ? e : new Error(e);
37179      }
37180    });
37181
37182    /**
37183     * Binds methods of an object to the object itself, overwriting the existing
37184     * method.
37185     *
37186     * **Note:** This method doesn't set the "length" property of bound functions.
37187     *
37188     * @static
37189     * @since 0.1.0
37190     * @memberOf _
37191     * @category Util
37192     * @param {Object} object The object to bind and assign the bound methods to.
37193     * @param {...(string|string[])} methodNames The object method names to bind.
37194     * @returns {Object} Returns `object`.
37195     * @example
37196     *
37197     * var view = {
37198     *   'label': 'docs',
37199     *   'click': function() {
37200     *     console.log('clicked ' + this.label);
37201     *   }
37202     * };
37203     *
37204     * _.bindAll(view, ['click']);
37205     * jQuery(element).on('click', view.click);
37206     * // => Logs 'clicked docs' when clicked.
37207     */
37208    var bindAll = flatRest(function(object, methodNames) {
37209      arrayEach(methodNames, function(key) {
37210        key = toKey(key);
37211        baseAssignValue(object, key, bind(object[key], object));
37212      });
37213      return object;
37214    });
37215
37216    /**
37217     * Creates a function that iterates over `pairs` and invokes the corresponding
37218     * function of the first predicate to return truthy. The predicate-function
37219     * pairs are invoked with the `this` binding and arguments of the created
37220     * function.
37221     *
37222     * @static
37223     * @memberOf _
37224     * @since 4.0.0
37225     * @category Util
37226     * @param {Array} pairs The predicate-function pairs.
37227     * @returns {Function} Returns the new composite function.
37228     * @example
37229     *
37230     * var func = _.cond([
37231     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],
37232     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
37233     *   [_.stubTrue,                      _.constant('no match')]
37234     * ]);
37235     *
37236     * func({ 'a': 1, 'b': 2 });
37237     * // => 'matches A'
37238     *
37239     * func({ 'a': 0, 'b': 1 });
37240     * // => 'matches B'
37241     *
37242     * func({ 'a': '1', 'b': '2' });
37243     * // => 'no match'
37244     */
37245    function cond(pairs) {
37246      var length = pairs == null ? 0 : pairs.length,
37247          toIteratee = getIteratee();
37248
37249      pairs = !length ? [] : arrayMap(pairs, function(pair) {
37250        if (typeof pair[1] != 'function') {
37251          throw new TypeError(FUNC_ERROR_TEXT);
37252        }
37253        return [toIteratee(pair[0]), pair[1]];
37254      });
37255
37256      return baseRest(function(args) {
37257        var index = -1;
37258        while (++index < length) {
37259          var pair = pairs[index];
vendor: 10,296 bytes, lines 37260-37592
37260          if (apply(pair[0], this, args)) {
37261            return apply(pair[1], this, args);
37262          }
37263        }
37264      });
37265    }
37266
37267    /**
37268     * Creates a function that invokes the predicate properties of `source` with
37269     * the corresponding property values of a given object, returning `true` if
37270     * all predicates return truthy, else `false`.
37271     *
37272     * **Note:** The created function is equivalent to `_.conformsTo` with
37273     * `source` partially applied.
37274     *
37275     * @static
37276     * @memberOf _
37277     * @since 4.0.0
37278     * @category Util
37279     * @param {Object} source The object of property predicates to conform to.
37280     * @returns {Function} Returns the new spec function.
37281     * @example
37282     *
37283     * var objects = [
37284     *   { 'a': 2, 'b': 1 },
37285     *   { 'a': 1, 'b': 2 }
37286     * ];
37287     *
37288     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
37289     * // => [{ 'a': 1, 'b': 2 }]
37290     */
37291    function conforms(source) {
37292      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
37293    }
37294
37295    /**
37296     * Creates a function that returns `value`.
37297     *
37298     * @static
37299     * @memberOf _
37300     * @since 2.4.0
37301     * @category Util
37302     * @param {*} value The value to return from the new function.
37303     * @returns {Function} Returns the new constant function.
37304     * @example
37305     *
37306     * var objects = _.times(2, _.constant({ 'a': 1 }));
37307     *
37308     * console.log(objects);
37309     * // => [{ 'a': 1 }, { 'a': 1 }]
37310     *
37311     * console.log(objects[0] === objects[1]);
37312     * // => true
37313     */
37314    function constant(value) {
37315      return function() {
37316        return value;
37317      };
37318    }
37319
37320    /**
37321     * Checks `value` to determine whether a default value should be returned in
37322     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
37323     * or `undefined`.
37324     *
37325     * @static
37326     * @memberOf _
37327     * @since 4.14.0
37328     * @category Util
37329     * @param {*} value The value to check.
37330     * @param {*} defaultValue The default value.
37331     * @returns {*} Returns the resolved value.
37332     * @example
37333     *
37334     * _.defaultTo(1, 10);
37335     * // => 1
37336     *
37337     * _.defaultTo(undefined, 10);
37338     * // => 10
37339     */
37340    function defaultTo(value, defaultValue) {
37341      return (value == null || value !== value) ? defaultValue : value;
37342    }
37343
37344    /**
37345     * Creates a function that returns the result of invoking the given functions
37346     * with the `this` binding of the created function, where each successive
37347     * invocation is supplied the return value of the previous.
37348     *
37349     * @static
37350     * @memberOf _
37351     * @since 3.0.0
37352     * @category Util
37353     * @param {...(Function|Function[])} [funcs] The functions to invoke.
37354     * @returns {Function} Returns the new composite function.
37355     * @see _.flowRight
37356     * @example
37357     *
37358     * function square(n) {
37359     *   return n * n;
37360     * }
37361     *
37362     * var addSquare = _.flow([_.add, square]);
37363     * addSquare(1, 2);
37364     * // => 9
37365     */
37366    var flow = createFlow();
37367
37368    /**
37369     * This method is like `_.flow` except that it creates a function that
37370     * invokes the given functions from right to left.
37371     *
37372     * @static
37373     * @since 3.0.0
37374     * @memberOf _
37375     * @category Util
37376     * @param {...(Function|Function[])} [funcs] The functions to invoke.
37377     * @returns {Function} Returns the new composite function.
37378     * @see _.flow
37379     * @example
37380     *
37381     * function square(n) {
37382     *   return n * n;
37383     * }
37384     *
37385     * var addSquare = _.flowRight([square, _.add]);
37386     * addSquare(1, 2);
37387     * // => 9
37388     */
37389    var flowRight = createFlow(true);
37390
37391    /**
37392     * This method returns the first argument it receives.
37393     *
37394     * @static
37395     * @since 0.1.0
37396     * @memberOf _
37397     * @category Util
37398     * @param {*} value Any value.
37399     * @returns {*} Returns `value`.
37400     * @example
37401     *
37402     * var object = { 'a': 1 };
37403     *
37404     * console.log(_.identity(object) === object);
37405     * // => true
37406     */
37407    function identity(value) {
37408      return value;
37409    }
37410
37411    /**
37412     * Creates a function that invokes `func` with the arguments of the created
37413     * function. If `func` is a property name, the created function returns the
37414     * property value for a given element. If `func` is an array or object, the
37415     * created function returns `true` for elements that contain the equivalent
37416     * source properties, otherwise it returns `false`.
37417     *
37418     * @static
37419     * @since 4.0.0
37420     * @memberOf _
37421     * @category Util
37422     * @param {*} [func=_.identity] The value to convert to a callback.
37423     * @returns {Function} Returns the callback.
37424     * @example
37425     *
37426     * var users = [
37427     *   { 'user': 'barney', 'age': 36, 'active': true },
37428     *   { 'user': 'fred',   'age': 40, 'active': false }
37429     * ];
37430     *
37431     * // The `_.matches` iteratee shorthand.
37432     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
37433     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
37434     *
37435     * // The `_.matchesProperty` iteratee shorthand.
37436     * _.filter(users, _.iteratee(['user', 'fred']));
37437     * // => [{ 'user': 'fred', 'age': 40 }]
37438     *
37439     * // The `_.property` iteratee shorthand.
37440     * _.map(users, _.iteratee('user'));
37441     * // => ['barney', 'fred']
37442     *
37443     * // Create custom iteratee shorthands.
37444     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
37445     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {
37446     *     return func.test(string);
37447     *   };
37448     * });
37449     *
37450     * _.filter(['abc', 'def'], /ef/);
37451     * // => ['def']
37452     */
37453    function iteratee(func) {
37454      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
37455    }
37456
37457    /**
37458     * Creates a function that performs a partial deep comparison between a given
37459     * object and `source`, returning `true` if the given object has equivalent
37460     * property values, else `false`.
37461     *
37462     * **Note:** The created function is equivalent to `_.isMatch` with `source`
37463     * partially applied.
37464     *
37465     * Partial comparisons will match empty array and empty object `source`
37466     * values against any array or object value, respectively. See `_.isEqual`
37467     * for a list of supported value comparisons.
37468     *
37469     * **Note:** Multiple values can be checked by combining several matchers
37470     * using `_.overSome`
37471     *
37472     * @static
37473     * @memberOf _
37474     * @since 3.0.0
37475     * @category Util
37476     * @param {Object} source The object of property values to match.
37477     * @returns {Function} Returns the new spec function.
37478     * @example
37479     *
37480     * var objects = [
37481     *   { 'a': 1, 'b': 2, 'c': 3 },
37482     *   { 'a': 4, 'b': 5, 'c': 6 }
37483     * ];
37484     *
37485     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
37486     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
37487     *
37488     * // Checking for several possible values
37489     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
37490     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
37491     */
37492    function matches(source) {
37493      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
37494    }
37495
37496    /**
37497     * Creates a function that performs a partial deep comparison between the
37498     * value at `path` of a given object to `srcValue`, returning `true` if the
37499     * object value is equivalent, else `false`.
37500     *
37501     * **Note:** Partial comparisons will match empty array and empty object
37502     * `srcValue` values against any array or object value, respectively. See
37503     * `_.isEqual` for a list of supported value comparisons.
37504     *
37505     * **Note:** Multiple values can be checked by combining several matchers
37506     * using `_.overSome`
37507     *
37508     * @static
37509     * @memberOf _
37510     * @since 3.2.0
37511     * @category Util
37512     * @param {Array|string} path The path of the property to get.
37513     * @param {*} srcValue The value to match.
37514     * @returns {Function} Returns the new spec function.
37515     * @example
37516     *
37517     * var objects = [
37518     *   { 'a': 1, 'b': 2, 'c': 3 },
37519     *   { 'a': 4, 'b': 5, 'c': 6 }
37520     * ];
37521     *
37522     * _.find(objects, _.matchesProperty('a', 4));
37523     * // => { 'a': 4, 'b': 5, 'c': 6 }
37524     *
37525     * // Checking for several possible values
37526     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
37527     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
37528     */
37529    function matchesProperty(path, srcValue) {
37530      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
37531    }
37532
37533    /**
37534     * Creates a function that invokes the method at `path` of a given object.
37535     * Any additional arguments are provided to the invoked method.
37536     *
37537     * @static
37538     * @memberOf _
37539     * @since 3.7.0
37540     * @category Util
37541     * @param {Array|string} path The path of the method to invoke.
37542     * @param {...*} [args] The arguments to invoke the method with.
37543     * @returns {Function} Returns the new invoker function.
37544     * @example
37545     *
37546     * var objects = [
37547     *   { 'a': { 'b': _.constant(2) } },
37548     *   { 'a': { 'b': _.constant(1) } }
37549     * ];
37550     *
37551     * _.map(objects, _.method('a.b'));
37552     * // => [2, 1]
37553     *
37554     * _.map(objects, _.method(['a', 'b']));
37555     * // => [2, 1]
37556     */
37557    var method = baseRest(function(path, args) {
37558      return function(object) {
37559        return baseInvoke(object, path, args);
37560      };
37561    });
37562
37563    /**
37564     * The opposite of `_.method`; this method creates a function that invokes
37565     * the method at a given path of `object`. Any additional arguments are
37566     * provided to the invoked method.
37567     *
37568     * @static
37569     * @memberOf _
37570     * @since 3.7.0
37571     * @category Util
37572     * @param {Object} object The object to query.
37573     * @param {...*} [args] The arguments to invoke the method with.
37574     * @returns {Function} Returns the new invoker function.
37575     * @example
37576     *
37577     * var array = _.times(3, _.constant),
37578     *     object = { 'a': array, 'b': array, 'c': array };
37579     *
37580     * _.map(['a[2]', 'c[0]'], _.methodOf(object));
37581     * // => [2, 0]
37582     *
37583     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
37584     * // => [2, 0]
37585     */
37586    var methodOf = baseRest(function(object, args) {
37587      return function(path) {
37588        return baseInvoke(object, path, args);
37589      };
37590    });
37591
37592    /**
vendor: 10,734 bytes, lines 37593-37980
37593     * Adds all own enumerable string keyed function properties of a source
37594     * object to the destination object. If `object` is a function, then methods
37595     * are added to its prototype as well.
37596     *
37597     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
37598     * avoid conflicts caused by modifying the original.
37599     *
37600     * @static
37601     * @since 0.1.0
37602     * @memberOf _
37603     * @category Util
37604     * @param {Function|Object} [object=lodash] The destination object.
37605     * @param {Object} source The object of functions to add.
37606     * @param {Object} [options={}] The options object.
37607     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
37608     * @returns {Function|Object} Returns `object`.
37609     * @example
37610     *
37611     * function vowels(string) {
37612     *   return _.filter(string, function(v) {
37613     *     return /[aeiou]/i.test(v);
37614     *   });
37615     * }
37616     *
37617     * _.mixin({ 'vowels': vowels });
37618     * _.vowels('fred');
37619     * // => ['e']
37620     *
37621     * _('fred').vowels().value();
37622     * // => ['e']
37623     *
37624     * _.mixin({ 'vowels': vowels }, { 'chain': false });
37625     * _('fred').vowels();
37626     * // => ['e']
37627     */
37628    function mixin(object, source, options) {
37629      var props = keys(source),
37630          methodNames = baseFunctions(source, props);
37631
37632      if (options == null &&
37633          !(isObject(source) && (methodNames.length || !props.length))) {
37634        options = source;
37635        source = object;
37636        object = this;
37637        methodNames = baseFunctions(source, keys(source));
37638      }
37639      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
37640          isFunc = isFunction(object);
37641
37642      arrayEach(methodNames, function(methodName) {
37643        var func = source[methodName];
37644        object[methodName] = func;
37645        if (isFunc) {
37646          object.prototype[methodName] = function() {
37647            var chainAll = this.__chain__;
37648            if (chain || chainAll) {
37649              var result = object(this.__wrapped__),
37650                  actions = result.__actions__ = copyArray(this.__actions__);
37651
37652              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
37653              result.__chain__ = chainAll;
37654              return result;
37655            }
37656            return func.apply(object, arrayPush([this.value()], arguments));
37657          };
37658        }
37659      });
37660
37661      return object;
37662    }
37663
37664    /**
37665     * Reverts the `_` variable to its previous value and returns a reference to
37666     * the `lodash` function.
37667     *
37668     * @static
37669     * @since 0.1.0
37670     * @memberOf _
37671     * @category Util
37672     * @returns {Function} Returns the `lodash` function.
37673     * @example
37674     *
37675     * var lodash = _.noConflict();
37676     */
37677    function noConflict() {
37678      if (root._ === this) {
37679        root._ = oldDash;
37680      }
37681      return this;
37682    }
37683
37684    /**
37685     * This method returns `undefined`.
37686     *
37687     * @static
37688     * @memberOf _
37689     * @since 2.3.0
37690     * @category Util
37691     * @example
37692     *
37693     * _.times(2, _.noop);
37694     * // => [undefined, undefined]
37695     */
37696    function noop() {
37697      // No operation performed.
37698    }
37699
37700    /**
37701     * Creates a function that gets the argument at index `n`. If `n` is negative,
37702     * the nth argument from the end is returned.
37703     *
37704     * @static
37705     * @memberOf _
37706     * @since 4.0.0
37707     * @category Util
37708     * @param {number} [n=0] The index of the argument to return.
37709     * @returns {Function} Returns the new pass-thru function.
37710     * @example
37711     *
37712     * var func = _.nthArg(1);
37713     * func('a', 'b', 'c', 'd');
37714     * // => 'b'
37715     *
37716     * var func = _.nthArg(-2);
37717     * func('a', 'b', 'c', 'd');
37718     * // => 'c'
37719     */
37720    function nthArg(n) {
37721      n = toInteger(n);
37722      return baseRest(function(args) {
37723        return baseNth(args, n);
37724      });
37725    }
37726
37727    /**
37728     * Creates a function that invokes `iteratees` with the arguments it receives
37729     * and returns their results.
37730     *
37731     * @static
37732     * @memberOf _
37733     * @since 4.0.0
37734     * @category Util
37735     * @param {...(Function|Function[])} [iteratees=[_.identity]]
37736     *  The iteratees to invoke.
37737     * @returns {Function} Returns the new function.
37738     * @example
37739     *
37740     * var func = _.over([Math.max, Math.min]);
37741     *
37742     * func(1, 2, 3, 4);
37743     * // => [4, 1]
37744     */
37745    var over = createOver(arrayMap);
37746
37747    /**
37748     * Creates a function that checks if **all** of the `predicates` return
37749     * truthy when invoked with the arguments it receives.
37750     *
37751     * Following shorthands are possible for providing predicates.
37752     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
37753     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
37754     *
37755     * @static
37756     * @memberOf _
37757     * @since 4.0.0
37758     * @category Util
37759     * @param {...(Function|Function[])} [predicates=[_.identity]]
37760     *  The predicates to check.
37761     * @returns {Function} Returns the new function.
37762     * @example
37763     *
37764     * var func = _.overEvery([Boolean, isFinite]);
37765     *
37766     * func('1');
37767     * // => true
37768     *
37769     * func(null);
37770     * // => false
37771     *
37772     * func(NaN);
37773     * // => false
37774     */
37775    var overEvery = createOver(arrayEvery);
37776
37777    /**
37778     * Creates a function that checks if **any** of the `predicates` return
37779     * truthy when invoked with the arguments it receives.
37780     *
37781     * Following shorthands are possible for providing predicates.
37782     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
37783     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
37784     *
37785     * @static
37786     * @memberOf _
37787     * @since 4.0.0
37788     * @category Util
37789     * @param {...(Function|Function[])} [predicates=[_.identity]]
37790     *  The predicates to check.
37791     * @returns {Function} Returns the new function.
37792     * @example
37793     *
37794     * var func = _.overSome([Boolean, isFinite]);
37795     *
37796     * func('1');
37797     * // => true
37798     *
37799     * func(null);
37800     * // => true
37801     *
37802     * func(NaN);
37803     * // => false
37804     *
37805     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
37806     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
37807     */
37808    var overSome = createOver(arraySome);
37809
37810    /**
37811     * Creates a function that returns the value at `path` of a given object.
37812     *
37813     * @static
37814     * @memberOf _
37815     * @since 2.4.0
37816     * @category Util
37817     * @param {Array|string} path The path of the property to get.
37818     * @returns {Function} Returns the new accessor function.
37819     * @example
37820     *
37821     * var objects = [
37822     *   { 'a': { 'b': 2 } },
37823     *   { 'a': { 'b': 1 } }
37824     * ];
37825     *
37826     * _.map(objects, _.property('a.b'));
37827     * // => [2, 1]
37828     *
37829     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
37830     * // => [1, 2]
37831     */
37832    function property(path) {
37833      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
37834    }
37835
37836    /**
37837     * The opposite of `_.property`; this method creates a function that returns
37838     * the value at a given path of `object`.
37839     *
37840     * @static
37841     * @memberOf _
37842     * @since 3.0.0
37843     * @category Util
37844     * @param {Object} object The object to query.
37845     * @returns {Function} Returns the new accessor function.
37846     * @example
37847     *
37848     * var array = [0, 1, 2],
37849     *     object = { 'a': array, 'b': array, 'c': array };
37850     *
37851     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
37852     * // => [2, 0]
37853     *
37854     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
37855     * // => [2, 0]
37856     */
37857    function propertyOf(object) {
37858      return function(path) {
37859        return object == null ? undefined : baseGet(object, path);
37860      };
37861    }
37862
37863    /**
37864     * Creates an array of numbers (positive and/or negative) progressing from
37865     * `start` up to, but not including, `end`. A step of `-1` is used if a negative
37866     * `start` is specified without an `end` or `step`. If `end` is not specified,
37867     * it's set to `start` with `start` then set to `0`.
37868     *
37869     * **Note:** JavaScript follows the IEEE-754 standard for resolving
37870     * floating-point values which can produce unexpected results.
37871     *
37872     * @static
37873     * @since 0.1.0
37874     * @memberOf _
37875     * @category Util
37876     * @param {number} [start=0] The start of the range.
37877     * @param {number} end The end of the range.
37878     * @param {number} [step=1] The value to increment or decrement by.
37879     * @returns {Array} Returns the range of numbers.
37880     * @see _.inRange, _.rangeRight
37881     * @example
37882     *
37883     * _.range(4);
37884     * // => [0, 1, 2, 3]
37885     *
37886     * _.range(-4);
37887     * // => [0, -1, -2, -3]
37888     *
37889     * _.range(1, 5);
37890     * // => [1, 2, 3, 4]
37891     *
37892     * _.range(0, 20, 5);
37893     * // => [0, 5, 10, 15]
37894     *
37895     * _.range(0, -4, -1);
37896     * // => [0, -1, -2, -3]
37897     *
37898     * _.range(1, 4, 0);
37899     * // => [1, 1, 1]
37900     *
37901     * _.range(0);
37902     * // => []
37903     */
37904    var range = createRange();
37905
37906    /**
37907     * This method is like `_.range` except that it populates values in
37908     * descending order.
37909     *
37910     * @static
37911     * @memberOf _
37912     * @since 4.0.0
37913     * @category Util
37914     * @param {number} [start=0] The start of the range.
37915     * @param {number} end The end of the range.
37916     * @param {number} [step=1] The value to increment or decrement by.
37917     * @returns {Array} Returns the range of numbers.
37918     * @see _.inRange, _.range
37919     * @example
37920     *
37921     * _.rangeRight(4);
37922     * // => [3, 2, 1, 0]
37923     *
37924     * _.rangeRight(-4);
37925     * // => [-3, -2, -1, 0]
37926     *
37927     * _.rangeRight(1, 5);
37928     * // => [4, 3, 2, 1]
37929     *
37930     * _.rangeRight(0, 20, 5);
37931     * // => [15, 10, 5, 0]
37932     *
37933     * _.rangeRight(0, -4, -1);
37934     * // => [-3, -2, -1, 0]
37935     *
37936     * _.rangeRight(1, 4, 0);
37937     * // => [1, 1, 1]
37938     *
37939     * _.rangeRight(0);
37940     * // => []
37941     */
37942    var rangeRight = createRange(true);
37943
37944    /**
37945     * This method returns a new empty array.
37946     *
37947     * @static
37948     * @memberOf _
37949     * @since 4.13.0
37950     * @category Util
37951     * @returns {Array} Returns the new empty array.
37952     * @example
37953     *
37954     * var arrays = _.times(2, _.stubArray);
37955     *
37956     * console.log(arrays);
37957     * // => [[], []]
37958     *
37959     * console.log(arrays[0] === arrays[1]);
37960     * // => false
37961     */
37962    function stubArray() {
37963      return [];
37964    }
37965
37966    /**
37967     * This method returns `false`.
37968     *
37969     * @static
37970     * @memberOf _
37971     * @since 4.13.0
37972     * @category Util
37973     * @returns {boolean} Returns `false`.
37974     * @example
37975     *
37976     * _.times(2, _.stubFalse);
37977     * // => [false, false]
37978     */
37979    function stubFalse() {
37980      return false;
vendor: 1,044 bytes, lines 37981-38034
37981    }
37982
37983    /**
37984     * This method returns a new empty object.
37985     *
37986     * @static
37987     * @memberOf _
37988     * @since 4.13.0
37989     * @category Util
37990     * @returns {Object} Returns the new empty object.
37991     * @example
37992     *
37993     * var objects = _.times(2, _.stubObject);
37994     *
37995     * console.log(objects);
37996     * // => [{}, {}]
37997     *
37998     * console.log(objects[0] === objects[1]);
37999     * // => false
38000     */
38001    function stubObject() {
38002      return {};
38003    }
38004
38005    /**
38006     * This method returns an empty string.
38007     *
38008     * @static
38009     * @memberOf _
38010     * @since 4.13.0
38011     * @category Util
38012     * @returns {string} Returns the empty string.
38013     * @example
38014     *
38015     * _.times(2, _.stubString);
38016     * // => ['', '']
38017     */
38018    function stubString() {
38019      return '';
38020    }
38021
38022    /**
38023     * This method returns `true`.
38024     *
38025     * @static
38026     * @memberOf _
38027     * @since 4.13.0
38028     * @category Util
38029     * @returns {boolean} Returns `true`.
38030     * @example
38031     *
38032     * _.times(2, _.stubTrue);
38033     * // => [true, true]
38034     */
vendor: 9,081 bytes, lines 38035-38378
38035    function stubTrue() {
38036      return true;
38037    }
38038
38039    /**
38040     * Invokes the iteratee `n` times, returning an array of the results of
38041     * each invocation. The iteratee is invoked with one argument; (index).
38042     *
38043     * @static
38044     * @since 0.1.0
38045     * @memberOf _
38046     * @category Util
38047     * @param {number} n The number of times to invoke `iteratee`.
38048     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
38049     * @returns {Array} Returns the array of results.
38050     * @example
38051     *
38052     * _.times(3, String);
38053     * // => ['0', '1', '2']
38054     *
38055     *  _.times(4, _.constant(0));
38056     * // => [0, 0, 0, 0]
38057     */
38058    function times(n, iteratee) {
38059      n = toInteger(n);
38060      if (n < 1 || n > MAX_SAFE_INTEGER) {
38061        return [];
38062      }
38063      var index = MAX_ARRAY_LENGTH,
38064          length = nativeMin(n, MAX_ARRAY_LENGTH);
38065
38066      iteratee = getIteratee(iteratee);
38067      n -= MAX_ARRAY_LENGTH;
38068
38069      var result = baseTimes(length, iteratee);
38070      while (++index < n) {
38071        iteratee(index);
38072      }
38073      return result;
38074    }
38075
38076    /**
38077     * Converts `value` to a property path array.
38078     *
38079     * @static
38080     * @memberOf _
38081     * @since 4.0.0
38082     * @category Util
38083     * @param {*} value The value to convert.
38084     * @returns {Array} Returns the new property path array.
38085     * @example
38086     *
38087     * _.toPath('a.b.c');
38088     * // => ['a', 'b', 'c']
38089     *
38090     * _.toPath('a[0].b.c');
38091     * // => ['a', '0', 'b', 'c']
38092     */
38093    function toPath(value) {
38094      if (isArray(value)) {
38095        return arrayMap(value, toKey);
38096      }
38097      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
38098    }
38099
38100    /**
38101     * Generates a unique ID. If `prefix` is given, the ID is appended to it.
38102     *
38103     * @static
38104     * @since 0.1.0
38105     * @memberOf _
38106     * @category Util
38107     * @param {string} [prefix=''] The value to prefix the ID with.
38108     * @returns {string} Returns the unique ID.
38109     * @example
38110     *
38111     * _.uniqueId('contact_');
38112     * // => 'contact_104'
38113     *
38114     * _.uniqueId();
38115     * // => '105'
38116     */
38117    function uniqueId(prefix) {
38118      var id = ++idCounter;
38119      return toString(prefix) + id;
38120    }
38121
38122    /*------------------------------------------------------------------------*/
38123
38124    /**
38125     * Adds two numbers.
38126     *
38127     * @static
38128     * @memberOf _
38129     * @since 3.4.0
38130     * @category Math
38131     * @param {number} augend The first number in an addition.
38132     * @param {number} addend The second number in an addition.
38133     * @returns {number} Returns the total.
38134     * @example
38135     *
38136     * _.add(6, 4);
38137     * // => 10
38138     */
38139    var add = createMathOperation(function(augend, addend) {
38140      return augend + addend;
38141    }, 0);
38142
38143    /**
38144     * Computes `number` rounded up to `precision`.
38145     *
38146     * @static
38147     * @memberOf _
38148     * @since 3.10.0
38149     * @category Math
38150     * @param {number} number The number to round up.
38151     * @param {number} [precision=0] The precision to round up to.
38152     * @returns {number} Returns the rounded up number.
38153     * @example
38154     *
38155     * _.ceil(4.006);
38156     * // => 5
38157     *
38158     * _.ceil(6.004, 2);
38159     * // => 6.01
38160     *
38161     * _.ceil(6040, -2);
38162     * // => 6100
38163     */
38164    var ceil = createRound('ceil');
38165
38166    /**
38167     * Divide two numbers.
38168     *
38169     * @static
38170     * @memberOf _
38171     * @since 4.7.0
38172     * @category Math
38173     * @param {number} dividend The first number in a division.
38174     * @param {number} divisor The second number in a division.
38175     * @returns {number} Returns the quotient.
38176     * @example
38177     *
38178     * _.divide(6, 4);
38179     * // => 1.5
38180     */
38181    var divide = createMathOperation(function(dividend, divisor) {
38182      return dividend / divisor;
38183    }, 1);
38184
38185    /**
38186     * Computes `number` rounded down to `precision`.
38187     *
38188     * @static
38189     * @memberOf _
38190     * @since 3.10.0
38191     * @category Math
38192     * @param {number} number The number to round down.
38193     * @param {number} [precision=0] The precision to round down to.
38194     * @returns {number} Returns the rounded down number.
38195     * @example
38196     *
38197     * _.floor(4.006);
38198     * // => 4
38199     *
38200     * _.floor(0.046, 2);
38201     * // => 0.04
38202     *
38203     * _.floor(4060, -2);
38204     * // => 4000
38205     */
38206    var floor = createRound('floor');
38207
38208    /**
38209     * Computes the maximum value of `array`. If `array` is empty or falsey,
38210     * `undefined` is returned.
38211     *
38212     * @static
38213     * @since 0.1.0
38214     * @memberOf _
38215     * @category Math
38216     * @param {Array} array The array to iterate over.
38217     * @returns {*} Returns the maximum value.
38218     * @example
38219     *
38220     * _.max([4, 2, 8, 6]);
38221     * // => 8
38222     *
38223     * _.max([]);
38224     * // => undefined
38225     */
38226    function max(array) {
38227      return (array && array.length)
38228        ? baseExtremum(array, identity, baseGt)
38229        : undefined;
38230    }
38231
38232    /**
38233     * This method is like `_.max` except that it accepts `iteratee` which is
38234     * invoked for each element in `array` to generate the criterion by which
38235     * the value is ranked. The iteratee is invoked with one argument: (value).
38236     *
38237     * @static
38238     * @memberOf _
38239     * @since 4.0.0
38240     * @category Math
38241     * @param {Array} array The array to iterate over.
38242     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
38243     * @returns {*} Returns the maximum value.
38244     * @example
38245     *
38246     * var objects = [{ 'n': 1 }, { 'n': 2 }];
38247     *
38248     * _.maxBy(objects, function(o) { return o.n; });
38249     * // => { 'n': 2 }
38250     *
38251     * // The `_.property` iteratee shorthand.
38252     * _.maxBy(objects, 'n');
38253     * // => { 'n': 2 }
38254     */
38255    function maxBy(array, iteratee) {
38256      return (array && array.length)
38257        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
38258        : undefined;
38259    }
38260
38261    /**
38262     * Computes the mean of the values in `array`.
38263     *
38264     * @static
38265     * @memberOf _
38266     * @since 4.0.0
38267     * @category Math
38268     * @param {Array} array The array to iterate over.
38269     * @returns {number} Returns the mean.
38270     * @example
38271     *
38272     * _.mean([4, 2, 8, 6]);
38273     * // => 5
38274     */
38275    function mean(array) {
38276      return baseMean(array, identity);
38277    }
38278
38279    /**
38280     * This method is like `_.mean` except that it accepts `iteratee` which is
38281     * invoked for each element in `array` to generate the value to be averaged.
38282     * The iteratee is invoked with one argument: (value).
38283     *
38284     * @static
38285     * @memberOf _
38286     * @since 4.7.0
38287     * @category Math
38288     * @param {Array} array The array to iterate over.
38289     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
38290     * @returns {number} Returns the mean.
38291     * @example
38292     *
38293     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
38294     *
38295     * _.meanBy(objects, function(o) { return o.n; });
38296     * // => 5
38297     *
38298     * // The `_.property` iteratee shorthand.
38299     * _.meanBy(objects, 'n');
38300     * // => 5
38301     */
38302    function meanBy(array, iteratee) {
38303      return baseMean(array, getIteratee(iteratee, 2));
38304    }
38305
38306    /**
38307     * Computes the minimum value of `array`. If `array` is empty or falsey,
38308     * `undefined` is returned.
38309     *
38310     * @static
38311     * @since 0.1.0
38312     * @memberOf _
38313     * @category Math
38314     * @param {Array} array The array to iterate over.
38315     * @returns {*} Returns the minimum value.
38316     * @example
38317     *
38318     * _.min([4, 2, 8, 6]);
38319     * // => 2
38320     *
38321     * _.min([]);
38322     * // => undefined
38323     */
38324    function min(array) {
38325      return (array && array.length)
38326        ? baseExtremum(array, identity, baseLt)
38327        : undefined;
38328    }
38329
38330    /**
38331     * This method is like `_.min` except that it accepts `iteratee` which is
38332     * invoked for each element in `array` to generate the criterion by which
38333     * the value is ranked. The iteratee is invoked with one argument: (value).
38334     *
38335     * @static
38336     * @memberOf _
38337     * @since 4.0.0
38338     * @category Math
38339     * @param {Array} array The array to iterate over.
38340     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
38341     * @returns {*} Returns the minimum value.
38342     * @example
38343     *
38344     * var objects = [{ 'n': 1 }, { 'n': 2 }];
38345     *
38346     * _.minBy(objects, function(o) { return o.n; });
38347     * // => { 'n': 1 }
38348     *
38349     * // The `_.property` iteratee shorthand.
38350     * _.minBy(objects, 'n');
38351     * // => { 'n': 1 }
38352     */
38353    function minBy(array, iteratee) {
38354      return (array && array.length)
38355        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
38356        : undefined;
38357    }
38358
38359    /**
38360     * Multiply two numbers.
38361     *
38362     * @static
38363     * @memberOf _
38364     * @since 4.7.0
38365     * @category Math
38366     * @param {number} multiplier The first number in a multiplication.
38367     * @param {number} multiplicand The second number in a multiplication.
38368     * @returns {number} Returns the product.
38369     * @example
38370     *
38371     * _.multiply(6, 4);
38372     * // => 24
38373     */
38374    var multiply = createMathOperation(function(multiplier, multiplicand) {
38375      return multiplier * multiplicand;
38376    }, 1);
38377
38378    /**
vendor: 13,137 bytes, lines 38379-38817
38379     * Computes `number` rounded to `precision`.
38380     *
38381     * @static
38382     * @memberOf _
38383     * @since 3.10.0
38384     * @category Math
38385     * @param {number} number The number to round.
38386     * @param {number} [precision=0] The precision to round to.
38387     * @returns {number} Returns the rounded number.
38388     * @example
38389     *
38390     * _.round(4.006);
38391     * // => 4
38392     *
38393     * _.round(4.006, 2);
38394     * // => 4.01
38395     *
38396     * _.round(4060, -2);
38397     * // => 4100
38398     */
38399    var round = createRound('round');
38400
38401    /**
38402     * Subtract two numbers.
38403     *
38404     * @static
38405     * @memberOf _
38406     * @since 4.0.0
38407     * @category Math
38408     * @param {number} minuend The first number in a subtraction.
38409     * @param {number} subtrahend The second number in a subtraction.
38410     * @returns {number} Returns the difference.
38411     * @example
38412     *
38413     * _.subtract(6, 4);
38414     * // => 2
38415     */
38416    var subtract = createMathOperation(function(minuend, subtrahend) {
38417      return minuend - subtrahend;
38418    }, 0);
38419
38420    /**
38421     * Computes the sum of the values in `array`.
38422     *
38423     * @static
38424     * @memberOf _
38425     * @since 3.4.0
38426     * @category Math
38427     * @param {Array} array The array to iterate over.
38428     * @returns {number} Returns the sum.
38429     * @example
38430     *
38431     * _.sum([4, 2, 8, 6]);
38432     * // => 20
38433     */
38434    function sum(array) {
38435      return (array && array.length)
38436        ? baseSum(array, identity)
38437        : 0;
38438    }
38439
38440    /**
38441     * This method is like `_.sum` except that it accepts `iteratee` which is
38442     * invoked for each element in `array` to generate the value to be summed.
38443     * The iteratee is invoked with one argument: (value).
38444     *
38445     * @static
38446     * @memberOf _
38447     * @since 4.0.0
38448     * @category Math
38449     * @param {Array} array The array to iterate over.
38450     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
38451     * @returns {number} Returns the sum.
38452     * @example
38453     *
38454     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
38455     *
38456     * _.sumBy(objects, function(o) { return o.n; });
38457     * // => 20
38458     *
38459     * // The `_.property` iteratee shorthand.
38460     * _.sumBy(objects, 'n');
38461     * // => 20
38462     */
38463    function sumBy(array, iteratee) {
38464      return (array && array.length)
38465        ? baseSum(array, getIteratee(iteratee, 2))
38466        : 0;
38467    }
38468
38469    /*------------------------------------------------------------------------*/
38470
38471    // Add methods that return wrapped values in chain sequences.
38472    lodash.after = after;
38473    lodash.ary = ary;
38474    lodash.assign = assign;
38475    lodash.assignIn = assignIn;
38476    lodash.assignInWith = assignInWith;
38477    lodash.assignWith = assignWith;
38478    lodash.at = at;
38479    lodash.before = before;
38480    lodash.bind = bind;
38481    lodash.bindAll = bindAll;
38482    lodash.bindKey = bindKey;
38483    lodash.castArray = castArray;
38484    lodash.chain = chain;
38485    lodash.chunk = chunk;
38486    lodash.compact = compact;
38487    lodash.concat = concat;
38488    lodash.cond = cond;
38489    lodash.conforms = conforms;
38490    lodash.constant = constant;
38491    lodash.countBy = countBy;
38492    lodash.create = create;
38493    lodash.curry = curry;
38494    lodash.curryRight = curryRight;
38495    lodash.debounce = debounce;
38496    lodash.defaults = defaults;
38497    lodash.defaultsDeep = defaultsDeep;
38498    lodash.defer = defer;
38499    lodash.delay = delay;
38500    lodash.difference = difference;
38501    lodash.differenceBy = differenceBy;
38502    lodash.differenceWith = differenceWith;
38503    lodash.drop = drop;
38504    lodash.dropRight = dropRight;
38505    lodash.dropRightWhile = dropRightWhile;
38506    lodash.dropWhile = dropWhile;
38507    lodash.fill = fill;
38508    lodash.filter = filter;
38509    lodash.flatMap = flatMap;
38510    lodash.flatMapDeep = flatMapDeep;
38511    lodash.flatMapDepth = flatMapDepth;
38512    lodash.flatten = flatten;
38513    lodash.flattenDeep = flattenDeep;
38514    lodash.flattenDepth = flattenDepth;
38515    lodash.flip = flip;
38516    lodash.flow = flow;
38517    lodash.flowRight = flowRight;
38518    lodash.fromPairs = fromPairs;
38519    lodash.functions = functions;
38520    lodash.functionsIn = functionsIn;
38521    lodash.groupBy = groupBy;
38522    lodash.initial = initial;
38523    lodash.intersection = intersection;
38524    lodash.intersectionBy = intersectionBy;
38525    lodash.intersectionWith = intersectionWith;
38526    lodash.invert = invert;
38527    lodash.invertBy = invertBy;
38528    lodash.invokeMap = invokeMap;
38529    lodash.iteratee = iteratee;
38530    lodash.keyBy = keyBy;
38531    lodash.keys = keys;
38532    lodash.keysIn = keysIn;
38533    lodash.map = map;
38534    lodash.mapKeys = mapKeys;
38535    lodash.mapValues = mapValues;
38536    lodash.matches = matches;
38537    lodash.matchesProperty = matchesProperty;
38538    lodash.memoize = memoize;
38539    lodash.merge = merge;
38540    lodash.mergeWith = mergeWith;
38541    lodash.method = method;
38542    lodash.methodOf = methodOf;
38543    lodash.mixin = mixin;
38544    lodash.negate = negate;
38545    lodash.nthArg = nthArg;
38546    lodash.omit = omit;
38547    lodash.omitBy = omitBy;
38548    lodash.once = once;
38549    lodash.orderBy = orderBy;
38550    lodash.over = over;
38551    lodash.overArgs = overArgs;
38552    lodash.overEvery = overEvery;
38553    lodash.overSome = overSome;
38554    lodash.partial = partial;
38555    lodash.partialRight = partialRight;
38556    lodash.partition = partition;
38557    lodash.pick = pick;
38558    lodash.pickBy = pickBy;
38559    lodash.property = property;
38560    lodash.propertyOf = propertyOf;
38561    lodash.pull = pull;
38562    lodash.pullAll = pullAll;
38563    lodash.pullAllBy = pullAllBy;
38564    lodash.pullAllWith = pullAllWith;
38565    lodash.pullAt = pullAt;
38566    lodash.range = range;
38567    lodash.rangeRight = rangeRight;
38568    lodash.rearg = rearg;
38569    lodash.reject = reject;
38570    lodash.remove = remove;
38571    lodash.rest = rest;
38572    lodash.reverse = reverse;
38573    lodash.sampleSize = sampleSize;
38574    lodash.set = set;
38575    lodash.setWith = setWith;
38576    lodash.shuffle = shuffle;
38577    lodash.slice = slice;
38578    lodash.sortBy = sortBy;
38579    lodash.sortedUniq = sortedUniq;
38580    lodash.sortedUniqBy = sortedUniqBy;
38581    lodash.split = split;
38582    lodash.spread = spread;
38583    lodash.tail = tail;
38584    lodash.take = take;
38585    lodash.takeRight = takeRight;
38586    lodash.takeRightWhile = takeRightWhile;
38587    lodash.takeWhile = takeWhile;
38588    lodash.tap = tap;
38589    lodash.throttle = throttle;
38590    lodash.thru = thru;
38591    lodash.toArray = toArray;
38592    lodash.toPairs = toPairs;
38593    lodash.toPairsIn = toPairsIn;
38594    lodash.toPath = toPath;
38595    lodash.toPlainObject = toPlainObject;
38596    lodash.transform = transform;
38597    lodash.unary = unary;
38598    lodash.union = union;
38599    lodash.unionBy = unionBy;
38600    lodash.unionWith = unionWith;
38601    lodash.uniq = uniq;
38602    lodash.uniqBy = uniqBy;
38603    lodash.uniqWith = uniqWith;
38604    lodash.unset = unset;
38605    lodash.unzip = unzip;
38606    lodash.unzipWith = unzipWith;
38607    lodash.update = update;
38608    lodash.updateWith = updateWith;
38609    lodash.values = values;
38610    lodash.valuesIn = valuesIn;
38611    lodash.without = without;
38612    lodash.words = words;
38613    lodash.wrap = wrap;
38614    lodash.xor = xor;
38615    lodash.xorBy = xorBy;
38616    lodash.xorWith = xorWith;
38617    lodash.zip = zip;
38618    lodash.zipObject = zipObject;
38619    lodash.zipObjectDeep = zipObjectDeep;
38620    lodash.zipWith = zipWith;
38621
38622    // Add aliases.
38623    lodash.entries = toPairs;
38624    lodash.entriesIn = toPairsIn;
38625    lodash.extend = assignIn;
38626    lodash.extendWith = assignInWith;
38627
38628    // Add methods to `lodash.prototype`.
38629    mixin(lodash, lodash);
38630
38631    /*------------------------------------------------------------------------*/
38632
38633    // Add methods that return unwrapped values in chain sequences.
38634    lodash.add = add;
38635    lodash.attempt = attempt;
38636    lodash.camelCase = camelCase;
38637    lodash.capitalize = capitalize;
38638    lodash.ceil = ceil;
38639    lodash.clamp = clamp;
38640    lodash.clone = clone;
38641    lodash.cloneDeep = cloneDeep;
38642    lodash.cloneDeepWith = cloneDeepWith;
38643    lodash.cloneWith = cloneWith;
38644    lodash.conformsTo = conformsTo;
38645    lodash.deburr = deburr;
38646    lodash.defaultTo = defaultTo;
38647    lodash.divide = divide;
38648    lodash.endsWith = endsWith;
38649    lodash.eq = eq;
38650    lodash.escape = escape;
38651    lodash.escapeRegExp = escapeRegExp;
38652    lodash.every = every;
38653    lodash.find = find;
38654    lodash.findIndex = findIndex;
38655    lodash.findKey = findKey;
38656    lodash.findLast = findLast;
38657    lodash.findLastIndex = findLastIndex;
38658    lodash.findLastKey = findLastKey;
38659    lodash.floor = floor;
38660    lodash.forEach = forEach;
38661    lodash.forEachRight = forEachRight;
38662    lodash.forIn = forIn;
38663    lodash.forInRight = forInRight;
38664    lodash.forOwn = forOwn;
38665    lodash.forOwnRight = forOwnRight;
38666    lodash.get = get;
38667    lodash.gt = gt;
38668    lodash.gte = gte;
38669    lodash.has = has;
38670    lodash.hasIn = hasIn;
38671    lodash.head = head;
38672    lodash.identity = identity;
38673    lodash.includes = includes;
38674    lodash.indexOf = indexOf;
38675    lodash.inRange = inRange;
38676    lodash.invoke = invoke;
38677    lodash.isArguments = isArguments;
38678    lodash.isArray = isArray;
38679    lodash.isArrayBuffer = isArrayBuffer;
38680    lodash.isArrayLike = isArrayLike;
38681    lodash.isArrayLikeObject = isArrayLikeObject;
38682    lodash.isBoolean = isBoolean;
38683    lodash.isBuffer = isBuffer;
38684    lodash.isDate = isDate;
38685    lodash.isElement = isElement;
38686    lodash.isEmpty = isEmpty;
38687    lodash.isEqual = isEqual;
38688    lodash.isEqualWith = isEqualWith;
38689    lodash.isError = isError;
38690    lodash.isFinite = isFinite;
38691    lodash.isFunction = isFunction;
38692    lodash.isInteger = isInteger;
38693    lodash.isLength = isLength;
38694    lodash.isMap = isMap;
38695    lodash.isMatch = isMatch;
38696    lodash.isMatchWith = isMatchWith;
38697    lodash.isNaN = isNaN;
38698    lodash.isNative = isNative;
38699    lodash.isNil = isNil;
38700    lodash.isNull = isNull;
38701    lodash.isNumber = isNumber;
38702    lodash.isObject = isObject;
38703    lodash.isObjectLike = isObjectLike;
38704    lodash.isPlainObject = isPlainObject;
38705    lodash.isRegExp = isRegExp;
38706    lodash.isSafeInteger = isSafeInteger;
38707    lodash.isSet = isSet;
38708    lodash.isString = isString;
38709    lodash.isSymbol = isSymbol;
38710    lodash.isTypedArray = isTypedArray;
38711    lodash.isUndefined = isUndefined;
38712    lodash.isWeakMap = isWeakMap;
38713    lodash.isWeakSet = isWeakSet;
38714    lodash.join = join;
38715    lodash.kebabCase = kebabCase;
38716    lodash.last = last;
38717    lodash.lastIndexOf = lastIndexOf;
38718    lodash.lowerCase = lowerCase;
38719    lodash.lowerFirst = lowerFirst;
38720    lodash.lt = lt;
38721    lodash.lte = lte;
38722    lodash.max = max;
38723    lodash.maxBy = maxBy;
38724    lodash.mean = mean;
38725    lodash.meanBy = meanBy;
38726    lodash.min = min;
38727    lodash.minBy = minBy;
38728    lodash.stubArray = stubArray;
38729    lodash.stubFalse = stubFalse;
38730    lodash.stubObject = stubObject;
38731    lodash.stubString = stubString;
38732    lodash.stubTrue = stubTrue;
38733    lodash.multiply = multiply;
38734    lodash.nth = nth;
38735    lodash.noConflict = noConflict;
38736    lodash.noop = noop;
38737    lodash.now = now;
38738    lodash.pad = pad;
38739    lodash.padEnd = padEnd;
38740    lodash.padStart = padStart;
38741    lodash.parseInt = parseInt;
38742    lodash.random = random;
38743    lodash.reduce = reduce;
38744    lodash.reduceRight = reduceRight;
38745    lodash.repeat = repeat;
38746    lodash.replace = replace;
38747    lodash.result = result;
38748    lodash.round = round;
38749    lodash.runInContext = runInContext;
38750    lodash.sample = sample;
38751    lodash.size = size;
38752    lodash.snakeCase = snakeCase;
38753    lodash.some = some;
38754    lodash.sortedIndex = sortedIndex;
38755    lodash.sortedIndexBy = sortedIndexBy;
38756    lodash.sortedIndexOf = sortedIndexOf;
38757    lodash.sortedLastIndex = sortedLastIndex;
38758    lodash.sortedLastIndexBy = sortedLastIndexBy;
38759    lodash.sortedLastIndexOf = sortedLastIndexOf;
38760    lodash.startCase = startCase;
38761    lodash.startsWith = startsWith;
38762    lodash.subtract = subtract;
38763    lodash.sum = sum;
38764    lodash.sumBy = sumBy;
38765    lodash.template = template;
38766    lodash.times = times;
38767    lodash.toFinite = toFinite;
38768    lodash.toInteger = toInteger;
38769    lodash.toLength = toLength;
38770    lodash.toLower = toLower;
38771    lodash.toNumber = toNumber;
38772    lodash.toSafeInteger = toSafeInteger;
38773    lodash.toString = toString;
38774    lodash.toUpper = toUpper;
38775    lodash.trim = trim;
38776    lodash.trimEnd = trimEnd;
38777    lodash.trimStart = trimStart;
38778    lodash.truncate = truncate;
38779    lodash.unescape = unescape;
38780    lodash.uniqueId = uniqueId;
38781    lodash.upperCase = upperCase;
38782    lodash.upperFirst = upperFirst;
38783
38784    // Add aliases.
38785    lodash.each = forEach;
38786    lodash.eachRight = forEachRight;
38787    lodash.first = head;
38788
38789    mixin(lodash, (function() {
38790      var source = {};
38791      baseForOwn(lodash, function(func, methodName) {
38792        if (!hasOwnProperty.call(lodash.prototype, methodName)) {
38793          source[methodName] = func;
38794        }
38795      });
38796      return source;
38797    }()), { 'chain': false });
38798
38799    /*------------------------------------------------------------------------*/
38800
38801    /**
38802     * The semantic version number.
38803     *
38804     * @static
38805     * @memberOf _
38806     * @type {string}
38807     */
38808    lodash.VERSION = VERSION;
38809
38810    // Assign default placeholders.
38811    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
38812      lodash[methodName].placeholder = lodash;
38813    });
38814
38815    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
38816    arrayEach(['drop', 'take'], function(methodName, index) {
38817      LazyWrapper.prototype[methodName] = function(n) {
vendor: 8,175 bytes, lines 38818-39050
38818        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
38819
38820        var result = (this.__filtered__ && !index)
38821          ? new LazyWrapper(this)
38822          : this.clone();
38823
38824        if (result.__filtered__) {
38825          result.__takeCount__ = nativeMin(n, result.__takeCount__);
38826        } else {
38827          result.__views__.push({
38828            'size': nativeMin(n, MAX_ARRAY_LENGTH),
38829            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
38830          });
38831        }
38832        return result;
38833      };
38834
38835      LazyWrapper.prototype[methodName + 'Right'] = function(n) {
38836        return this.reverse()[methodName](n).reverse();
38837      };
38838    });
38839
38840    // Add `LazyWrapper` methods that accept an `iteratee` value.
38841    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
38842      var type = index + 1,
38843          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
38844
38845      LazyWrapper.prototype[methodName] = function(iteratee) {
38846        var result = this.clone();
38847        result.__iteratees__.push({
38848          'iteratee': getIteratee(iteratee, 3),
38849          'type': type
38850        });
38851        result.__filtered__ = result.__filtered__ || isFilter;
38852        return result;
38853      };
38854    });
38855
38856    // Add `LazyWrapper` methods for `_.head` and `_.last`.
38857    arrayEach(['head', 'last'], function(methodName, index) {
38858      var takeName = 'take' + (index ? 'Right' : '');
38859
38860      LazyWrapper.prototype[methodName] = function() {
38861        return this[takeName](1).value()[0];
38862      };
38863    });
38864
38865    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
38866    arrayEach(['initial', 'tail'], function(methodName, index) {
38867      var dropName = 'drop' + (index ? '' : 'Right');
38868
38869      LazyWrapper.prototype[methodName] = function() {
38870        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
38871      };
38872    });
38873
38874    LazyWrapper.prototype.compact = function() {
38875      return this.filter(identity);
38876    };
38877
38878    LazyWrapper.prototype.find = function(predicate) {
38879      return this.filter(predicate).head();
38880    };
38881
38882    LazyWrapper.prototype.findLast = function(predicate) {
38883      return this.reverse().find(predicate);
38884    };
38885
38886    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
38887      if (typeof path == 'function') {
38888        return new LazyWrapper(this);
38889      }
38890      return this.map(function(value) {
38891        return baseInvoke(value, path, args);
38892      });
38893    });
38894
38895    LazyWrapper.prototype.reject = function(predicate) {
38896      return this.filter(negate(getIteratee(predicate)));
38897    };
38898
38899    LazyWrapper.prototype.slice = function(start, end) {
38900      start = toInteger(start);
38901
38902      var result = this;
38903      if (result.__filtered__ && (start > 0 || end < 0)) {
38904        return new LazyWrapper(result);
38905      }
38906      if (start < 0) {
38907        result = result.takeRight(-start);
38908      } else if (start) {
38909        result = result.drop(start);
38910      }
38911      if (end !== undefined) {
38912        end = toInteger(end);
38913        result = end < 0 ? result.dropRight(-end) : result.take(end - start);
38914      }
38915      return result;
38916    };
38917
38918    LazyWrapper.prototype.takeRightWhile = function(predicate) {
38919      return this.reverse().takeWhile(predicate).reverse();
38920    };
38921
38922    LazyWrapper.prototype.toArray = function() {
38923      return this.take(MAX_ARRAY_LENGTH);
38924    };
38925
38926    // Add `LazyWrapper` methods to `lodash.prototype`.
38927    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
38928      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
38929          isTaker = /^(?:head|last)$/.test(methodName),
38930          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
38931          retUnwrapped = isTaker || /^find/.test(methodName);
38932
38933      if (!lodashFunc) {
38934        return;
38935      }
38936      lodash.prototype[methodName] = function() {
38937        var value = this.__wrapped__,
38938            args = isTaker ? [1] : arguments,
38939            isLazy = value instanceof LazyWrapper,
38940            iteratee = args[0],
38941            useLazy = isLazy || isArray(value);
38942
38943        var interceptor = function(value) {
38944          var result = lodashFunc.apply(lodash, arrayPush([value], args));
38945          return (isTaker && chainAll) ? result[0] : result;
38946        };
38947
38948        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
38949          // Avoid lazy use if the iteratee has a "length" value other than `1`.
38950          isLazy = useLazy = false;
38951        }
38952        var chainAll = this.__chain__,
38953            isHybrid = !!this.__actions__.length,
38954            isUnwrapped = retUnwrapped && !chainAll,
38955            onlyLazy = isLazy && !isHybrid;
38956
38957        if (!retUnwrapped && useLazy) {
38958          value = onlyLazy ? value : new LazyWrapper(this);
38959          var result = func.apply(value, args);
38960          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
38961          return new LodashWrapper(result, chainAll);
38962        }
38963        if (isUnwrapped && onlyLazy) {
38964          return func.apply(this, args);
38965        }
38966        result = this.thru(interceptor);
38967        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
38968      };
38969    });
38970
38971    // Add `Array` methods to `lodash.prototype`.
38972    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
38973      var func = arrayProto[methodName],
38974          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
38975          retUnwrapped = /^(?:pop|shift)$/.test(methodName);
38976
38977      lodash.prototype[methodName] = function() {
38978        var args = arguments;
38979        if (retUnwrapped && !this.__chain__) {
38980          var value = this.value();
38981          return func.apply(isArray(value) ? value : [], args);
38982        }
38983        return this[chainName](function(value) {
38984          return func.apply(isArray(value) ? value : [], args);
38985        });
38986      };
38987    });
38988
38989    // Map minified method names to their real names.
38990    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
38991      var lodashFunc = lodash[methodName];
38992      if (lodashFunc) {
38993        var key = lodashFunc.name + '';
38994        if (!hasOwnProperty.call(realNames, key)) {
38995          realNames[key] = [];
38996        }
38997        realNames[key].push({ 'name': methodName, 'func': lodashFunc });
38998      }
38999    });
39000
39001    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
39002      'name': 'wrapper',
39003      'func': undefined
39004    }];
39005
39006    // Add methods to `LazyWrapper`.
39007    LazyWrapper.prototype.clone = lazyClone;
39008    LazyWrapper.prototype.reverse = lazyReverse;
39009    LazyWrapper.prototype.value = lazyValue;
39010
39011    // Add chain sequence methods to the `lodash` wrapper.
39012    lodash.prototype.at = wrapperAt;
39013    lodash.prototype.chain = wrapperChain;
39014    lodash.prototype.commit = wrapperCommit;
39015    lodash.prototype.next = wrapperNext;
39016    lodash.prototype.plant = wrapperPlant;
39017    lodash.prototype.reverse = wrapperReverse;
39018    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
39019
39020    // Add lazy aliases.
39021    lodash.prototype.first = lodash.prototype.head;
39022
39023    if (symIterator) {
39024      lodash.prototype[symIterator] = wrapperToIterator;
39025    }
39026    return lodash;
39027  });
39028
39029  /*--------------------------------------------------------------------------*/
39030
39031  // Export lodash.
39032  var _ = runInContext();
39033
39034  // Some AMD build optimizers, like r.js, check for condition patterns like:
39035  if (true) {
39036    // Expose Lodash on the global object to prevent errors when Lodash is
39037    // loaded by a script tag in the presence of an AMD loader.
39038    // See http://requirejs.org/docs/errors.html#mismatch for more details.
39039    // Use `_.noConflict` to remove Lodash from the global object.
39040    root._ = _;
39041
39042    // Define as an anonymous module so, through path mapping, it can be
39043    // referenced as the "underscore" module.
39044    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
39045      return _;
39046    }).call(exports, __webpack_require__, exports, module),
39047				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
39048  }
39049  // Check for `exports` after `define` in case a build optimizer adds it.
39050  else 
39050{}
39051}.call(this));
39052
39053/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("ntbh"), __webpack_require__("LY0y")(module)))
39054
39055/***/ }),
39056
39057/***/ "Lxf3":
39058/***/ (function(module, exports, __webpack_require__) {
39059
39060"use strict";
39061
39062
39063var toStr = Object.prototype.toString;
39064
39065var isPrimitive = __webpack_require__("Teho");
39066
39067var isCallable = __webpack_require__("IdCN");
39068
39069// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8
39070var ES5internalSlots = {
39071	'[[DefaultValue]]': function (O) {
39072		var actualHint;
39073		if (arguments.length > 1) {
39074			actualHint = arguments[1];
39075		} else {
39076			actualHint = toStr.call(O) === '[object Date]' ? String : Number;
39077		}
39078
39079		if (actualHint === String || actualHint === Number) {
39080			var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
39081			var value, i;
39082			for (i = 0; i < methods.length; ++i) {
39083				if (isCallable(O[methods[i]])) {
39084					value = O[methods[i]]();
39085					if (isPrimitive(value)) {
39086						return value;
39087					}
39088				}
39089			}
39090			throw new TypeError('No default value');
39091		}
39092		throw new TypeError('invalid [[DefaultValue]] hint supplied');
39093	}
39094};
39095
39096// http://ecma-international.org/ecma-262/5.1/#sec-9.1
39097module.exports = function ToPrimitive(input) {
39098	if (isPrimitive(input)) {
39099		return input;
39100	}
39101	if (arguments.length > 1) {
39102		return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);
39103	}
39104	return ES5internalSlots['[[DefaultValue]]'](input);
39105};
39106
39107
39108/***/ }),
39109
39110/***/ "Mbdf":
39111/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
39112
39113"use strict";
39114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return valueFromAST; });
39115/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1QEH");
39116/* harmony import */ var _jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("kBjl");
39117/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rWdj");
39118/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("2C6G");
39119/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("/jXB");
39120/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("axIb");
39121
39122
39123
39124
39125
39126
39127/**
39128 * Produces a JavaScript value given a GraphQL Value AST.
39129 *
39130 * A GraphQL type must be provided, which will be used to interpret different
39131 * GraphQL Value literals.
39132 *
39133 * Returns `undefined` when the value could not be validly coerced according to
39134 * the provided type.
39135 *
39136 * | GraphQL Value        | JSON Value    |
39137 * | -------------------- | ------------- |
39138 * | Input Object         | Object        |
39139 * | List                 | Array         |
39140 * | Boolean              | Boolean       |
39141 * | String               | String        |
39142 * | Int / Float          | Number        |
39143 * | Enum Value           | Mixed         |
39144 * | NullValue            | null          |
39145 *
39146 */
39147
39148function valueFromAST(valueNode, type, variables) {
39149  if (!valueNode) {
39150    // When there is no node, then there is also no value.
39151    // Importantly, this is different from returning the value null.
39152    return;
39153  }
39154
39155  if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Kind */ "a"].VARIABLE) {
39156    var variableName = valueNode.name.value;
39157
39158    if (variables == null || variables[variableName] === undefined) {
39159      // No valid return value.
39160      return;
39161    }
39162
39163    var variableValue = variables[variableName];
39164
39165    if (variableValue === null && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isNonNullType */ "L"])(type)) {
39166      return; // Invalid: intentionally return no value.
39167    } // Note: This does no further checking that this variable is correct.
39168    // This assumes that this query has been validated and the variable
39169    // usage here is of the correct type.
39170
39171
39172    return variableValue;
39173  }
39174
39175  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isNonNullType */ "L"])(type)) {
39176    if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Kind */ "a"].NULL) {
39177      return; // Invalid: intentionally return no value.
39178    }
39179
39180    return valueFromAST(valueNode, type.ofType, variables);
39181  }
39182
39183  if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Kind */ "a"].NULL) {
39184    // This is explicitly returning the value null.
39185    return null;
39186  }
39187
39188  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isListType */ "J"])(type)) {
39189    var itemType = type.ofType;
39190
39191    if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Kind */ "a"].LIST) {
39192      var coercedValues = [];
39193
39194      for (var _i2 = 0, _valueNode$values2 = valueNode.values; _i2 < _valueNode$values2.length; _i2++) {
39195        var itemNode = _valueNode$values2[_i2];
39196
39197        if (isMissingVariable(itemNode, variables)) {
39198          // If an array contains a missing variable, it is either coerced to
39199          // null or if the item type is non-null, it considered invali
39199d.
39200          if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isNonNullType */ "L"])(itemType)) {
39201            return; // Invalid: intentionally return no value.
39202          }
39203
39204          coercedValues.push(null);
39205        } else {
39206          var itemValue = valueFromAST(itemNode, itemType, variables);
39207
39208          if (itemValue === undefined) {
39209            return; // Invalid: intentionally return no value.
39210          }
39211
39212          coercedValues.push(itemValue);
39213        }
39214      }
39215
39216      return coercedValues;
39217    }
39218
39219    var coercedValue = valueFromAST(valueNode, itemType, variables);
39220
39221    if (coercedValue === undefined) {
39222      return; // Invalid: intentionally return no value.
39223    }
39224
39225    return [coercedValue];
39226  }
39227
39228  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isInputObjectType */ "F"])(type)) {
39229    if (valueNode.kind !== _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Kind */ "a"].OBJECT) {
39230      return; // Invalid: intentionally return no value.
39231    }
39232
39233    var coercedObj = Object.create(null);
39234    var fieldNodes = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(valueNode.fields, function (field) {
39235      return field.name.value;
39236    });
39237
39238    for (var _i4 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type.getFields()); _i4 < _objectValues2.length; _i4++) {
39239      var field = _objectValues2[_i4];
39240      var fieldNode = fieldNodes[field.name];
39241
39242      if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {
39243        if (field.defaultValue !== undefined) {
39244          coercedObj[field.name] = field.defaultValue;
39245        } else if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isNonNullType */ "L"])(field.type)) {
39246          return; // Invalid: intentionally return no value.
39247        }
39248
39249        continue;
39250      }
39251
39252      var fieldValue = valueFromAST(fieldNode.value, field.type, variables);
39253
39254      if (fieldValue === undefined) {
39255        return; // Invalid: intentionally return no value.
39256      }
39257
39258      coercedObj[field.name] = fieldValue;
39259    }
39260
39261    return coercedObj;
39262  } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
39263
39264
39265  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isLeafType */ "I"])(type)) {
39266    // Scalars and Enums fulfill parsing a literal value via parseLiteral().
39267    // Invalid values represent a failure to parse correctly, in which case
39268    // no value is returned.
39269    var result;
39270
39271    try {
39272      result = type.parseLiteral(valueNode, variables);
39273    } catch (_error) {
39274      return; // Invalid: intentionally return no value.
39275    }
39276
39277    if (result === undefined) {
39278      return; // Invalid: intentionally return no value.
39279    }
39280
39281    return result;
39282  } // istanbul ignore next (Not reachable. All possible input types have been considered)
39283
39284
39285   false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(0, 'Unexpected input type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type));
39286} // Returns true if the provided valueNode is a variable which is not defined
39287// in the set of variables.
39288
39289function isMissingVariable(valueNode, variables) {
39290  return valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Kind */ "a"].VARIABLE && (variables == null || variables[valueNode.name.value] === undefined);
39291}
39292
39293
39294/***/ }),
39295
39296/***/ "MlE5":
39297/***/ (function(module, exports, __webpack_require__) {
39298
39299"use strict";
39300
39301
39302var ToPrimitive = __webpack_require__("1fn3");
39303
39304// http://262.ecma-international.org/5.1/#sec-9.3
39305
39306module.exports = function ToNumber(value) {
39307	var prim = ToPrimitive(value, Number);
39308	if (typeof prim !== 'string') {
39309		return +prim; // eslint-disable-line no-implicit-coercion
39310	}
39311
39312	// eslint-disable-next-line no-control-regex
39313	var trimmed = prim.replace(/^[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+|[ \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u0085]+$/g, '');
39314	if ((/^0[ob]|^[+-]0x/).test(trimmed)) {
39315		return NaN;
39316	}
39317
39318	return +trimmed; // eslint-disable-line no-implicit-coercion
39319};
39320
39321
39322/***/ }),
39323
39324/***/ "Mooo":
39325/***/ (function(module, __webpack_exports__, __webpack_require__) {
39326
39327"use strict";
39328__webpack_require__.r(__webpack_exports__);
39329/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "titleCase", function() { return titleCase; });
39330var SMALL_WORDS = /\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i;
39331var TOKENS = /[^\s:–—-]+|./g;
39332var WHITESPACE = /\s/;
39333var IS_MANUAL_CASE = /.(?=[A-Z]|\..)/;
39334var ALPHANUMERIC_PATTERN = /[A-Za-z0-9\u00C0-\u00FF]/;
39335function titleCase(input) {
39336    var result = "";
39337    var m;
39338    // tslint:disable-next-line
39339    while ((m = TOKENS.exec(input)) !== null) {
39340        var token = m[0], index = m.index;
39341        if (
39342        // Ignore already capitalized words.
39343        !IS_MANUAL_CASE.test(token) &&
39344            // Ignore small words except at beginning or end.
39345            (!SMALL_WORDS.test(token) ||
39346                index === 0 ||
39347                index + token.length === input.length) &&
39348            // Ignore URLs.
39349            (input.charAt(index + token.length) !== ":" ||
39350                WHITESPACE.test(input.charAt(index + token.length + 1)))) {
39351            // Find and uppercase first word character, skips over *modifiers*.
39352            result += token.replace(ALPHANUMERIC_PATTERN, function (m) { return m.toUpperCase(); });
39353            continue;
39354        }
39355        result += token;
39356    }
39357    return result;
39358}
39359//# sourceMappingURL=index.js.map
39360
39361/***/ }),
39362
39363/***/ "Mw0p":
39364/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
39365
39366"use strict";
39367function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
39368
39369
39370/**
39371 * A replacement for instanceof which includes an error warning when multi-realm
39372 * constructors are detected.
39373 */
39374
39375// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
39376// See: https://webpack.js.org/guides/production/
39377/* harmony default export */ __webpack_exports__["a"] = ( true ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
39378// eslint-disable-next-line no-shadow
39379function instanceOf(value, constructor) {
39380  return value instanceof constructor;
39381} : // eslint-disable-next-line no-shadow
39382undefined);
39383
39384
39385/***/ }),
39386
39387/***/ "NIw6":
39388/***/ (function(module, exports, __webpack_require__) {
39389
39390"use strict";
39391/*!
39392 * path-root-regex <https://github.com/jonschlinkert/path-root-regex>
39393 *
39394 * Copyright (c) 2016, Jon Schlinkert.
39395 * Licensed under the MIT License.
39396 */
39397
39398
39399
39400module.exports = function() {
39401  // Regex is modified from the split device regex in the node.js path module.
39402  return /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?/;
39403};
39404
39405
39406/***/ }),
39407
39408/***/ "Ndee":
39409/***/ (function(module, exports, __webpack_require__) {
39410
39411/* WEBPACK VAR INJECTION */(function(process) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
39412 * is-windows <https://github.com/jonschlinkert/is-windows>
39413 *
39414 * Copyright © 2015-2018, Jon Schlinkert.
39415 * Released under the MIT License.
39416 */
39417
39418(function(factory) {
39419  if (exports && typeof exports === 'object' && typeof module !== 'undefined') {
39420    module.exports = factory();
39421  } else if (true) {
39422    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
39423				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
39424				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
39425				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
39426  } else {}
39427})(function() {
39428  'use strict';
39429  return function isWindows() {
39430    return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE));
39431  };
39432});
39433
39434/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("8oxB")))
39435
39436/***/ }),
39437
39438/***/ "NePw":
39439/***/ (function(module, exports, __webpack_require__) {
39440
39441"use strict";
39442
39443
39444var GetIntrinsic = __webpack_require__("AM7I");
39445
39446var $test = GetIntrinsic('RegExp.prototype.test');
39447
39448var callBind = __webpack_require__("PrET");
39449
39450module.exports = function regexTester(regex) {
39451	return callBind($test, regex);
39452};
39453
39454
39455/***/ }),
39456
39457/***/ "O05/":
39458/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
39459
39460"use strict";
39461/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueVariableNamesRule; });
39462/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
39463
39464
39465/**
39466 * Unique variable names
39467 *
39468 * A GraphQL operation is only valid if all its variables are uniquely named.
39469 */
39470function UniqueVariableNamesRule(context) {
39471  var knownVariableNames = Object.create(null);
39472  return {
39473    OperationDefinition: function OperationDefinition() {
39474      knownVariableNames = Object.create(null);
39475    },
39476    VariableDefinition: function VariableDefinition(node) {
39477      var variableName = node.variable.name.value;
39478
39479      if (knownVariableNames[variableName]) {
39480        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("There can be only one variable named \"$".concat(variableName, "\"."), [knownVariableNames[variableName], node.variable.name]));
39481      } else {
39482        knownVariableNames[variableName] = node.variable.name;
39483      }
39484    }
39485  };
39486}
39487
39488
39489/***/ }),
39490
39491/***/ "O2xy":
39492/***/ (function(module, __webpack_exports__, __webpack_require__) {
39493
39494"use strict";
39495/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MapperKind; });
39496/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SchemaDirectiveVisitor; });
39497/* unused harmony export SchemaVisitor */
39498/* unused harmony export VisitSchemaKind */
39499/* unused harmony export addTypes */
39500/* unused harmony export appendObjectFields */
39501/* unused harmony export argsToFieldConfigArgumentMap */
39502/* unused harmony export argumentToArgumentConfig */
39503/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return asArray; });
39504/* unused harmony export astFromArg */
39505/* unused harmony export astFromDirective */
39506/* unused harmony export astFromEnumType */
39507/* unused harmony export astFromEnumValue */
39508/* unused harmony export astFromField */
39509/* unused harmony export astFromInputField */
39510/* unused harmony export astFromInputObjectType */
39511/* unused harmony export astFromInterfaceType */
39512/* unused harmony export astFromObjectType */
39513/* unused harmony export astFromScalarType */
39514/* unused harmony export astFromSchema */
39515/* unused harmony export astFromUnionType */
39516/* unused harmony export astFromValueUntyped */
39517/* unused harmony export buildOperationNodeForField */
39518/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return checkValidationErrors; });
39519/* unused harmony export cloneDirective */
39520/* unused harmony export cloneSchema */
39521/* unused harmony export cloneType */
39522/* unused harmony export collectFields */
39523/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return compareNodes; });
39524/* unused harmony export compareStrings */
39525/* unused harmony export correctASTNodes */
39526/* unused harmony export createNamedStub */
39527/* unused harmony export createSchemaDefinition */
39528/* unused harmony export createStub */
39529/* unused harmony export debugLog */
39530/* unused harmony export fieldToFieldConfig */
39531/* unused harmony export filterSchema */
39532/* unused harmony export fixSchemaAst */
39533/* unused harmony export fixWindowsPath */
39534/* unused harmony export flattenArray */
39535/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return forEachDefaultValue; });
39536/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return forEachField; });
39537/* unused harmony export getArgumentValues */
39538/* unused harmony export getBuiltInForStub */
39539/* unused harmony export getDeprecatableDirectiveNodes */
39540/* unused harmony export getDirectiveNodes */
39541/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getDirectives; });
39542/* unused harmony export getDirectivesInExtensions */
39543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getDocumentNodeFromSchema; });
39544/* unused harmony export getFieldsWithDirectives */
39545/* unused harmony export getImplementingTypes */
39546/* unused harmony export getLeadingCommentBlock */
39547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getResolversFromSchema; });
39548/* unused harmony export getResponseKeyFromInfo */
39549/* unused harmony export getUserTypesFromSchema */
39550/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return healSchema; });
39551/* unused harmony export healTypes */
39552/* unused harmony export implementsAbstractType */
39553/* unused harmony export inputFieldToFieldConfig */
39554/* unused harmony export isAsyncIterable */
39555/* unused harmony export isDescribable */
39556/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isDocumentNode; });
39557/* unused harmony export isDocumentString */
39558/* unused harmony export isEqual */
39559/* unused harmony export isNamedStub */
39560/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isNotEqual; });
39561/* unused harmony export isValidPath */
39562/* unused harmony export makeDeprecatedDirective */
39563/* unused harmony export makeDirectiveNode */
39564/* unused harmony export makeDirectiveNodes */
39565/* unused harmony export mapAsyncIterator */
39566/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return mapSchema; });
39567/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return mergeDeep; });
39568/* unused harmony export modifyObjectFields */
39569/* unused harmony export nodeToString */
39570/* unused harmony export observableToAsyncIterable */
39571/* unused harmony export parseGraphQLJSON */
39572/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return parseGraphQLSDL; });
39573/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return parseInputValue; });
39574/* unused harmony export parseInputValueLiteral */
39575/* unused harmony export parseSelectionSet */
39576/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return printSchemaWithDirectives; });
39577/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return pruneSchema; });
39578/* unused harmony export relocatedError */
39579/* unused harmony export removeObjectFields */
39580/* unused harmony export renameType */
39581/* unused harmony export rewireTypes */
39582/* unused harmony export selectObjectFields */
39583/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return serializeInputValue; });
39584/* unused harmony export transformCommentsToDescriptions */
39585/* unused harmony export transformInputValue */
39586/* unused harmony export updateArgument */
39587/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return validateGraphQlDocuments; });
39588/* unused harmony export valueMatchesCriteria */
39589/* unused harmony export visitData */
39590/* unused harmony export visitErrors */
39591/* unused harmony export visitResult */
39592/* unused harmony export visitSchema */
39593/* unused harmony export withCancel */
39594/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("EMzn");
39595/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("axIb");
39596/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("dWS+");
39597/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("/jXB");
39598/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Mbdf");
39599/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("dQau");
39600/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("4suF");
39601/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("19Hc");
39602/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("LViu");
39603/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("3HNt");
39604/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("EkME");
39605/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("FQ53");
39606/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("Yen0");
39607/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("neE4");
39608/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("JvOi");
39609/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("L2ys");
39610/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("Xizt");
39611/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("TirB");
39612/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("51nL");
39613/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("ADFt");
39614/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("5XwX");
39615/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("umOc");
39616/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("sJV+");
39617/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("SYjR");
39618/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("gXYT");
39619/* harmony import */ var _ardatan_aggregate_error__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("py+6");
39620/* harmony import */ var camel_case__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("h6tn");
39621
39622
39623
39624
39625const asArray = (fns) => (Array.isArray(fns) ? fns : fns ? [fns] : []);
39626function isEqual(a, b) {
39627    if (Array.isArray(a) && Array.isArray(b)) {
39628        if (a.length !== b.length) {
39629            return false;
39630        }
39631        for (let index = 0; index < a.length; index++) {
39632            if (a[index] !== b[index]) {
39633                return false;
39634            }
39635        }
39636        return true;
39637    }
39638    return a === b || (!a && !b);
39639}
39640function isNotEqual(a, b) {
39641    return !isEqual(a, b);
39642}
39643function isDocumentString(str) {
39644    // XXX: is-valid-path or is-glob treat SDL as a valid path
39645    // (`scalar Date` for example)
39646    // this why checking the extension is fast enough
39647    // and prevent from parsing the string in order to find out
39648    // if the string is a SDL
39649    if (/\.[a-z0-9]+$/i.test(str)) {
39650        return false;
39651    }
39652    try {
39653        Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(str);
39654        return true;
39655    }
39656    catch (e) { }
39657    return false;
39658}
39659const invalidPathRegex = /[‘“!%&^<=>`]/;
39660function isValidPath(str) {
39661    return typeof str === 'string' && !invalidPathRegex.test(str);
39662}
39663function compareStrings(a, b) {
39664    if (a.toString() < b.toString()) {
39665        return -1;
39666    }
39667    if (a.toString() > b.toString()) {
39668        return 1;
39669    }
39670    return 0;
39671}
39672function nodeToString(a) {
39673    if ('alias' in a) {
39674        return a.alias.value;
39675    }
39676    if ('name' in a) {
39677        return a.name.value;
39678    }
39679    return a.kind;
39680}
39681function compareNodes(a, b, customFn) {
39682    const aStr = nodeToString(a);
39683    const bStr = nodeToString(b);
39684    if (typeof customFn === 'function') {
39685        return customFn(aStr, bStr);
39686    }
39687    return compareStrings(aStr, bStr);
39688}
39689
39690function debugLog(...args) {
39691    if (process && process.env && process.env.DEBUG && !process.env.GQL_tools_NODEBUG) {
39692        // tslint:disable-next-line: no-console
39693        console.log(...args);
39694    }
39695}
39696
39697const fixWindowsPath = (path) => path.replace(/\\/g, '/');
39698
39699const flattenArray = (arr) => arr.reduce((acc, next) => acc.concat(Array.isArray(next) ? flattenArray(next) : next), []);
39700
39701const MAX_ARRAY_LENGTH = 10;
39702const MAX_RECURSIVE_DEPTH = 2;
39703/**
39704 * Used to print values in error messages.
39705 */
39706function inspect(value) {
39707    return formatValue(value, []);
39708}
39709function formatValue(value, seenValues) {
39710    switch (typeof value) {
39711        case 'string':
39712            return JSON.stringify(value);
39713        case 'function':
39714            return value.name ? `[function ${value.name}]` : '[function]';
39715        case 'object':
39716            if (value === null) {
39717                return 'null';
39718            }
39719            return formatObjectValue(value, seenValues);
39720        default:
39721            return String(value);
39722    }
39723}
39724function formatObjectValue(value, previouslySeenValues) {
39725    if (previouslySeenValues.indexOf(value) !== -1) {
39726        return '[Circular]';
39727    }
39728    const seenValues = [...previouslySeenValues, value];
39729    const customInspectFn = getCustomFn(value);
39730    if (customInspectFn !== undefined) {
39731        const customValue = customInspectFn.call(value);
39732        // check for infinite recursion
39733        if (customValue !== value) {
39734            return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues);
39735        }
39736    }
39737    else if (Array.isArray(value)) {
39738        return formatArray(value, seenValues);
39739    }
39740    return formatObject(value, seenValues);
39741}
39742function formatObject(object, seenValues) {
39743    const keys = Object.keys(object);
39744    if (keys.length === 0) {
39745        return '{}';
39746    }
39747    if (seenValues.length > MAX_RECURSIVE_DEPTH) {
39748        return '[' + getObjectTag(object) + ']';
39749    }
39750    const properties = keys.map(key => {
39751        const value = formatValue(object[key], seenValues);
39752        return key + ': ' + value;
39753    });
39754    return '{ ' + properties.join(', ') + ' }';
39755}
39756function formatArray(array, seenValues) {
39757    if (array.length === 0) {
39758        return '[]';
39759    }
39760    if (seenValues.length > MAX_RECURSIVE_DEPTH) {
39761        return '[Array]';
39762    }
39763    const len = Math.min(MAX_ARRAY_LENGTH, array.length);
39764    const remaining = array.length - len;
39765    const items = [];
39766    for (let i = 0; i < len; ++i) {
39767        items.push(formatValue(array[i], seenValues));
39768    }
39769    if (remaining === 1) {
39770        items.push('... 1 more item');
39771    }
39772    else if (remaining > 1) {
39773        items.push(`... ${remaining.toString(10)} more items`);
39774    }
39775    return '[' + items.join(', ') + ']';
39776}
39777function getCustomFn(obj) {
39778    if (typeof obj.inspect === 'function') {
39779        return obj.inspect;
39780    }
39781}
39782function getObjectTag(obj) {
39783    const tag = Object.prototype.toString
39784        .call(obj)
39785        .replace(/^\[object /, '')
39786        .replace(/]$/, '');
39787    if (tag === 'Object' && typeof obj.constructor === 'function') {
39788        const name = obj.constructor.name;
39789        if (typeof name === 'string' && name !== '') {
39790            return name;
39791        }
39792    }
39793    return tag;
39794}
39795
39796/**
39797 * Prepares an object map of argument values given a list of argument
39798 * definitions and list of argument AST nodes.
39799 *
39800 * Note: The returned value is a plain Object with a prototype, since it is
39801 * exposed to user code. Care should be taken to not pull values from the
39802 * Object prototype.
39803 */
39804function getArgumentValues(def, node, variableValues = {}) {
39805    var _a;
39806    const variableMap = Object.entries(variableValues).reduce((prev, [key, value]) => ({
39807        ...prev,
39808        [key]: value,
39809    }), {});
39810    const coercedValues = {};
39811    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
39812    const argumentNodes = (_a = node.arguments) !== null && _a !== void 0 ? _a : [];
39813    const argNodeMap = argumentNodes.reduce((prev, arg) => ({
39814        ...prev,
39815        [arg.name.value]: arg,
39816    }), {});
39817    for (const argDef of def.args) {
39818        const name = argDef.name;
39819        const argType = argDef.type;
39820        const argumentNode = argNodeMap[name];
39821        if (!argumentNode) {
39822            if (argDef.defaultValue !== undefined) {
39823                coercedValues[name] = argDef.defaultValue;
39824            }
39825            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNonNullType */ "L"])(argType)) {
39826                throw new graphql__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"](`Argument "${name}" of required type "${inspect(argType)}" ` + 'was not provided.', node);
39827            }
39828            continue;
39829        }
39830        const valueNode = argumentNode.value;
39831        let isNull = valueNode.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NULL;
39832        if (valueNode.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].VARIABLE) {
39833            const variableName = valueNode.name.value;
39834            if (variableValues == null || !(variableName in variableMap)) {
39835                if (argDef.defaultValue !== undefined) {
39836                    coercedValues[name] = argDef.defaultValue;
39837                }
39838                else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNonNullType */ "L"])(argType)) {
39839                    throw new graphql__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"](`Argument "${name}" of required type "${inspect(argType)}" ` +
39840                        `was provided the variable "$${variableName}" which was not provided a runtime value.`, valueNode);
39841                }
39842                continue;
39843            }
39844            isNull = variableValues[variableName] == null;
39845        }
39846        if (isNull && Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNonNullType */ "L"])(argType)) {
39847            throw new graphql__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"](`Argument "${name}" of non-null type "${inspect(argType)}" ` + 'must not be null.', valueNode);
39848        }
39849        const coercedValue = Object(graphql__WEBPACK_IMPORTED_MODULE_4__[/* valueFromAST */ "a"])(valueNode, argType, variableValues);
39850        if (coercedValue === undefined) {
39851            // Note: ValuesOfCorrectTypeRule validation should catch this before
39852            // execution. This is a runtime check to ensure execution does not
39853            // continue with an invalid argument value.
39854            throw new graphql__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"](`Argument "${name}" has invalid value ${Object(graphql__WEBPACK_IMPORTED_MODULE_5__[/* print */ "a"])(valueNode)}.`, valueNode);
39855        }
39856        coercedValues[name] = coercedValue;
39857    }
39858    return coercedValues;
39859}
39860
39861function getDirectivesInExtensions(node, pathToDirectivesInExtensions = ['directives']) {
39862    const directivesInExtensions = pathToDirectivesInExtensions.reduce((acc, pathSegment) => (acc == null ? acc : acc[pathSegment]), node === null || node === void 0 ? void 0 : node.extensions);
39863    return directivesInExtensions;
39864}
39865function getDirectives(schema, node, pathToDirectivesInExtensions = ['directives']) {
39866    const directivesInExtensions = getDirectivesInExtensions(node, pathToDirectivesInExtensions);
39867    if (directivesInExtensions != null) {
39868        return directivesInExtensions;
39869    }
39870    const schemaDirectives = schema && schema.getDirectives ? schema.getDirectives() : [];
39871    const schemaDirectiveMap = schemaDirectives.reduce((schemaDirectiveMap, schemaDirective) => {
39872        schemaDirectiveMap[schemaDirective.name] = schemaDirective;
39873        return schemaDirectiveMap;
39874    }, {});
39875    let astNodes = [];
39876    if (node.astNode) {
39877        astNodes.push(node.astNode);
39878    }
39879    if ('extensionASTNodes' in node && node.extensionASTNodes) {
39880        astNodes = [...astNodes, ...node.extensionASTNodes];
39881    }
39882    const result = {};
39883    astNodes.forEach(astNode => {
39884        if (astNode.directives) {
39885            astNode.directives.forEach(directiveNode => {
39886                var _a;
39887                const schemaDirective = schemaDirectiveMap[directiveNode.name.value];
39888                if (schemaDirective) {
39889                    if (schemaDirective.isRepeatable) {
39890                        result[schemaDirective.name] = (_a = result[schemaDirective.name]) !== null && _a !== void 0 ? _a : [];
39891                        result[schemaDirective.name].push(getArgumentValues(schemaDirective, directiveNode));
39892                    }
39893                    else {
39894                        result[schemaDirective.name] = getArgumentValues(schemaDirective, directiveNode);
39895                    }
39896                }
39897            });
39898        }
39899    });
39900    return result;
39901}
39902
39903function parseDirectiveValue(value) {
39904    switch (value.kind) {
39905        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INT:
39906            return parseInt(value.value);
39907        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FLOAT:
39908            return parseFloat(value.value);
39909        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].BOOLEAN:
39910            return Boolean(value.value);
39911        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING:
39912        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ENUM:
39913            return value.value;
39914        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].LIST:
39915            return value.values.map(v => parseDirectiveValue(v));
39916        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OBJECT:
39917            return value.fields.reduce((prev, v) => ({ ...prev, [v.name.value]: parseDirectiveValue(v.value) }), {});
39918        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NULL:
39919            return null;
39920        default:
39921            return null;
39922    }
39923}
39924function getFieldsWithDirectives(documentNode, options = {}) {
39925    const result = {};
39926    let selected = ['ObjectTypeDefinition', 'ObjectTypeExtension'];
39927    if (options.includeInputTypes) {
39928        selected = [...selected, 'InputObjectTypeDefinition', 'InputObjectTypeExtension'];
39929    }
39930    const allTypes = documentNode.definitions.filter(obj => selected.includes(obj.kind));
39931    for (const type of allTypes) {
39932        const typeName = type.name.value;
39933        for (const field of type.fields) {
39934            if (field.directives && field.directives.length > 0) {
39935                const fieldName = field.name.value;
39936                const key = `${typeName}.${fieldName}`;
39937                const directives = field.directives.map(d => ({
39938                    name: d.name.value,
39939                    args: (d.arguments || []).reduce((prev, arg) => ({ ...prev, [arg.name.value]: parseDirectiveValue(arg.value) }), {}),
39940                }));
39941                result[key] = directives;
39942            }
39943        }
39944    }
39945    return result;
39946}
39947
39948function getImplementingTypes(interfaceName, schema) {
39949    const allTypesMap = schema.getTypeMap();
39950    const result = [];
39951    for (const graphqlTypeName in allTypesMap) {
39952        const graphqlType = allTypesMap[graphqlTypeName];
39953        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(graphqlType)) {
39954            const allInterfaces = graphqlType.getInterfaces();
39955            if (allInterfaces.find(int => int.name === interfaceName)) {
39956                result.push(graphqlType.name);
39957            }
39958        }
39959    }
39960    return result;
39961}
39962
39963function astFromType(type) {
39964    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNonNullType */ "L"])(type)) {
39965        const innerType = astFromType(type.ofType);
39966        if (innerType.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NON_NULL_TYPE) {
39967            throw new Error(`Invalid type node ${JSON.stringify(type)}. Inner type of non-null type cannot be a non-null type.`);
39968        }
39969        return {
39970            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NON_NULL_TYPE,
39971            type: innerType,
39972        };
39973    }
39974    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isListType */ "J"])(type)) {
39975        return {
39976            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].LIST_TYPE,
39977            type: astFromType(type.ofType),
39978        };
39979    }
39980    return {
39981        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAMED_TYPE,
39982        name: {
39983            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
39984            value: type.name,
39985        },
39986    };
39987}
39988
39989/**
39990 * Produces a GraphQL Value AST given a JavaScript object.
39991 * Function will match JavaScript/JSON values to GraphQL AST schema format
39992 * by using the following mapping.
39993 *
39994 * | JSON Value    | GraphQL Value        |
39995 * | ------------- | -------------------- |
39996 * | Object        | Input Object         |
39997 * | Array         | List                 |
39998 * | Boolean       | Boolean              |
39999 * | String        | String               |
40000 * | Number        | Int / Float          |
40001 * | null          | NullValue            |
40002 *
40003 */
40004function astFromValueUntyped(value) {
40005    // only explicit null, not undefined, NaN
40006    if (value === null) {
40007        return { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NULL };
40008    }
40009    // undefined
40010    if (value === undefined) {
40011        return null;
40012    }
40013    // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but
40014    // the value is not an array, convert the value using the list's item type.
40015    if (Array.isArray(value)) {
40016        const valuesNodes = [];
40017        value.forEach(item => {
40018            const itemNode = astFromValueUntyped(item);
40019            if (itemNode != null) {
40020                valuesNodes.push(itemNode);
40021            }
40022        });
40023        return { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].LIST, values: valuesNodes };
40024    }
40025    if (typeof value === 'object') {
40026        const fieldNodes = [];
40027        Object.entries(value).forEach(([fieldName, fieldValue]) => {
40028            const ast = astFromValueUntyped(fieldValue);
40029            if (ast) {
40030                fieldNodes.push({
40031                    kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OBJECT_FIELD,
40032                    name: { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME, value: fieldName },
40033                    value: ast,
40034                });
40035            }
40036        });
40037        return { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OBJECT, fields: fieldNodes };
40038    }
40039    // Others serialize based on their corresponding JavaScript scalar types.
40040    if (typeof value === 'boolean') {
40041        return { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].BOOLEAN, value };
40042    }
40043    // JavaScript numbers can be Int or Float values.
40044    if (typeof value === 'number' && isFinite(value)) {
40045        const stringNum = String(value);
40046        return integerStringRegExp.test(stringNum)
40047            ? { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INT, value: stringNum }
40048            : { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FLOAT, value: stringNum };
40049    }
40050    if (typeof value === 'string') {
40051        return { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING, value };
40052    }
40053    throw new TypeError(`Cannot convert value to AST: ${value}.`);
40054}
40055/**
40056 * IntValue:
40057 *   - NegativeSign? 0
40058 *   - NegativeSign? NonZeroDigit ( Digit+ )?
40059 */
40060const integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;
40061
40062function getDocumentNodeFromSchema(schema, options = {}) {
40063    const pathToDirectivesInExtensions = options.pathToDirectivesInExtensions;
40064    const typesMap = schema.getTypeMap();
40065    const schemaNode = astFromSchema(schema, pathToDirectivesInExtensions);
40066    const definitions = schemaNode != null ? [schemaNode] : [];
40067    const directives = schema.getDirectives();
40068    for (const directive of directives) {
40069        if (Object(graphql__WEBPACK_IMPORTED_MODULE_6__[/* isSpecifiedDirective */ "i"])(directive)) {
40070            continue;
40071        }
40072        definitions.push(astFromDirective(directive, schema, pathToDirectivesInExtensions));
40073    }
40074    for (const typeName in typesMap) {
40075        const type = typesMap[typeName];
40076        const isPredefinedScalar = Object(graphql__WEBPACK_IMPORTED_MODULE_7__[/* isSpecifiedScalarType */ "f"])(type);
40077        const isIntrospection = Object(graphql__WEBPACK_IMPORTED_MODULE_8__[/* isIntrospectionType */ "n"])(type);
40078        if (isPredefinedScalar || isIntrospection) {
40079            continue;
40080        }
40081        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
40082            definitions.push(astFromObjectType(type, schema, pathToDirectivesInExtensions));
40083        }
40084        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
40085            definitions.push(astFromInterfaceType(type, schema, pathToDirectivesInExtensions));
40086        }
40087        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
40088            definitions.push(astFromUnionType(type, schema, pathToDirectivesInExtensions));
40089        }
40090        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
40091            definitions.push(astFromInputObjectType(type, schema, pathToDirectivesInExtensions));
40092        }
40093        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type)) {
40094            definitions.push(astFromEnumType(type, schema, pathToDirectivesInExtensions));
40095        }
40096        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(type)) {
40097            definitions.push(astFromScalarType(type, schema, pathToDirectivesInExtensions));
40098        }
40099        else {
40100            throw new Error(`Unknown type ${type}.`);
40101        }
40102    }
40103    return {
40104        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].DOCUMENT,
40105        definitions,
40106    };
40107}
40108// this approach uses the default schema printer rather than a custom solution, so may be more backwards compatible
40109// currently does not allow customization of printSchema options having to do with comments.
40110function printSchemaWithDirectives(schema, options = {}) {
40111    const documentNode = getDocumentNodeFromSchema(schema, options);
40112    return Object(graphql__WEBPACK_IMPORTED_MODULE_5__[/* print */ "a"])(documentNode);
40113}
40114function astFromSchema(schema, pathToDirectivesInExtensions) {
40115    var _a, _b;
40116    const operationTypeMap = {
40117        query: undefined,
40118        mutation: undefined,
40119        subscription: undefined,
40120    };
40121    let nodes = [];
40122    if (schema.astNode != null) {
40123        nodes.push(schema.astNode);
40124    }
40125    if (schema.extensionASTNodes != null) {
40126        nodes = nodes.concat(schema.extensionASTNodes);
40127    }
40128    nodes.forEach(node => {
40129        if (node.operationTypes) {
40130            node.operationTypes.forEach(operationTypeDefinitionNode => {
40131                operationTypeMap[operationTypeDefinitionNode.operation] = operationTypeDefinitionNode;
40132            });
40133        }
40134    });
40135    const rootTypeMap = {
40136        query: schema.getQueryType(),
40137        mutation: schema.getMutationType(),
40138        subscription: schema.getSubscriptionType(),
40139    };
40140    Object.keys(operationTypeMap).forEach(operationTypeNode => {
40141        if (rootTypeMap[operationTypeNode] != null) {
40142            if (operationTypeMap[operationTypeNode] != null) {
40143                operationTypeMap[operationTypeNode].type = astFromType(rootTypeMap[operationTypeNode]);
40144            }
40145            else {
40146                operationTypeMap[operationTypeNode] = {
40147                    kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OPERATION_TYPE_DEFINITION,
40148                    operation: operationTypeNode,
40149                    type: astFromType(rootTypeMap[operationTypeNode]),
40150                };
40151            }
40152        }
40153    });
40154    const operationTypes = Object.values(operationTypeMap).filter(operationTypeDefinitionNode => operationTypeDefinitionNode != null);
40155    const directives = getDirectiveNodes(schema, schema, pathToDirectivesInExtensions);
40156    if (!operationTypes.length && !directives.length) {
40157        return null;
40158    }
40159    const schemaNode = {
40160        kind: operationTypes != null ? graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SCHEMA_DEFINITION : graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SCHEMA_EXTENSION,
40161        operationTypes,
40162        directives,
40163    };
40164    schemaNode.description =
40165        ((_b = (_a = schema.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : schema.description != null)
40166            ? {
40167                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40168                value: schema.description,
40169                block: true,
40170            }
40171            : undefined;
40172    return schemaNode;
40173}
40174function astFromDirective(directive, schema, pathToDirectivesInExtensions) {
40175    var _a, _b;
40176    return {
40177        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].DIRECTIVE_DEFINITION,
40178        description: (_b = (_a = directive.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : (directive.description
40179            ? {
40180                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40181                value: directive.description,
40182            }
40183            : undefined),
40184        name: {
40185            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40186            value: directive.name,
40187        },
40188        arguments: (directive === null || directive === void 0 ? void 0 : directive.args)
40189            ? directive.args.map(arg => astFromArg(arg, schema, pathToDirectivesInExtensions))
40190            : undefined,
40191        repeatable: directive.isRepeatable,
40192        locations: (directive === null || directive === void 0 ? void 0 : directive.locations)
40193            ? directive.locations.map(location => ({
40194                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40195                value: location,
40196            }))
40197            : undefined,
40198    };
40199}
40200function getDirectiveNodes(entity, schema, pathToDirectivesInExtensions) {
40201    const directivesInExtensions = getDirectivesInExtensions(entity, pathToDirectivesInExtensions);
40202    let nodes = [];
40203    if (entity.astNode != null) {
40204        nodes.push(entity.astNode);
40205    }
40206    if ('extensionASTNodes' in entity && entity.extensionASTNodes != null) {
40207        nodes = nodes.concat(entity.extensionASTNodes);
40208    }
40209    let directives;
40210    if (directivesInExtensions != null) {
40211        directives = makeDirectiveNodes(schema, directivesInExtensions);
40212    }
40213    else {
40214        directives = [].concat(...nodes.filter(node => node.directives != null).map(node => node.directives));
40215    }
40216    return directives;
40217}
40218function getDeprecatableDirectiveNodes(entity, schema, pathToDirectivesInExtensions) {
40219    var _a, _b;
40220    let directiveNodesBesidesDeprecated = [];
40221    let deprecatedDirectiveNode;
40222    const directivesInExtensions = getDirectivesInExtensions(entity, pathToDirectivesInExtensions);
40223    let directives;
40224    if (directivesInExtensions != null) {
40225        directives = makeDirectiveNodes(schema, directivesInExtensions);
40226    }
40227    else {
40228        directives = (_a = entity.astNode) === null || _a === void 0 ? void 0 : _a.directives;
40229    }
40230    if (directives != null) {
40231        directiveNodesBesidesDeprecated = directives.filter(directive => directive.name.value !== 'deprecated');
40232        if (entity.deprecationReason != null) {
40233            deprecatedDirectiveNode = (_b = directives.filter(directive => directive.name.value === 'deprecated')) === null || _b === void 0 ? void 0 : _b[0];
40234        }
40235    }
40236    if (entity.deprecationReason != null &&
40237        deprecatedDirectiveNode == null) {
40238        deprecatedDirectiveNode = makeDeprecatedDirective(entity.deprecationReason);
40239    }
40240    return deprecatedDirectiveNode == null
40241        ? directiveNodesBesidesDeprecated
40242        : [deprecatedDirectiveNode].concat(directiveNodesBesidesDeprecated);
40243}
40244function astFromArg(arg, schema, pathToDirectivesInExtensions) {
40245    var _a, _b;
40246    return {
40247        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_VALUE_DEFINITION,
40248        description: ((_b = (_a = arg.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : arg.description)
40249            ? {
40250                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40251                value: arg.description,
40252                block: true,
40253            }
40254            : undefined,
40255        name: {
40256            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40257            value: arg.name,
40258        },
40259        type: astFromType(arg.type),
40260        defaultValue: arg.defaultValue !== undefined ? Object(graphql__WEBPACK_IMPORTED_MODULE_9__[/* astFromValue */ "a"])(arg.defaultValue, arg.type) : undefined,
40261        directives: getDeprecatableDirectiveNodes(arg, schema, pathToDirectivesInExtensions),
40262    };
40263}
40264function astFromObjectType(type, schema, pathToDirectivesInExtensions) {
40265    var _a, _b;
40266    return {
40267        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OBJECT_TYPE_DEFINITION,
40268        description: ((_b = (_a = type.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : type.description)
40269            ? {
40270                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40271                value: type.description,
40272                block: true,
40273            }
40274            : undefined,
40275        name: {
40276            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40277            value: type.name,
40278        },
40279        fields: Object.values(type.getFields()).map(field => astFromField(field, schema, pathToDirectivesInExtensions)),
40280        interfaces: Object.values(type.getInterfaces()).map(iFace => astFromType(iFace)),
40281        directives: getDirectiveNodes(type, schema, pathToDirectivesInExtensions),
40282    };
40283}
40284function astFromInterfaceType(type, schema, pathToDirectivesInExtensions) {
40285    var _a, _b;
40286    const node = {
40287        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INTERFACE_TYPE_DEFINITION,
40288        description: ((_b = (_a = type.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : type.description)
40289            ? {
40290                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40291                value: type.description,
40292                block: true,
40293            }
40294            : undefined,
40295        name: {
40296            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40297            value: type.name,
40298        },
40299        fields: Object.values(type.getFields()).map(field => astFromField(field, schema, pathToDirectivesInExtensions)),
40300        directives: getDirectiveNodes(type, schema, pathToDirectivesInExtensions),
40301    };
40302    if ('getInterfaces' in type) {
40303        node.interfaces = Object.values(type.getInterfaces()).map(iFace => astFromType(iFace));
40304    }
40305    return node;
40306}
40307function astFromUnionType(type, schema, pathToDirectivesInExtensions) {
40308    var _a, _b;
40309    return {
40310        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].UNION_TYPE_DEFINITION,
40311        description: ((_b = (_a = type.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : type.description)
40312            ? {
40313                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40314                value: type.description,
40315                block: true,
40316            }
40317            : undefined,
40318        name: {
40319            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40320            value: type.name,
40321        },
40322        directives: getDirectiveNodes(type, schema, pathToDirectivesInExtensions),
40323        types: type.getTypes().map(type => astFromType(type)),
40324    };
40325}
40326function astFromInputObjectType(type, schema, pathToDirectivesInExtensions) {
40327    var _a, _b;
40328    return {
40329        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_OBJECT_TYPE_DEFINITION,
40330        description: ((_b = (_a = type.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : type.description)
40331            ? {
40332                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40333                value: type.description,
40334                block: true,
40335            }
40336            : undefined,
40337        name: {
40338            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40339            value: type.name,
40340        },
40341        fields: Object.values(type.getFields()).map(field => astFromInputField(field, schema, pathToDirectivesInExtensions)),
40342        directives: getDirectiveNodes(type, schema, pathToDirectivesInExtensions),
40343    };
40344}
40345function astFromEnumType(type, schema, pathToDirectivesInExtensions) {
40346    var _a, _b;
40347    return {
40348        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ENUM_TYPE_DEFINITION,
40349        description: ((_b = (_a = type.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : type.description)
40350            ? {
40351                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40352                value: type.description,
40353                block: true,
40354            }
40355            : undefined,
40356        name: {
40357            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40358            value: type.name,
40359        },
40360        values: Object.values(type.getValues()).map(value => astFromEnumValue(value, schema, pathToDirectivesInExtensions)),
40361        directives: getDirectiveNodes(type, schema, pathToDirectivesInExtensions),
40362    };
40363}
40364function astFromScalarType(type, schema, pathToDirectivesInExtensions) {
40365    var _a, _b, _c, _d;
40366    let directiveNodesBesidesSpecifiedBy = [];
40367    let specifiedByDirectiveNode;
40368    const directivesInExtensions = getDirectivesInExtensions(type, pathToDirectivesInExtensions);
40369    let allDirectives;
40370    if (directivesInExtensions != null) {
40371        allDirectives = makeDirectiveNodes(schema, directivesInExtensions);
40372    }
40373    else {
40374        allDirectives = (_a = type.astNode) === null || _a === void 0 ? void 0 : _a.directives;
40375    }
40376    if (allDirectives != null) {
40377        directiveNodesBesidesSpecifiedBy = allDirectives.filter(directive => directive.name.value !== 'specifiedBy');
40378        if (type.specifiedByUrl != null) {
40379            specifiedByDirectiveNode = (_b = allDirectives.filter(directive => directive.name.value === 'specifiedBy')) === null || _b === void 0 ? void 0 : _b[0];
40380        }
40381    }
40382    if (type.specifiedByUrl != null && specifiedByDirectiveNode == null) {
40383        specifiedByDirectiveNode = makeDirectiveNode('specifiedBy', {
40384            url: type.specifiedByUrl,
40385        });
40386    }
40387    const directives = specifiedByDirectiveNode == null
40388        ? directiveNodesBesidesSpecifiedBy
40389        : [specifiedByDirectiveNode].concat(directiveNodesBesidesSpecifiedBy);
40390    return {
40391        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SCALAR_TYPE_DEFINITION,
40392        description: ((_d = (_c = type.astNode) === null || _c === void 0 ? void 0 : _c.description) !== null && _d !== void 0 ? _d : type.description)
40393            ? {
40394                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40395                value: type.description,
40396                block: true,
40397            }
40398            : undefined,
40399        name: {
40400            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40401            value: type.name,
40402        },
40403        directives,
40404    };
40405}
40406function astFromField(field, schema, pathToDirectivesInExtensions) {
40407    var _a, _b;
40408    return {
40409        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FIELD_DEFINITION,
40410        description: ((_b = (_a = field.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : field.description)
40411            ? {
40412                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40413                value: field.description,
40414                block: true,
40415            }
40416            : undefined,
40417        name: {
40418            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40419            value: field.name,
40420        },
40421        arguments: field.args.map(arg => astFromArg(arg, schema, pathToDirectivesInExtensions)),
40422        type: astFromType(field.type),
40423        directives: getDeprecatableDirectiveNodes(field, schema, pathToDirectivesInExtensions),
40424    };
40425}
40426function astFromInputField(field, schema, pathToDirectivesInExtensions) {
40427    var _a, _b;
40428    return {
40429        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_VALUE_DEFINITION,
40430        description: ((_b = (_a = field.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : field.description)
40431            ? {
40432                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40433                value: field.description,
40434                block: true,
40435            }
40436            : undefined,
40437        name: {
40438            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40439            value: field.name,
40440        },
40441        type: astFromType(field.type),
40442        directives: getDeprecatableDirectiveNodes(field, schema, pathToDirectivesInExtensions),
40443        defaultValue: Object(graphql__WEBPACK_IMPORTED_MODULE_9__[/* astFromValue */ "a"])(field.defaultValue, field.type),
40444    };
40445}
40446function astFromEnumValue(value, schema, pathToDirectivesInExtensions) {
40447    var _a, _b;
40448    return {
40449        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ENUM_VALUE_DEFINITION,
40450        description: ((_b = (_a = value.astNode) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : value.description)
40451            ? {
40452                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40453                value: value.description,
40454                block: true,
40455            }
40456            : undefined,
40457        name: {
40458            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40459            value: value.name,
40460        },
40461        directives: getDirectiveNodes(value, schema, pathToDirectivesInExtensions),
40462    };
40463}
40464function makeDeprecatedDirective(deprecationReason) {
40465    return makeDirectiveNode('deprecated', { reason: deprecationReason }, graphql__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLDeprecatedDirective */ "b"]);
40466}
40467function makeDirectiveNode(name, args, directive) {
40468    const directiveArguments = [];
40469    if (directive != null) {
40470        directive.args.forEach(arg => {
40471            const argName = arg.name;
40472            const argValue = args[argName];
40473            if (argValue !== undefined) {
40474                directiveArguments.push({
40475                    kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ARGUMENT,
40476                    name: {
40477                        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40478                        value: argName,
40479                    },
40480                    value: Object(graphql__WEBPACK_IMPORTED_MODULE_9__[/* astFromValue */ "a"])(argValue, arg.type),
40481                });
40482            }
40483        });
40484    }
40485    else {
40486        Object.entries(args).forEach(([argName, argValue]) => {
40487            directiveArguments.push({
40488                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ARGUMENT,
40489                name: {
40490                    kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40491                    value: argName,
40492                },
40493                value: astFromValueUntyped(argValue),
40494            });
40495        });
40496    }
40497    return {
40498        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].DIRECTIVE,
40499        name: {
40500            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40501            value: name,
40502        },
40503        arguments: directiveArguments,
40504    };
40505}
40506function makeDirectiveNodes(schema, directiveValues) {
40507    const directiveNodes = [];
40508    Object.entries(directiveValues).forEach(([directiveName, arrayOrSingleValue]) => {
40509        const directive = schema === null || schema === void 0 ? void 0 : schema.getDirective(directiveName);
40510        if (Array.isArray(arrayOrSingleValue)) {
40511            arrayOrSingleValue.forEach(value => {
40512                directiveNodes.push(makeDirectiveNode(directiveName, value, directive));
40513            });
40514        }
40515        else {
40516            directiveNodes.push(makeDirectiveNode(directiveName, arrayOrSingleValue, directive));
40517        }
40518    });
40519    return directiveNodes;
40520}
40521
40522async function validateGraphQlDocuments(schema, documentFiles, effectiveRules) {
40523    effectiveRules = effectiveRules || createDefaultRules();
40524    const allFragments = [];
40525    documentFiles.forEach(documentFile => {
40526        if (documentFile.document) {
40527            for (const definitionNode of documentFile.document.definitions) {
40528                if (definitionNode.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FRAGMENT_DEFINITION) {
40529                    allFragments.push(definitionNode);
40530                }
40531            }
40532        }
40533    });
40534    const allErrors = [];
40535    await Promise.all(documentFiles.map(async (documentFile) => {
40536        const documentToValidate = {
40537            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].DOCUMENT,
40538            definitions: [...allFragments, ...documentFile.document.definitions].filter((definition, index, list) => {
40539                if (definition.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FRAGMENT_DEFINITION) {
40540                    const firstIndex = list.findIndex(def => def.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FRAGMENT_DEFINITION && def.name.value === definition.name.value);
40541                    const isDuplicated = firstIndex !== index;
40542                    if (isDuplicated) {
40543                        return false;
40544                    }
40545                }
40546                return true;
40547            }),
40548        };
40549        const errors = Object(graphql__WEBPACK_IMPORTED_MODULE_10__[/* validate */ "c"])(schema, documentToValidate, effectiveRules);
40550        if (errors.length > 0) {
40551            allErrors.push({
40552                filePath: documentFile.location,
40553                errors,
40554            });
40555        }
40556    }));
40557    return allErrors;
40558}
40559function checkValidationErrors(loadDocumentErrors) {
40560    if (loadDocumentErrors.length > 0) {
40561        const errors = [];
40562        for (const loadDocumentError of loadDocumentErrors) {
40563            for (const graphQLError of loadDocumentError.errors) {
40564                const error = new Error();
40565                error.name = 'GraphQLDocumentError';
40566                error.message = `${error.name}: ${graphQLError.message}`;
40567                error.stack = error.message;
40568                graphQLError.locations.forEach(location => (error.stack += `\n    at ${loadDocumentError.filePath}:${location.line}:${location.column}`));
40569                errors.push(error);
40570            }
40571        }
40572        throw new _ardatan_aggregate_error__WEBPACK_IMPORTED_MODULE_25__[/* default */ "a"](errors);
40573    }
40574}
40575function createDefaultRules() {
40576    const ignored = ['NoUnusedFragmentsRule', 'NoUnusedVariablesRule', 'KnownDirectivesRule'];
40577    // GraphQL v14 has no Rule suffix in function names
40578    // Adding `*Rule` makes validation backwards compatible
40579    ignored.forEach(rule => {
40580        ignored.push(rule.replace(/Rule$/, ''));
40581    });
40582    return graphql__WEBPACK_IMPORTED_MODULE_11__[/* specifiedRules */ "a"].filter((f) => !ignored.includes(f.name));
40583}
40584
40585function buildFixedSchema(schema, options) {
40586    return Object(graphql__WEBPACK_IMPORTED_MODULE_12__[/* buildSchema */ "b"])(printSchemaWithDirectives(schema), {
40587        noLocation: true,
40588        ...(options || {}),
40589    });
40590}
40591function fixSchemaAst(schema, options) {
40592    let schemaWithValidAst;
40593    if (!schema.astNode || !schema.extensionASTNodes) {
40594        schemaWithValidAst = buildFixedSchema(schema, options);
40595    }
40596    if (!schema.astNode) {
40597        schema.astNode = schemaWithValidAst.astNode;
40598    }
40599    if (!schema.extensionASTNodes) {
40600        schema.extensionASTNodes = schemaWithValidAst.extensionASTNodes;
40601    }
40602    return schema;
40603}
40604
40605/**
40606 * Produces the value of a block string from its parsed raw value, similar to
40607 * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.
40608 *
40609 * This implements the GraphQL spec's BlockStringValue() static algorithm.
40610 *
40611 * @internal
40612 */
40613function dedentBlockStringValue(rawString) {
40614  // Expand a block string's raw value into independent lines.
40615  var lines = rawString.split(/\r\n|[\n\r]/g);
40615 // Remove common indentation from all lines but first.
40616
40617  var commonIndent = getBlockStringIndentation(rawString);
40618
40619  if (commonIndent !== 0) {
40620    for (var i = 1; i < lines.length; i++) {
40621      lines[i] = lines[i].slice(commonIndent);
40622    }
40623  } // Remove leading and trailing blank lines.
40624
40625
40626  var startLine = 0;
40627
40628  while (startLine < lines.length && isBlank(lines[startLine])) {
40629    ++startLine;
40630  }
40631
40632  var endLine = lines.length;
40633
40634  while (endLine > startLine && isBlank(lines[endLine - 1])) {
40635    --endLine;
40636  } // Return a string of the lines joined with U+000A.
40637
40638
40639  return lines.slice(startLine, endLine).join('\n');
40640}
40641
40642function isBlank(str) {
40643  for (var i = 0; i < str.length; ++i) {
40644    if (str[i] !== ' ' && str[i] !== '\t') {
40645      return false;
40646    }
40647  }
40648
40649  return true;
40650}
40651/**
40652 * @internal
40653 */
40654
40655
40656function getBlockStringIndentation(value) {
40657  var _commonIndent;
40658
40659  var isFirstLine = true;
40660  var isEmptyLine = true;
40661  var indent = 0;
40662  var commonIndent = null;
40663
40664  for (var i = 0; i < value.length; ++i) {
40665    switch (value.charCodeAt(i)) {
40666      case 13:
40667        //  \r
40668        if (value.charCodeAt(i + 1) === 10) {
40669          ++i; // skip \r\n as one symbol
40670        }
40671
40672      // falls through
40673
40674      case 10:
40675        //  \n
40676        isFirstLine = false;
40677        isEmptyLine = true;
40678        indent = 0;
40679        break;
40680
40681      case 9: //   \t
40682
40683      case 32:
40684        //  <space>
40685        ++indent;
40686        break;
40687
40688      default:
40689        if (isEmptyLine && !isFirstLine && (commonIndent === null || indent < commonIndent)) {
40690          commonIndent = indent;
40691        }
40692
40693        isEmptyLine = false;
40694    }
40695  }
40696
40697  return (_commonIndent = commonIndent) !== null && _commonIndent !== void 0 ? _commonIndent : 0;
40698}
40699
40700function parseGraphQLSDL(location, rawSDL, options = {}) {
40701    let document;
40702    const sdl = rawSDL;
40703    let sdlModified = false;
40704    try {
40705        if (options.commentDescriptions && sdl.includes('#')) {
40706            sdlModified = true;
40707            document = transformCommentsToDescriptions(rawSDL, options);
40708            // If noLocation=true, we need to make sure to print and parse it again, to remove locations,
40709            // since `transformCommentsToDescriptions` must have locations set in order to transform the comments
40710            // into descriptions.
40711            if (options.noLocation) {
40712                document = Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(Object(graphql__WEBPACK_IMPORTED_MODULE_5__[/* print */ "a"])(document), options);
40713            }
40714        }
40715        else {
40716            document = Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(new graphql__WEBPACK_IMPORTED_MODULE_13__[/* Source */ "a"](sdl, location), options);
40717        }
40718    }
40719    catch (e) {
40720        if (e.message.includes('EOF') && sdl.replace(/(\#[^*]*)/g, '').trim() === '') {
40721            document = {
40722                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].DOCUMENT,
40723                definitions: [],
40724            };
40725        }
40726        else {
40727            throw e;
40728        }
40729    }
40730    return {
40731        location,
40732        document,
40733        rawSDL: sdlModified ? Object(graphql__WEBPACK_IMPORTED_MODULE_5__[/* print */ "a"])(document) : sdl,
40734    };
40735}
40736function getLeadingCommentBlock(node) {
40737    const loc = node.loc;
40738    if (!loc) {
40739        return;
40740    }
40741    const comments = [];
40742    let token = loc.startToken.prev;
40743    while (token != null &&
40744        token.kind === graphql__WEBPACK_IMPORTED_MODULE_14__[/* TokenKind */ "a"].COMMENT &&
40745        token.next &&
40746        token.prev &&
40747        token.line + 1 === token.next.line &&
40748        token.line !== token.prev.line) {
40749        const value = String(token.value);
40750        comments.push(value);
40751        token = token.prev;
40752    }
40753    return comments.length > 0 ? comments.reverse().join('\n') : undefined;
40754}
40755function transformCommentsToDescriptions(sourceSdl, options = {}) {
40756    const parsedDoc = Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(sourceSdl, {
40757        ...options,
40758        noLocation: false,
40759    });
40760    const modifiedDoc = Object(graphql__WEBPACK_IMPORTED_MODULE_15__[/* visit */ "c"])(parsedDoc, {
40761        leave: (node) => {
40762            if (isDescribable(node)) {
40763                const rawValue = getLeadingCommentBlock(node);
40764                if (rawValue !== undefined) {
40765                    const commentsBlock = dedentBlockStringValue('\n' + rawValue);
40766                    const isBlock = commentsBlock.includes('\n');
40767                    if (!node.description) {
40768                        return {
40769                            ...node,
40770                            description: {
40771                                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].STRING,
40772                                value: commentsBlock,
40773                                block: isBlock,
40774                            },
40775                        };
40776                    }
40777                    else {
40778                        return {
40779                            ...node,
40780                            description: {
40781                                ...node.description,
40782                                value: node.description.value + '\n' + commentsBlock,
40783                                block: true,
40784                            },
40785                        };
40786                    }
40787                }
40788            }
40789        },
40790    });
40791    return modifiedDoc;
40792}
40793function isDescribable(node) {
40794    return (Object(graphql__WEBPACK_IMPORTED_MODULE_16__[/* isTypeSystemDefinitionNode */ "g"])(node) ||
40795        node.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FIELD_DEFINITION ||
40796        node.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_VALUE_DEFINITION ||
40797        node.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ENUM_VALUE_DEFINITION);
40798}
40799
40800function stripBOM(content) {
40801    content = content.toString();
40802    // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
40803    // because the buffer-to-string conversion in `fs.readFileSync()`
40804    // translates it to FEFF, the UTF-16 BOM.
40805    if (content.charCodeAt(0) === 0xfeff) {
40806        content = content.slice(1);
40807    }
40808    return content;
40809}
40810function parseBOM(content) {
40811    return JSON.parse(stripBOM(content));
40812}
40813function parseGraphQLJSON(location, jsonContent, options) {
40814    let parsedJson = parseBOM(jsonContent);
40815    if (parsedJson.data) {
40816        parsedJson = parsedJson.data;
40817    }
40818    if (parsedJson.kind === 'Document') {
40819        const document = parsedJson;
40820        return {
40821            location,
40822            document,
40823        };
40824    }
40825    else if (parsedJson.__schema) {
40826        const schema = Object(graphql__WEBPACK_IMPORTED_MODULE_17__[/* buildClientSchema */ "a"])(parsedJson, options);
40827        const rawSDL = printSchemaWithDirectives(schema, options);
40828        return {
40829            location,
40830            document: parseGraphQLSDL(location, rawSDL, options).document,
40831            rawSDL,
40832            schema,
40833        };
40834    }
40835    throw new Error(`Not valid JSON content`);
40836}
40837
40838/**
40839 * Get all GraphQL types from schema without:
40840 *
40841 * - Query, Mutation, Subscription objects
40842 * - Internal scalars added by parser
40843 *
40844 * @param schema
40845 */
40846function getUserTypesFromSchema(schema) {
40847    const allTypesMap = schema.getTypeMap();
40848    // tslint:disable-next-line: no-unnecessary-local-variable
40849    const modelTypes = Object.values(allTypesMap).filter((graphqlType) => {
40850        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(graphqlType)) {
40851            // Filter out private types
40852            if (graphqlType.name.startsWith('__')) {
40853                return false;
40854            }
40855            if (schema.getMutationType() && graphqlType.name === schema.getMutationType().name) {
40856                return false;
40857            }
40858            if (schema.getQueryType() && graphqlType.name === schema.getQueryType().name) {
40859                return false;
40860            }
40861            if (schema.getSubscriptionType() && graphqlType.name === schema.getSubscriptionType().name) {
40862                return false;
40863            }
40864            return true;
40865        }
40866        return false;
40867    });
40868    return modelTypes;
40869}
40870
40871function createSchemaDefinition(def, config) {
40872    const schemaRoot = {};
40873    if (def.query) {
40874        schemaRoot.query = def.query.toString();
40875    }
40876    if (def.mutation) {
40877        schemaRoot.mutation = def.mutation.toString();
40878    }
40879    if (def.subscription) {
40880        schemaRoot.subscription = def.subscription.toString();
40881    }
40882    const fields = Object.keys(schemaRoot)
40883        .map(rootType => (schemaRoot[rootType] ? `${rootType}: ${schemaRoot[rootType]}` : null))
40884        .filter(a => a);
40885    if (fields.length) {
40886        return `schema { ${fields.join('\n')} }`;
40887    }
40888    if (config && config.force) {
40889        return ` schema { query: Query } `;
40890    }
40891    return undefined;
40892}
40893
40894let operationVariables = [];
40895let fieldTypeMap = new Map();
40896function addOperationVariable(variable) {
40897    operationVariables.push(variable);
40898}
40899function resetOperationVariables() {
40900    operationVariables = [];
40901}
40902function resetFieldMap() {
40903    fieldTypeMap = new Map();
40904}
40905function buildOperationName(name) {
40906    return Object(camel_case__WEBPACK_IMPORTED_MODULE_26__[/* camelCase */ "a"])(name);
40907}
40908function buildOperationNodeForField({ schema, kind, field, models, ignore, depthLimit, circularReferenceDepth, argNames, selectedFields = true, }) {
40909    resetOperationVariables();
40910    resetFieldMap();
40911    const operationNode = buildOperationAndCollectVariables({
40912        schema,
40913        fieldName: field,
40914        kind,
40915        models: models || [],
40916        ignore: ignore || [],
40917        depthLimit: depthLimit || Infinity,
40918        circularReferenceDepth: circularReferenceDepth || 1,
40919        argNames,
40920        selectedFields,
40921    });
40922    // attach variables
40923    operationNode.variableDefinitions = [...operationVariables];
40924    resetOperationVariables();
40925    resetFieldMap();
40926    return operationNode;
40927}
40928function buildOperationAndCollectVariables({ schema, fieldName, kind, models, ignore, depthLimit, circularReferenceDepth, argNames, selectedFields, }) {
40929    const typeMap = {
40930        query: schema.getQueryType(),
40931        mutation: schema.getMutationType(),
40932        subscription: schema.getSubscriptionType(),
40933    };
40934    const type = typeMap[kind];
40935    const field = type.getFields()[fieldName];
40936    const operationName = buildOperationName(`${fieldName}_${kind}`);
40937    if (field.args) {
40938        field.args.forEach(arg => {
40939            const argName = arg.name;
40940            if (!argNames || argNames.includes(argName)) {
40941                addOperationVariable(resolveVariable(arg, argName));
40942            }
40943        });
40944    }
40945    return {
40946        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OPERATION_DEFINITION,
40947        operation: kind,
40948        name: {
40949            kind: 'Name',
40950            value: operationName,
40951        },
40952        variableDefinitions: [],
40953        selectionSet: {
40954            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SELECTION_SET,
40955            selections: [
40956                resolveField({
40957                    type,
40958                    field,
40959                    models,
40960                    firstCall: true,
40961                    path: [],
40962                    ancestors: [],
40963                    ignore,
40964                    depthLimit,
40965                    circularReferenceDepth,
40966                    schema,
40967                    depth: 0,
40968                    argNames,
40969                    selectedFields,
40970                }),
40971            ],
40972        },
40973    };
40974}
40975function resolveSelectionSet({ parent, type, models, firstCall, path, ancestors, ignore, depthLimit, circularReferenceDepth, schema, depth, argNames, selectedFields, }) {
40976    if (typeof selectedFields === 'boolean' && depth > depthLimit) {
40977        return;
40978    }
40979    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
40980        const types = type.getTypes();
40981        return {
40982            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SELECTION_SET,
40983            selections: types
40984                .filter(t => !hasCircularRef([...ancestors, t], {
40985                depth: circularReferenceDepth,
40986            }))
40987                .map(t => {
40988                return {
40989                    kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INLINE_FRAGMENT,
40990                    typeCondition: {
40991                        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAMED_TYPE,
40992                        name: {
40993                            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
40994                            value: t.name,
40995                        },
40996                    },
40997                    selectionSet: resolveSelectionSet({
40998                        parent: type,
40999                        type: t,
41000                        models,
41001                        path,
41002                        ancestors,
41003                        ignore,
41004                        depthLimit,
41005                        circularReferenceDepth,
41006                        schema,
41007                        depth,
41008                        argNames,
41009                        selectedFields,
41010                    }),
41011                };
41012            })
41013                .filter(fragmentNode => { var _a, _b; return ((_b = (_a = fragmentNode === null || fragmentNode === void 0 ? void 0 : fragmentNode.selectionSet) === null || _a === void 0 ? void 0 : _a.selections) === null || _b === void 0 ? void 0 : _b.length) > 0; }),
41014        };
41015    }
41016    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
41017        const types = Object.values(schema.getTypeMap()).filter((t) => Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(t) && t.getInterfaces().includes(type));
41018        return {
41019            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SELECTION_SET,
41020            selections: types
41021                .filter(t => !hasCircularRef([...ancestors, t], {
41022                depth: circularReferenceDepth,
41023            }))
41024                .map(t => {
41025                return {
41026                    kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INLINE_FRAGMENT,
41027                    typeCondition: {
41028                        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAMED_TYPE,
41029                        name: {
41030                            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
41031                            value: t.name,
41032                        },
41033                    },
41034                    selectionSet: resolveSelectionSet({
41035                        parent: type,
41036                        type: t,
41037                        models,
41038                        path,
41039                        ancestors,
41040                        ignore,
41041                        depthLimit,
41042                        circularReferenceDepth,
41043                        schema,
41044                        depth,
41045                        argNames,
41046                        selectedFields,
41047                    }),
41048                };
41049            })
41050                .filter(fragmentNode => { var _a, _b; return ((_b = (_a = fragmentNode === null || fragmentNode === void 0 ? void 0 : fragmentNode.selectionSet) === null || _a === void 0 ? void 0 : _a.selections) === null || _b === void 0 ? void 0 : _b.length) > 0; }),
41051        };
41052    }
41053    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
41054        const isIgnored = ignore.includes(type.name) || ignore.includes(`${parent.name}.${path[path.length - 1]}`);
41055        const isModel = models.includes(type.name);
41056        if (!firstCall && isModel && !isIgnored) {
41057            return {
41058                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SELECTION_SET,
41059                selections: [
41060                    {
41061                        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FIELD,
41062                        name: {
41063                            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
41064                            value: 'id',
41065                        },
41066                    },
41067                ],
41068            };
41069        }
41070        const fields = type.getFields();
41071        return {
41072            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SELECTION_SET,
41073            selections: Object.keys(fields)
41074                .filter(fieldName => {
41075                return !hasCircularRef([...ancestors, Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNamedType */ "A"])(fields[fieldName].type)], {
41076                    depth: circularReferenceDepth,
41077                });
41078            })
41079                .map(fieldName => {
41080                const selectedSubFields = typeof selectedFields === 'object' ? selectedFields[fieldName] : true;
41081                if (selectedSubFields) {
41082                    return resolveField({
41083                        type: type,
41084                        field: fields[fieldName],
41085                        models,
41086                        path: [...path, fieldName],
41087                        ancestors,
41088                        ignore,
41089                        depthLimit,
41090                        circularReferenceDepth,
41091                        schema,
41092                        depth,
41093                        argNames,
41094                        selectedFields: selectedSubFields,
41095                    });
41096                }
41097                return null;
41098            })
41099                .filter(f => {
41100                var _a, _b;
41101                if (f) {
41102                    if ('selectionSet' in f) {
41103                        return (_b = (_a = f.selectionSet) === null || _a === void 0 ? void 0 : _a.selections) === null || _b === void 0 ? void 0 : _b.length;
41104                    }
41105                    else {
41106                        return true;
41107                    }
41108                }
41109                return false;
41110            }),
41111        };
41112    }
41113}
41114function resolveVariable(arg, name) {
41115    function resolveVariableType(type) {
41116        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isListType */ "J"])(type)) {
41117            return {
41118                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].LIST_TYPE,
41119                type: resolveVariableType(type.ofType),
41120            };
41121        }
41122        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNonNullType */ "L"])(type)) {
41123            return {
41124                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NON_NULL_TYPE,
41125                type: resolveVariableType(type.ofType),
41126            };
41127        }
41128        return {
41129            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAMED_TYPE,
41130            name: {
41131                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
41132                value: type.name,
41133            },
41134        };
41135    }
41136    return {
41137        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].VARIABLE_DEFINITION,
41138        variable: {
41139            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].VARIABLE,
41140            name: {
41141                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
41142                value: name || arg.name,
41143            },
41144        },
41145        type: resolveVariableType(arg.type),
41146    };
41147}
41148function getArgumentName(name, path) {
41149    return Object(camel_case__WEBPACK_IMPORTED_MODULE_26__[/* camelCase */ "a"])([...path, name].join('_'));
41150}
41151function resolveField({ type, field, models, firstCall, path, ancestors, ignore, depthLimit, circularReferenceDepth, schema, depth, argNames, selectedFields, }) {
41152    const namedType = Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNamedType */ "A"])(field.type);
41153    let args = [];
41154    let removeField = false;
41155    if (field.args && field.args.length) {
41156        args = field.args
41157            .map(arg => {
41158            const argumentName = getArgumentName(arg.name, path);
41159            if (argNames && !argNames.includes(argumentName)) {
41160                if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNonNullType */ "L"])(arg.type)) {
41161                    removeField = true;
41162                }
41163                return null;
41164            }
41165            if (!firstCall) {
41166                addOperationVariable(resolveVariable(arg, argumentName));
41167            }
41168            return {
41169                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ARGUMENT,
41170                name: {
41171                    kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
41172                    value: arg.name,
41173                },
41174                value: {
41175                    kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].VARIABLE,
41176                    name: {
41177                        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
41178                        value: getArgumentName(arg.name, path),
41179                    },
41180                },
41181            };
41182        })
41183            .filter(Boolean);
41184    }
41185    if (removeField) {
41186        return null;
41187    }
41188    const fieldPath = [...path, field.name];
41189    const fieldPathStr = fieldPath.join('.');
41190    let fieldName = field.name;
41191    if (fieldTypeMap.has(fieldPathStr) && fieldTypeMap.get(fieldPathStr) !== field.type.toString()) {
41192        fieldName += field.type.toString().replace('!', 'NonNull');
41193    }
41194    fieldTypeMap.set(fieldPathStr, field.type.toString());
41195    if (!Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(namedType) && !Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(namedType)) {
41196        return {
41197            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FIELD,
41198            name: {
41199                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
41200                value: field.name,
41201            },
41202            ...(fieldName !== field.name && { alias: { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME, value: fieldName } }),
41203            selectionSet: resolveSelectionSet({
41204                parent: type,
41205                type: namedType,
41206                models,
41207                firstCall,
41208                path: fieldPath,
41209                ancestors: [...ancestors, type],
41210                ignore,
41211                depthLimit,
41212                circularReferenceDepth,
41213                schema,
41214                depth: depth + 1,
41215                argNames,
41216                selectedFields,
41217            }) || undefined,
41218            arguments: args,
41219        };
41220    }
41221    return {
41222        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FIELD,
41223        name: {
41224            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
41225            value: field.name,
41226        },
41227        ...(fieldName !== field.name && { alias: { kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME, value: fieldName } }),
41228        arguments: args,
41229    };
41230}
41231function hasCircularRef(types, config = {
41232    depth: 1,
41233}) {
41234    const type = types[types.length - 1];
41235    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(type)) {
41236        return false;
41237    }
41238    const size = types.filter(t => t.name === type.name).length;
41239    return size > config.depth;
41240}
41241
41242var VisitSchemaKind;
41243(function (VisitSchemaKind) {
41244    VisitSchemaKind["TYPE"] = "VisitSchemaKind.TYPE";
41245    VisitSchemaKind["SCALAR_TYPE"] = "VisitSchemaKind.SCALAR_TYPE";
41246    VisitSchemaKind["ENUM_TYPE"] = "VisitSchemaKind.ENUM_TYPE";
41247    VisitSchemaKind["COMPOSITE_TYPE"] = "VisitSchemaKind.COMPOSITE_TYPE";
41248    VisitSchemaKind["OBJECT_TYPE"] = "VisitSchemaKind.OBJECT_TYPE";
41249    VisitSchemaKind["INPUT_OBJECT_TYPE"] = "VisitSchemaKind.INPUT_OBJECT_TYPE";
41250    VisitSchemaKind["ABSTRACT_TYPE"] = "VisitSchemaKind.ABSTRACT_TYPE";
41251    VisitSchemaKind["UNION_TYPE"] = "VisitSchemaKind.UNION_TYPE";
41252    VisitSchemaKind["INTERFACE_TYPE"] = "VisitSchemaKind.INTERFACE_TYPE";
41253    VisitSchemaKind["ROOT_OBJECT"] = "VisitSchemaKind.ROOT_OBJECT";
41254    VisitSchemaKind["QUERY"] = "VisitSchemaKind.QUERY";
41255    VisitSchemaKind["MUTATION"] = "VisitSchemaKind.MUTATION";
41256    VisitSchemaKind["SUBSCRIPTION"] = "VisitSchemaKind.SUBSCRIPTION";
41257})(VisitSchemaKind || (VisitSchemaKind = {}));
41258var MapperKind;
41259(function (MapperKind) {
41260    MapperKind["TYPE"] = "MapperKind.TYPE";
41261    MapperKind["SCALAR_TYPE"] = "MapperKind.SCALAR_TYPE";
41262    MapperKind["ENUM_TYPE"] = "MapperKind.ENUM_TYPE";
41263    MapperKind["COMPOSITE_TYPE"] = "MapperKind.COMPOSITE_TYPE";
41264    MapperKind["OBJECT_TYPE"] = "MapperKind.OBJECT_TYPE";
41265    MapperKind["INPUT_OBJECT_TYPE"] = "MapperKind.INPUT_OBJECT_TYPE";
41266    MapperKind["ABSTRACT_TYPE"] = "MapperKind.ABSTRACT_TYPE";
41267    MapperKind["UNION_TYPE"] = "MapperKind.UNION_TYPE";
41268    MapperKind["INTERFACE_TYPE"] = "MapperKind.INTERFACE_TYPE";
41269    MapperKind["ROOT_OBJECT"] = "MapperKind.ROOT_OBJECT";
41270    MapperKind["QUERY"] = "MapperKind.QUERY";
41271    MapperKind["MUTATION"] = "MapperKind.MUTATION";
41272    MapperKind["SUBSCRIPTION"] = "MapperKind.SUBSCRIPTION";
41273    MapperKind["DIRECTIVE"] = "MapperKind.DIRECTIVE";
41274    MapperKind["FIELD"] = "MapperKind.FIELD";
41275    MapperKind["COMPOSITE_FIELD"] = "MapperKind.COMPOSITE_FIELD";
41276    MapperKind["OBJECT_FIELD"] = "MapperKind.OBJECT_FIELD";
41277    MapperKind["ROOT_FIELD"] = "MapperKind.ROOT_FIELD";
41278    MapperKind["QUERY_ROOT_FIELD"] = "MapperKind.QUERY_ROOT_FIELD";
41279    MapperKind["MUTATION_ROOT_FIELD"] = "MapperKind.MUTATION_ROOT_FIELD";
41280    MapperKind["SUBSCRIPTION_ROOT_FIELD"] = "MapperKind.SUBSCRIPTION_ROOT_FIELD";
41281    MapperKind["INTERFACE_FIELD"] = "MapperKind.INTERFACE_FIELD";
41282    MapperKind["INPUT_OBJECT_FIELD"] = "MapperKind.INPUT_OBJECT_FIELD";
41283    MapperKind["ARGUMENT"] = "MapperKind.ARGUMENT";
41284    MapperKind["ENUM_VALUE"] = "MapperKind.ENUM_VALUE";
41285})(MapperKind || (MapperKind = {}));
41286
41287function createNamedStub(name, type) {
41288    let constructor;
41289    if (type === 'object') {
41290        constructor = graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"];
41291    }
41292    else if (type === 'interface') {
41293        constructor = graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInterfaceType */ "c"];
41294    }
41295    else {
41296        constructor = graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInputObjectType */ "b"];
41297    }
41298    return new constructor({
41299        name,
41300        fields: {
41301            _fake: {
41302                type: graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLString */ "e"],
41303            },
41304        },
41305    });
41306}
41307function createStub(node, type) {
41308    switch (node.kind) {
41309        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].LIST_TYPE:
41310            return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLList */ "d"](createStub(node.type, type));
41311        case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NON_NULL_TYPE:
41312            return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLNonNull */ "e"](createStub(node.type, type));
41313        default:
41314            if (type === 'output') {
41315                return createNamedStub(node.name.value, 'object');
41316            }
41317            return createNamedStub(node.name.value, 'input');
41318    }
41319}
41320function isNamedStub(type) {
41321    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type) || Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type) || Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
41322        const fields = type.getFields();
41323        const fieldNames = Object.keys(fields);
41324        return fieldNames.length === 1 && fields[fieldNames[0]].name === '_fake';
41325    }
41326    return false;
41327}
41328function getBuiltInForStub(type) {
41329    switch (type.name) {
41330        case graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLInt */ "d"].name:
41331            return graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLInt */ "d"];
41332        case graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLFloat */ "b"].name:
41333            return graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLFloat */ "b"];
41334        case graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLString */ "e"].name:
41335            return graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLString */ "e"];
41336        case graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLBoolean */ "a"].name:
41337            return graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLBoolean */ "a"];
41338        case graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLID */ "c"].name:
41339            return graphql__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLID */ "c"];
41340        default:
41341            return type;
41342    }
41343}
41344
41345function rewireTypes(originalTypeMap, directives) {
41346    const referenceTypeMap = Object.create(null);
41347    Object.keys(originalTypeMap).forEach(typeName => {
41348        referenceTypeMap[typeName] = originalTypeMap[typeName];
41349    });
41350    const newTypeMap = Object.create(null);
41351    Object.keys(referenceTypeMap).forEach(typeName => {
41352        const namedType = referenceTypeMap[typeName];
41353        if (namedType == null || typeName.startsWith('__')) {
41354            return;
41355        }
41356        const newName = namedType.name;
41357        if (newName.startsWith('__')) {
41358            return;
41359        }
41360        if (newTypeMap[newName] != null) {
41361            throw new Error(`Duplicate schema type name ${newName}`);
41362        }
41363        newTypeMap[newName] = namedType;
41364    });
41365    Object.keys(newTypeMap).forEach(typeName => {
41366        newTypeMap[typeName] = rewireNamedType(newTypeMap[typeName]);
41367    });
41368    const newDirectives = directives.map(directive => rewireDirective(directive));
41369    return {
41370        typeMap: newTypeMap,
41371        directives: newDirectives,
41372    };
41373    function rewireDirective(directive) {
41374        if (Object(graphql__WEBPACK_IMPORTED_MODULE_6__[/* isSpecifiedDirective */ "i"])(directive)) {
41375            return directive;
41376        }
41377        const directiveConfig = directive.toConfig();
41378        directiveConfig.args = rewireArgs(directiveConfig.args);
41379        return new graphql__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLDirective */ "c"](directiveConfig);
41380    }
41381    function rewireArgs(args) {
41382        const rewiredArgs = {};
41383        Object.keys(args).forEach(argName => {
41384            const arg = args[argName];
41385            const rewiredArgType = rewireType(arg.type);
41386            if (rewiredArgType != null) {
41387                arg.type = rewiredArgType;
41388                rewiredArgs[argName] = arg;
41389            }
41390        });
41391        return rewiredArgs;
41392    }
41393    function rewireNamedType(type) {
41394        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
41395            const config = type.toConfig();
41396            const newConfig = {
41397                ...config,
41398                fields: () => rewireFields(config.fields),
41399                interfaces: () => rewireNamedTypes(config.interfaces),
41400            };
41401            return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"](newConfig);
41402        }
41403        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
41404            const config = type.toConfig();
41405            const newConfig = {
41406                ...config,
41407                fields: () => rewireFields(config.fields),
41408            };
41409            if ('interfaces' in newConfig) {
41410                newConfig.interfaces = () => rewireNamedTypes(config.interfaces);
41411            }
41412            return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInterfaceType */ "c"](newConfig);
41413        }
41414        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
41415            const config = type.toConfig();
41416            const newConfig = {
41417                ...config,
41418                types: () => rewireNamedTypes(config.types),
41419            };
41420            return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLUnionType */ "h"](newConfig);
41421        }
41422        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
41423            const config = type.toConfig();
41424            const newConfig = {
41425                ...config,
41426                fields: () => rewireInputFields(config.fields),
41427            };
41428            return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInputObjectType */ "b"](newConfig);
41429        }
41430        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type)) {
41431            const enumConfig = type.toConfig();
41432            return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLEnumType */ "a"](enumConfig);
41433        }
41434        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(type)) {
41435            if (Object(graphql__WEBPACK_IMPORTED_MODULE_7__[/* isSpecifiedScalarType */ "f"])(type)) {
41436                return type;
41437            }
41438            const scalarConfig = type.toConfig();
41439            return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLScalarType */ "g"](scalarConfig);
41440        }
41441        throw new Error(`Unexpected schema type: ${type}`);
41442    }
41443    function rewireFields(fields) {
41444        const rewiredFields = {};
41445        Object.keys(fields).forEach(fieldName => {
41446            const field = fields[fieldName];
41447            const rewiredFieldType = rewireType(field.type);
41448            if (rewiredFieldType != null) {
41449                field.type = rewiredFieldType;
41450                field.args = rewireArgs(field.args);
41451                rewiredFields[fieldName] = field;
41452            }
41453        });
41454        return rewiredFields;
41455    }
41456    function rewireInputFields(fields) {
41457        const rewiredFields = {};
41458        Object.keys(fields).forEach(fieldName => {
41459            const field = fields[fieldName];
41460            const rewiredFieldType = rewireType(field.type);
41461            if (rewiredFieldType != null) {
41462                field.type = rewiredFieldType;
41463                rewiredFields[fieldName] = field;
41464            }
41465        });
41466        return rewiredFields;
41467    }
41468    function rewireNamedTypes(namedTypes) {
41469        const rewiredTypes = [];
41470        namedTypes.forEach(namedType => {
41471            const rewiredType = rewireType(namedType);
41472            if (rewiredType != null) {
41473                rewiredTypes.push(rewiredType);
41474            }
41475        });
41476        return rewiredTypes;
41477    }
41478    function rewireType(type) {
41479        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isListType */ "J"])(type)) {
41480            const rewiredType = rewireType(type.ofType);
41481            return rewiredType != null ? new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLList */ "d"](rewiredType) : null;
41482        }
41483        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNonNullType */ "L"])(type)) {
41484            const rewiredType = rewireType(type.ofType);
41485            return rewiredType != null ? new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLNonNull */ "e"](rewiredType) : null;
41486        }
41487        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNamedType */ "K"])(type)) {
41488            let rewiredType = referenceTypeMap[type.name];
41489            if (rewiredType === undefined) {
41490                rewiredType = isNamedStub(type) ? getBuiltInForStub(type) : rewireNamedType(type);
41491                newTypeMap[rewiredType.name] = referenceTypeMap[type.name] = rewiredType;
41492            }
41493            return rewiredType != null ? newTypeMap[rewiredType.name] : null;
41494        }
41495        return null;
41496    }
41497}
41498
41499function transformInputValue(type, value, inputLeafValueTransformer = null, inputObjectValueTransformer = null) {
41500    if (value == null) {
41501        return value;
41502    }
41503    const nullableType = Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNullableType */ "B"])(type);
41504    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isLeafType */ "I"])(nullableType)) {
41505        return inputLeafValueTransformer != null ? inputLeafValueTransformer(nullableType, value) : value;
41506    }
41507    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isListType */ "J"])(nullableType)) {
41508        return value.map((listMember) => transformInputValue(nullableType.ofType, listMember, inputLeafValueTransformer, inputObjectValueTransformer));
41509    }
41510    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(nullableType)) {
41511        const fields = nullableType.getFields();
41512        const newValue = {};
41513        Object.keys(value).forEach(key => {
41514            const field = fields[key];
41515            if (field != null) {
41516                newValue[key] = transformInputValue(field.type, value[key], inputLeafValueTransformer, inputObjectValueTransformer);
41517            }
41518        });
41519        return inputObjectValueTransformer != null ? inputObjectValueTransformer(nullableType, newValue) : newValue;
41520    }
41521    // unreachable, no other possible return value
41522}
41523function serializeInputValue(type, value) {
41524    return transformInputValue(type, value, (t, v) => t.serialize(v));
41525}
41526function parseInputValue(type, value) {
41527    return transformInputValue(type, value, (t, v) => t.parseValue(v));
41528}
41529function parseInputValueLiteral(type, value) {
41530    return transformInputValue(type, value, (t, v) => t.parseLiteral(v, {}));
41531}
41532
41533function mapSchema(schema, schemaMapper = {}) {
41534    const originalTypeMap = schema.getTypeMap();
41535    let newTypeMap = mapDefaultValues(originalTypeMap, schema, serializeInputValue);
41536    newTypeMap = mapTypes(newTypeMap, schema, schemaMapper, type => Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isLeafType */ "I"])(type));
41537    newTypeMap = mapEnumValues(newTypeMap, schema, schemaMapper);
41538    newTypeMap = mapDefaultValues(newTypeMap, schema, parseInputValue);
41539    newTypeMap = mapTypes(newTypeMap, schema, schemaMapper, type => !Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isLeafType */ "I"])(type));
41540    newTypeMap = mapFields(newTypeMap, schema, schemaMapper);
41541    newTypeMap = mapArguments(newTypeMap, schema, schemaMapper);
41542    const originalDirectives = schema.getDirectives();
41543    const newDirectives = mapDirectives(originalDirectives, schema, schemaMapper);
41544    const queryType = schema.getQueryType();
41545    const mutationType = schema.getMutationType();
41546    const subscriptionType = schema.getSubscriptionType();
41547    const newQueryTypeName = queryType != null ? (newTypeMap[queryType.name] != null ? newTypeMap[queryType.name].name : undefined) : undefined;
41548    const newMutationTypeName = mutationType != null
41549        ? newTypeMap[mutationType.name] != null
41550            ? newTypeMap[mutationType.name].name
41551            : undefined
41552        : undefined;
41553    const newSubscriptionTypeName = subscriptionType != null
41554        ? newTypeMap[subscriptionType.name] != null
41555            ? newTypeMap[subscriptionType.name].name
41556            : undefined
41557        : undefined;
41558    const { typeMap, directives } = rewireTypes(newTypeMap, newDirectives);
41559    return new graphql__WEBPACK_IMPORTED_MODULE_18__[/* GraphQLSchema */ "a"]({
41560        ...schema.toConfig(),
41561        query: newQueryTypeName ? typeMap[newQueryTypeName] : undefined,
41562        mutation: newMutationTypeName ? typeMap[newMutationTypeName] : undefined,
41563        subscription: newSubscriptionTypeName != null ? typeMap[newSubscriptionTypeName] : undefined,
41564        types: Object.keys(typeMap).map(typeName => typeMap[typeName]),
41565        directives,
41566    });
41567}
41568function mapTypes(originalTypeMap, schema, schemaMapper, testFn = () => true) {
41569    const newTypeMap = {};
41570    Object.keys(originalTypeMap).forEach(typeName => {
41571        if (!typeName.startsWith('__')) {
41572            const originalType = originalTypeMap[typeName];
41573            if (originalType == null || !testFn(originalType)) {
41574                newTypeMap[typeName] = originalType;
41575                return;
41576            }
41577            const typeMapper = getTypeMapper(schema, schemaMapper, typeName);
41578            if (typeMapper == null) {
41579                newTypeMap[typeName] = originalType;
41580                return;
41581            }
41582            const maybeNewType = typeMapper(originalType, schema);
41583            if (maybeNewType === undefined) {
41584                newTypeMap[typeName] = originalType;
41585                return;
41586            }
41587            newTypeMap[typeName] = maybeNewType;
41588        }
41589    });
41590    return newTypeMap;
41591}
41592function mapEnumValues(originalTypeMap, schema, schemaMapper) {
41593    const enumValueMapper = getEnumValueMapper(schemaMapper);
41594    if (!enumValueMapper) {
41595        return originalTypeMap;
41596    }
41597    return mapTypes(originalTypeMap, schema, {
41598        [MapperKind.ENUM_TYPE]: type => {
41599            const config = type.toConfig();
41600            const originalEnumValueConfigMap = config.values;
41601            const newEnumValueConfigMap = {};
41602            Object.keys(originalEnumValueConfigMap).forEach(externalValue => {
41603                const originalEnumValueConfig = originalEnumValueConfigMap[externalValue];
41604                const mappedEnumValue = enumValueMapper(originalEnumValueConfig, type.name, schema, externalValue);
41605                if (mappedEnumValue === undefined) {
41606                    newEnumValueConfigMap[externalValue] = originalEnumValueConfig;
41607                }
41608                else if (Array.isArray(mappedEnumValue)) {
41609                    const [newExternalValue, newEnumValueConfig] = mappedEnumValue;
41610                    newEnumValueConfigMap[newExternalValue] =
41611                        newEnumValueConfig === undefined ? originalEnumValueConfig : newEnumValueConfig;
41612                }
41613                else if (mappedEnumValue !== null) {
41614                    newEnumValueConfigMap[externalValue] = mappedEnumValue;
41615                }
41616            });
41617            return correctASTNodes(new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLEnumType */ "a"]({
41618                ...config,
41619                values: newEnumValueConfigMap,
41620            }));
41621        },
41622    }, type => Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type));
41623}
41624function mapDefaultValues(originalTypeMap, schema, fn) {
41625    const newTypeMap = mapArguments(originalTypeMap, schema, {
41626        [MapperKind.ARGUMENT]: argumentConfig => {
41627            if (argumentConfig.defaultValue === undefined) {
41628                return argumentConfig;
41629            }
41630            const maybeNewType = getNewType(originalTypeMap, argumentConfig.type);
41631            if (maybeNewType != null) {
41632                return {
41633                    ...argumentConfig,
41634                    defaultValue: fn(maybeNewType, argumentConfig.defaultValue),
41635                };
41636            }
41637        },
41638    });
41639    return mapFields(newTypeMap, schema, {
41640        [MapperKind.INPUT_OBJECT_FIELD]: inputFieldConfig => {
41641            if (inputFieldConfig.defaultValue === undefined) {
41642                return inputFieldConfig;
41643            }
41644            const maybeNewType = getNewType(newTypeMap, inputFieldConfig.type);
41645            if (maybeNewType != null) {
41646                return {
41647                    ...inputFieldConfig,
41648                    defaultValue: fn(maybeNewType, inputFieldConfig.defaultValue),
41649                };
41650            }
41651        },
41652    });
41653}
41654function getNewType(newTypeMap, type) {
41655    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isListType */ "J"])(type)) {
41656        const newType = getNewType(newTypeMap, type.ofType);
41657        return newType != null ? new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLList */ "d"](newType) : null;
41658    }
41659    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNonNullType */ "L"])(type)) {
41660        const newType = getNewType(newTypeMap, type.ofType);
41661        return newType != null ? new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLNonNull */ "e"](newType) : null;
41662    }
41663    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNamedType */ "K"])(type)) {
41664        const newType = newTypeMap[type.name];
41665        return newType != null ? newType : null;
41666    }
41667    return null;
41668}
41669function mapFields(originalTypeMap, schema, schemaMapper) {
41670    const newTypeMap = {};
41671    Object.keys(originalTypeMap).forEach(typeName => {
41672        if (!typeName.startsWith('__')) {
41673            const originalType = originalTypeMap[typeName];
41674            if (!Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(originalType) && !Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(originalType) && !Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(originalType)) {
41675                newTypeMap[typeName] = originalType;
41676                return;
41677            }
41678            const fieldMapper = getFieldMapper(schema, schemaMapper, typeName);
41679            if (fieldMapper == null) {
41680                newTypeMap[typeName] = originalType;
41681                return;
41682            }
41683            const config = originalType.toConfig();
41684            const originalFieldConfigMap = config.fields;
41685            const newFieldConfigMap = {};
41686            Object.keys(originalFieldConfigMap).forEach(fieldName => {
41687                const originalFieldConfig = originalFieldConfigMap[fieldName];
41688                const mappedField = fieldMapper(originalFieldConfig, fieldName, typeName, schema);
41689                if (mappedField === undefined) {
41690                    newFieldConfigMap[fieldName] = originalFieldConfig;
41691                }
41692                else if (Array.isArray(mappedField)) {
41693                    const [newFieldName, newFieldConfig] = mappedField;
41694                    if (newFieldConfig.astNode != null) {
41695                        newFieldConfig.astNode = {
41696                            ...newFieldConfig.astNode,
41697                            name: {
41698                                ...newFieldConfig.astNode.name,
41699                                value: newFieldName,
41700                            },
41701                        };
41702                    }
41703                    newFieldConfigMap[newFieldName] = newFieldConfig === undefined ? originalFieldConfig : newFieldConfig;
41704                }
41705                else if (mappedField !== null) {
41706                    newFieldConfigMap[fieldName] = mappedField;
41707                }
41708            });
41709            if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(originalType)) {
41710                newTypeMap[typeName] = correctASTNodes(new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"]({
41711                    ...config,
41712                    fields: newFieldConfigMap,
41713                }));
41714            }
41715            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(originalType)) {
41716                newTypeMap[typeName] = correctASTNodes(new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInterfaceType */ "c"]({
41717                    ...config,
41718                    fields: newFieldConfigMap,
41719                }));
41720            }
41721            else {
41722                newTypeMap[typeName] = correctASTNodes(new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInputObjectType */ "b"]({
41723                    ...config,
41724                    fields: newFieldConfigMap,
41725                }));
41726            }
41727        }
41728    });
41729    return newTypeMap;
41730}
41731function mapArguments(originalTypeMap, schema, schemaMapper) {
41732    const newTypeMap = {};
41733    Object.keys(originalTypeMap).forEach(typeName => {
41734        if (!typeName.startsWith('__')) {
41735            const originalType = originalTypeMap[typeName];
41736            if (!Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(originalType) && !Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(originalType)) {
41737                newTypeMap[typeName] = originalType;
41738                return;
41739            }
41740            const argumentMapper = getArgumentMapper(schemaMapper);
41741            if (argumentMapper == null) {
41742                newTypeMap[typeName] = originalType;
41743                return;
41744            }
41745            const config = originalType.toConfig();
41746            const originalFieldConfigMap = config.fields;
41747            const newFieldConfigMap = {};
41748            Object.keys(originalFieldConfigMap).forEach(fieldName => {
41749                const originalFieldConfig = originalFieldConfigMap[fieldName];
41750                const originalArgumentConfigMap = originalFieldConfig.args;
41751                if (originalArgumentConfigMap == null) {
41752                    newFieldConfigMap[fieldName] = originalFieldConfig;
41753                    return;
41754                }
41755                const argumentNames = Object.keys(originalArgumentConfigMap);
41756                if (!argumentNames.length) {
41757                    newFieldConfigMap[fieldName] = originalFieldConfig;
41758                    return;
41759                }
41760                const newArgumentConfigMap = {};
41761                argumentNames.forEach(argumentName => {
41762                    const originalArgumentConfig = originalArgumentConfigMap[argumentName];
41763                    const mappedArgument = argumentMapper(originalArgumentConfig, fieldName, typeName, schema);
41764                    if (mappedArgument === undefined) {
41765                        newArgumentConfigMap[argumentName] = originalArgumentConfig;
41766                    }
41767                    else if (Array.isArray(mappedArgument)) {
41768                        const [newArgumentName, newArgumentConfig] = mappedArgument;
41769                        newArgumentConfigMap[newArgumentName] = newArgumentConfig;
41770                    }
41771                    else if (mappedArgument !== null) {
41772                        newArgumentConfigMap[argumentName] = mappedArgument;
41773                    }
41774                });
41775                newFieldConfigMap[fieldName] = {
41776                    ...originalFieldConfig,
41777                    args: newArgumentConfigMap,
41778                };
41779            });
41780            if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(originalType)) {
41781                newTypeMap[typeName] = new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"]({
41782                    ...config,
41783                    fields: newFieldConfigMap,
41784                });
41785            }
41786            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(originalType)) {
41787                newTypeMap[typeName] = new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInterfaceType */ "c"]({
41788                    ...config,
41789                    fields: newFieldConfigMap,
41790                });
41791            }
41792            else {
41793                newTypeMap[typeName] = new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInputObjectType */ "b"]({
41794                    ...config,
41795                    fields: newFieldConfigMap,
41796                });
41797            }
41798        }
41799    });
41800    return newTypeMap;
41801}
41802function mapDirectives(originalDirectives, schema, schemaMapper) {
41803    const directiveMapper = getDirectiveMapper(schemaMapper);
41804    if (directiveMapper == null) {
41805        return originalDirectives.slice();
41806    }
41807    const newDirectives = [];
41808    originalDirectives.forEach(directive => {
41809        const mappedDirective = directiveMapper(directive, schema);
41810        if (mappedDirective === undefined) {
41811            newDirectives.push(directive);
41812        }
41813        else if (mappedDirective !== null) {
41814            newDirectives.push(mappedDirective);
41815        }
41816    });
41817    return newDirectives;
41818}
41819function getTypeSpecifiers(schema, typeName) {
41820    const type = schema.getType(typeName);
41821    const specifiers = [MapperKind.TYPE];
41822    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
41823        specifiers.push(MapperKind.COMPOSITE_TYPE, MapperKind.OBJECT_TYPE);
41824        const query = schema.getQueryType();
41825        const mutation = schema.getMutationType();
41826        const subscription = schema.getSubscriptionType();
41827        if (query != null && typeName === query.name) {
41828            specifiers.push(MapperKind.ROOT_OBJECT, MapperKind.QUERY);
41829        }
41830        else if (mutation != null && typeName === mutation.name) {
41831            specifiers.push(MapperKind.ROOT_OBJECT, MapperKind.MUTATION);
41832        }
41833        else if (subscription != null && typeName === subscription.name) {
41834            specifiers.push(MapperKind.ROOT_OBJECT, MapperKind.SUBSCRIPTION);
41835        }
41836    }
41837    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
41838        specifiers.push(MapperKind.INPUT_OBJECT_TYPE);
41839    }
41840    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
41841        specifiers.push(MapperKind.COMPOSITE_TYPE, MapperKind.ABSTRACT_TYPE, MapperKind.INTERFACE_TYPE);
41842    }
41843    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
41844        specifiers.push(MapperKind.COMPOSITE_TYPE, MapperKind.ABSTRACT_TYPE, MapperKind.UNION_TYPE);
41845    }
41846    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type)) {
41847        specifiers.push(MapperKind.ENUM_TYPE);
41848    }
41849    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(type)) {
41850        specifiers.push(MapperKind.SCALAR_TYPE);
41851    }
41852    return specifiers;
41853}
41854function getTypeMapper(schema, schemaMapper, typeName) {
41855    const specifiers = getTypeSpecifiers(schema, typeName);
41856    let typeMapper;
41857    const stack = [...specifiers];
41858    while (!typeMapper && stack.length > 0) {
41859        const next = stack.pop();
41860        typeMapper = schemaMapper[next];
41861    }
41862    return typeMapper != null ? typeMapper : null;
41863}
41864function getFieldSpecifiers(schema, typeName) {
41865    const type = schema.getType(typeName);
41866    const specifiers = [MapperKind.FIELD];
41867    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
41868        specifiers.push(MapperKind.COMPOSITE_FIELD, MapperKind.OBJECT_FIELD);
41869        const query = schema.getQueryType();
41870        const mutation = schema.getMutationType();
41871        const subscription = schema.getSubscriptionType();
41872        if (query != null && typeName === query.name) {
41873            specifiers.push(MapperKind.ROOT_FIELD, MapperKind.QUERY_ROOT_FIELD);
41874        }
41875        else if (mutation != null && typeName === mutation.name) {
41876            specifiers.push(MapperKind.ROOT_FIELD, MapperKind.MUTATION_ROOT_FIELD);
41877        }
41878        else if (subscription != null && typeName === subscription.name) {
41879            specifiers.push(MapperKind.ROOT_FIELD, MapperKind.SUBSCRIPTION_ROOT_FIELD);
41880        }
41881    }
41882    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
41883        specifiers.push(MapperKind.COMPOSITE_FIELD, MapperKind.INTERFACE_FIELD);
41884    }
41885    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
41886        specifiers.push(MapperKind.INPUT_OBJECT_FIELD);
41887    }
41888    return specifiers;
41889}
41890function getFieldMapper(schema, schemaMapper, typeName) {
41891    const specifiers = getFieldSpecifiers(schema, typeName);
41892    let fieldMapper;
41893    const stack = [...specifiers];
41894    while (!fieldMapper && stack.length > 0) {
41895        const next = stack.pop();
41896        fieldMapper = schemaMapper[next];
41897    }
41898    return fieldMapper != null ? fieldMapper : null;
41899}
41900function getArgumentMapper(schemaMapper) {
41901    const argumentMapper = schemaMapper[MapperKind.ARGUMENT];
41902    return argumentMapper != null ? argumentMapper : null;
41903}
41904function getDirectiveMapper(schemaMapper) {
41905    const directiveMapper = schemaMapper[MapperKind.DIRECTIVE];
41906    return directiveMapper != null ? directiveMapper : null;
41907}
41908function getEnumValueMapper(schemaMapper) {
41909    const enumValueMapper = schemaMapper[MapperKind.ENUM_VALUE];
41910    return enumValueMapper != null ? enumValueMapper : null;
41911}
41912function correctASTNodes(type) {
41913    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
41914        const config = type.toConfig();
41915        if (config.astNode != null) {
41916            const fields = [];
41917            Object.values(config.fields).forEach(fieldConfig => {
41918                if (fieldConfig.astNode != null) {
41919                    fields.push(fieldConfig.astNode);
41920                }
41921            });
41922            config.astNode = {
41923                ...config.astNode,
41924                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OBJECT_TYPE_DEFINITION,
41925                fields,
41926            };
41927        }
41928        if (config.extensionASTNodes != null) {
41929            config.extensionASTNodes = config.extensionASTNodes.map(node => ({
41930                ...node,
41931                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OBJECT_TYPE_EXTENSION,
41932                fields: undefined,
41933            }));
41934        }
41935        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"](config);
41936    }
41937    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
41938        const config = type.toConfig();
41939        if (config.astNode != null) {
41940            const fields = [];
41941            Object.values(config.fields).forEach(fieldConfig => {
41942                if (fieldConfig.astNode != null) {
41943                    fields.push(fieldConfig.astNode);
41944                }
41945            });
41946            config.astNode = {
41947                ...config.astNode,
41948                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INTERFACE_TYPE_DEFINITION,
41949                fields,
41950            };
41951        }
41952        if (config.extensionASTNodes != null) {
41953            config.extensionASTNodes = config.extensionASTNodes.map(node => ({
41954                ...node,
41955                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INTERFACE_TYPE_EXTENSION,
41956                fields: undefined,
41957            }));
41958        }
41959        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInterfaceType */ "c"](config);
41960    }
41961    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
41962        const config = type.toConfig();
41963        if (config.astNode != null) {
41964            const fields = [];
41965            Object.values(config.fields).forEach(fieldConfig => {
41966                if (fieldConfig.astNode != null) {
41967                    fields.push(fieldConfig.astNode);
41968                }
41969            });
41970            config.astNode = {
41971                ...config.astNode,
41972                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_OBJECT_TYPE_DEFINITION,
41973                fields,
41974            };
41975        }
41976        if (config.extensionASTNodes != null) {
41977            config.extensionASTNodes = config.extensionASTNodes.map(node => ({
41978                ...node,
41979                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_OBJECT_TYPE_EXTENSION,
41980                fields: undefined,
41981            }));
41982        }
41983        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInputObjectType */ "b"](config);
41984    }
41985    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type)) {
41986        const config = type.toConfig();
41987        if (config.astNode != null) {
41988            const values = [];
41989            Object.values(config.values).forEach(enumValueConfig => {
41990                if (enumValueConfig.astNode != null) {
41991                    values.push(enumValueConfig.astNode);
41992                }
41993            });
41994            config.astNode = {
41995                ...config.astNode,
41996                values,
41997            };
41998        }
41999        if (config.extensionASTNodes != null) {
42000            config.extensionASTNodes = config.extensionASTNodes.map(node => ({
42001                ...node,
42002                values: undefined,
42003            }));
42004        }
42005        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLEnumType */ "a"](config);
42006    }
42007    else {
42008        return type;
42009    }
42010}
42011
42012function filterSchema({ schema, typeFilter = () => true, fieldFilter = undefined, rootFieldFilter = undefined, objectFieldFilter = undefined, interfaceFieldFilter = undefined, inputObjectFieldFilter = undefined, argumentFilter = undefined, }) {
42013    const filteredSchema = mapSchema(schema, {
42014        [MapperKind.QUERY]: (type) => filterRootFields(type, 'Query', rootFieldFilter, argumentFilter),
42015        [MapperKind.MUTATION]: (type) => filterRootFields(type, 'Mutation', rootFieldFilter, argumentFilter),
42016        [MapperKind.SUBSCRIPTION]: (type) => filterRootFields(type, 'Subscription', rootFieldFilter, argumentFilter),
42017        [MapperKind.OBJECT_TYPE]: (type) => typeFilter(type.name, type)
42018            ? filterElementFields(graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"], type, objectFieldFilter || fieldFilter, argumentFilter)
42019            : null,
42020        [MapperKind.INTERFACE_TYPE]: (type) => typeFilter(type.name, type)
42021            ? filterElementFields(graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInterfaceType */ "c"], type, interfaceFieldFilter || fieldFilter, argumentFilter)
42022            : null,
42023        [MapperKind.INPUT_OBJECT_TYPE]: (type) => typeFilter(type.name, type)
42024            ? filterElementFields(graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInputObjectType */ "b"], type, inputObjectFieldFilter || fieldFilter)
42025            : null,
42026        [MapperKind.UNION_TYPE]: (type) => (typeFilter(type.name, type) ? undefined : null),
42027        [MapperKind.ENUM_TYPE]: (type) => (typeFilter(type.name, type) ? undefined : null),
42028        [MapperKind.SCALAR_TYPE]: (type) => (typeFilter(type.name, type) ? undefined : null),
42029    });
42030    return filteredSchema;
42031}
42032function filterRootFields(type, operation, rootFieldFilter, argumentFilter) {
42033    if (rootFieldFilter || argumentFilter) {
42034        const config = type.toConfig();
42035        Object.entries(config.fields).forEach(([fieldName, field]) => {
42036            if (rootFieldFilter && !rootFieldFilter(operation, fieldName, config.fields[fieldName])) {
42037                delete config.fields[fieldName];
42038            }
42039            else if (argumentFilter) {
42040                for (const argName of Object.keys(field.args)) {
42041                    if (!argumentFilter(operation, fieldName, argName, field.args[argName])) {
42042                        delete field.args[argName];
42043                    }
42044                }
42045            }
42046        });
42047        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"](config);
42048    }
42049    return type;
42050}
42051function filterElementFields(ElementConstructor, type, fieldFilter, argumentFilter) {
42052    if (fieldFilter || argumentFilter) {
42053        const config = type.toConfig();
42054        Object.entries(config.fields).forEach(([fieldName, field]) => {
42055            if (fieldFilter && !fieldFilter(type.name, fieldName, config.fields[fieldName])) {
42056                delete config.fields[fieldName];
42057            }
42058            else if (argumentFilter && 'args' in field) {
42059                for (const argName of Object.keys(field.args)) {
42060                    if (!argumentFilter(type.name, fieldName, argName, field.args[argName])) {
42061                        delete field.args[argName];
42062                    }
42063                }
42064            }
42065        });
42066        return new ElementConstructor(config);
42067    }
42068}
42069
42070function cloneDirective(directive) {
42071    return Object(graphql__WEBPACK_IMPORTED_MODULE_6__[/* isSpecifiedDirective */ "i"])(directive) ? directive : new graphql__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLDirective */ "c"](directive.toConfig());
42072}
42073function cloneType(type) {
42074    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
42075        const config = type.toConfig();
42076        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"]({
42077            ...config,
42078            interfaces: typeof config.interfaces === 'function' ? config.interfaces : config.interfaces.slice(),
42079        });
42080    }
42081    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
42082        const config = type.toConfig();
42083        const newConfig = {
42084            ...config,
42085            interfaces: [...((typeof config.interfaces === 'function' ? config.interfaces() : config.interfaces) || [])],
42086        };
42087        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInterfaceType */ "c"](newConfig);
42088    }
42089    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
42090        const config = type.toConfig();
42091        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLUnionType */ "h"]({
42092            ...config,
42093            types: config.types.slice(),
42094        });
42095    }
42096    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
42097        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInputObjectType */ "b"](type.toConfig());
42098    }
42099    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type)) {
42100        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLEnumType */ "a"](type.toConfig());
42101    }
42102    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(type)) {
42103        return Object(graphql__WEBPACK_IMPORTED_MODULE_7__[/* isSpecifiedScalarType */ "f"])(type) ? type : new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLScalarType */ "g"](type.toConfig());
42104    }
42105    throw new Error(`Invalid type ${type}`);
42106}
42107function cloneSchema(schema) {
42108    return mapSchema(schema);
42109}
42110
42111// Update any references to named schema types that disagree with the named
42112// types found in schema.getTypeMap().
42113//
42114// healSchema and its callers (visitSchema/visitSchemaDirectives) all modify the schema in place.
42115// Therefore, private variables (such as the stored implementation map and the proper root types)
42116// are not updated.
42117//
42118// If this causes issues, the schema could be more aggressively healed as follows:
42119//
42120// healSchema(schema);
42121// const config = schema.toConfig()
42122// const healedSchema = new GraphQLSchema({
42123//   ...config,
42124//   query: schema.getType('<desired new root query type name>'),
42125//   mutation: schema.getType('<desired new root mutation type name>'),
42126//   subscription: schema.getType('<desired new root subscription type name>'),
42127// });
42128//
42129// One can then also -- if necessary --  assign the correct private variables to the initial schema
42130// as follows:
42131// Object.assign(schema, healedSchema);
42132//
42133// These steps are not taken automatically to preserve backwards compatibility with graphql-tools v4.
42134// See https://github.com/ardatan/graphql-tools/issues/1462
42135//
42136// They were briefly taken in v5, but can now be phased out as they were only required when other
42137// areas of the codebase were using healSchema and visitSchema more extensively.
42138//
42139function healSchema(schema) {
42140    healTypes(schema.getTypeMap(), schema.getDirectives());
42141    return schema;
42142}
42143function healTypes(originalTypeMap, directives) {
42144    const actualNamedTypeMap = Object.create(null);
42145    // If any of the .name properties of the GraphQLNamedType objects in
42146    // schema.getTypeMap() have changed, the keys of the type map need to
42147    // be updated accordingly.
42148    Object.entries(originalTypeMap).forEach(([typeName, namedType]) => {
42149        if (namedType == null || typeName.startsWith('__')) {
42150            return;
42151        }
42152        const actualName = namedType.name;
42153        if (actualName.startsWith('__')) {
42154            return;
42155        }
42156        if (actualName in actualNamedTypeMap) {
42157            throw new Error(`Duplicate schema type name ${actualName}`);
42158        }
42159        actualNamedTypeMap[actualName] = namedType;
42160        // Note: we are deliberately leaving namedType in the schema by its
42161        // original name (which might be different from actualName), so that
42162        // references by that name can be healed.
42163    });
42164    // Now add back every named type by its actual name.
42165    Object.entries(actualNamedTypeMap).forEach(([typeName, namedType]) => {
42166        originalTypeMap[typeName] = namedType;
42167    });
42168    // Directive declaration argument types can refer to named types.
42169    directives.forEach((decl) => {
42170        decl.args = decl.args.filter(arg => {
42171            arg.type = healType(arg.type);
42172            return arg.type !== null;
42173        });
42174    });
42175    Object.entries(originalTypeMap).forEach(([typeName, namedType]) => {
42176        // Heal all named types, except for dangling references, kept only to redirect.
42177        if (!typeName.startsWith('__') && typeName in actualNamedTypeMap) {
42178            if (namedType != null) {
42179                healNamedType(namedType);
42180            }
42181        }
42182    });
42183    for (const typeName of Object.keys(originalTypeMap)) {
42184        if (!typeName.startsWith('__') && !(typeName in actualNamedTypeMap)) {
42185            delete originalTypeMap[typeName];
42186        }
42187    }
42188    function healNamedType(type) {
42189        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
42190            healFields(type);
42191            healInterfaces(type);
42192            return;
42193        }
42194        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
42195            healFields(type);
42196            if ('getInterfaces' in type) {
42197                healInterfaces(type);
42198            }
42199            return;
42200        }
42201        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
42202            healUnderlyingTypes(type);
42203            return;
42204        }
42205        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
42206            healInputFields(type);
42207            return;
42208        }
42209        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isLeafType */ "I"])(type)) {
42210            return;
42211        }
42212        throw new Error(`Unexpected schema type: ${type}`);
42213    }
42214    function healFields(type) {
42215        const fieldMap = type.getFields();
42216        for (const [key, field] of Object.entries(fieldMap)) {
42217            field.args
42218                .map(arg => {
42219                arg.type = healType(arg.type);
42220                return arg.type === null ? null : arg;
42221            })
42222                .filter(Boolean);
42223            field.type = healType(field.type);
42224            if (field.type === null) {
42225                delete fieldMap[key];
42226            }
42227        }
42228    }
42229    function healInterfaces(type) {
42230        if ('getInterfaces' in type) {
42231            const interfaces = type.getInterfaces();
42232            interfaces.push(...interfaces
42233                .splice(0)
42234                .map(iface => healType(iface))
42235                .filter(Boolean));
42236        }
42237    }
42238    function healInputFields(type) {
42239        const fieldMap = type.getFields();
42240        for (const [key, field] of Object.entries(fieldMap)) {
42241            field.type = healType(field.type);
42242            if (field.type === null) {
42243                delete fieldMap[key];
42244            }
42245        }
42246    }
42247    function healUnderlyingTypes(type) {
42248        const types = type.getTypes();
42249        types.push(...types
42250            .splice(0)
42251            .map(t => healType(t))
42252            .filter(Boolean));
42253    }
42254    function healType(type) {
42255        // Unwrap the two known wrapper types
42256        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isListType */ "J"])(type)) {
42257            const healedType = healType(type.ofType);
42258            return healedType != null ? new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLList */ "d"](healedType) : null;
42259        }
42260        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNonNullType */ "L"])(type)) {
42261            const healedType = healType(type.ofType);
42262            return healedType != null ? new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLNonNull */ "e"](healedType) : null;
42263        }
42264        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNamedType */ "K"])(type)) {
42265            // If a type annotation on a field or an argument or a union member is
42266            // any `GraphQLNamedType` with a `name`, then it must end up identical
42267            // to `schema.getType(name)`, since `schema.getTypeMap()` is the source
42268            // of truth for all named schema types.
42269            // Note that new types can still be simply added by adding a field, as
42270            // the official type will be undefined, not null.
42271            const officialType = originalTypeMap[type.name];
42272            if (officialType && type !== officialType) {
42273                return officialType;
42274            }
42275        }
42276        return type;
42277    }
42278}
42279
42280// Abstract base class of any visitor implementation, defining the available
42281// visitor methods along with their parameter types, and providing a static
42282// helper function for determining whether a subclass implements a given
42283// visitor method, as opposed to inheriting one of the stubs defined here.
42284class SchemaVisitor {
42285    // Determine if this SchemaVisitor (sub)class implements a particular
42286    // visitor method.
42287    static implementsVisitorMethod(methodName) {
42288        if (!methodName.startsWith('visit')) {
42289            return false;
42290        }
42291        const method = this.prototype[methodName];
42292        if (typeof method !== 'function') {
42293            return false;
42294        }
42295        if (this.name === 'SchemaVisitor') {
42296            // The SchemaVisitor class implements every visitor method.
42297            return true;
42298        }
42299        const stub = SchemaVisitor.prototype[methodName];
42300        if (method === stub) {
42301            // If this.prototype[methodName] was just inherited from SchemaVisitor,
42302            // then this class does not really implement the method.
42303            return false;
42304        }
42305        return true;
42306    }
42307    // Concrete subclasses of SchemaVisitor should override one or more of these
42308    // visitor methods, in order to express their interest in handling certain
42309    // schema types/locations. Each method may return null to remove the given
42310    // type from the schema, a non-null value of the same type to update the
42311    // type in the schema, or nothing to leave the type as it was.
42312    // eslint-disable-next-line @typescript-eslint/no-empty-function
42313    visitSchema(_schema) { }
42314    visitScalar(_scalar
42315    // eslint-disable-next-line @typescript-eslint/no-empty-function
42316    ) { }
42317    visitObject(_object
42318    // eslint-disable-next-line @typescript-eslint/no-empty-function
42319    ) { }
42320    visitFieldDefinition(_field, _details
42321    // eslint-disable-next-line @typescript-eslint/no-empty-function
42322    ) { }
42323    visitArgumentDefinition(_argument, _details
42324    // eslint-disable-next-line @typescript-eslint/no-empty-function
42325    ) { }
42326    visitInterface(_iface
42327    // eslint-disable-next-line @typescript-eslint/no-empty-function
42328    ) { }
42329    // eslint-disable-next-line @typescript-eslint/no-empty-function
42330    visitUnion(_union) { }
42331    // eslint-disable-next-line @typescript-eslint/no-empty-function
42332    visitEnum(_type) { }
42333    visitEnumValue(_value, _details
42334    // eslint-disable-next-line @typescript-eslint/no-empty-function
42335    ) { }
42336    visitInputObject(_object
42337    // eslint-disable-next-line @typescript-eslint/no-empty-function
42338    ) { }
42339    visitInputFieldDefinition(_field, _details
42340    // eslint-disable-next-line @typescript-eslint/no-empty-function
42341    ) { }
42342}
42343
42344function isSchemaVisitor(obj) {
42345    if ('schema' in obj && Object(graphql__WEBPACK_IMPORTED_MODULE_18__[/* isSchema */ "c"])(obj.schema)) {
42346        if ('visitSchema' in obj && typeof obj.visitSchema === 'function') {
42347            return true;
42348        }
42349    }
42350    return false;
42351}
42352// Generic function for visiting GraphQLSchema objects.
42353function visitSchema(schema, 
42354// To accommodate as many different visitor patterns as possible, the
42355// visitSchema function does not simply accept a single instance of the
42356// SchemaVisitor class, but instead accepts a function that takes the
42357// current VisitableSchemaType object and the name of a visitor method and
42358// returns an array of SchemaVisitor instances that implement the visitor
42359// method and have an interest in handling the given VisitableSchemaType
42360// object. In the simplest case, this function can always return an array
42361// containing a single visitor object, without even looking at the type or
42362// methodName parameters. In other cases, this function might sometimes
42363// return an empty array to indicate there are no visitors that should be
42364// applied to the given VisitableSchemaType object. For an example of a
42365// visitor pattern that benefits from this abstraction, see the
42366// SchemaDirectiveVisitor class below.
42367visitorOrVisitorSelector) {
42368    const visitorSelector = typeof visitorOrVisitorSelector === 'function' ? visitorOrVisitorSelector : () => visitorOrVisitorSelector;
42369    // Helper function that calls visitorSelector and applies the resulting
42370    // visitors to the given type, with arguments [type, ...args].
42371    function callMethod(methodName, type, ...args) {
42372        let visitors = visitorSelector(type, methodName);
42373        visitors = Array.isArray(visitors) ? visitors : [visitors];
42374        let finalType = type;
42375        visitors.every(visitorOrVisitorDef => {
42376            let newType;
42377            if (isSchemaVisitor(visitorOrVisitorDef)) {
42378                newType = visitorOrVisitorDef[methodName](finalType, ...args);
42379            }
42380            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNamedType */ "K"])(finalType) &&
42381                (methodName === 'visitScalar' ||
42382                    methodName === 'visitEnum' ||
42383                    methodName === 'visitObject' ||
42384                    methodName === 'visitInputObject' ||
42385                    methodName === 'visitUnion' ||
42386                    methodName === 'visitInterface')) {
42387                const specifiers = getTypeSpecifiers$1(finalType, schema);
42388                const typeVisitor = getVisitor(visitorOrVisitorDef, specifiers);
42389                newType = typeVisitor != null ? typeVisitor(finalType, schema) : undefined;
42390            }
42391            if (typeof newType === 'undefined') {
42392                // Keep going without modifying type.
42393                return true;
42394            }
42395            if (methodName === 'visitSchema' || Object(graphql__WEBPACK_IMPORTED_MODULE_18__[/* isSchema */ "c"])(finalType)) {
42396                throw new Error(`Method ${methodName} cannot replace schema with ${newType}`);
42397            }
42398            if (newType === null) {
42399                // Stop the loop and return null form callMethod, which will cause
42400                // the type to be removed from the schema.
42401                finalType = null;
42402                return false;
42403            }
42404            // Update type to the new type returned by the visitor method, so that
42405            // later directives will see the new type, and callMethod will return
42406            // the final type.
42407            finalType = newType;
42408            return true;
42409        });
42410        // If there were no directives for this type object, or if all visitor
42411        // methods returned nothing, type will be returned unmodified.
42412        return finalType;
42413    }
42414    // Recursive helper function that calls any appropriate visitor methods for
42415    // each object in the schema, then traverses the object's children (if any).
42416    function visit(type) {
42417        if (Object(graphql__WEBPACK_IMPORTED_MODULE_18__[/* isSchema */ "c"])(type)) {
42418            // Unlike the other types, the root GraphQLSchema object cannot be
42419            // replaced by visitor methods, because that would make life very hard
42420            // for SchemaVisitor subclasses that rely on the original schema object.
42421            callMethod('visitSchema', type);
42422            const typeMap = type.getTypeMap();
42423            Object.entries(typeMap).forEach(([typeName, namedType]) => {
42424                if (!typeName.startsWith('__') && namedType != null) {
42425                    // Call visit recursively to let it determine which concrete
42426                    // subclass of GraphQLNamedType we found in the type map.
42427                    // We do not use updateEachKey because we want to preserve
42428                    // deleted types in the typeMap so that other types that reference
42429                    // the deleted types can be healed.
42430                    typeMap[typeName] = visit(namedType);
42431                }
42432            });
42433            return type;
42434        }
42435        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
42436            // Note that callMethod('visitObject', type) may not actually call any
42437            // methods, if there are no @directive annotations associated with this
42438            // type, or if this SchemaDirectiveVisitor subclass does not override
42439            // the visitObject method.
42440            const newObject = callMethod('visitObject', type);
42441            if (newObject != null) {
42442                visitFields(newObject);
42443            }
42444            return newObject;
42445        }
42446        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
42447            const newInterface = callMethod('visitInterface', type);
42448            if (newInterface != null) {
42449                visitFields(newInterface);
42450            }
42451            return newInterface;
42452        }
42453        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
42454            const newInputObject = callMethod('visitInputObject', type);
42455            if (newInputObject != null) {
42456                const fieldMap = newInputObject.getFields();
42457                for (const key of Object.keys(fieldMap)) {
42458                    fieldMap[key] = callMethod('visitInputFieldDefinition', fieldMap[key], {
42459                        // Since we call a different method for input object fields, we
42460                        // can't reuse the visitFields function here.
42461                        objectType: newInputObject,
42462                    });
42463                    if (!fieldMap[key]) {
42464                        delete fieldMap[key];
42465                    }
42466                }
42467            }
42468            return newInputObject;
42469        }
42470        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(type)) {
42471            return callMethod('visitScalar', type);
42472        }
42473        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
42474            return callMethod('visitUnion', type);
42475        }
42476        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type)) {
42477            let newEnum = callMethod('visitEnum', type);
42478            if (newEnum != null) {
42479                const newValues = newEnum
42480                    .getValues()
42481                    .map(value => callMethod('visitEnumValue', value, {
42482                    enumType: newEnum,
42483                }))
42484                    .filter(Boolean);
42485                // Recreate the enum type if any of the values changed
42486                const valuesUpdated = newValues.some((value, index) => value !== newEnum.getValues()[index]);
42487                if (valuesUpdated) {
42488                    newEnum = new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLEnumType */ "a"]({
42489                        ...newEnum.toConfig(),
42490                        values: newValues.reduce((prev, value) => ({
42491                            ...prev,
42492                            [value.name]: {
42493                                value: value.value,
42494                                deprecationReason: value.deprecationReason,
42495                                description: value.description,
42496                                astNode: value.astNode,
42497                            },
42498                        }), {}),
42499                    });
42500                }
42501            }
42502            return newEnum;
42503        }
42504        throw new Error(`Unexpected schema type: ${type}`);
42505    }
42506    function visitFields(type) {
42507        const fieldMap = type.getFields();
42508        for (const [key, field] of Object.entries(fieldMap)) {
42509            // It would be nice if we could call visit(field) recursively here, but
42510            // GraphQLField is merely a type, not a value that can be detected using
42511            // an instanceof check, so we have to visit the fields in this lexical
42512            // context, so that TypeScript can validate the call to
42513            // visitFieldDefinition.
42514            const newField = callMethod('visitFieldDefinition', field, {
42515                // While any field visitor needs a reference to the field object, some
42516                // field visitors may also need to know the enclosing (parent) type,
42517                // perhaps to determine if the parent is a GraphQLObjectType or a
42518                // GraphQLInterfaceType. To obtain a reference to the parent, a
42519                // visitor method can have a second parameter, which will be an object
42520                // with an .objectType property referring to the parent.
42521                objectType: type,
42522            });
42523            if ((newField === null || newField === void 0 ? void 0 : newField.args) != null) {
42524                newField.args = newField.args
42525                    .map(arg => callMethod('visitArgumentDefinition', arg, {
42526                    // Like visitFieldDefinition, visitArgumentDefinition takes a
42527                    // second parameter that provides additional context, namely the
42528                    // parent .field and grandparent .objectType. Remember that the
42529                    // current GraphQLSchema is always available via this.schema.
42530                    field: newField,
42531                    objectType: type,
42532                }))
42533                    .filter(Boolean);
42534            }
42535            // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
42536            if (newField) {
42537                fieldMap[key] = newField;
42538            }
42539            else {
42540                delete fieldMap[key];
42541            }
42542        }
42543    }
42544    visit(schema);
42545    // Automatically update any references to named schema types replaced
42546    // during the traversal, so implementers don't have to worry about that.
42547    healSchema(schema);
42548    // Return schema for convenience, even though schema parameter has all updated types.
42549    return schema;
42550}
42551function getTypeSpecifiers$1(type, schema) {
42552    const specifiers = [VisitSchemaKind.TYPE];
42553    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
42554        specifiers.push(VisitSchemaKind.COMPOSITE_TYPE, VisitSchemaKind.OBJECT_TYPE);
42555        const query = schema.getQueryType();
42556        const mutation = schema.getMutationType();
42557        const subscription = schema.getSubscriptionType();
42558        if (type === query) {
42559            specifiers.push(VisitSchemaKind.ROOT_OBJECT, VisitSchemaKind.QUERY);
42560        }
42561        else if (type === mutation) {
42562            specifiers.push(VisitSchemaKind.ROOT_OBJECT, VisitSchemaKind.MUTATION);
42563        }
42564        else if (type === subscription) {
42565            specifiers.push(VisitSchemaKind.ROOT_OBJECT, VisitSchemaKind.SUBSCRIPTION);
42566        }
42567    }
42568    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputType */ "G"])(type)) {
42569        specifiers.push(VisitSchemaKind.INPUT_OBJECT_TYPE);
42570    }
42571    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
42572        specifiers.push(VisitSchemaKind.COMPOSITE_TYPE, VisitSchemaKind.ABSTRACT_TYPE, VisitSchemaKind.INTERFACE_TYPE);
42573    }
42574    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
42575        specifiers.push(VisitSchemaKind.COMPOSITE_TYPE, VisitSchemaKind.ABSTRACT_TYPE, VisitSchemaKind.UNION_TYPE);
42576    }
42577    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type)) {
42578        specifiers.push(VisitSchemaKind.ENUM_TYPE);
42579    }
42580    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(type)) {
42581        specifiers.push(VisitSchemaKind.SCALAR_TYPE);
42582    }
42583    return specifiers;
42584}
42585function getVisitor(visitorDef, specifiers) {
42586    let typeVisitor;
42587    const stack = [...specifiers];
42588    while (!typeVisitor && stack.length > 0) {
42589        const next = stack.pop();
42590        typeVisitor = visitorDef[next];
42591    }
42592    return typeVisitor != null ? typeVisitor : null;
42593}
42594
42595// This class represents a reusable implementation of a @directive that may
42596// appear in a GraphQL schema written in Schema Definition Language.
42597//
42598// By overriding one or more visit{Object,Union,...} methods, a subclass
42599// registers interest in certain schema types, such as GraphQLObjectType,
42600// GraphQLUnionType, etc. When SchemaDirectiveVisitor.visitSchemaDirectives is
42601// called with a GraphQLSchema object and a map of visitor subclasses, the
42602// overridden methods of those subclasses allow the visitors to obtain
42603// references to any type objects that have @directives attached to them,
42604// enabling visitors to inspect or modify the schema as appropriate.
42605//
42606// For example, if a directive called @rest(url: "...") appears after a field
42607// definition, a SchemaDirectiveVisitor subclass could provide meaning to that
42608// directive by overriding the visitFieldDefinition method (which receives a
42609// GraphQLField parameter), and then the body of that visitor method could
42610// manipulate the field's resolver function to fetch data from a REST endpoint
42611// described by the url argument passed to the @rest directive:
42612//
42613//   const typeDefs = `
42614//   type Query {
42615//     people: [Person] @rest(url: "/api/v1/people")
42616//   }`;
42617//
42618//   const schema = makeExecutableSchema({ typeDefs });
42619//
42620//   SchemaDirectiveVisitor.visitSchemaDirectives(schema, {
42621//     rest: class extends SchemaDirectiveVisitor {
42622//       public visitFieldDefinition(field: GraphQLField<any, any>) {
42623//         const { url } = this.args;
42624//         field.resolve = () => fetch(url);
42625//       }
42626//     }
42627//   });
42628//
42629// The subclass in this example is defined as an anonymous class expression,
42630// for brevity. A truly reusable SchemaDirectiveVisitor would most likely be
42631// defined in a library using a named class declaration, and then exported for
42632// consumption by other modules and packages.
42633//
42634// See below for a complete list of overridable visitor methods, their
42635// parameter types, and more details about the properties exposed by instances
42636// of the SchemaDirectiveVisitor class.
42637class SchemaDirectiveVisitor extends SchemaVisitor {
42638    // Mark the constructor protected to enforce passing SchemaDirectiveVisitor
42639    // subclasses (not instances) to visitSchemaDirectives.
42640    constructor(config) {
42641        super();
42642        this.name = config.name;
42643        this.args = config.args;
42644        this.visitedType = config.visitedType;
42645        this.schema = config.schema;
42646        this.context = config.context;
42647    }
42648    // Override this method to return a custom GraphQLDirective (or modify one
42649    // already present in the schema) to enforce argument types, provide default
42650    // argument values, or specify schema locations where this @directive may
42651    // appear. By default, any declaration found in the schema will be returned.
42652    static getDirectiveDeclaration(directiveName, schema) {
42653        return schema.getDirective(directiveName);
42654    }
42655    // Call SchemaDirectiveVisitor.visitSchemaDirectives to visit every
42656    // @directive in the schema and create an appropriate SchemaDirectiveVisitor
42657    // instance to visit the object decorated by the @directive.
42658    static visitSchemaDirectives(schema, 
42659    // The keys of this object correspond to directive names as they appear
42660    // in the schema, and the values should be subclasses (not instances!)
42661    // of the SchemaDirectiveVisitor class. This distinction is important
42662    // because a new SchemaDirectiveVisitor instance will be created each
42663    // time a matching directive is found in the schema AST, with arguments
42664    // and other metadata specific to that occurrence. To help prevent the
42665    // mistake of passing instances, the SchemaDirectiveVisitor constructor
42666    // method is marked as protected.
42667    directiveVisitors, 
42668    // Optional context object that will be available to all visitor instances
42669    // via this.context. Defaults to an empty null-prototype object.
42670    context = Object.create(null), 
42671    // The visitSchemaDirectives method returns a map from directive names to
42672    // lists of SchemaDirectiveVisitors created while visiting the schema.
42673    pathToDirectivesInExtensions = ['directives']) {
42674        // If the schema declares any directives for public consumption, record
42675        // them here so that we can properly coerce arguments when/if we encounter
42676        // an occurrence of the directive while walking the schema below.
42677        const declaredDirectives = this.getDeclaredDirectives(schema, directiveVisitors);
42678        // Map from directive names to lists of SchemaDirectiveVisitor instances
42679        // created while visiting the schema.
42680        const createdVisitors = Object.keys(directiveVisitors).reduce((prev, item) => ({
42681            ...prev,
42682            [item]: [],
42683        }), {});
42684        const directiveVisitorMap = Object.entries(directiveVisitors).reduce((prev, [key, value]) => ({
42685            ...prev,
42686            [key]: value,
42687        }), {});
42688        function visitorSelector(type, methodName) {
42689            var _a, _b;
42690            const directivesInExtensions = pathToDirectivesInExtensions.reduce((acc, pathSegment) => (acc == null ? acc : acc[pathSegment]), type === null || type === void 0 ? void 0 : type.extensions);
42691            const directives = Object.create(null);
42692            if (directivesInExtensions != null) {
42693                Object.entries(directivesInExtensions).forEach(([directiveName, directiveValue]) => {
42694                    if (!directives[directiveName]) {
42695                        directives[directiveName] = [directiveValue];
42696                    }
42697                    else {
42698                        directives[directiveName].push([directiveValue]);
42699                    }
42700                });
42701            }
42702            else {
42703                let directiveNodes = (_b = (_a = type === null || type === void 0 ? void 0 : type.astNode) === null || _a === void 0 ? void 0 : _a.directives) !== null && _b !== void 0 ? _b : [];
42704                const extensionASTNodes = type.extensionASTNodes;
42705                if (extensionASTNodes != null) {
42706                    extensionASTNodes.forEach(extensionASTNode => {
42707                        if (extensionASTNode.directives != null) {
42708                            directiveNodes = directiveNodes.concat(extensionASTNode.directives);
42709                        }
42710                    });
42711                }
42712                directiveNodes.forEach(directiveNode => {
42713                    const directiveName = directiveNode.name.value;
42714                    const decl = declaredDirectives[directiveName];
42715                    let args;
42716                    if (decl != null) {
42717                        // If this directive was explicitly declared, use the declared
42718                        // argument types (and any default values) to check, coerce, and/or
42719                        // supply default values for the given arguments.
42720                        args = getArgumentValues(decl, directiveNode);
42721                    }
42722                    else {
42723                        // If this directive was not explicitly declared, just convert the
42724                        // argument nodes to their corresponding JavaScript values.
42725                        args = Object.create(null);
42726                        if (directiveNode.arguments != null) {
42727                            directiveNode.arguments.forEach(arg => {
42728                                args[arg.name.value] = Object(graphql__WEBPACK_IMPORTED_MODULE_19__[/* valueFromASTUntyped */ "a"])(arg.value);
42729                            });
42730                        }
42731                    }
42732                    if (!directives[directiveName]) {
42733                        directives[directiveName] = [args];
42734                    }
42735                    else {
42736                        directives[directiveName].push(args);
42737                    }
42738                });
42739            }
42740            const visitors = [];
42741            Object.entries(directives).forEach(([directiveName, directiveValues]) => {
42742                if (!(directiveName in directiveVisitorMap)) {
42743                    return;
42744                }
42745                const VisitorClass = directiveVisitorMap[directiveName];
42746                // Avoid creating visitor objects if visitorClass does not override
42747                // the visitor method named by methodName.
42748                if (!VisitorClass.implementsVisitorMethod(methodName)) {
42749                    return;
42750                }
42751                directiveValues.forEach(directiveValue => {
42752                    // As foretold in comments near the top of the visitSchemaDirectives
42753                    // method, this is where instances of the SchemaDirectiveVisitor class
42754                    // get created and assigned names. While subclasses could override the
42755                    // constructor method, the constructor is marked as protected, so
42756                    // these are the only arguments that will ever be passed.
42757                    visitors.push(new VisitorClass({
42758                        name: directiveName,
42759                        args: directiveValue,
42760                        visitedType: type,
42761                        schema,
42762                        context,
42763                    }));
42764                });
42765            });
42766            if (visitors.length > 0) {
42767                visitors.forEach(visitor => {
42768                    createdVisitors[visitor.name].push(visitor);
42769                });
42770            }
42771            return visitors;
42772        }
42773        visitSchema(schema, visitorSelector);
42774        return createdVisitors;
42775    }
42776    static getDeclaredDirectives(schema, directiveVisitors) {
42777        const declaredDirectives = schema.getDirectives().reduce((prev, curr) => ({
42778            ...prev,
42779            [curr.name]: curr,
42780        }), {});
42781        // If the visitor subclass overrides getDirectiveDeclaration, and it
42782        // returns a non-null GraphQLDirective, use that instead of any directive
42783        // declared in the schema itself. Reasoning: if a SchemaDirectiveVisitor
42784        // goes to the trouble of implementing getDirectiveDeclaration, it should
42785        // be able to rely on that implementation.
42786        Object.entries(directiveVisitors).forEach(([directiveName, visitorClass]) => {
42787            const decl = visitorClass.getDirectiveDeclaration(directiveName, schema);
42788            if (decl != null) {
42789                declaredDirectives[directiveName] = decl;
42790            }
42791        });
42792        Object.entries(declaredDirectives).forEach(([name, decl]) => {
42793            if (!(name in directiveVisitors)) {
42794                // SchemaDirectiveVisitors.visitSchemaDirectives might be called
42795                // multiple times with partial directiveVisitors maps, so it's not
42796                // necessarily an error for directiveVisitors to be missing an
42797                // implementation of a directive that was declared in the schema.
42798                return;
42799            }
42800            const visitorClass = directiveVisitors[name];
42801            decl.locations.forEach(loc => {
42802                const visitorMethodName = directiveLocationToVisitorMethodName(loc);
42803                if (SchemaVisitor.implementsVisitorMethod(visitorMethodName) &&
42804                    !visitorClass.implementsVisitorMethod(visitorMethodName)) {
42805                    // While visitor subclasses may implement extra visitor methods,
42806                    // it's definitely a mistake if the GraphQLDirective declares itself
42807                    // applicable to certain schema locations, and the visitor subclass
42808                    // does not implement all the corresponding methods.
42809                    throw new Error(`SchemaDirectiveVisitor for @${name} must implement ${visitorMethodName} method`);
42810                }
42811            });
42812        });
42813        return declaredDirectives;
42814    }
42815}
42816// Convert a string like "FIELD_DEFINITION" to "visitFieldDefinition".
42817function directiveLocationToVisitorMethodName(loc) {
42818    return ('visit' +
42819        loc.replace(/([^_]*)_?/g, (_wholeMatch, part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase()));
42820}
42821
42822function getResolversFromSchema(schema) {
42823    const resolvers = Object.create({});
42824    const typeMap = schema.getTypeMap();
42825    Object.keys(typeMap).forEach(typeName => {
42826        if (!typeName.startsWith('__')) {
42827            const type = typeMap[typeName];
42828            if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(type)) {
42829                if (!Object(graphql__WEBPACK_IMPORTED_MODULE_7__[/* isSpecifiedScalarType */ "f"])(type)) {
42830                    const config = type.toConfig();
42831                    delete config.astNode; // avoid AST duplication elsewhere
42832                    resolvers[typeName] = new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLScalarType */ "g"](config);
42833                }
42834            }
42835            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type)) {
42836                resolvers[typeName] = {};
42837                const values = type.getValues();
42838                values.forEach(value => {
42839                    resolvers[typeName][value.name] = value.value;
42840                });
42841            }
42842            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
42843                if (type.resolveType != null) {
42844                    resolvers[typeName] = {
42845                        __resolveType: type.resolveType,
42846                    };
42847                }
42848            }
42849            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
42850                if (type.resolveType != null) {
42851                    resolvers[typeName] = {
42852                        __resolveType: type.resolveType,
42853                    };
42854                }
42855            }
42856            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
42857                resolvers[typeName] = {};
42858                if (type.isTypeOf != null) {
42859                    resolvers[typeName].__isTypeOf = type.isTypeOf;
42860                }
42861                const fields = type.getFields();
42862                Object.keys(fields).forEach(fieldName => {
42863                    var _a, _b;
42864                    const field = fields[fieldName];
42865                    if (field.subscribe != null) {
42866                        resolvers[typeName][fieldName] = resolvers[typeName][fieldName] || {};
42867                        resolvers[typeName][fieldName].subscribe = field.subscribe;
42868                    }
42869                    if (field.resolve != null && ((_a = field.resolve) === null || _a === void 0 ? void 0 : _a.name) !== 'defaultFieldResolver' && ((_b = field.resolve) === null || _b === void 0 ? void 0 : _b.name) !== 'defaultMergedResolver') {
42870                        resolvers[typeName][fieldName] = resolvers[typeName][fieldName] || {};
42871                        resolvers[typeName][fieldName].resolve = field.resolve;
42872                    }
42873                });
42874            }
42875        }
42876    });
42877    return resolvers;
42878}
42879
42880function forEachField(schema, fn) {
42881    const typeMap = schema.getTypeMap();
42882    Object.keys(typeMap).forEach(typeName => {
42883        const type = typeMap[typeName];
42884        // TODO: maybe have an option to include these?
42885        if (!Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNamedType */ "A"])(type).name.startsWith('__') && Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
42886            const fields = type.getFields();
42887            Object.keys(fields).forEach(fieldName => {
42888                const field = fields[fieldName];
42889                fn(field, typeName, fieldName);
42890            });
42891        }
42892    });
42893}
42894
42895function forEachDefaultValue(schema, fn) {
42896    const typeMap = schema.getTypeMap();
42897    Object.keys(typeMap).forEach(typeName => {
42898        const type = typeMap[typeName];
42899        if (!Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNamedType */ "A"])(type).name.startsWith('__')) {
42900            if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
42901                const fields = type.getFields();
42902                Object.keys(fields).forEach(fieldName => {
42903                    const field = fields[fieldName];
42904                    field.args.forEach(arg => {
42905                        arg.defaultValue = fn(arg.type, arg.defaultValue);
42906                    });
42907                });
42908            }
42909            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
42910                const fields = type.getFields();
42911                Object.keys(fields).forEach(fieldName => {
42912                    const field = fields[fieldName];
42913                    field.defaultValue = fn(field.type, field.defaultValue);
42914                });
42915            }
42916        }
42917    });
42918}
42919
42920// addTypes uses toConfig to create a new schema with a new or replaced
42921function addTypes(schema, newTypesOrDirectives) {
42922    const queryType = schema.getQueryType();
42923    const mutationType = schema.getMutationType();
42924    const subscriptionType = schema.getSubscriptionType();
42925    const queryTypeName = queryType != null ? queryType.name : undefined;
42926    const mutationTypeName = mutationType != null ? mutationType.name : undefined;
42927    const subscriptionTypeName = subscriptionType != null ? subscriptionType.name : undefined;
42928    const config = schema.toConfig();
42929    const originalTypeMap = {};
42930    config.types.forEach(type => {
42931        originalTypeMap[type.name] = type;
42932    });
42933    const originalDirectiveMap = {};
42934    config.directives.forEach(directive => {
42935        originalDirectiveMap[directive.name] = directive;
42936    });
42937    newTypesOrDirectives.forEach(newTypeOrDirective => {
42938        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isNamedType */ "K"])(newTypeOrDirective)) {
42939            originalTypeMap[newTypeOrDirective.name] = newTypeOrDirective;
42940        }
42941        else if (Object(graphql__WEBPACK_IMPORTED_MODULE_6__[/* isDirective */ "h"])(newTypeOrDirective)) {
42942            originalDirectiveMap[newTypeOrDirective.name] = newTypeOrDirective;
42943        }
42944    });
42945    const { typeMap, directives } = rewireTypes(originalTypeMap, Object.keys(originalDirectiveMap).map(directiveName => originalDirectiveMap[directiveName]));
42946    return new graphql__WEBPACK_IMPORTED_MODULE_18__[/* GraphQLSchema */ "a"]({
42947        ...config,
42948        query: queryTypeName ? typeMap[queryTypeName] : undefined,
42949        mutation: mutationTypeName ? typeMap[mutationTypeName] : undefined,
42950        subscription: subscriptionTypeName != null ? typeMap[subscriptionTypeName] : undefined,
42951        types: Object.keys(typeMap).map(typeName => typeMap[typeName]),
42952        directives,
42953    });
42954}
42955
42956/**
42957 * Prunes the provided schema, removing unused and empty types
42958 * @param schema The schema to prune
42959 * @param options Additional options for removing unused types from the schema
42960 */
42961function pruneSchema(schema, options = {}) {
42962    const pruningContext = {
42963        schema,
42964        unusedTypes: Object.create(null),
42965        implementations: Object.create(null),
42966    };
42967    Object.keys(schema.getTypeMap()).forEach(typeName => {
42968        const type = schema.getType(typeName);
42969        if ('getInterfaces' in type) {
42970            type.getInterfaces().forEach(iface => {
42971                const implementations = getImplementations(pruningContext, iface);
42972                if (implementations == null) {
42973                    pruningContext.implementations[iface.name] = Object.create(null);
42974                }
42975                pruningContext.implementations[iface.name][type.name] = true;
42976            });
42977        }
42978    });
42979    visitTypes(pruningContext, schema);
42980    return mapSchema(schema, {
42981        [MapperKind.TYPE]: (type) => {
42982            // If we should NOT prune the type, return it immediately as unmodified
42983            if (options.skipPruning && options.skipPruning(type)) {
42984                return type;
42985            }
42986            if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type) || Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
42987                if ((!Object.keys(type.getFields()).length && !options.skipEmptyCompositeTypePruning) ||
42988                    (pruningContext.unusedTypes[type.name] && !options.skipUnusedTypesPruning)) {
42989                    return null;
42990                }
42991            }
42992            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
42993                if ((!type.getTypes().length && !options.skipEmptyUnionPruning) ||
42994                    (pruningContext.unusedTypes[type.name] && !options.skipUnusedTypesPruning)) {
42995                    return null;
42996                }
42997            }
42998            else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
42999                const implementations = getImplementations(pruningContext, type);
43000                if ((!Object.keys(type.getFields()).length && !options.skipEmptyCompositeTypePruning) ||
43001                    (implementations && !Object.keys(implementations).length && !options.skipUnimplementedInterfacesPruning) ||
43002                    (pruningContext.unusedTypes[type.name] && !options.skipUnusedTypesPruning)) {
43003                    return null;
43004                }
43005            }
43006            else {
43007                if (pruningContext.unusedTypes[type.name] && !options.skipUnusedTypesPruning) {
43008                    return null;
43009                }
43010            }
43011        },
43012    });
43013}
43014function visitOutputType(visitedTypes, pruningContext, type) {
43015    if (visitedTypes[type.name]) {
43016        return;
43017    }
43018    visitedTypes[type.name] = true;
43019    pruningContext.unusedTypes[type.name] = false;
43020    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type) || Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
43021        const fields = type.getFields();
43022        Object.keys(fields).forEach(fieldName => {
43023            const field = fields[fieldName];
43024            const namedType = Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNamedType */ "A"])(field.type);
43025            visitOutputType(visitedTypes, pruningContext, namedType);
43026            const args = field.args;
43027            args.forEach(arg => {
43028                const type = Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNamedType */ "A"])(arg.type);
43029                visitInputType(visitedTypes, pruningContext, type);
43030            });
43031        });
43032        if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
43033            const implementations = getImplementations(pruningContext, type);
43034            if (implementations) {
43035                Object.keys(implementations).forEach(typeName => {
43036                    visitOutputType(visitedTypes, pruningContext, pruningContext.schema.getType(typeName));
43037                });
43038            }
43039        }
43040        if ('getInterfaces' in type) {
43041            type.getInterfaces().forEach(type => {
43042                visitOutputType(visitedTypes, pruningContext, type);
43043            });
43044        }
43045    }
43046    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
43047        const types = type.getTypes();
43048        types.forEach(type => visitOutputType(visitedTypes, pruningContext, type));
43049    }
43050}
43051/**
43052 * Get the implementations of an interface. May return undefined.
43053 */
43054function getImplementations(pruningContext, type) {
43055    return pruningContext.implementations[type.name];
43056}
43057function visitInputType(visitedTypes, pruningContext, type) {
43058    if (visitedTypes[type.name]) {
43059        return;
43060    }
43061    pruningContext.unusedTypes[type.name] = false;
43062    visitedTypes[type.name] = true;
43063    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
43064        const fields = type.getFields();
43065        Object.keys(fields).forEach(fieldName => {
43066            const field = fields[fieldName];
43067            const namedType = Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNamedType */ "A"])(field.type);
43068            visitInputType(visitedTypes, pruningContext, namedType);
43069        });
43070    }
43071}
43072function visitTypes(pruningContext, schema) {
43073    Object.keys(schema.getTypeMap()).forEach(typeName => {
43074        if (!typeName.startsWith('__')) {
43075            pruningContext.unusedTypes[typeName] = true;
43076        }
43077    });
43078    const visitedTypes = Object.create(null);
43079    const rootTypes = [schema.getQueryType(), schema.getMutationType(), schema.getSubscriptionType()].filter(type => type != null);
43080    rootTypes.forEach(rootType => visitOutputType(visitedTypes, pruningContext, rootType));
43081    schema.getDirectives().forEach(directive => {
43082        directive.args.forEach(arg => {
43083            const type = Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNamedType */ "A"])(arg.type);
43084            visitInputType(visitedTypes, pruningContext, type);
43085        });
43086    });
43087}
43088
43089/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
43090function mergeDeep(target, ...sources) {
43091    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(target)) {
43092        return target;
43093    }
43094    const output = {
43095        ...target,
43096    };
43097    for (const source of sources) {
43098        if (isObject(target) && isObject(source)) {
43099            for (const key in source) {
43100                if (isObject(source[key])) {
43101                    if (!(key in target)) {
43102                        Object.assign(output, { [key]: source[key] });
43103                    }
43104                    else {
43105                        output[key] = mergeDeep(target[key], source[key]);
43106                    }
43107                }
43108                else {
43109                    Object.assign(output, { [key]: source[key] });
43110                }
43111            }
43112        }
43113    }
43114    return output;
43115}
43116function isObject(item) {
43117    return item && typeof item === 'object' && !Array.isArray(item);
43118}
43119
43120function parseSelectionSet(selectionSet, options) {
43121    const query = Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(selectionSet, options).definitions[0];
43122    return query.selectionSet;
43123}
43124
43125/**
43126 * Get the key under which the result of this resolver will be placed in the response JSON. Basically, just
43127 * resolves aliases.
43128 * @param info The info argument to the resolver.
43129 */
43130function getResponseKeyFromInfo(info) {
43131    return info.fieldNodes[0].alias != null ? info.fieldNodes[0].alias.value : info.fieldName;
43132}
43133
43134function appendObjectFields(schema, typeName, additionalFields) {
43135    if (schema.getType(typeName) == null) {
43136        return addTypes(schema, [
43137            new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"]({
43138                name: typeName,
43139                fields: additionalFields,
43140            }),
43141        ]);
43142    }
43143    return mapSchema(schema, {
43144        [MapperKind.OBJECT_TYPE]: type => {
43145            if (type.name === typeName) {
43146                const config = type.toConfig();
43147                const originalFieldConfigMap = config.fields;
43148                const newFieldConfigMap = {};
43149                Object.keys(originalFieldConfigMap).forEach(fieldName => {
43150                    newFieldConfigMap[fieldName] = originalFieldConfigMap[fieldName];
43151                });
43152                Object.keys(additionalFields).forEach(fieldName => {
43153                    newFieldConfigMap[fieldName] = additionalFields[fieldName];
43154                });
43155                return correctASTNodes(new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"]({
43156                    ...config,
43157                    fields: newFieldConfigMap,
43158                }));
43159            }
43160        },
43161    });
43162}
43163function removeObjectFields(schema, typeName, testFn) {
43164    const removedFields = {};
43165    const newSchema = mapSchema(schema, {
43166        [MapperKind.OBJECT_TYPE]: type => {
43167            if (type.name === typeName) {
43168                const config = type.toConfig();
43169                const originalFieldConfigMap = config.fields;
43170                const newFieldConfigMap = {};
43171                Object.keys(originalFieldConfigMap).forEach(fieldName => {
43172                    const originalFieldConfig = originalFieldConfigMap[fieldName];
43173                    if (testFn(fieldName, originalFieldConfig)) {
43174                        removedFields[fieldName] = originalFieldConfig;
43175                    }
43176                    else {
43177                        newFieldConfigMap[fieldName] = originalFieldConfig;
43178                    }
43179                });
43180                return correctASTNodes(new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"]({
43181                    ...config,
43182                    fields: newFieldConfigMap,
43183                }));
43184            }
43185        },
43186    });
43187    return [newSchema, removedFields];
43188}
43189function selectObjectFields(schema, typeName, testFn) {
43190    const selectedFields = {};
43191    mapSchema(schema, {
43192        [MapperKind.OBJECT_TYPE]: type => {
43193            if (type.name === typeName) {
43194                const config = type.toConfig();
43195                const originalFieldConfigMap = config.fields;
43196                Object.keys(originalFieldConfigMap).forEach(fieldName => {
43197                    const originalFieldConfig = originalFieldConfigMap[fieldName];
43198                    if (testFn(fieldName, originalFieldConfig)) {
43199                        selectedFields[fieldName] = originalFieldConfig;
43200                    }
43201                });
43202            }
43203            return undefined;
43204        },
43205    });
43206    return selectedFields;
43207}
43208function modifyObjectFields(schema, typeName, testFn, newFields) {
43209    const removedFields = {};
43210    const newSchema = mapSchema(schema, {
43211        [MapperKind.OBJECT_TYPE]: type => {
43212            if (type.name === typeName) {
43213                const config = type.toConfig();
43214                const originalFieldConfigMap = config.fields;
43215                const newFieldConfigMap = {};
43216                Object.keys(originalFieldConfigMap).forEach(fieldName => {
43217                    const originalFieldConfig = originalFieldConfigMap[fieldName];
43218                    if (testFn(fieldName, originalFieldConfig)) {
43219                        removedFields[fieldName] = originalFieldConfig;
43220                    }
43221                    else {
43222                        newFieldConfigMap[fieldName] = originalFieldConfig;
43223                    }
43224                });
43225                Object.keys(newFields).forEach(fieldName => {
43226                    const fieldConfig = newFields[fieldName];
43227                    newFieldConfigMap[fieldName] = fieldConfig;
43228                });
43229                return correctASTNodes(new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"]({
43230                    ...config,
43231                    fields: newFieldConfigMap,
43232                }));
43233            }
43234        },
43235    });
43236    return [newSchema, removedFields];
43237}
43238
43239function renameType(type, newTypeName) {
43240    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type)) {
43241        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLObjectType */ "f"]({
43242            ...type.toConfig(),
43243            name: newTypeName,
43244            astNode: type.astNode == null
43245                ? type.astNode
43246                : {
43247                    ...type.astNode,
43248                    name: {
43249                        ...type.astNode.name,
43250                        value: newTypeName,
43251                    },
43252                },
43253            extensionASTNodes: type.extensionASTNodes == null
43254                ? type.extensionASTNodes
43255                : type.extensionASTNodes.map(node => ({
43256                    ...node,
43257                    name: {
43258                        ...node.name,
43259                        value: newTypeName,
43260                    },
43261                })),
43262        });
43263    }
43264    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type)) {
43265        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInterfaceType */ "c"]({
43266            ...type.toConfig(),
43267            name: newTypeName,
43268            astNode: type.astNode == null
43269                ? type.astNode
43270                : {
43271                    ...type.astNode,
43272                    name: {
43273                        ...type.astNode.name,
43274                        value: newTypeName,
43275                    },
43276                },
43277            extensionASTNodes: type.extensionASTNodes == null
43278                ? type.extensionASTNodes
43279                : type.extensionASTNodes.map(node => ({
43280                    ...node,
43281                    name: {
43282                        ...node.name,
43283                        value: newTypeName,
43284                    },
43285                })),
43286        });
43287    }
43288    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isUnionType */ "T"])(type)) {
43289        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLUnionType */ "h"]({
43290            ...type.toConfig(),
43291            name: newTypeName,
43292            astNode: type.astNode == null
43293                ? type.astNode
43294                : {
43295                    ...type.astNode,
43296                    name: {
43297                        ...type.astNode.name,
43298                        value: newTypeName,
43299                    },
43300                },
43301            extensionASTNodes: type.extensionASTNodes == null
43302                ? type.extensionASTNodes
43303                : type.extensionASTNodes.map(node => ({
43304                    ...node,
43305                    name: {
43306                        ...node.name,
43307                        value: newTypeName,
43308                    },
43309                })),
43310        });
43311    }
43312    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
43313        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLInputObjectType */ "b"]({
43314            ...type.toConfig(),
43315            name: newTypeName,
43316            astNode: type.astNode == null
43317                ? type.astNode
43318                : {
43319                    ...type.astNode,
43320                    name: {
43321                        ...type.astNode.name,
43322                        value: newTypeName,
43323                    },
43324                },
43325            extensionASTNodes: type.extensionASTNodes == null
43326                ? type.extensionASTNodes
43327                : type.extensionASTNodes.map(node => ({
43328                    ...node,
43329                    name: {
43330                        ...node.name,
43331                        value: newTypeName,
43332                    },
43333                })),
43334        });
43335    }
43336    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(type)) {
43337        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLEnumType */ "a"]({
43338            ...type.toConfig(),
43339            name: newTypeName,
43340            astNode: type.astNode == null
43341                ? type.astNode
43342                : {
43343                    ...type.astNode,
43344                    name: {
43345                        ...type.astNode.name,
43346                        value: newTypeName,
43347                    },
43348                },
43349            extensionASTNodes: type.extensionASTNodes == null
43350                ? type.extensionASTNodes
43351                : type.extensionASTNodes.map(node => ({
43352                    ...node,
43353                    name: {
43354                        ...node.name,
43355                        value: newTypeName,
43356                    },
43357                })),
43358        });
43359    }
43360    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isScalarType */ "R"])(type)) {
43361        return new graphql__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLScalarType */ "g"]({
43362            ...type.toConfig(),
43363            name: newTypeName,
43364            astNode: type.astNode == null
43365                ? type.astNode
43366                : {
43367                    ...type.astNode,
43368                    name: {
43369                        ...type.astNode.name,
43370                        value: newTypeName,
43371                    },
43372                },
43373            extensionASTNodes: type.extensionASTNodes == null
43374                ? type.extensionASTNodes
43375                : type.extensionASTNodes.map(node => ({
43376                    ...node,
43377                    name: {
43378                        ...node.name,
43379                        value: newTypeName,
43380                    },
43381                })),
43382        });
43383    }
43384    throw new Error(`Unknown type ${type}.`);
43385}
43386
43387/**
43388 * Given a selectionSet, adds all of the fields in that selection to
43389 * the passed in map of fields, and returns it at the end.
43390 *
43391 * CollectFields requires the "runtime type" of an object. For a field which
43392 * returns an Interface or Union type, the "runtime type" will be the actual
43393 * Object type returned by that field.
43394 *
43395 * @internal
43396 */
43397function collectFields(exeContext, runtimeType, selectionSet, fields, visitedFragmentNames) {
43398    for (const selection of selectionSet.selections) {
43399        switch (selection.kind) {
43400            case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FIELD: {
43401                if (!shouldIncludeNode(exeContext, selection)) {
43402                    continue;
43403                }
43404                const name = getFieldEntryKey(selection);
43405                if (!(name in fields)) {
43406                    fields[name] = [];
43407                }
43408                fields[name].push(selection);
43409                break;
43410            }
43411            case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INLINE_FRAGMENT: {
43412                if (!shouldIncludeNode(exeContext, selection) ||
43413                    !doesFragmentConditionMatch(exeContext, selection, runtimeType)) {
43414                    continue;
43415                }
43416                collectFields(exeContext, runtimeType, selection.selectionSet, fields, visitedFragmentNames);
43417                break;
43418            }
43419            case graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FRAGMENT_SPREAD: {
43420                const fragName = selection.name.value;
43421                if (visitedFragmentNames[fragName] || !shouldIncludeNode(exeContext, selection)) {
43422                    continue;
43423                }
43424                visitedFragmentNames[fragName] = true;
43425                const fragment = exeContext.fragments[fragName];
43426                if (!fragment || !doesFragmentConditionMatch(exeContext, fragment, runtimeType)) {
43427                    continue;
43428                }
43429                collectFields(exeContext, runtimeType, fragment.selectionSet, fields, visitedFragmentNames);
43430                break;
43431            }
43432        }
43433    }
43434    return fields;
43435}
43436/**
43437 * Determines if a field should be included based on the @include and @skip
43438 * directives, where @skip has higher precedence than @include.
43439 */
43440function shouldIncludeNode(exeContext, node) {
43441    const skip = Object(graphql__WEBPACK_IMPORTED_MODULE_20__[/* getDirectiveValues */ "b"])(graphql__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLSkipDirective */ "e"], node, exeContext.variableValues);
43442    if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) {
43443        return false;
43444    }
43445    const include = Object(graphql__WEBPACK_IMPORTED_MODULE_20__[/* getDirectiveValues */ "b"])(graphql__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLIncludeDirective */ "d"], node, exeContext.variableValues);
43446    if ((include === null || include === void 0 ? void 0 : include.if) === false) {
43447        return false;
43448    }
43449    return true;
43450}
43451/**
43452 * Determines if a fragment is applicable to the given type.
43453 */
43454function doesFragmentConditionMatch(exeContext, fragment, type) {
43455    const typeConditionNode = fragment.typeCondition;
43456    if (!typeConditionNode) {
43457        return true;
43458    }
43459    const conditionalType = Object(graphql__WEBPACK_IMPORTED_MODULE_21__[/* typeFromAST */ "a"])(exeContext.schema, typeConditionNode);
43460    if (conditionalType === type) {
43461        return true;
43462    }
43463    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isAbstractType */ "C"])(conditionalType)) {
43464        return exeContext.schema.isPossibleType(conditionalType, type);
43465    }
43466    return false;
43467}
43468/**
43469 * Implements the logic to compute the key of a given field's entry
43470 */
43471function getFieldEntryKey(node) {
43472    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
43473    return node.alias ? node.alias.value : node.name.value;
43474}
43475
43476/**
43477 * Given an AsyncIterable and a callback function, return an AsyncIterator
43478 * which produces values mapped via calling the callback function.
43479 */
43480function mapAsyncIterator(iterator, callback, rejectCallback) {
43481    let $return;
43482    let abruptClose;
43483    if (typeof iterator.return === 'function') {
43484        $return = iterator.return;
43485        abruptClose = (error) => {
43486            const rethrow = () => Promise.reject(error);
43487            return $return.call(iterator).then(rethrow, rethrow);
43488        };
43489    }
43490    function mapResult(result) {
43491        return result.done ? result : asyncMapValue(result.value, callback).then(iteratorResult, abruptClose);
43492    }
43493    let mapReject;
43494    if (rejectCallback) {
43495        // Capture rejectCallback to ensure it cannot be null.
43496        const reject = rejectCallback;
43497        mapReject = (error) => asyncMapValue(error, reject).then(iteratorResult, abruptClose);
43498    }
43499    return {
43500        next() {
43501            return iterator.next().then(mapResult, mapReject);
43502        },
43503        return() {
43504            return $return
43505                ? $return.call(iterator).then(mapResult, mapReject)
43506                : Promise.resolve({ value: undefined, done: true });
43507        },
43508        throw(error) {
43509            if (typeof iterator.throw === 'function') {
43510                return iterator.throw(error).then(mapResult, mapReject);
43511            }
43512            return Promise.reject(error).catch(abruptClose);
43513        },
43514        [Symbol.asyncIterator]() {
43515            return this;
43516        },
43517    };
43518}
43519function asyncMapValue(value, callback) {
43520    return new Promise(resolve => resolve(callback(value)));
43521}
43522function iteratorResult(value) {
43523    return { value, done: false };
43524}
43525
43526function updateArgument(argName, argType, argumentNodes, variableDefinitionsMap, variableValues, newArg) {
43527    let varName;
43528    let numGeneratedVariables = 0;
43529    do {
43530        varName = `_v${(numGeneratedVariables++).toString()}_${argName}`;
43531    } while (varName in variableDefinitionsMap);
43532    argumentNodes[argName] = {
43533        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ARGUMENT,
43534        name: {
43535            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
43536            value: argName,
43537        },
43538        value: {
43539            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].VARIABLE,
43540            name: {
43541                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
43542                value: varName,
43543            },
43544        },
43545    };
43546    variableDefinitionsMap[varName] = {
43547        kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].VARIABLE_DEFINITION,
43548        variable: {
43549            kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].VARIABLE,
43550            name: {
43551                kind: graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NAME,
43552                value: varName,
43553            },
43554        },
43555        type: astFromType(argType),
43556    };
43557    if (newArg === undefined) {
43558        delete variableValues[varName];
43559    }
43560    else {
43561        variableValues[varName] = newArg;
43562    }
43563}
43564
43565function implementsAbstractType(schema, typeA, typeB) {
43566    if (typeA === typeB) {
43567        return true;
43568    }
43569    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isCompositeType */ "D"])(typeA) && Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isCompositeType */ "D"])(typeB)) {
43570        return Object(graphql__WEBPACK_IMPORTED_MODULE_22__[/* doTypesOverlap */ "a"])(schema, typeA, typeB);
43571    }
43572    return false;
43573}
43574
43575function relocatedError(originalError, path) {
43576    return new graphql__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"](originalError.message, originalError.nodes, originalError.source, originalError.positions, path === null ? undefined : path === undefined ? originalError.path : path, originalError.originalError, originalError.extensions);
43577}
43578
43579function inputFieldToFieldConfig(field) {
43580    return {
43581        description: field.description,
43582        type: field.type,
43583        defaultValue: field.defaultValue,
43584        extensions: field.extensions,
43585        astNode: field.astNode,
43586    };
43587}
43588function fieldToFieldConfig(field) {
43589    return {
43590        description: field.description,
43591        type: field.type,
43592        args: argsToFieldConfigArgumentMap(field.args),
43593        resolve: field.resolve,
43594        subscribe: field.subscribe,
43595        deprecationReason: field.deprecationReason,
43596        extensions: field.extensions,
43597        astNode: field.astNode,
43598    };
43599}
43600function argsToFieldConfigArgumentMap(args) {
43601    const newArguments = {};
43602    args.forEach(arg => {
43603        newArguments[arg.name] = argumentToArgumentConfig(arg);
43604    });
43605    return newArguments;
43606}
43607function argumentToArgumentConfig(arg) {
43608    return {
43609        description: arg.description,
43610        type: arg.type,
43611        defaultValue: arg.defaultValue,
43612        extensions: arg.extensions,
43613        astNode: arg.astNode,
43614    };
43615}
43616
43617function observableToAsyncIterable(observable) {
43618    const pullQueue = [];
43619    const pushQueue = [];
43620    let listening = true;
43621    const pushValue = (value) => {
43622        if (pullQueue.length !== 0) {
43623            pullQueue.shift()({ value, done: false });
43624        }
43625        else {
43626            pushQueue.push({ value, done: false });
43627        }
43628    };
43629    const pushError = (error) => {
43630        if (pullQueue.length !== 0) {
43631            pullQueue.shift()({ value: { errors: [error] }, done: false });
43632        }
43633        else {
43634            pushQueue.push({ value: { errors: [error] }, done: false });
43635        }
43636    };
43637    const pushDone = () => {
43638        if (pullQueue.length !== 0) {
43639            pullQueue.shift()({ done: true });
43640        }
43641        else {
43642            pushQueue.push({ done: true });
43643        }
43644    };
43645    const pullValue = () => new Promise(resolve => {
43646        if (pushQueue.length !== 0) {
43647            const element = pushQueue.shift();
43648            // either {value: {errors: [...]}} or {value: ...}
43649            resolve(element);
43650        }
43651        else {
43652            pullQueue.push(resolve);
43653        }
43654    });
43655    const subscription = observable.subscribe({
43656        next(value) {
43657            pushValue(value);
43658        },
43659        error(err) {
43660            pushError(err);
43661        },
43662        complete() {
43663            pushDone();
43664        },
43665    });
43666    const emptyQueue = () => {
43667        if (listening) {
43668            listening = false;
43669            subscription.unsubscribe();
43670            pullQueue.forEach(resolve => resolve({ value: undefined, done: true }));
43671            pullQueue.length = 0;
43672            pushQueue.length = 0;
43673        }
43674    };
43675    return {
43676        next() {
43677            return listening ? pullValue() : this.return();
43678        },
43679        return() {
43680            emptyQueue();
43681            return Promise.resolve({ value: undefined, done: true });
43682        },
43683        throw(error) {
43684            emptyQueue();
43685            return Promise.reject(error);
43686        },
43687        [Symbol.asyncIterator]() {
43688            return this;
43689        },
43690    };
43691}
43692
43693function visitData(data, enter, leave) {
43694    if (Array.isArray(data)) {
43695        return data.map(value => visitData(value, enter, leave));
43696    }
43697    else if (typeof data === 'object') {
43698        const newData = enter != null ? enter(data) : data;
43699        if (newData != null) {
43700            Object.keys(newData).forEach(key => {
43701                const value = newData[key];
43702                newData[key] = visitData(value, enter, leave);
43703            });
43704        }
43705        return leave != null ? leave(newData) : newData;
43706    }
43707    return data;
43708}
43709function visitErrors(errors, visitor) {
43710    return errors.map(error => visitor(error));
43711}
43712function visitResult(result, request, schema, resultVisitorMap, errorVisitorMap) {
43713    const partialExecutionContext = {
43714        schema,
43715        fragments: request.document.definitions.reduce((acc, def) => {
43716            if (def.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FRAGMENT_DEFINITION) {
43717                acc[def.name.value] = def;
43718            }
43719            return acc;
43720        }, {}),
43721        variableValues: request.variables,
43722    };
43723    const errorInfo = {
43724        segmentInfoMap: new Map(),
43725        unpathedErrors: new Set(),
43726    };
43727    const data = result.data;
43728    const errors = result.errors;
43729    const visitingErrors = errors != null && errorVisitorMap != null;
43730    if (data != null) {
43731        result.data = visitRoot(data, Object(graphql__WEBPACK_IMPORTED_MODULE_23__[/* getOperationAST */ "a"])(request.document, undefined), partialExecutionContext, resultVisitorMap, visitingErrors ? errors : undefined, errorInfo);
43732    }
43733    if (visitingErrors) {
43734        result.errors = visitErrorsByType(errors, errorVisitorMap, errorInfo);
43735    }
43736    return result;
43737}
43738function visitErrorsByType(errors, errorVisitorMap, errorInfo) {
43739    const segmentInfoMap = errorInfo.segmentInfoMap;
43740    const unpathedErrors = errorInfo.unpathedErrors;
43741    const unpathedErrorVisitor = errorVisitorMap['__unpathed'];
43742    return errors.map(originalError => {
43743        const pathSegmentsInfo = segmentInfoMap.get(originalError);
43744        const newError = pathSegmentsInfo == null
43745            ? originalError
43746            : pathSegmentsInfo.reduceRight((acc, segmentInfo) => {
43747                const typeName = segmentInfo.type.name;
43748                const typeVisitorMap = errorVisitorMap[typeName];
43749                if (typeVisitorMap == null) {
43750                    return acc;
43751                }
43752                const errorVisitor = typeVisitorMap[segmentInfo.fieldName];
43753                return errorVisitor == null ? acc : errorVisitor(acc, segmentInfo.pathIndex);
43754            }, originalError);
43755        if (unpathedErrorVisitor && unpathedErrors.has(originalError)) {
43756            return unpathedErrorVisitor(newError);
43757        }
43758        return newError;
43759    });
43760}
43761function visitRoot(root, operation, exeContext, resultVisitorMap, errors, errorInfo) {
43762    const operationRootType = Object(graphql__WEBPACK_IMPORTED_MODULE_24__[/* getOperationRootType */ "a"])(exeContext.schema, operation);
43763    const collectedFields = collectFields(exeContext, operationRootType, operation.selectionSet, Object.create(null), Object.create(null));
43764    return visitObjectValue(root, operationRootType, collectedFields, exeContext, resultVisitorMap, 0, errors, errorInfo);
43765}
43766function visitObjectValue(object, type, fieldNodeMap, exeContext, resultVisitorMap, pathIndex, errors, errorInfo) {
43767    const fieldMap = type.getFields();
43768    const typeVisitorMap = resultVisitorMap === null || resultVisitorMap === void 0 ? void 0 : resultVisitorMap[type.name];
43769    const enterObject = typeVisitorMap === null || typeVisitorMap === void 0 ? void 0 : typeVisitorMap.__enter;
43770    const newObject = enterObject != null ? enterObject(object) : object;
43771    let sortedErrors;
43772    let errorMap;
43773    if (errors != null) {
43774        sortedErrors = sortErrorsByPathSegment(errors, pathIndex);
43775        errorMap = sortedErrors.errorMap;
43776        sortedErrors.unpathedErrors.forEach(error => errorInfo.unpathedErrors.add(error));
43777    }
43778    Object.keys(fieldNodeMap).forEach(responseKey => {
43779        const subFieldNodes = fieldNodeMap[responseKey];
43780        const fieldName = subFieldNodes[0].name.value;
43781        const fieldType = fieldName === '__typename' ? graphql__WEBPACK_IMPORTED_MODULE_8__[/* TypeNameMetaFieldDef */ "d"].type : fieldMap[fieldName].type;
43782        const newPathIndex = pathIndex + 1;
43783        let fieldErrors;
43784        if (errors != null) {
43785            fieldErrors = errorMap[responseKey];
43786            if (fieldErrors != null) {
43787                delete errorMap[responseKey];
43788            }
43789            addPathSegmentInfo(type, fieldName, newPathIndex, fieldErrors, errorInfo);
43790        }
43791        const newValue = visitFieldValue(object[responseKey], fieldType, subFieldNodes, exeContext, resultVisitorMap, newPathIndex, fieldErrors, errorInfo);
43792        updateObject(newObject, responseKey, newValue, typeVisitorMap, fieldName);
43793    });
43794    const oldTypename = newObject.__typename;
43795    if (oldTypename != null) {
43796        updateObject(newObject, '__typename', oldTypename, typeVisitorMap, '__typename');
43797    }
43798    if (errors != null) {
43799        Object.keys(errorMap).forEach(unknownResponseKey => {
43800            errorMap[unknownResponseKey].forEach(error => errorInfo.unpathedErrors.add(error));
43801        });
43802    }
43803    const leaveObject = typeVisitorMap === null || typeVisitorMap === void 0 ? void 0 : typeVisitorMap.__leave;
43804    return leaveObject != null ? leaveObject(newObject) : newObject;
43805}
43806function updateObject(object, responseKey, newValue, typeVisitorMap, fieldName) {
43807    if (typeVisitorMap == null) {
43808        object[responseKey] = newValue;
43809        return;
43810    }
43811    const fieldVisitor = typeVisitorMap[fieldName];
43812    if (fieldVisitor == null) {
43813        object[responseKey] = newValue;
43814        return;
43815    }
43816    const visitedValue = fieldVisitor(newValue);
43817    if (visitedValue === undefined) {
43818        delete object[responseKey];
43819        return;
43820    }
43821    object[responseKey] = visitedValue;
43822}
43823function visitListValue(list, returnType, fieldNodes, exeContext, resultVisitorMap, pathIndex, errors, errorInfo) {
43824    return list.map(listMember => visitFieldValue(listMember, returnType, fieldNodes, exeContext, resultVisitorMap, pathIndex + 1, errors, errorInfo));
43825}
43826function visitFieldValue(value, returnType, fieldNodes, exeContext, resultVisitorMap, pathIndex, errors = [], errorInfo) {
43827    if (value == null) {
43828        return value;
43829    }
43830    const nullableType = Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* getNullableType */ "B"])(returnType);
43831    if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isListType */ "J"])(nullableType)) {
43832        return visitListValue(value, nullableType.ofType, fieldNodes, exeContext, resultVisitorMap, pathIndex, errors, errorInfo);
43833    }
43834    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isAbstractType */ "C"])(nullableType)) {
43835        const finalType = exeContext.schema.getType(value.__typename);
43836        const collectedFields = collectSubFields(exeContext, finalType, fieldNodes);
43837        return visitObjectValue(value, finalType, collectedFields, exeContext, resultVisitorMap, pathIndex, errors, errorInfo);
43838    }
43839    else if (Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(nullableType)) {
43840        const collectedFields = collectSubFields(exeContext, nullableType, fieldNodes);
43841        return visitObjectValue(value, nullableType, collectedFields, exeContext, resultVisitorMap, pathIndex, errors, errorInfo);
43842    }
43843    const typeVisitorMap = resultVisitorMap === null || resultVisitorMap === void 0 ? void 0 : resultVisitorMap[nullableType.name];
43844    if (typeVisitorMap == null) {
43845        return value;
43846    }
43847    const visitedValue = typeVisitorMap(value);
43848    return visitedValue === undefined ? value : visitedValue;
43849}
43850function sortErrorsByPathSegment(errors, pathIndex) {
43851    const errorMap = Object.create(null);
43852    const unpathedErrors = new Set();
43853    errors.forEach(error => {
43854        var _a;
43855        const pathSegment = (_a = error.path) === null || _a === void 0 ? void 0 : _a[pathIndex];
43856        if (pathSegment == null) {
43857            unpathedErrors.add(error);
43858            return;
43859        }
43860        if (pathSegment in errorMap) {
43861            errorMap[pathSegment].push(error);
43862        }
43863        else {
43864            errorMap[pathSegment] = [error];
43865        }
43866    });
43867    return {
43868        errorMap,
43869        unpathedErrors,
43870    };
43871}
43872function addPathSegmentInfo(type, fieldName, pathIndex, errors = [], errorInfo) {
43873    errors.forEach(error => {
43874        const segmentInfo = {
43875            type,
43876            fieldName,
43877            pathIndex,
43878        };
43879        const pathSegmentsInfo = errorInfo.segmentInfoMap.get(error);
43880        if (pathSegmentsInfo == null) {
43881            errorInfo.segmentInfoMap.set(error, [segmentInfo]);
43882        }
43883        else {
43884            pathSegmentsInfo.push(segmentInfo);
43885        }
43886    });
43887}
43888function collectSubFields(exeContext, type, fieldNodes) {
43889    let subFieldNodes = Object.create(null);
43890    const visitedFragmentNames = Object.create(null);
43891    fieldNodes.forEach(fieldNode => {
43892        subFieldNodes = collectFields(exeContext, type, fieldNode.selectionSet, subFieldNodes, visitedFragmentNames);
43893    });
43894    return subFieldNodes;
43895}
43896
43897function valueMatchesCriteria(value, criteria) {
43898    if (value == null) {
43899        return value === criteria;
43900    }
43901    else if (Array.isArray(value)) {
43902        return Array.isArray(criteria) && value.every((val, index) => valueMatchesCriteria(val, criteria[index]));
43903    }
43904    else if (typeof value === 'object') {
43905        return (typeof criteria === 'object' &&
43906            criteria &&
43907            Object.keys(criteria).every(propertyName => valueMatchesCriteria(value[propertyName], criteria[propertyName])));
43908    }
43909    else if (criteria instanceof RegExp) {
43910        return criteria.test(value);
43911    }
43912    return value === criteria;
43913}
43914
43915function isAsyncIterable(value) {
43916    return typeof value === 'object' && value != null && Symbol.asyncIterator in value;
43917}
43918
43919function isDocumentNode(object) {
43920    return object && typeof object === 'object' && 'kind' in object && object.kind === graphql__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].DOCUMENT;
43921}
43922
43923function withCancel(asyncIteratorLike, onCancel) {
43924    const asyncIterator = asyncIteratorLike[Symbol.asyncIterator]();
43925    if (!asyncIterator.return) {
43926        asyncIterator.return = () => Promise.resolve({ value: undefined, done: true });
43927    }
43928    const savedReturn = asyncIterator.return.bind(asyncIterator);
43929    asyncIterator.return = () => {
43930        onCancel();
43931        return savedReturn();
43932    };
43933    return asyncIterator;
43934}
43935
43936
43937//# sourceMappingURL=index.esm.js.map
43938
43939/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("8oxB")))
43940
43941/***/ }),
43942
43943/***/ "OHCT":
43944/***/ (function(module, exports, __webpack_require__) {
43945
43946"use strict";
43947/**
43948 * Copyright (c) Facebook, Inc. and its affiliates.
43949 *
43950 * This source code is licensed under the MIT license found in the
43951 * LICENSE file in the root directory of this source tree.
43952 *
43953 * 
43954 * @format
43955 */
43956// flowlint ambiguous-object-type:error
43957
43958
43959var _interopRequireDefault = __webpack_require__("TqRt");
43960
43961var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA"));
43962
43963function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
43964
43965function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
43966
43967var invariant = __webpack_require__("OUqe");
43968
43969var _require = __webpack_require__("VrDQ"),
43970    eachWithCombinedError = _require.eachWithCombinedError;
43971
43972/**
43973 * @public
43974 *
43975 * Helper for writing compiler transforms that apply "map" and/or "filter"-style
43976 * operations to compiler contexts. The `visitor` argument accepts a map of IR
43977 * kinds to user-defined functions that can map nodes of that kind to new values
43978 * (of the same kind).
43979 *
43980 * If a visitor function is defined for a kind, the visitor function is
43981 * responsible for traversing its children (by calling `this.traverse(node)`)
43982 * and returning either the input (to indicate no changes), a new node (to
43983 * indicate changes), or null/undefined (to indicate the removal of that node
43984 * from the output).
43985 *
43986 * If a visitor function is *not* defined for a kind, a default traversal is
43987 * used to evaluate its children.
43988 *
43989 * The `stateInitializer` argument accepts an optional function to construct the
43990 * state for each document (fragment or root) in the context. Any documents for
43991 * which the initializer returns null/undefined is deleted from the context
43992 * without being traversed.
43993 *
43994 * Example: Alias all scalar fields with the reverse of their name:
43995 *
43996 * ```
43997 * transform(context, {
43998 *   ScalarField: visitScalarField,
43999 * });
44000 *
44001 * function visitScalarField(field: ScalarField, state: State): ?ScalarField {
44002 *   // Traverse child nodes - for a scalar field these are the arguments &
44003 *   // directives.
44004 *   const nextField = this.traverse(field, state);
44005 *   // Return a new node with a different alias.
44006 *   return {
44007 *     ...nextField,
44008 *     alias: nextField.name.split('').reverse().join(''),
44009 *   };
44010 * }
44011 * ```
44012 */
44013function transform(context, visitor, stateInitializer) {
44014  var transformer = new Transformer(context, visitor);
44015  return context.withMutations(function (ctx) {
44016    var nextContext = ctx;
44017    eachWithCombinedError(context.documents(), function (prevNode) {
44018      var nextNode;
44019
44020      if (stateInitializer === undefined) {
44021        nextNode = transformer.visit(prevNode, undefined);
44022      } else {
44023        var _state = stateInitializer(prevNode);
44024
44025        if (_state != null) {
44026          nextNode = transformer.visit(prevNode, _state);
44027        }
44028      }
44029
44030      if (!nextNode) {
44031        nextContext = nextContext.remove(prevNode.name);
44032      } else if (nextNode !== prevNode) {
44033        nextContext = nextContext.replace(nextNode);
44034      }
44035    });
44036    return nextContext;
44037  });
44038}
44039/**
44040 * @internal
44041 */
44042
44043
44044var Transformer = /*#__PURE__*/function () {
44045  function Transformer(context, visitor) {
44046    this._context = context;
44047    this._states = [];
44048    this._visitor = visitor;
44049  }
44050  /**
44051   * @public
44052   *
44053   * Returns the original compiler context that is being transformed. This can
44054   * be used to look up fragments by name, for example.
44055   */
44056
44057
44058  var _proto = Transformer.prototype;
44059
44060  _proto.getContext = function getContext() {
44061    return this._context;
44062  }
44063  /**
44064   * @public
44065   *
44066   * Transforms the node, calling a user-defined visitor function if defined for
44067   * the node's kind. Uses the given state for this portion of the traversal.
44068   *
44069   * Note: This differs from `traverse` in that it calls a visitor function for
44070   * the node itself.
44071   */
44072  ;
44073
44074  _proto.visit = function visit(node, state) {
44075    this._states.push(state);
44076
44077    var nextNode = this._visit(node);
44078
44079    this._states.pop();
44080
44081    return nextNode;
44082  }
44083  /**
44084   * @public
44085   *
44086   * Transforms the children of the given node, skipping the user-defined
44087   * visitor function for the node itself. Uses the given state for this portion
44088   * of the traversal.
44089   *
44090   * Note: This differs from `visit` in that it does not call a visitor function
44091   * for the node itself.
44092   */
44093  ;
44094
44095  _proto.traverse = function traverse(node, state) {
44096    this._states.push(state);
44097
44098    var nextNode = this._traverse(node);
44099
44100    this._states.pop();
44101
44102    return nextNode;
44103  };
44104
44105  _proto._visit = function _visit(node) {
44106    var nodeVisitor = this._visitor[node.kind];
44107
44108    if (nodeVisitor) {
44109      // If a handler for the kind is defined, it is responsible for calling
44110      // `traverse` to transform children as necessary.
44111      var _state2 = this._getState();
44112
44113      var nextNode = nodeVisitor.call(this, node, _state2);
44114      return nextNode;
44115    } // Otherwise traverse is called automatically.
44116
44117
44118    return this._traverse(node);
44119  };
44120
44121  _proto._traverse = function _traverse(prevNode) {
44122    var nextNode;
44123
44124    switch (prevNode.kind) {
44125      case 'Argument':
44126        nextNode = this._traverseChildren(prevNode, null, ['value']);
44127        break;
44128
44129      case 'Literal':
44130      case 'LocalArgumentDefinition':
44131      case 'RootArgumentDefinition':
44132      case 'Variable':
44133        nextNode = prevNode;
44134        break;
44135
44136      case 'Defer':
44137        nextNode = this._traverseChildren(prevNode, ['selections'], ['if']);
44138        break;
44139
44140      case 'Stream':
44141        nextNode = this._traverseChildren(prevNode, ['selections'], ['if', 'initialCount']);
44142        break;
44143
44144      case 'ClientExtension':
44145        nextNode = this._traverseChildren(prevNode, ['selections']);
44146        break;
44147
44148      case 'Directive':
44149        nextNode = this._traverseChildren(prevNode, ['args']);
44150        break;
44151
44152      case 'ModuleImport':
44153        nextNode = this._traverseChildren(prevNode, ['selections']);
44154
44155        if (!nextNode.selections.length) {
44156          nextNode = null;
44157        }
44158
44159        break;
44160
44161      case 'FragmentSpread':
44162      case 'ScalarField':
44163        nextNode = this._traverseChildren(prevNode, ['args', 'directives']);
44164        break;
44165
44166      case 'InlineDataFragmentSpread':
44167        nextNode = this._traverseChildren(prevNode, ['selections']);
44168        break;
44169
44170      case 'LinkedField':
44171        nextNode = this._traverseChildren(prevNode, ['args', 'directives', 'selections']);
44172
44173        if (!nextNode.selections.length) {
44174          nextNode = null;
44175        }
44176
44177        break;
44178
44179      case 'ListValue':
44180        nextNode = this._traverseChildren(prevNode, ['items']);
44181        break;
44182
44183      case 'ObjectFieldValue':
44184        nextNode = this._traverseChildren(prevNode, null, ['value']);
44185        break;
44186
44187      case 'ObjectValue':
44188        nextNode = this._traverseChildren(prevNode, ['fields']);
44189        break;
44190
44191      case 'Condition':
44192        nextNode = this._traverseChildren(prevNode, ['directives', 'selections'], ['condition']);
44193
44194        if (!nextNode.selections.length) {
44195          nextNode = null;
44196        }
44197
44198        break;
44199
44200      case 'InlineFragment':
44201        nextNode = this._traverseChildren(prevNode, ['directives', 'selections']);
44202
44203        if (!nextNode.selections.length) {
44204          nextNode = null;
44205        }
44206
44207        break;
44208
44209      case 'Fragment':
44210      case 'Root':
44211        nextNode = this._traverseChildren(prevNode, ['argumentDefinitions', 'directives', 'selections']);
44212        break;
44213
44214      case 'Request':
44215        nextNode = this._traverseChildren(prevNode, null, ['fragment', 'root']);
44216        break;
44217
44218      case 'SplitOperation':
44219        nextNode = this._traverseChildren(prevNode, ['selections']);
44220        break;
44221
44222      default:
44223        prevNode;
44224         true ?  false ? undefined : invariant(false) : undefined;
44225    }
44226
44227    return nextNode;
44228  };
44229
44230  _proto._traverseChildren = function _traverseChildren(prevNode, pluralKeys, singularKeys) {
44231    var _this = this;
44232
44233    var nextNode;
44234    pluralKeys && pluralKeys.forEach(function (key) {
44235      var prevItems = prevNode[key];
44236
44237      if (!prevItems) {
44238        return;
44239      }
44240
44241      !Array.isArray(prevItems) ?  false ? undefined : invariant(false) : void 0;
44242
44243      var nextItems = _this._map(prevItems);
44244
44245      if (nextNode || nextItems !== prevItems) {
44246        nextNode = nextNode || _objectSpread({}, prevNode);
44247        nextNode[key] = nextItems;
44248      }
44249    });
44250    singularKeys && singularKeys.forEach(function (key) {
44251      var prevItem = prevNode[key];
44252
44253      if (!prevItem) {
44254        return;
44255      }
44256
44257      var nextItem = _this._visit(prevItem);
44258
44259      if (nextNode || nextItem !== prevItem) {
44260        nextNode = nextNode || _objectSpread({}, prevNode);
44261        nextNode[key] = nextItem;
44262      }
44263    });
44264    return nextNode || prevNode;
44265  };
44266
44267  _proto._map = function _map(prevItems) {
44268    var _this2 = this;
44269
44270    var nextItems;
44271    prevItems.forEach(function (prevItem, index) {
44272      var nextItem = _this2._visit(prevItem);
44273
44274      if (nextItems || nextItem !== prevItem) {
44275        nextItems = nextItems || prevItems.slice(0, index);
44276
44277        if (nextItem) {
44278          nextItems.push(nextItem);
44279        }
44280      }
44281    });
44282    return nextItems || prevItems;
44283  };
44284
44285  _proto._getState = function _getState() {
44286    !this._states.length ?  false ? undefined : invariant(false) : void 0;
44287    return this._states[this._states.length - 1];
44288  };
44289
44290  return Transformer;
44291}();
44292
44293module.exports = {
44294  transform: transform
44295};
44296
44297/***/ }),
44298
44299/***/ "OM4Y":
44300/***/ (function(module, exports, __webpack_require__) {
44301
44302"use strict";
44303
44304
44305// var modulo = require('./modulo');
44306var $floor = Math.floor;
44307
44308// http://262.ecma-international.org/5.1/#sec-5.2
44309
44310module.exports = function floor(x) {
44311	// return x - modulo(x, 1);
44312	return $floor(x);
44313};
44314
44315
44316/***/ }),
44317
44318/***/ "OUqe":
44319/***/ (function(module, exports, __webpack_require__) {
44320
44321"use strict";
44322/**
44323 * Copyright (c) 2013-present, Facebook, Inc.
44324 *
44325 * This source code is licensed under the MIT license found in the
44326 * LICENSE file in the root directory of this source tree.
44327 *
44328 * 
44329 */
44330
44331
44332var validateFormat =  false ? undefined : function (format) {};
44333/**
44334 * Use invariant() to assert state which your program assumes to be true.
44335 *
44336 * Provide sprintf-style format (only %s is supported) and arguments to provide
44337 * information about what broke and what you were expecting.
44338 *
44339 * The invariant message will be stripped in production, but the invariant will
44340 * remain to ensure logic does not differ in production.
44341 */
44342
44343function invariant(condition, format) {
44344  for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
44345    args[_key - 2] = arguments[_key];
44346  }
44347
44348  validateFormat(format);
44349
44350  if (!condition) {
44351    var error;
44352
44353    if (format === undefined) {
44354      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
44355    } else {
44356      var argIndex = 0;
44357      error = new Error(format.replace(/%s/g, function () {
44358        return String(args[argIndex++]);
44359      }));
44360      error.name = 'Invariant Violation';
44361    }
44362
44363    error.framesToPop = 1; // Skip invariant's own stack frame.
44364
44365    throw error;
44366  }
44367}
44368
44369module.exports = invariant;
44370
44371/***/ }),
44372
44373/***/ "PDty":
44374/***/ (function(module, exports, __webpack_require__) {
44375
44376"use strict";
44377
44378
44379var GetIntrinsic = __webpack_require__("AM7I");
44380
44381var $Array = GetIntrinsic('%Array%');
44382var $species = GetIntrinsic('%Symbol.species%', true);
44383var $TypeError = GetIntrinsic('%TypeError%');
44384
44385var Get = __webpack_require__("V/hC");
44386var IsArray = __webpack_require__("plxK");
44387var IsConstructor = __webpack_require__("ugY3");
44388var IsInteger = __webpack_require__("Fo5y");
44389var Type = __webpack_require__("zOLO");
44390
44391// https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate
44392
44393module.exports = function ArraySpeciesCreate(originalArray, length) {
44394	if (!IsInteger(length) || length < 0) {
44395		throw new $TypeError('Assertion failed: length must be an integer >= 0');
44396	}
44397	var len = length === 0 ? 0 : length;
44398	var C;
44399	var isArray = IsArray(originalArray);
44400	if (isArray) {
44401		C = Get(originalArray, 'constructor');
44402		// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
44403		// if (IsConstructor(C)) {
44404		// 	if C is another realm's Array, C = undefined
44405		// 	Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
44406		// }
44407		if ($species && Type(C) === 'Object') {
44408			C = Get(C, $species);
44409			if (C === null) {
44410				C = void 0;
44411			}
44412		}
44413	}
44414	if (typeof C === 'undefined') {
44415		return $Array(len);
44416	}
44417	if (!IsConstructor(C)) {
44418		throw new $TypeError('C must be a constructor');
44419	}
44420	return new C(len); // Construct(C, len);
44421};
44422
44423
44424
44425/***/ }),
44426
44427/***/ "PrET":
44428/***/ (function(module, exports, __webpack_require__) {
44429
44430"use strict";
44431
44432
44433var bind = __webpack_require__("D3zA");
44434var GetIntrinsic = __webpack_require__("AM7I");
44435
44436var $apply = GetIntrinsic('%Function.prototype.apply%');
44437var $call = GetIntrinsic('%Function.prototype.call%');
44438var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
44439
44440var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
44441var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
44442var $max = GetIntrinsic('%Math.max%');
44443
44444if ($defineProperty) {
44445	try {
44446		$defineProperty({}, 'a', { value: 1 });
44447	} catch (e) {
44448		// IE 8 has a broken defineProperty
44449		$defineProperty = null;
44450	}
44451}
44452
44453module.exports = function callBind(originalFunction) {
44454	var func = $reflectApply(bind, $call, arguments);
44455	if ($gOPD && $defineProperty) {
44456		var desc = $gOPD(func, 'length');
44457		if (desc.configurable) {
44458			// original length, plus the receiver, minus any additional arguments (after the receiver)
44459			$defineProperty(
44460				func,
44461				'length',
44462				{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
44463			);
44464		}
44465	}
44466	return func;
44467};
44468
44469var applyBind = function applyBind() {
44470	return $reflectApply(bind, $apply, arguments);
44471};
44472
44473if ($defineProperty) {
44474	$defineProperty(module.exports, 'apply', { value: applyBind });
44475} else {
44476	module.exports.apply = applyBind;
44477}
44478
44479
44480/***/ }),
44481
44482/***/ "QO3R":
44483/***/ (function(module, exports, __webpack_require__) {
44484
44485"use strict";
44486
44487
44488var $isNaN = Number.isNaN || function (a) { return a !== a; };
44489
44490module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };
44491
44492
44493/***/ }),
44494
44495/***/ "QTt7":
44496/***/ (function(module, __webpack_exports__, __webpack_require__) {
44497
44498"use strict";
44499__webpack_require__.r(__webpack_exports__);
44500/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spongeCase", function() { return spongeCase; });
44501function spongeCase(input) {
44502    var result = "";
44503    for (var i = 0; i < input.length; i++) {
44504        result +=
44505            Math.random() > 0.5 ? input[i].toUpperCase() : input[i].toLowerCase();
44506    }
44507    return result;
44508}
44509//# sourceMappingURL=index.js.map
44510
44511/***/ }),
44512
44513/***/ "QqNk":
44514/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
44515
44516"use strict";
44517/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueFieldDefinitionNamesRule; });
44518/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
44519/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("axIb");
44520
44521
44522
44523/**
44524 * Unique field definition names
44525 *
44526 * A GraphQL complex type is only valid if all its fields are uniquely named.
44527 */
44528function UniqueFieldDefinitionNamesRule(context) {
44529  var schema = context.getSchema();
44530  var existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);
44531  var knownFieldNames = Object.create(null);
44532  return {
44533    InputObjectTypeDefinition: checkFieldUniqueness,
44534    InputObjectTypeExtension: checkFieldUniqueness,
44535    InterfaceTypeDefinition: checkFieldUniqueness,
44536    InterfaceTypeExtension: checkFieldUniqueness,
44537    ObjectTypeDefinition: checkFieldUniqueness,
44538    ObjectTypeExtension: checkFieldUniqueness
44539  };
44540
44541  function checkFieldUniqueness(node) {
44542    var _node$fields;
44543
44544    var typeName = node.name.value;
44545
44546    if (!knownFieldNames[typeName]) {
44547      knownFieldNames[typeName] = Object.create(null);
44548    } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
44549
44550
44551    var fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];
44552    var fieldNames = knownFieldNames[typeName];
44553
44554    for (var _i2 = 0; _i2 < fieldNodes.length; _i2++) {
44555      var fieldDef = fieldNodes[_i2];
44556      var fieldName = fieldDef.name.value;
44557
44558      if (hasField(existingTypeMap[typeName], fieldName)) {
44559        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Field \"".concat(typeName, ".").concat(fieldName, "\" already exists in the schema. It cannot also be defined in this type extension."), fieldDef.name));
44560      } else if (fieldNames[fieldName]) {
44561        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Field \"".concat(typeName, ".").concat(fieldName, "\" can only be defined once."), [fieldNames[fieldName], fieldDef.name]));
44562      } else {
44563        fieldNames[fieldName] = fieldDef.name;
44564      }
44565    }
44566
44567    return false;
44568  }
44569}
44570
44571function hasField(type, fieldName) {
44572  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_1__[/* isObjectType */ "N"])(type) || Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_1__[/* isInterfaceType */ "H"])(type) || Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_1__[/* isInputObjectType */ "F"])(type)) {
44573    return type.getFields()[fieldName] != null;
44574  }
44575
44576  return false;
44577}
44578
44579
44580/***/ }),
44581
44582/***/ "Qx16":
44583/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
44584
44585"use strict";
44586/* harmony import */ var _symbols_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2Fve");
44587
44588
44589/* eslint-disable no-redeclare */
44590// $FlowFixMe[name-already-bound]
44591var arrayFrom = Array.from || function (obj, mapFn, thisArg) {
44592  if (obj == null) {
44593    throw new TypeError('Array.from requires an array-like object - not null or undefined');
44594  } // Is Iterable?
44595
44596
44597  var iteratorMethod = obj[_symbols_mjs__WEBPACK_IMPORTED_MODULE_0__[/* SYMBOL_ITERATOR */ "b"]];
44598
44599  if (typeof iteratorMethod === 'function') {
44600    var iterator = iteratorMethod.call(obj);
44601    var result = [];
44602    var step;
44603
44604    for (var i = 0; !(step = iterator.next()).done; ++i) {
44605      result.push(mapFn.call(thisArg, step.value, i)); // Infinite Iterators could cause forEach to run forever.
44606      // After a very large number of iterations, produce an error.
44607      // istanbul ignore if (Too big to actually test)
44608
44609      if (i > 9999999) {
44610        throw new TypeError('Near-infinite iteration.');
44611      }
44612    }
44613
44614    return result;
44615  } // Is Array like?
44616
44617
44618  var length = obj.length;
44619
44620  if (typeof length === 'number' && length >= 0 && length % 1 === 0) {
44621    var _result = [];
44622
44623    for (var _i = 0; _i < length; ++_i) {
44624      if (Object.prototype.hasOwnProperty.call(obj, _i)) {
44625        _result.push(mapFn.call(thisArg, obj[_i], _i));
44626      }
44627    }
44628
44629    return _result;
44630  }
44631
44632  return [];
44633};
44634
44635/* harmony default export */ __webpack_exports__["a"] = (arrayFrom);
44636
44637
44638/***/ }),
44639
44640/***/ "R/MH":
44641/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
44642
44643"use strict";
44644/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PossibleTypeExtensionsRule; });
44645/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
44646/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2C6G");
44647/* harmony import */ var _jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("pv/G");
44648/* harmony import */ var _jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("T95z");
44649/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("dWS+");
44650/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("/jXB");
44651/* harmony import */ var _language_predicates_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Xizt");
44652/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("axIb");
44653var _defKindToExtKind;
44654
44655function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
44656
44657
44658
44659
44660
44661
44662
44663
44664
44665
44666/**
44667 * Possible type extension
44668 *
44669 * A type extension is only valid if the type is defined and has the same kind.
44670 */
44671function PossibleTypeExtensionsRule(context) {
44672  var schema = context.getSchema();
44673  var definedTypes = Object.create(null);
44674
44675  for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) {
44676    var def = _context$getDocument$2[_i2];
44677
44678    if (Object(_language_predicates_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isTypeDefinitionNode */ "d"])(def)) {
44679      definedTypes[def.name.value] = def;
44680    }
44681  }
44682
44683  return {
44684    ScalarTypeExtension: checkExtension,
44685    ObjectTypeExtension: checkExtension,
44686    InterfaceTypeExtension: checkExtension,
44687    UnionTypeExtension: checkExtension,
44688    EnumTypeExtension: checkExtension,
44689    InputObjectTypeExtension: checkExtension
44690  };
44691
44692  function checkExtension(node) {
44693    var typeName = node.name.value;
44694    var defNode = definedTypes[typeName];
44695    var existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName);
44696    var expectedKind;
44697
44698    if (defNode) {
44699      expectedKind = defKindToExtKind[defNode.kind];
44700    } else if (existingType) {
44701      expectedKind = typeToExtKind(existingType);
44702    }
44703
44704    if (expectedKind) {
44705      if (expectedKind !== node.kind) {
44706        var kindStr = extensionKindToTypeName(node.kind);
44707        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Cannot extend non-".concat(kindStr, " type \"").concat(typeName, "\"."), defNode ? [defNode, node] : node));
44708      }
44709    } else {
44710      var allTypeNames = Object.keys(definedTypes);
44711
44712      if (schema) {
44713        allTypeNames = allTypeNames.concat(Object.keys(schema.getTypeMap()));
44714      }
44715
44716      var suggestedTypes = Object(_jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(typeName, allTypeNames);
44717      context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Cannot extend type \"".concat(typeName, "\" because it is not defined.") + Object(_jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(suggestedTypes), node.name));
44718    }
44719  }
44720}
44721var defKindToExtKind = (_defKindToExtKind = {}, _defineProperty(_defKindToExtKind, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].SCALAR_TYPE_DEFINITION, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].SCALAR_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].OBJECT_TYPE_DEFINITION, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].OBJECT_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].INTERFACE_TYPE_DEFINITION, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].INTERFACE_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].UNION_TYPE_DEFINITION, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].UNION_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].ENUM_TYPE_DEFINITION, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].ENUM_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].INPUT_OBJECT_TYPE_DEFINITION, _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].INPUT_OBJECT_TYPE_EXTENSION), _defKindToExtKind);
44722
44723function typeToExtKind(type) {
44724  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isScalarType */ "R"])(type)) {
44725    return _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].SCALAR_TYPE_EXTENSION;
44726  }
44727
44728  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isObjectType */ "N"])(type)) {
44729    return _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].OBJECT_TYPE_EXTENSION;
44730  }
44731
44732  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInterfaceType */ "H"])(type)) {
44733    return _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].INTERFACE_TYPE_EXTENSION;
44734  }
44735
44736  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isUnionType */ "T"])(type)) {
44737    return _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].UNION_TYPE_EXTENSION;
44738  }
44739
44740  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isEnumType */ "E"])(type)) {
44741    return _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].ENUM_TYPE_EXTENSION;
44742  } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
44743
44744
44745  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInputObjectType */ "F"])(type)) {
44746    return _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].INPUT_OBJECT_TYPE_EXTENSION;
44747  } // istanbul ignore next (Not reachable. All possible types have been considered)
44748
44749
44750   false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(0, 'Unexpected type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type));
44751}
44752
44753function extensionKindToTypeName(kind) {
44754  switch (kind) {
44755    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].SCALAR_TYPE_EXTENSION:
44756      return 'scalar';
44757
44758    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].OBJECT_TYPE_EXTENSION:
44759      return 'object';
44760
44761    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].INTERFACE_TYPE_EXTENSION:
44762      return 'interface';
44763
44764    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].UNION_TYPE_EXTENSION:
44765      return 'union';
44766
44767    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].ENUM_TYPE_EXTENSION:
44768      return 'enum';
44769
44770    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_5__[/* Kind */ "a"].INPUT_OBJECT_TYPE_EXTENSION:
44771      return 'input object';
44772  } // istanbul ignore next (Not reachable. All possible types have been considered)
44773
44774
44775   false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(0, 'Unexpected kind: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(kind));
44776}
44777
44778
44779/***/ }),
44780
44781/***/ "RDGc":
44782/***/ (function(module, __webpack_exports__, __webpack_require__) {
44783
44784"use strict";
44785/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ApolloFederation; });
44786/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DetailedError; });
44787/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return addFederationReferencesToSchema; });
44788/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return federationSpec; });
44789/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getBaseType; });
44790/* unused harmony export hasNullableTypeRecursively */
44791/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isComplexPluginOutput; });
44792/* unused harmony export isConfiguredOutput */
44793/* unused harmony export isDetailedError */
44794/* unused harmony export isOutputConfigArray */
44795/* unused harmony export isUsingTypes */
44796/* unused harmony export isWrapperType */
44797/* unused harmony export mergeOutputs */
44798/* unused harmony export normalizeConfig */
44799/* unused harmony export normalizeInstanceOrArray */
44800/* unused harmony export normalizeOutputParam */
44801/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return removeFederation; });
44802/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return removeNonNullWrapper; });
44803/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return resolveExter
44803nalModuleAndFn; });
44804/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("axIb");
44805/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("L2ys");
44806/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("/jXB");
44807/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("EMzn");
44808/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("3vMM");
44809/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("LvDl");
44810/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);
44811
44812
44813
44814function resolveExternalModuleAndFn(pointer) {
44815    if (typeof pointer === 'function') {
44816        return pointer;
44817    }
44818    // eslint-disable-next-line no-eval
44819    const importExternally = (moduleName) => eval(`require('${moduleName}')`);
44820    // eslint-disable-next-line prefer-const
44821    let [moduleName, functionName] = pointer.split('#');
44822    // Temp workaround until v2
44823    if (moduleName === 'change-case') {
44824        moduleName = 'change-case-all';
44825    }
44826    const { resolve } = importExternally('path');
44827    const localFilePath = resolve(process.cwd(), moduleName);
44828    const { existsSync } = importExternally('fs');
44829    const localFileExists = existsSync(localFilePath);
44830    const importFrom = importExternally('import-from');
44831    const loadedModule = localFileExists ? importExternally(localFilePath) : importFrom(process.cwd(), moduleName);
44832    if (!(functionName in loadedModule) && typeof loadedModule !== 'function') {
44833        throw new Error(`${functionName} couldn't be found in module ${moduleName}!`);
44834    }
44835    return loadedModule[functionName] || loadedModule;
44836}
44837
44838function isComplexPluginOutput(obj) {
44839    return typeof obj === 'object' && obj.hasOwnProperty('content');
44840}
44841
44842function mergeOutputs(content) {
44843    const result = { content: '', prepend: [], append: [] };
44844    if (Array.isArray(content)) {
44845        content.forEach(item => {
44846            if (typeof item === 'string') {
44847                result.content += item;
44848            }
44849            else {
44850                result.content += item.content;
44851                result.prepend.push(...(item.prepend || []));
44852                result.append.push(...(item.append || []));
44853            }
44854        });
44855    }
44856    return [...result.prepend, result.content, ...result.append].join('\n');
44857}
44858function isWrapperType(t) {
44859    return Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isListType */ "J"])(t) || Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isNonNullType */ "L"])(t);
44860}
44861function getBaseType(type) {
44862    if (isWrapperType(type)) {
44863        return getBaseType(type.ofType);
44864    }
44865    else {
44866        return type;
44867    }
44868}
44869function removeNonNullWrapper(type) {
44870    return Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isNonNullType */ "L"])(type) ? type.ofType : type;
44871}
44872
44873function isOutputConfigArray(type) {
44874    return Array.isArray(type);
44875}
44876function isConfiguredOutput(type) {
44877    return typeof type === 'object' && type.plugins;
44878}
44879function normalizeOutputParam(config) {
44880    // In case of direct array with a list of plugins
44881    if (isOutputConfigArray(config)) {
44882        return {
44883            documents: [],
44884            schema: [],
44885            plugins: isConfiguredOutput(config) ? config.plugins : config,
44886        };
44887    }
44888    else if (isConfiguredOutput(config)) {
44889        return config;
44890    }
44891    else {
44892        throw new Error(`Invalid "generates" config!`);
44893    }
44894}
44895function normalizeInstanceOrArray(type) {
44896    if (Array.isArray(type)) {
44897        return type;
44898    }
44899    else if (!type) {
44900        return [];
44901    }
44902    return [type];
44903}
44904function normalizeConfig(config) {
44905    if (typeof config === 'string') {
44906        return [{ [config]: {} }];
44907    }
44908    else if (Array.isArray(config)) {
44909        return config.map(plugin => (typeof plugin === 'string' ? { [plugin]: {} } : plugin));
44910    }
44911    else if (typeof config === 'object') {
44912        return Object.keys(config).reduce((prev, pluginName) => [...prev, { [pluginName]: config[pluginName] }], []);
44913    }
44914    else {
44915        return [];
44916    }
44917}
44918function hasNullableTypeRecursively(type) {
44919    if (!Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isNonNullType */ "L"])(type)) {
44920        return true;
44921    }
44922    if (Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isListType */ "J"])(type) || Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isNonNullType */ "L"])(type)) {
44923        return hasNullableTypeRecursively(type.ofType);
44924    }
44925    return false;
44926}
44927function isUsingTypes(document, externalFragments, schema) {
44928    let foundFields = 0;
44929    const typesStack = [];
44930    Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* visit */ "c"])(document, {
44931        SelectionSet: {
44932            enter(node, key, parent, anscestors) {
44933                const insideIgnoredFragment = anscestors.find((f) => f.kind && f.kind === 'FragmentDefinition' && externalFragments.includes(f.name.value));
44934                if (insideIgnoredFragment) {
44935                    return;
44936                }
44937                const selections = node.selections || [];
44938                if (schema && selections.length > 0) {
44939                    const nextTypeName = (() => {
44940                        if (parent.kind === graphql__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].FRAGMENT_DEFINITION) {
44941                            return parent.typeCondition.name.value;
44942                        }
44943                        else if (parent.kind === graphql__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].FIELD) {
44944                            const lastType = typesStack[typesStack.length - 1];
44945                            if (!lastType) {
44946                                throw new Error(`Unable to find parent type! Please make sure you operation passes validation`);
44947                            }
44948                            const field = lastType.getFields()[parent.name.value];
44949                            if (!field) {
44950                                throw new Error(`Unable to find field "${parent.name.value}" on type "${lastType}"!`);
44951                            }
44952                            return getBaseType(field.type).name;
44953                        }
44954                        else if (parent.kind === graphql__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].OPERATION_DEFINITION) {
44955                            if (parent.operation === 'query') {
44956                                return schema.getQueryType().name;
44957                            }
44958                            else if (parent.operation === 'mutation') {
44959                                return schema.getMutationType().name;
44960                            }
44961                            else if (parent.operation === 'subscription') {
44962                                return schema.getSubscriptionType().name;
44963                            }
44964                        }
44965                        else if (parent.kind === graphql__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].INLINE_FRAGMENT) {
44966                            if (parent.typeCondition) {
44967                                return parent.typeCondition.name.value;
44968                            }
44969                            else {
44970                                return typesStack[typesStack.length - 1].name;
44971                            }
44972                        }
44973                        return null;
44974                    })();
44975                    typesStack.push(schema.getType(nextTypeName));
44976                }
44977            },
44978            leave(node) {
44979                const selections = node.selections || [];
44980                if (schema && selections.length > 0) {
44981                    typesStack.pop();
44982                }
44983            },
44984        },
44985        Field: {
44986            enter: (node, key, parent, path, anscestors) => {
44987                if (node.name.value.startsWith('__')) {
44988                    return;
44989                }
44990                const insideIgnoredFragment = anscestors.find((f) => f.kind && f.kind === 'FragmentDefinition' && externalFragments.includes(f.name.value));
44991                if (insideIgnoredFragment) {
44992                    return;
44993                }
44994                const selections = node.selectionSet ? node.selectionSet.selections || [] : [];
44995                const relevantFragmentSpreads = selections.filter(s => s.kind === graphql__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].FRAGMENT_SPREAD && !externalFragments.includes(s.name.value));
44996                if (selections.length === 0 || relevantFragmentSpreads.length > 0) {
44997                    foundFields++;
44998                }
44999                if (schema) {
45000                    const lastType = typesStack[typesStack.length - 1];
45001                    if (lastType) {
45002                        if (Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(lastType)) {
45003                            const field = lastType.getFields()[node.name.value];
45004                            if (!field) {
45005                                throw new Error(`Unable to find f
45005ield "${node.name.value}" on type "${lastType}"!`);
45006                            }
45007                            const currentType = field.type;
45008                            // To handle `Maybe` usage
45009                            if (hasNullableTypeRecursively(currentType)) {
45010                                foundFields++;
45011                            }
45012                        }
45013                    }
45014                }
45015            },
45016        },
45017        enter: {
45018            VariableDefinition: (node, key, parent, path, anscestors) => {
45019                const insideIgnoredFragment = anscestors.find((f) => f.kind && f.kind === 'FragmentDefinition' && externalFragments.includes(f.name.value));
45020                if (insideIgnoredFragment) {
45021                    return;
45022                }
45023                foundFields++;
45024            },
45025            InputValueDefinition: (node, key, parent, path, anscestors) => {
45026                const insideIgnoredFragment = anscestors.find((f) => f.kind && f.kind === 'FragmentDefinition' && externalFragments.includes(f.name.value));
45027                if (insideIgnoredFragment) {
45028                    return;
45029                }
45030                foundFields++;
45031            },
45032        },
45033    });
45034    return foundFields > 0;
45035}
45036
45037/**
45038 * Federation Spec
45039 */
45040const federationSpec = Object(graphql__WEBPACK_IMPORTED_MODULE_3__["parse"])(/* GraphQL */ `
45041  scalar _FieldSet
45042
45043  directive @external on FIELD_DEFINITION
45044  directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
45045  directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
45046  directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
45047`);
45048/**
45049 * Adds `__resolveReference` in each ObjectType involved in Federation.
45050 * @param schema
45051 */
45052function addFederationReferencesToSchema(schema) {
45053    const typeMap = schema.getTypeMap();
45054    for (const typeName in typeMap) {
45055        const type = schema.getType(typeName);
45056        if (Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(type) && isFederationObjectType(type)) {
45057            const typeConfig = type.toConfig();
45058            typeConfig.fields = {
45059                [resolveReferenceFieldName]: {
45060                    type,
45061                },
45062                ...typeConfig.fields,
45063            };
45064            const newType = new graphql__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLObjectType */ "f"](typeConfig);
45065            newType.astNode = newType.astNode || Object(graphql__WEBPACK_IMPORTED_MODULE_3__["parse"])(Object(graphql__WEBPACK_IMPORTED_MODULE_4__[/* printType */ "c"])(newType)).definitions[0];
45066            newType.astNode.fields.unshift({
45067                kind: graphql__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].FIELD_DEFINITION,
45068                name: {
45069                    kind: graphql__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].NAME,
45070                    value: resolveReferenceFieldName,
45071                },
45072                type: {
45073                    kind: graphql__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].NAMED_TYPE,
45074                    name: {
45075                        kind: graphql__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].NAME,
45076                        value: typeName,
45077                    },
45078                },
45079            });
45080            typeMap[typeName] = newType;
45081        }
45082    }
45083    return schema;
45084}
45085/**
45086 * Removes Federation Spec from GraphQL Schema
45087 * @param schema
45088 * @param config
45089 */
45090function removeFederation(schema) {
45091    const queryType = schema.getQueryType();
45092    const queryTypeFields = queryType.getFields();
45093    delete queryTypeFields._entities;
45094    delete queryTypeFields._service;
45095    const typeMap = schema.getTypeMap();
45096    delete typeMap._Service;
45097    delete typeMap._Entity;
45098    delete typeMap._Any;
45099    return schema;
45100}
45101const resolveReferenceFieldName = '__resolveReference';
45102class ApolloFederation {
45103    constructor({ enabled, schema }) {
45104        this.enabled = false;
45105        this.enabled = enabled;
45106        this.schema = schema;
45107        this.providesMap = this.createMapOfProvides();
45108    }
45109    /**
45110     * Excludes types definde by Federation
45111     * @param typeNames List of type names
45112     */
45113    filterTypeNames(typeNames) {
45114        return this.enabled ? typeNames.filter(t => t !== '_FieldSet') : typeNames;
45115    }
45116    /**
45117     * Excludes `__resolveReference` fields
45118     * @param fieldNames List of field names
45119     */
45120    filterFieldNames(fieldNames) {
45121        return this.enabled ? fieldNames.filter(t => t !== resolveReferenceFieldName) : fieldNames;
45122    }
45123    /**
45124     * Decides if directive should not be generated
45125     * @param name directive's name
45126     */
45127    skipDirective(name) {
45128        return this.enabled && ['external', 'requires', 'provides', 'key'].includes(name);
45129    }
45130    /**
45131     * Decides if scalar should not be generated
45132     * @param name directive's name
45133     */
45134    skipScalar(name) {
45135        return this.enabled && name === '_FieldSet';
45136    }
45137    /**
45138     * Decides if field should not be generated
45139     * @param data
45140     */
45141    skipField({ fieldNode, parentType }) {
45142        if (!this.enabled || !Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(parentType) || !isFederationObjectType(parentType)) {
45143            return false;
45144        }
45145        return this.isExternalAndNotProvided(fieldNode, parentType);
45146    }
45147    isResolveReferenceField(fieldNode) {
45148        const name = typeof fieldNode.name === 'string' ? fieldNode.name : fieldNode.name.value;
45149        return this.enabled && name === resolveReferenceFieldName;
45150    }
45151    /**
45152     * Transforms ParentType signature in ObjectTypes involved in Federation
45153     * @param data
45154     */
45155    transformParentType({ fieldNode, parentType, parentTypeSignature, }) {
45156        if (this.enabled &&
45157            Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(parentType) &&
45158            isFederationObjectType(parentType) &&
45159            (isTypeExtension(parentType) || fieldNode.name.value === resolveReferenceFieldName)) {
45160            const keys = getDirectivesByName('key', parentType);
45161            if (keys.length) {
45162                const outputs = [`{ __typename: '${parentType.name}' } &`];
45163                // Look for @requires and see what the service needs and gets
45164                const requires = getDirectivesByName('requires', fieldNode).map(this.extractKeyOrRequiresFieldSet);
45165                const requiredFields = this.translateFieldSet(Object(lodash__WEBPACK_IMPORTED_MODULE_5__["merge"])({}, ...requires), parentTypeSignature);
45166                // @key() @key() - "primary keys" in Federation
45167                const primaryKeys = keys.map(def => {
45168                    const fields = this.extractKeyOrRequiresFieldSet(def);
45169                    return this.translateFieldSet(fields, parentTypeSignature);
45170                });
45171                const [open, close] = primaryKeys.length > 1 ? ['(', ')'] : ['', ''];
45172                outputs.push([open, primaryKeys.join(' | '), close].join(''));
45173                // include required fields
45174                if (requires.length) {
45175                    outputs.push(`& ${requiredFields}`);
45176                }
45177                return outputs.join(' ');
45178            }
45179        }
45180        return parentTypeSignature;
45181    }
45182    isExternalAndNotProvided(fieldNode, objectType) {
45183        return this.isExternal(fieldNode) && !this.hasProvides(objectType, fieldNode);
45184    }
45185    isExternal(node) {
45186        return getDirectivesByName('external', node).length > 0;
45187    }
45188    hasProvides(objectType, node) {
45189        const fields = this.providesMap[Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(objectType) ? objectType.name : objectType.name.value];
45190        if (fields && fields.length) {
45191            return fields.includes(node.name.value);
45192        }
45193        return false;
45194    }
45195    translateFieldSet(fields, parentTypeRef) {
45196        return `GraphQLRecursivePick<${parentTypeRef}, ${JSON.stringify(fields)}>`;
45197    }
45198    extractKeyOrRequiresFieldSet(directive) {
45199        const arg = directive.arguments.find(arg => arg.name.value === 'fields');
45200        const value = arg.value.value;
45201        return Object(graphql__WEBPACK_IMPORTED_MODULE_1__[/* visit */ "c"])(Object(graphql__WEBPACK_IMPORTED_MODULE_3__["parse"])(`{${value}}`), {
45202            leave: {
45203                SelectionSet(node) {
45204                    return node.selections.reduce((accum, field) => {
45205                        accum[field.name] = field.selection;
45206                        return accum;
45207                    }, {});
45208                },
45209                Field(node) {
45210                    return {
45211                        name: node.name.value,
45212                        selection: node.selectionSet ? node.selectionSet : true,
45213                    };
45214                },
45215                Document(node) {
45216                    return node.definitions.find((def) => def.kind === 'OperationDefinition' && def.operation === 'query').selectionSet;
45217                },
45218            },
45219        });
45220    }
45221    extractProvidesFieldSet(directive) {
45222        const arg = directive.arguments.find(arg => arg.name.value === 'fields');
45223        const value = arg.value.value;
45224        if (/[{}]/gi.test(value)) {
45225            throw new Error('Nested fields in _FieldSet is not supported in the @provides directive');
45226        }
45227        return value.split(/\s+/g);
45228    }
45229    createMapOfProvides() {
45230        const providesMap = {};
45231        Object.keys(this.schema.getTypeMap()).forEach(typename => {
45232            const objectType = this.schema.getType(typename);
45233            if (Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(objectType)) {
45234                Object.values(objectType.getFields()).forEach(field => {
45235                    const provides = getDirectivesByName('provides', field.astNode)
45236                        .map(this.extractProvidesFieldSet)
45237                        .reduce((prev, curr) => [...prev, ...curr], []);
45238                    const ofType = getBaseType(field.type);
45239                    if (!providesMap[ofType.name]) {
45240                        providesMap[ofType.name] = [];
45241                    }
45242                    providesMap[ofType.name].push(...provides);
45243                });
45244            }
45245        });
45246        return providesMap;
45247    }
45248}
45249/**
45250 * Checks if Object Type is involved in Federation. Based on `@key` directive
45251 * @param node Type
45252 */
45253function isFederationObjectType(node) {
45254    const definition = Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(node)
45255        ? node.astNode || Object(graphql__WEBPACK_IMPORTED_MODULE_3__["parse"])(Object(graphql__WEBPACK_IMPORTED_MODULE_4__[/* printType */ "c"])(node)).definitions[0]
45256        : node;
45257    const name = definition.name.value;
45258    const directives = definition.directives;
45259    const isNotRoot = !['Query', 'Mutation', 'Subscription'].includes(name);
45260    const isNotIntrospection = !name.startsWith('__');
45261    const hasKeyDirective = directives.some(d => d.name.value === 'key');
45262    return isNotRoot && isNotIntrospection && hasKeyDirective;
45263}
45264/**
45265 * Extracts directives from a node based on directive's name
45266 * @param name directive name
45267 * @param node ObjectType or Field
45268 */
45269function getDirectivesByName(name, node) {
45270    let astNode;
45271    if (Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(node)) {
45272        astNode = node.astNode;
45273    }
45274    else {
45275        astNode = node;
45276    }
45277    if (astNode && astNode.directives) {
45278        return astNode.directives.filter(d => d.name.value === name);
45279    }
45280    return [];
45281}
45282/**
45283 * Checks if the Object Type extends a federated type from a remote schema.
45284 * Based on if any of its fields contain the `@external` directive
45285 * @param node Type
45286 */
45287function isTypeExtension(node) {
45288    var _a;
45289    const definition = Object(graphql__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(node)
45290        ? node.astNode || Object(graphql__WEBPACK_IMPORTED_MODULE_3__["parse"])(Object(graphql__WEBPACK_IMPORTED_MODULE_4__[/* printType */ "c"])(node)).definitions[0]
45291        : node;
45292    return (_a = definition.fields) === null || _a === void 0 ? void 0 : _a.some(field => getDirectivesByName('external', field).length);
45293}
45294
45295class DetailedError extends Error {
45296    constructor(message, details, source) {
45297        super(message);
45298        this.message = message;
45299        this.details = details;
45300        this.source = source;
45301        Object.setPrototypeOf(this, DetailedError.prototype);
45302        Error.captureStackTrace(this, DetailedError);
45303    }
45304}
45305function isDetailedError(error) {
45306    return error.details;
45307}
45308
45309
45310//# sourceMappingURL=index.esm.js.map
45311
45312/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("8oxB")))
45313
45314/***/ }),
45315
45316/***/ "RIqP":
45317/***/ (function(module, exports, __webpack_require__) {
45318
45319var arrayWithoutHoles = __webpack_require__("Ijbi");
45320
45321var iterableToArray = __webpack_require__("EbDI");
45322
45323var unsupportedIterableToArray = __webpack_require__("ZhPi");
45324
45325var nonIterableSpread = __webpack_require__("Bnag");
45326
45327function _toConsumableArray(arr) {
45328  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
45329}
45330
45331module.exports = _toConsumableArray;
45332
45333/***/ }),
45334
45335/***/ "RKIb":
45336/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
45337
45338"use strict";
45339// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
45340var nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;
45341/* harmony default export */ __webpack_exports__["a"] = (nodejsCustomInspectSymbol);
45342
45343
45344/***/ }),
45345
45346/***/ "RWgL":
45347/***/ (function(module, exports, __webpack_require__) {
45348
45349"use strict";
45350
45351
45352var GetIntrinsic = __webpack_require__("AM7I");
45353
45354var $TypeError = GetIntrinsic('%TypeError%');
45355
45356var DefineOwnProperty = __webpack_require__("KPrL");
45357
45358var FromPropertyDescriptor = __webpack_require__("hYbJ");
45359var OrdinaryGetOwnProperty = __webpack_require__("EZ6x");
45360var IsDataDescriptor = __webpack_require__("ayMG");
45361var IsExtensible = __webpack_require__("URYG");
45362var IsPropertyKey = __webpack_require__("ml7t");
45363var SameValue = __webpack_require__("tS0h");
45364var Type = __webpack_require__("zOLO");
45365
45366// https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty
45367
45368module.exports = function CreateDataProperty(O, P, V) {
45369	if (Type(O) !== 'Object') {
45370		throw new $TypeError('Assertion failed: Type(O) is not Object');
45371	}
45372	if (!IsPropertyKey(P)) {
45373		throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
45374	}
45375	var oldDesc = OrdinaryGetOwnProperty(O, P);
45376	var extensible = !oldDesc || IsExtensible(O);
45377	var immutable = oldDesc && (!oldDesc['[[Writable]]'] || !oldDesc['[[Configurable]]']);
45378	if (immutable || !extensible) {
45379		return false;
45380	}
45381	return DefineOwnProperty(
45382		IsDataDescriptor,
45383		SameValue,
45384		FromPropertyDescriptor,
45385		O,
45386		P,
45387		{
45388			'[[Configurable]]': true,
45389			'[[Enumerable]]': true,
45390			'[[Value]]': V,
45391			'[[Writable]]': true
45392		}
45393	);
45394};
45395
45396
45397/***/ }),
45398
45399/***/ "Rska":
45400/***/ (function(module, exports, __webpack_require__) {
45401
45402var hasMap = typeof Map === 'function' && Map.prototype;
45403var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
45404var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
45405var mapForEach = hasMap && Map.prototype.forEach;
45406var hasSet = typeof Set === 'function' && Set.prototype;
45407var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
45408var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
45409var setForEach = hasSet && Set.prototype.forEach;
45410var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
45411var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
45412var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
45413var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
45414var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
45415var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
45416var booleanValueOf = Boolean.prototype.valueOf;
45417var objectToString = Object.prototype.toString;
45418var functionToString = Function.prototype.toString;
45419var match = String.prototype.match;
45420var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
45421var gOPS = Object.getOwnPropertySymbols;
45422var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
45423var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
45424var isEnumerable = Object.prototype.propertyIsEnumerable;
45425
45426var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
45427    [].__proto__ === Array.prototype // eslint-disable-line no-proto
45428        ? function (O) {
45429            return O.__proto__; // eslint-disable-line no-proto
45430        }
45431        : null
45432);
45433
45434var inspectCustom = __webpack_require__(0).custom;
45435var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
45436var toStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag !== 'undefined' ? Symbol.toStringTag : null;
45437
45438module.exports = function inspect_(obj, options, depth, seen) {
45439    var opts = options || {};
45440
45441    if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
45442        throw new TypeError('option "quoteStyle" must be "single" or "double"');
45443    }
45444    if (
45445        has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
45446            ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
45447            : opts.maxStringLength !== null
45448        )
45449    ) {
45450        throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
45451    }
45452    var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
45453    if (typeof customInspect !== 'boolean') {
45454        throw new TypeError('option "customInspect", if provided, must be `true` or `false`');
45455    }
45456
45457    if (
45458        has(opts, 'indent')
45459        && opts.indent !== null
45460        && opts.indent !== '\t'
45461        && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
45462    ) {
45463        throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');
45464    }
45465
45466    if (typeof obj === 'undefined') {
45467        return 'undefined';
45468    }
45469    if (obj === null) {
45470        return 'null';
45471    }
45472    if (typeof obj === 'boolean') {
45473        return obj ? 'true' : 'false';
45474    }
45475
45476    if (typeof obj === 'string') {
45477        return inspectString(obj, opts);
45478    }
45479    if (typeof obj === 'number') {
45480        if (obj === 0) {
45481            return Infinity / obj > 0 ? '0' : '-0';
45482        }
45483        return String(obj);
45484    }
45485    if (typeof obj === 'bigint') {
45486        return String(obj) + 'n';
45487    }
45488
45489    var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
45490    if (typeof depth === 'undefined') { depth = 0; }
45491    if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
45492        return isArray(obj) ? '[Array]' : '[Object]';
45493    }
45494
45495    var indent = getIndent(opts, depth);
45496
45497    if (typeof seen === 'undefined') {
45498        seen = [];
45499    } else if (indexOf(seen, obj) >= 0) {
45500        return '[Circular]';
45501    }
45502
45503    function inspect(value, from, noIndent) {
45504        if (from) {
45505            seen = seen.slice();
45506            seen.push(from);
45507        }
45508        if (noIndent) {
45509            var newOpts = {
45510                depth: opts.depth
45511            };
45512            if (has(opts, 'quoteStyle')) {
45513                newOpts.quoteStyle = opts.quoteStyle;
45514            }
45515            return inspect_(value, newOpts, depth + 1, seen);
45516        }
45517        return inspect_(value, opts, depth + 1, seen);
45518    }
45519
45520    if (typeof obj === 'function') {
45521        var name = nameOf(obj);
45522        var keys = arrObjKeys(obj, inspect);
45523        return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + keys.join(', ') + ' }' : '');
45524    }
45525    if (isSymbol(obj)) {
45526        var symString = hasShammedSymbols ? String(obj).replace(/^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
45527        return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
45528    }
45529    if (isElement(obj)) {
45530        var s = '<' + String(obj.nodeName).toLowerCase();
45531        var attrs = obj.attributes || [];
45532        for (var i = 0; i < attrs.length; i++) {
45533            s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
45534        }
45535        s += '>';
45536        if (obj.childNodes && obj.childNodes.length) { s += '...'; }
45537        s += '</' + String(obj.nodeName).toLowerCase() + '>';
45538        return s;
45539    }
45540    if (isArray(obj)) {
45541        if (obj.length === 0) { return '[]'; }
45542        var xs = arrObjKeys(obj, inspect);
45543        if (indent && !singleLineValues(xs)) {
45544            return '[' + indentedJoin(xs, indent) + ']';
45545        }
45546        return '[ ' + xs.join(', ') + ' ]';
45547    }
45548    if (isError(obj)) {
45549        var parts = arrObjKeys(obj, inspect);
45550        if (parts.length === 0) { return '[' + String(obj) + ']'; }
45551        return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }';
45552    }
45553    if (typeof obj === 'object' && customInspect) {
45554        if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
45555            return obj[inspectSymbol]();
45556        } else if (typeof obj.inspect === 'function') {
45557            return obj.inspect();
45558        }
45559    }
45560    if (isMap(obj)) {
45561        var mapParts = [];
45562        mapForEach.call(obj, function (value, key) {
45563            mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
45564        });
45565        return collectionOf('Map', mapSize.call(obj), mapParts, indent);
45566    }
45567    if (isSet(obj)) {
45568        var setParts = [];
45569        setForEach.call(obj, function (value) {
45570            setParts.push(inspect(value, obj));
45571        });
45572        return collectionOf('Set', setSize.call(obj), setParts, indent);
45573    }
45574    if (isWeakMap(obj)) {
45575        return weakCollectionOf('WeakMap');
45576    }
45577    if (isWeakSet(obj)) {
45578        return weakCollectionOf('WeakSet');
45579    }
45580    if (isWeakRef(obj)) {
45581        return weakCollectionOf('WeakRef');
45582    }
45583    if (isNumber(obj)) {
45584        return markBoxed(inspect(Number(obj)));
45585    }
45586    if (isBigInt(obj)) {
45587        return markBoxed(inspect(bigIntValueOf.call(obj)));
45588    }
45589    if (isBoolean(obj)) {
45590        return markBoxed(booleanValueOf.call(obj));
45591    }
45592    if (isString(obj)) {
45593        return markBoxed(inspect(String(obj)));
45594    }
45595    if (!isDate(obj) && !isRegExp(obj)) {
45596        var ys = arrObjKeys(obj, inspect);
45597        var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
45598        var protoTag = obj instanceof Object ? '' : 'null prototype';
45599        var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? toStr(obj).slice(8, -1) : protoTag ? 'Object' : '';
45600        var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
45601        var tag = constructorTag + (stringTag || protoTag ? '[' + [].concat(stringTag || [], protoTag || []).join(': ') + '] ' : '');
45602        if (ys.length === 0) { return tag + '{}'; }
45603        if (indent) {
45604            return tag + '{' + indentedJoin(ys, indent) + '}';
45605        }
45606        return tag + '{ ' + ys.join(', ') + ' }';
45607    }
45608    return String(obj);
45609};
45610
45611function wrapQuotes(s, defaultStyle, opts) {
45612    var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
45613    return quoteChar + s + quoteChar;
45614}
45615
45616function quote(s) {
45617    return String(s).replace(/"/g, '&quot;');
45618}
45619
45620function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
45621function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
45622function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
45623function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
45624function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
45625function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
45626function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
45627
vendor: 4,431 bytes, lines 45628-45804
45628// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
45629function isSymbol(obj) {
45630    if (hasShammedSymbols) {
45631        return obj && typeof obj === 'object' && obj instanceof Symbol;
45632    }
45633    if (typeof obj === 'symbol') {
45634        return true;
45635    }
45636    if (!obj || typeof obj !== 'object' || !symToString) {
45637        return false;
45638    }
45639    try {
45640        symToString.call(obj);
45641        return true;
45642    } catch (e) {}
45643    return false;
45644}
45645
45646function isBigInt(obj) {
45647    if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
45648        return false;
45649    }
45650    try {
45651        bigIntValueOf.call(obj);
45652        return true;
45653    } catch (e) {}
45654    return false;
45655}
45656
45657var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
45658function has(obj, key) {
45659    return hasOwn.call(obj, key);
45660}
45661
45662function toStr(obj) {
45663    return objectToString.call(obj);
45664}
45665
45666function nameOf(f) {
45667    if (f.name) { return f.name; }
45668    var m = match.call(functionToString.call(f), /^function\s*([\w$]+)/);
45669    if (m) { return m[1]; }
45670    return null;
45671}
45672
45673function indexOf(xs, x) {
45674    if (xs.indexOf) { return xs.indexOf(x); }
45675    for (var i = 0, l = xs.length; i < l; i++) {
45676        if (xs[i] === x) { return i; }
45677    }
45678    return -1;
45679}
45680
45681function isMap(x) {
45682    if (!mapSize || !x || typeof x !== 'object') {
45683        return false;
45684    }
45685    try {
45686        mapSize.call(x);
45687        try {
45688            setSize.call(x);
45689        } catch (s) {
45690            return true;
45691        }
45692        return x instanceof Map; // core-js workaround, pre-v2.5.0
45693    } catch (e) {}
45694    return false;
45695}
45696
45697function isWeakMap(x) {
45698    if (!weakMapHas || !x || typeof x !== 'object') {
45699        return false;
45700    }
45701    try {
45702        weakMapHas.call(x, weakMapHas);
45703        try {
45704            weakSetHas.call(x, weakSetHas);
45705        } catch (s) {
45706            return true;
45707        }
45708        return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
45709    } catch (e) {}
45710    return false;
45711}
45712
45713function isWeakRef(x) {
45714    if (!weakRefDeref || !x || typeof x !== 'object') {
45715        return false;
45716    }
45717    try {
45718        weakRefDeref.call(x);
45719        return true;
45720    } catch (e) {}
45721    return false;
45722}
45723
45724function isSet(x) {
45725    if (!setSize || !x || typeof x !== 'object') {
45726        return false;
45727    }
45728    try {
45729        setSize.call(x);
45730        try {
45731            mapSize.call(x);
45732        } catch (m) {
45733            return true;
45734        }
45735        return x instanceof Set; // core-js workaround, pre-v2.5.0
45736    } catch (e) {}
45737    return false;
45738}
45739
45740function isWeakSet(x) {
45741    if (!weakSetHas || !x || typeof x !== 'object') {
45742        return false;
45743    }
45744    try {
45745        weakSetHas.call(x, weakSetHas);
45746        try {
45747            weakMapHas.call(x, weakMapHas);
45748        } catch (s) {
45749            return true;
45750        }
45751        return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
45752    } catch (e) {}
45753    return false;
45754}
45755
45756function isElement(x) {
45757    if (!x || typeof x !== 'object') { return false; }
45758    if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
45759        return true;
45760    }
45761    return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
45762}
45763
45764function inspectString(str, opts) {
45765    if (str.length > opts.maxStringLength) {
45766        var remaining = str.length - opts.maxStringLength;
45767        var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
45768        return inspectString(str.slice(0, opts.maxStringLength), opts) + trailer;
45769    }
45770    // eslint-disable-next-line no-control-regex
45771    var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte);
45772    return wrapQuotes(s, 'single', opts);
45773}
45774
45775function lowbyte(c) {
45776    var n = c.charCodeAt(0);
45777    var x = {
45778        8: 'b',
45779        9: 't',
45780        10: 'n',
45781        12: 'f',
45782        13: 'r'
45783    }[n];
45784    if (x) { return '\\' + x; }
45785    return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16).toUpperCase();
45786}
45787
45788function markBoxed(str) {
45789    return 'Object(' + str + ')';
45790}
45791
45792function weakCollectionOf(type) {
45793    return type + ' { ? }';
45794}
45795
45796function collectionOf(type, size, entries, indent) {
45797    var joinedEntries = indent ? indentedJoin(entries, indent) : entries.join(', ');
45798    return type + ' (' + size + ') {' + joinedEntries + '}';
45799}
45800
45801function singleLineValues(xs) {
45802    for (var i = 0; i < xs.length; i++) {
45803        if (indexOf(xs[i], '\n') >= 0) {
45804            return false;
45805        }
45806    }
45807    return true;
45808}
45809
45810function getIndent(opts, depth) {
45811    var baseIndent;
45812    if (opts.indent === '\t') {
45813        baseIndent = '\t';
45814    } else if (typeof opts.indent === 'number' && opts.indent > 0) {
45815        baseIndent = Array(opts.indent + 1).join(' ');
45816    } else {
45817        return null;
45818    }
45819    return {
45820        base: baseIndent,
45821        prev: Array(depth + 1).join(baseIndent)
45822    };
45823}
45824
45825function indentedJoin(xs, indent) {
45826    if (xs.length === 0) { return ''; }
45827    var lineJoiner = '\n' + indent.prev + indent.base;
45828    return lineJoiner + xs.join(',' + lineJoiner) + '\n' + indent.prev;
45829}
45830
45831function arrObjKeys(obj, inspect) {
45832    var isArr = isArray(obj);
45833    var xs = [];
45834    if (isArr) {
45835        xs.length = obj.length;
45836        for (var i = 0; i < obj.length; i++) {
45837            xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
45838        }
45839    }
45840    var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
45841    var symMap;
45842    if (hasShammedSymbols) {
45843        symMap = {};
45844        for (var k = 0; k < syms.length; k++) {
45845            symMap['$' + syms[k]] = syms[k];
45846        }
45847    }
45848
45849    for (var key in obj) { // eslint-disable-line no-restricted-syntax
45850        if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
45851        if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
45852        if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
45853            // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
45854            continue; // eslint-disable-line no-restricted-syntax, no-continue
45855        } else if ((/[^\w$]/).test(key)) {
45856            xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
45857        } else {
45858            xs.push(key + ': ' + inspect(obj[key], obj));
45859        }
45860    }
45861    if (typeof gOPS === 'function') {
45862        for (var j = 0; j < syms.length; j++) {
45863            if (isEnumerable.call(obj, syms[j])) {
45864                xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
45865            }
45866        }
45867    }
45868    return xs;
45869}
45870
45871
45872/***/ }),
45873
45874/***/ "S0S6":
45875/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
45876
45877"use strict";
45878/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ProvidedRequiredArgumentsRule; });
45879/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ProvidedRequiredArgumentsOnDirectivesRule; });
45880/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
45881/* harmony import */ var _jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("kBjl");
45882/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("dWS+");
45883/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("/jXB");
45884/* harmony import */ var _language_printer_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("dQau");
45885/* harmony import */ var _type_directives_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("4suF");
45886/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("axIb");
45887function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
45888
45889function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Ob
45889ject.getOwnPropertyDescriptor(source, key)); }); } } return target; }
45890
45891function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
45892
45893
45894
45895
45896
45897
45898
45899
45900
45901/**
45902 * Provided required arguments
45903 *
45904 * A field or directive is only valid if all required (non-null without a
45905 * default value) field arguments have been provided.
45906 */
45907function ProvidedRequiredArgumentsRule(context) {
45908  return _objectSpread(_objectSpread({}, ProvidedRequiredArgumentsOnDirectivesRule(context)), {}, {
45909    Field: {
45910      // Validate on leave to allow for deeper errors to appear first.
45911      leave: function leave(fieldNode) {
45912        var _fieldNode$arguments;
45913
45914        var fieldDef = context.getFieldDef();
45915
45916        if (!fieldDef) {
45917          return false;
45918        } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
45919
45920
45921        var argNodes = (_fieldNode$arguments = fieldNode.arguments) !== null && _fieldNode$arguments !== void 0 ? _fieldNode$arguments : [];
45922        var argNodeMap = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(argNodes, function (arg) {
45923          return arg.name.value;
45924        });
45925
45926        for (var _i2 = 0, _fieldDef$args2 = fieldDef.args; _i2 < _fieldDef$args2.length; _i2++) {
45927          var argDef = _fieldDef$args2[_i2];
45928          var argNode = argNodeMap[argDef.name];
45929
45930          if (!argNode && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isRequiredArgument */ "P"])(argDef)) {
45931            var argTypeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(argDef.type);
45932            context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"]("Field \"".concat(fieldDef.name, "\" argument \"").concat(argDef.name, "\" of type \"").concat(argTypeStr, "\" is required, but it was not provided."), fieldNode));
45933          }
45934        }
45935      }
45936    }
45937  });
45938}
45939/**
45940 * @internal
45941 */
45942
45943function ProvidedRequiredArgumentsOnDirectivesRule(context) {
45944  var requiredArgsMap = Object.create(null);
45945  var schema = context.getSchema();
45946  var definedDirectives = schema ? schema.getDirectives() : _type_directives_mjs__WEBPACK_IMPORTED_MODULE_5__[/* specifiedDirectives */ "j"];
45947
45948  for (var _i4 = 0; _i4 < definedDirectives.length; _i4++) {
45949    var directive = definedDirectives[_i4];
45950    requiredArgsMap[directive.name] = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(directive.args.filter(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isRequiredArgument */ "P"]), function (arg) {
45951      return arg.name;
45952    });
45953  }
45954
45955  var astDefinitions = context.getDocument().definitions;
45956
45957  for (var _i6 = 0; _i6 < astDefinitions.length; _i6++) {
45958    var def = astDefinitions[_i6];
45959
45960    if (def.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].DIRECTIVE_DEFINITION) {
45961      var _def$arguments;
45962
45963      // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
45964      var argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];
45965      requiredArgsMap[def.name.value] = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(argNodes.filter(isRequiredArgumentNode), function (arg) {
45966        return arg.name.value;
45967      });
45968    }
45969  }
45970
45971  return {
45972    Directive: {
45973      // Validate on leave to allow for deeper errors to appear first.
45974      leave: function leave(directiveNode) {
45975        var directiveName = directiveNode.name.value;
45976        var requiredArgs = requiredArgsMap[directiveName];
45977
45978        if (requiredArgs) {
45979          var _directiveNode$argume;
45980
45981          // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
45982          var _argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : [];
45983
45984          var argNodeMap = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_argNo
45984des, function (arg) {
45985            return arg.name.value;
45986          });
45987
45988          for (var _i8 = 0, _Object$keys2 = Object.keys(requiredArgs); _i8 < _Object$keys2.length; _i8++) {
45989            var argName = _Object$keys2[_i8];
45990
45991            if (!argNodeMap[argName]) {
45992              var argType = requiredArgs[argName].type;
45993              var argTypeStr = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isType */ "S"])(argType) ? Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(argType) : Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_4__[/* print */ "a"])(argType);
45994              context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"]("Directive \"@".concat(directiveName, "\" argument \"").concat(argName, "\" of type \"").concat(argTypeStr, "\" is required, but it was not provided."), directiveNode));
45995            }
45996          }
45997        }
45998      }
45999    }
46000  };
46001}
46002
46003function isRequiredArgumentNode(arg) {
46004  return arg.type.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].NON_NULL_TYPE && arg.defaultValue == null;
46005}
46006
46007
46008/***/ }),
46009
46010/***/ "SYRf":
46011/***/ (function(module, exports, __webpack_require__) {
46012
46013"use strict";
46014
46015
46016var GetIntrinsic = __webpack_require__("AM7I");
46017
46018var $String = GetIntrinsic('%String%');
46019var $TypeError = GetIntrinsic('%TypeError%');
46020
46021// https://ecma-international.org/ecma-262/6.0/#sec-tostring
46022
46023module.exports = function ToString(argument) {
46024	if (typeof argument === 'symbol') {
46025		throw new $TypeError('Cannot convert a Symbol value to a string');
46026	}
46027	return $String(argument);
46028};
46029
46030
46031/***/ }),
46032
46033/***/ "SYjR":
46034/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
46035
46036"use strict";
46037/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getOperationAST; });
46038/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("/jXB");
46039
46040/**
46041 * Returns an operation AST given a document AST and optionally an operation
46042 * name. If a name is not provided, an operation is only returned if only one is
46043 * provided in the document.
46044 */
46045
46046function getOperationAST(documentAST, operationName) {
46047  var operation = null;
46048
46049  for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) {
46050    var definition = _documentAST$definiti2[_i2];
46051
46052    if (definition.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].OPERATION_DEFINITION) {
46053      var _definition$name;
46054
46055      if (operationName == null) {
46056        // If no operation name was provided, only return an Operation if there
46057        // is one defined in the document. Upon encountering the second, return
46058        // null.
46059        if (operation) {
46060          return null;
46061        }
46062
46063        operation = definition;
46064      } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {
46065        return definition;
46066      }
46067    }
46068  }
46069
46070  return operation;
46071}
46072
46073
46074/***/ }),
46075
46076/***/ "SrQE":
46077/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
46078
46079"use strict";
46080/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoneAnonymousOperationRule; });
46081/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
46082/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("/jXB");
46083
46084
46085
46086/**
46087 * Lone anonymous operation
46088 *
46089 * A GraphQL document is only valid if when it contains an anonymous operation
46090 * (the query short-hand) that it contains only that one operation definition.
46091 */
46092function LoneAnonymousOperationRule(context) {
46093  var operationCount = 0;
46094  return {
46095    Document: function Document(node) {
46096      operationCount = node.definitions.filter(function (definition) {
46097        return definition.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].OPERATION_DEFINITION;
46098      }).length;
46099    },
46100    OperationDefinition: function OperationDefinition(node) {
46101      if (!node.name && operationCount > 1) {
46102        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]('This anonymous operation must be the only defined operation.', node));
46103      }
46104    }
46105  };
46106}
46107
46108
46109/***/ }),
46110
46111/***/ "T95z":
46112/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
46113
46114"use strict";
46115/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return suggestionList; });
46116/* harmony import */ var _naturalCompare_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Y5C7");
46117
46118/**
46119 * Given an invalid input string and a list of valid options, returns a filtered
46120 * list of valid options sorted based on their similarity with the input.
46121 */
46122
46123function suggestionList(input, options) {
46124  var optionsByDistance = Object.create(null);
46125  var lexicalDistance = new LexicalDistance(input);
46126  var threshold = Math.floor(input.length * 0.4) + 1;
46127
46128  for (var _i2 = 0; _i2 < options.length; _i2++) {
46129    var option = options[_i2];
46130    var distance = lexicalDistance.measure(option, threshold);
46131
46132    if (distance !== undefined) {
46133      optionsByDistance[option] = distance;
46134    }
46135  }
46136
46137  return Object.keys(optionsByDistance).sort(function (a, b) {
46138    var distanceDiff = optionsByDistance[a] - optionsByDistance[b];
46139    return distanceDiff !== 0 ? distanceDiff : Object(_naturalCompare_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(a, b);
46140  });
46141}
46142/**
46143 * Computes the lexical distance between strings A and B.
46144 *
46145 * The "distance" between two strings is given by counting the minimum number
46146 * of edits needed to transform string A into string B. An edit can be an
46147 * insertion, deletion, or substitution of a single character, or a swap of two
46148 * adjacent characters.
46149 *
46150 * Includes a custom alteration from Damerau-Levenshtein to treat case changes
46151 * as a single edit which helps identify mis-cased values with an edit distance
46152 * of 1.
46153 *
46154 * This distance can be useful for detecting typos in input or sorting
46155 */
46156
46157var LexicalDistance = /*#__PURE__*/function () {
46158  function LexicalDistance(input) {
46159    this._input = input;
46160    this._inputLowerCase = input.toLowerCase();
46161    this._inputArray = stringToArray(this._inputLowerCase);
46162    this._rows = [new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0)];
46163  }
46164
46165  var _proto = LexicalDistance.prototype;
46166
46167  _proto.measure = function measure(option, threshold) {
46168    if (this._input === option) {
46169      return 0;
46170    }
46171
46172    var optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit
46173
46174    if (this._inputLowerCase === optionLowerCase) {
46175      return 1;
46176    }
46177
46178    var a = stringToArray(optionLowerCase);
46179    var b = this._inputArray;
46180
46181    if (a.length < b.length) {
46182      var tmp = a;
46183      a = b;
46184      b = tmp;
46185    }
46186
46187    var aLength = a.length;
46188    var bLength = b.length;
46189
46190    if (aLength - bLength > threshold) {
46191      return undefined;
46192    }
46193
46194    var rows = this._rows;
46195
46196    for (var j = 0; j <= bLength; j++) {
46197      rows[0][j] = j;
46198    }
46199
46200    for (var i = 1; i <= aLength; i++) {
46201      var upRow = rows[(i - 1) % 3];
46202      var currentRow = rows[i % 3];
46203      var smallestCell = currentRow[0] = i;
46204
46205      for (var _j = 1; _j <= bLength; _j++) {
46206        var cost = a[i - 1] === b[_j - 1] ? 0 : 1;
46207        var currentCell = Math.min(upRow[_j] + 1, // delete
46208        currentRow[_j - 1] + 1, // insert
46209        upRow[_j - 1] + cost // substitute
46210        );
46211
46212        if (i > 1 && _j > 1 && a[i - 1] === b[_j - 2] && a[i - 2] === b[_j - 1]) {
46213          // transposition
46214          var doubleDiagonalCell = rows[(i - 2) % 3][_j - 2];
46215          currentCell = Math.min(currentCell, doubleDiagonalCell + 1);
46216        }
46217
46218        if (currentCell < smallestCell) {
46219          smallestCell = currentCell;
46220        }
46221
46222        currentRow[_j] = currentCell;
46223      } // Early exit, since distance can't go smaller than smallest element of the previous row.
46224
46225
46226      if (smallestCell > threshold) {
46227        return undefined;
46228      }
46229    }
46230
46231    var distance = rows[aLength % 3][bLength];
46232    return distance <= threshold ? distance : undefined;
46233  };
46234
46235  return LexicalDistance;
46236}();
46237
46238function stringToArray(str) {
46239  var strLength = str.length;
46240  var array = new Array(strLength);
46241
46242  for (var i = 0; i < strLength; ++i) {
46243    array[i] = str.charCodeAt(i);
46244  }
46245
46246  return array;
46247}
46248
46249
46250/***/ }),
46251
46252/***/ "TYx5":
46253/***/ (function(module, exports, __webpack_require__) {
46254
46255"use strict";
46256/**
46257 * Copyright (c) Facebook, Inc. and its affiliates.
46258 *
46259 * This source code is licensed under the MIT license found in the
46260 * LICENSE file in the root directory of this source tree.
46261 *
46262 * 
46263 * @format
46264 */
46265// flowlint ambiguous-object-type:error
46266
46267
46268function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
46269
46270function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
46271
46272function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
46273
46274var _require = __webpack_require__("VrDQ"),
46275    createCompilerError = _require.createCompilerError;
46276
46277var _require2 = __webpack_require__("Tzvz"),
46278    SchemaMetaFieldDef = _require2.SchemaMetaFieldDef,
46279    TypeMetaFieldDef = _require2.TypeMetaFieldDef;
46280
46281/**
46282 * Find the definition of a field of the specified type using strict
46283 * resolution rules per the GraphQL spec.
46284 */
46285function getFieldDefinitionStrict(schema, parentType, fieldName) {
46286  var type = schema.getRawType(parentType);
46287  var queryType = schema.getQueryType();
46288  var isQueryType = queryType != null && schema.areEqualTypes(type, queryType);
46289  var hasTypeName = schema.isAbstractType(type) || schema.isObject(type);
46290  var schemaFieldDef;
46291
46292  if (isQueryType && fieldName === SchemaMetaFieldDef.name) {
46293    schemaFieldDef = queryType != null ? schema.getFieldByName(queryType, '__schema') : null;
46294  } else if (isQueryType && fieldName === TypeMetaFieldDef.name) {
46295    schemaFieldDef = queryType != null ? schema.getFieldByName(queryType, '__type') : null;
46296  } else if (hasTypeName && fieldName === '__typename') {
46297    schemaFieldDef = schema.getFieldByName(schema.assertCompositeType(type), '__typename');
46298  } else if (hasTypeName && fieldName === '__id') {
46299    schemaFieldDef = schema.getFieldByName(schema.assertCompositeType(type), '__id');
46300  } else if (schema.isInterface(type) || schema.isObject(type)) {
46301    var compositeType = schema.assertCompositeType(type);
46302
46303    if (schema.hasField(compositeType, fieldName)) {
46304      schemaFieldDef = schema.getFieldByName(compositeType, fieldName);
46305    } else {
46306      return null;
46307    }
46308  }
46309
46310  return schemaFieldDef;
46311}
46312/**
46313 * Find the definition of a field of the specified type, first trying
46314 * the standard spec-compliant resolution process and falling back
46315 * to legacy mode that supports fat interfaces.
46316 */
46317
46318
46319function getFieldDefinitionLegacy(schema, parentType, fieldName, fieldAST) {
46320  var _schemaFieldDef;
46321
46322  var schemaFieldDef = getFieldDefinitionStrict(schema, parentType, fieldName);
46323
46324  if (!schemaFieldDef) {
46325    schemaFieldDef = getFieldDefinitionLegacyImpl(schema, parentType, fieldName, fieldAST);
46326  }
46327
46328  return (_schemaFieldDef = schemaFieldDef) !== null && _schemaFieldDef !== void 0 ? _schemaFieldDef : null;
46329}
46330/**
46331 * @private
46332 */
46333
46334
46335function getFieldDefinitionLegacyImpl(schema, type, fieldName, fieldAST) {
46336  var rawType = schema.getRawType(type);
46337
46338  if (schema.isAbstractType(rawType) && fieldAST && fieldAST.directives && fieldAST.directives.some(function (directive) {
46339    return getName(directive) === 'fixme_fat_interface';
46340  })) {
46341    var possibleTypes = schema.getPossibleTypes(schema.assertAbstractType(rawType));
46342    var schemaFieldDef;
46343
46344    var _iterator = _createForOfIteratorHelper(possibleTypes),
46345        _step;
46346
46347    try {
46348      var _loop = function _loop() {
46349        var possibleType = _step.value;
46350        var possibleField = schema.getFieldByName(possibleType, fieldName);
46351
46352        if (possibleField) {
46353          // Fat interface fields can have differing arguments. Try to return
46354          // a field with matching arguments, but still return a field if the
46355          // arguments do not match.
46356          schemaFieldDef = possibleField;
46357
46358          if (fieldAST && fieldAST.arguments) {
46359            var argumentsAllExist = fieldAST.arguments.every(function (argument) {
46360              return schema.getFieldArgByName(possibleField, getName(argument)) != null;
46361            });
46362
46363            if (argumentsAllExist) {
46364              return "break";
46365            }
46366          }
46367        }
46368      };
46369
46370      for (_iterator.s(); !(_step = _iterator.n()).done;) {
46371        var _ret = _loop();
46372
46373        if (_ret === "break") break;
46374      }
46375    } catch (err) {
46376      _iterator.e(err);
46377    } finally {
46378      _iterator.f();
46379    }
46380
46381    return schemaFieldDef;
46382  }
46383}
46384/**
46385 * @private
46386 */
46387
46388
46389function getName(ast) {
46390  var name = ast.name ? ast.name.value : null;
46391
46392  if (typeof name !== 'string') {
46393    throw createCompilerError("Expected ast node to have a 'name'.", null, [ast]);
46394  }
46395
46396  return name;
46397}
46398
46399module.exports = {
46400  getFieldDefinitionLegacy: getFieldDefinitionLegacy,
46401  getFieldDefinitionStrict: getFieldDefinitionStrict
46402};
46403
46404/***/ }),
46405
46406/***/ "Teho":
46407/***/ (function(module, exports, __webpack_require__) {
46408
46409"use strict";
46410
46411
46412module.exports = function isPrimitive(value) {
46413	return value === null || (typeof value !== 'function' && typeof value !== 'object');
46414};
46415
46416
46417/***/ }),
46418
46419/***/ "TirB":
46420/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
46421
46422"use strict";
46423/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return buildClientSchema; });
46424/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1QEH");
46425/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rWdj");
46426/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("t3R0");
46427/* harmony import */ var _jsutils_keyValMap_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("WXJZ");
46428/* harmony import */ var _jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("zpYP");
46429/* harmony import */ var _language_parser_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("EMzn");
46430/* harmony import */ var _type_schema_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("51nL");
46431/* harmony import */ var _type_directives_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("4suF");
46432/* harmony import */ var _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("19Hc");
46433/* harmony import */ var _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("LViu");
46434/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("axIb");
46435/* harmony import */ var _valueFromAST_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("Mbdf");
46436
46437
46438
46439
46440
46441
46442
46443
46444
46445
46446
46447
46448/**
46449 * Build a GraphQLSchema for use by client tools.
46450 *
46451 * Given the result of a client running the introspection query, creates and
46452 * returns a GraphQLSchema instance which can be then used with all graphql-js
46453 * tools, but cannot be used to execute a query, as introspection does not
46454 * represent the "resolver", "parse" or "serialize" functions or any other
46455 * server-internal mechanisms.
46456 *
46457 * This function expects a complete introspection result. Don't forget to check
46458 * the "errors" field of a server response before calling this function.
46459 */
46460
46461function buildClientSchema(introspection, options) {
46462  Object(_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(introspection) && Object(_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(introspection.__schema) || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(0, "Invalid or incomplete introspection result. Ensure that you are passing \"data\" property of introspection response and no \"errors\" was returned alongside: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(introspection), ".")); // Get the schema from the introspection result.
46463
46464  var schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each.
46465
46466  var typeMap = Object(_jsutils_keyValMap_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(schemaIntrospection.types, function (typeIntrospection) {
46467    return typeIntrospection.name;
46468  }, function (typeIntrospection) {
46469    return buildType(typeIntrospection);
46470  }); // Include standard types only if they are used.
46471
46472  for (var _i2 = 0, _ref2 = [].concat(_type_scalars_mjs__WEBPACK_IMPORTED_MODULE_8__[/* specifiedScalarTypes */ "g"], _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* introspectionTypes */ "m"]); _i2 < _ref2.length; _i2++) {
46473    var stdType = _ref2[_i2];
46474
46475    if (typeMap[stdType.name]) {
46476      typeMap[stdType.name] = stdType;
46477    }
46478  } // Get the root Query, Mutation, and Subscription types.
46479
46480
46481  var queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null;
46482  var mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null;
46483  var subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; // Get the directives supported by Introspection, assuming empty-set if
46484  // directives were not queried for.
46485
46486  var directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; // Then produce and return a Schema with these types.
46487
46488  return new _type_schema_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLSchema */ "a"]({
46489    description: schemaIntrospection.description,
46490    query: queryType,
46491    mutation: mutationType,
46492    subscription: subscriptionType,
46493    types: Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(typeMap),
46494    directives: directives,
46495    assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid
46496  }); // Given a type reference in introspection, return the GraphQLType instance.
46497  // preferring cached instances before building new instances.
46498
46499  function getType(typeRef) {
46500    if (typeRef.kind === _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* TypeKind */ "b"].LIST) {
46501      var itemRef = typeRef.ofType;
46502
46503      if (!itemRef) {
46504        throw new Error('Decorated type deeper than introspection query.');
46505      }
46506
46507      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLList */ "d"](getType(itemRef));
46508    }
46509
46510    if (typeRef.kind === _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* TypeKind */ "b"].NON_NULL) {
46511      var nullableRef = typeRef.ofType;
46512
46513      if (!nullableRef) {
46514        throw new Error('Decorated type deeper than introspection query.');
46515      }
46516
46517      var nullableType = getType(nullableRef);
46518      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLNonNull */ "e"](Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* assertNullableType */ "t"])(nullableType));
46519    }
46520
46521    return getNamedType(typeRef);
46522  }
46523
46524  function getNamedType(typeRef) {
46525    var typeName = typeRef.name;
46526
46527    if (!typeName) {
46528      throw new Error("Unknown type reference: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(typeRef), "."));
46529    }
46530
46531    var type = typeMap[typeName];
46532
46533    if (!type) {
46534      throw new Error("Invalid or incomplete schema, unknown type: ".concat(typeName, ". Ensure that a full introspection query is used in order to build a client schema."));
46535    }
46536
46537    return type;
46538  }
46539
46540  function getObjectType(typeRef) {
46541    return Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* assertObjectType */ "u"])(getNamedType(typeRef));
46542  }
46543
46544  function getInterfaceType(typeRef) {
46545    return Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* assertInterfaceType */ "o"])(getNamedType(typeRef));
46546  } // Given a type's introspection result, construct the correct
46547  // GraphQLType instance.
46548
46549
46550  function buildType(type) {
46551    if (type != null && type.name != null && type.kind != null) {
46552      switch (type.kind) {
46553        case _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* TypeKind */ "b"].SCALAR:
46554          return buildScalarDef(type);
46555
46556        case _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* TypeKind */ "b"].OBJECT:
46557          return buildObjectDef(type);
46558
46559        case _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* TypeKind */ "b"].INT
46559ERFACE:
46560          return buildInterfaceDef(type);
46561
46562        case _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* TypeKind */ "b"].UNION:
46563          return buildUnionDef(type);
46564
46565        case _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* TypeKind */ "b"].ENUM:
46566          return buildEnumDef(type);
46567
46568        case _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* TypeKind */ "b"].INPUT_OBJECT:
46569          return buildInputObjectDef(type);
46570      }
46571    }
46572
46573    var typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type);
46574    throw new Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ".concat(typeStr, "."));
46575  }
46576
46577  function buildScalarDef(scalarIntrospection) {
46578    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLScalarType */ "g"]({
46579      name: scalarIntrospection.name,
46580      description: scalarIntrospection.description,
46581      specifiedByUrl: scalarIntrospection.specifiedByUrl
46582    });
46583  }
46584
46585  function buildImplementationsList(implementingIntrospection) {
46586    // TODO: Temporary workaround until GraphQL ecosystem will fully support
46587    // 'interfaces' on interface types.
46588    if (implementingIntrospection.interfaces === null && implementingIntrospection.kind === _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_9__[/* TypeKind */ "b"].INTERFACE) {
46589      return [];
46590    }
46591
46592    if (!implementingIntrospection.interfaces) {
46593      var implementingIntrospectionStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(implementingIntrospection);
46594      throw new Error("Introspection result missing interfaces: ".concat(implementingIntrospectionStr, "."));
46595    }
46596
46597    return implementingIntrospection.interfaces.map(getInterfaceType);
46598  }
46599
46600  function buildObjectDef(objectIntrospection) {
46601    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLObjectType */ "f"]({
46602      name: objectIntrospection.name,
46603      description: objectIntrospection.description,
46604      interfaces: function interfaces() {
46605        return buildImplementationsList(objectIntrospection);
46606      },
46607      fields: function fields() {
46608        return buildFieldDefMap(objectIntrospection);
46609      }
46610    });
46611  }
46612
46613  function buildInterfaceDef(interfaceIntrospection) {
46614    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLInterfaceType */ "c"]({
46615      name: interfaceIntrospection.name,
46616      description: interfaceIntrospection.description,
46617      interfaces: function interfaces() {
46618        return buildImplementationsList(interfaceIntrospection);
46619      },
46620      fields: function fields() {
46621        return buildFieldDefMap(interfaceIntrospection);
46622      }
46623    });
46624  }
46625
46626  function buildUnionDef(unionIntrospection) {
46627    if (!unionIntrospection.possibleTypes) {
46628      var unionIntrospectionStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(unionIntrospection);
46629      throw new Error("Introspection result missing possibleTypes: ".concat(unionIntrospectionStr, "."));
46630    }
46631
46632    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLUnionType */ "h"]({
46633      name: unionIntrospection.name,
46634      description: unionIntrospection.description,
46635      types: function types() {
46636        return unionIntrospection.possibleTypes.map(getObjectType);
46637      }
46638    });
46639  }
46640
46641  function buildEnumDef(enumIntrospection) {
46642    if (!enumIntrospection.enumValues) {
46643      var enumIntrospectionStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(enumIntrospection);
46644      throw new Error("Introspection result missing enumValues: ".concat(enumIntrospectionStr, "."));
46645    }
46646
46647    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLEnumType */ "a"]({
46648      name: enumIntrospection.name,
46649      description: enumIntrospection.description,
46650      values: Object(_jsutils_keyValMap_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(enumIntrospection.enumValues, function (valueIntrospection) {
46651        return valueIntrospection.name;
46652      }, function (valueIntrospection) {
46653        return {
46654          description: valueIntrospection.description,
46655          deprecationReason: valueIntrospection.deprecationReason
46656        };
46657      })
46658    });
46659  }
46660
46661  function buildInputObjectDef(inputObjectIntrospection) {
46662    if (!inputObjectIntrospection.inputFields) {
46663      var inputObjectIntrospectionStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(inputObjectIntrospection);
46664      throw new Error("Introspection result missing inputFields: ".concat(inputObjectIntrospectionStr, "."));
46665    }
46666
46667    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* GraphQLInputObjectType */ "b"]({
46668      name: inputObjectIntrospection.name,
46669      description: inputObjectIntrospection.description,
46670      fields: function fields() {
46671        return buildInputValueDefMap(inputObjectIntrospection.inputFields);
46672      }
46673    });
46674  }
46675
46676  function buildFieldDefMap(typeIntrospection) {
46677    if (!typeIntrospection.fields) {
46678      throw new Error("Introspection result missing fields: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(typeIntrospection), "."));
46679    }
46680
46681    return Object(_jsutils_keyValMap_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(typeIntrospection.fields, function (fieldIntrospection) {
46682      return fieldIntrospection.name;
46683    }, buildField);
46684  }
46685
46686  function buildField(fieldIntrospection) {
46687    var type = getType(fieldIntrospection.type);
46688
46689    if (!Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isOutputType */ "O"])(type)) {
46690      var typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type);
46691      throw new Error("Introspection must provide output type for fields, but received: ".concat(typeStr, "."));
46692    }
46693
46694    if (!fieldIntrospection.args) {
46695      var fieldIntrospectionStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(fieldIntrospection);
46696      throw new Error("Introspection result missing field args: ".concat(fieldIntrospectionStr, "."));
46697    }
46698
46699    return {
46700      description: fieldIntrospection.description,
46701      deprecationReason: fieldIntrospection.deprecationReason,
46702      type: type,
46703      args: buildInputValueDefMap(fieldIntrospection.args)
46704    };
46705  }
46706
46707  function buildInputValueDefMap(inputValueIntrospections) {
46708    return Object(_jsutils_keyValMap_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(inputValueIntrospections, function (inputValue) {
46709      return inputValue.name;
46710    }, buildInputValue);
46711  }
46712
46713  function buildInputValue(inputValueIntrospection) {
46714    var type = getType(inputValueIntrospection.type);
46715
46716    if (!Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_10__[/* isInputType */ "G"])(type)) {
46717      var typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type);
46718      throw new Error("Introspection must provide input type for arguments, but received: ".concat(typeStr, "."));
46719    }
46720
46721    var defaultValue = inputValueIntrospection.defaultValue != null ? Object(_valueFromAST_mjs__WEBPACK_IMPORTED_MODULE_11__[/* valueFromAST */ "a"])(Object(_language_parser_mjs__WEBPACK_IMPORTED_MODULE_5__["parseValue"])(inputValueIntrospection.defaultValue), type) : undefined;
46722    return {
46723      description: inputValueIntrospection.description,
46724      type: type,
46725      defaultValue: defaultValue,
46726      deprecationReason: inputValueIntrospection.deprecationReason
46727    };
46728  }
46729
46730  function buildDirective(directiveIntrospection) {
46731    if (!directiveIntrospection.args) {
46732      var directiveIntrospectionStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(directiveIntrospection);
46733      throw new Error("Introspection result missing directive args: ".concat(directiveIntrospectionStr, "."));
46734    }
46735
46736    if (!directiveIntrospection.locations) {
46737      var _directiveIntrospectionStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(directiveIntrospection);
46738
46739      throw new Error("Introspection result missing directive locations: ".concat(_directiveIntrospectionStr, "."));
46740    }
46741
46742    return new _type_directives_mjs__WEBPACK_IMPORTED_MODULE_7__[/* GraphQLDirective */ "c"]({
46743      name: directiveIntrospection.name,
46744      description: directiveIntrospection.description,
46745      isRepeatable: directiveIntrospection.isRepeatable,
46746      locations: directiveIntrospection.locations.slice(),
46747      args: buildInputValueDefMap(directiveIntrospection.args)
46748    });
46749  }
46750}
46751
46752
46753/***/ }),
46754
46755/***/ "TqRt":
46756/***/ (function(module, exports) {
46757
46758function _interopRequireDefault(obj) {
46759  return obj && obj.__esModule ? obj : {
46760    "default": obj
46761  };
46762}
46763
46764module.exports = _interopRequireDefault;
46765
46766/***/ }),
46767
46768/***/ "Tzvz":
46769/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
46770
46771"use strict";
46772// ESM COMPAT FLAG
46773__webpack_require__.r(__webpack_exports__);
46774
46775// EXPORTS
46776__webpack_require__.d(__webpack_exports__, "version", function() { return /* reexport */ version; });
46777__webpack_require__.d(__webpack_exports__, "versionInfo", function() { return /* reexport */ versionInfo; });
46778__webpack_require__.d(__webpack_exports__, "graphql", function() { return /* reexport */ graphql; });
46779__webpack_require__.d(__webpack_exports__, "graphqlSync", function() { return /* reexport */ graphqlSync; });
46780__webpack_require__.d(__webpack_exports__, "GraphQLSchema", function() { return /* reexport */ type_schema["a" /* GraphQLSchema */]; });
46781__webpack_require__.d(__webpack_exports__, "GraphQLDirective", function() { return /* reexport */ directives["c" /* GraphQLDirective */]; });
46782__webpack_require__.d(__webpack_exports__, "GraphQLScalarType", function() { return /* reexport */ definition["g" /* GraphQLScalarType */]; });
46783__webpack_require__.d(__webpack_exports__, "GraphQLObjectType", function() { return /* reexport */ definition["f" /* GraphQLObjectType */]; });
46784__webpack_require__.d(__webpack_exports__, "GraphQLInterfaceType", function() { return /* reexport */ definition["c" /* GraphQLInterfaceType */]; });
46785__webpack_require__.d(__webpack_exports__, "GraphQLUnionType", function() { return /* reexport */ definition["h" /* GraphQLUnionType */]; });
46786__webpack_require__.d(__webpack_exports__, "GraphQLEnumType", function() { return /* reexport */ definition["a" /* GraphQLEnumType */]; });
46787__webpack_require__.d(__webpack_exports__, "GraphQLInputObjectType", function() { return /* reexport */ definition["b" /* GraphQLInputObjectType */]; });
46788__webpack_require__.d(__webpack_exports__, "GraphQLList", function() { return /* reexport */ definition["d" /* GraphQLList */]; });
46789__webpack_require__.d(__webpack_exports__, "GraphQLNonNull", function() { return /* reexport */ definition["e" /* GraphQLNonNull */]; });
46790__webpack_require__.d(__webpack_exports__, "specifiedScalarTypes", function() { return /* reexport */ scalars["g" /* specifiedScalarTypes */]; });
46791__webpack_require__.d(__webpack_exports__, "GraphQLInt", function() { return /* reexport */ scalars["d" /* GraphQLInt */]; });
46792__webpack_require__.d(__webpack_exports__, "GraphQLFloat", function() { return /* reexport */ scalars["b" /* GraphQLFloat */]; });
46793__webpack_require__.d(__webpack_exports__, "GraphQLString", function() { return /* reexport */ scalars["e" /* GraphQLString */]; });
46794__webpack_require__.d(__webpack_exports__, "GraphQLBoolean", function() { return /* reexport */ scalars["a" /* GraphQLBoolean */]; });
46795__webpack_require__.d(__webpack_exports__, "GraphQLID", function() { return /* reexport */ scalars["c" /* GraphQLID */]; });
46796__webpack_require__.d(__webpack_exports__, "specifiedDirectives", function() { return /* reexport */ directives["j" /* specifiedDirectives */]; });
46797__webpack_require__.d(__webpack_exports__, "GraphQLIncludeDirective", function() { return /* reexport */ directives["d" /* GraphQLIncludeDirective */]; });
46798__webpack_require__.d(__webpack_exports__, "GraphQLSkipDirective", function() { return /* reexport */ directives["e" /* GraphQLSkipDirective */]; });
46799__webpack_require__.d(__webpack_exports__, "GraphQLDeprecatedDirective", function() { return /* reexport */ directives["b" /* GraphQLDeprecatedDirective */]; });
46800__webpack_require__.d(__webpack_exports__, "GraphQLSpecifiedByDirective", function() { return /* reexport */ directives["f" /* GraphQLSpecifiedByDirective */]; });
46801__webpack_require__.d(__webpack_exports__, "TypeKind", function() { return /* reexport */ introspection["b" /* TypeKind */]; });
46802__webpack_require__.d(__webpack_exports__, "DEFAULT_DEPRECATION_REASON", function() { return /* reexport */ directives["a" /* DEFAULT_DEPRECATION_REASON */]; });
46803__webpack_require__.d(__webpack_exports__, "introspectionTypes", function() { return /* reexport */ introspection["m" /* introspectionTypes */]; });
46804__webpack_require__.d(__webpack_exports__, "__Schema", function() { return /* reexport */ introspection["j" /* __Schema */]; });
46805__webpack_require__.d(__webpack_exports__, "__Directive", function() { return /* reexport */ introspection["e" /* __Directive */]; });
46806__webpack_require__.d(__webpack_exports__, "__DirectiveLocation", function() { return /* reexport */ introspection["f" /* __DirectiveLocation */]; });
46807__webpack_require__.d(__webpack_exports__, "__Type", function() { return /* reexport */ introspection["k" /* __Type */]; });
46808__webpack_require__.d(__webpack_exports__, "__Field", function() { return /* reexport */ introspection["h" /* __Field */]; });
46809__webpack_require__.d(__webpack_exports__, "__InputValue", function() { return /* reexport */ introspection["i" /* __InputValue */]; });
46810__webpack_require__.d(__webpack_exports__, "__EnumValue", function() { return /* reexport */ introspection["g" /* __EnumValue */]; });
46811__webpack_require__.d(__webpack_exports__, "__TypeKind", function() { return /* reexport */ introspection["l" /* __TypeKind */]; });
46812__webpack_require__.d(__webpack_exports__, "SchemaMetaFieldDef", function() { return /* reexport */ introspection["a" /* SchemaMetaFieldDef */]; });
46813__webpack_require__.d(__webpack_exports__, "TypeMetaFieldDef", function() { return /* reexport */ introspection["c" /* TypeMetaFieldDef */]; });
46814__webpack_require__.d(__webpack_exports__, "TypeNameMetaFieldDef", function() { return /* reexport */ introspection["d" /* TypeNameMetaFieldDef */]; });
46815__webpack_require__.d(__webpack_exports__, "isSchema", function() { return /* reexport */ type_schema["c" /* isSchema */]; });
46816__webpack_require__.d(__webpack_exports__, "isDirective", function() { return /* reexport */ directives["h" /* isDirective */]; });
46817__webpack_require__.d(__webpack_exports__, "isType", function() { return /* reexport */ definition["S" /* isType */]; });
46818__webpack_require__.d(__webpack_exports__, "isScalarType", function() { return /* reexport */ definition["R" /* isScalarType */]; });
46819__webpack_require__.d(__webpack_exports__, "isObjectType", function() { return /* reexport */ definition["N" /* isObjectType */]; });
46820__webpack_require__.d(__webpack_exports__, "isInterfaceType", function() { return /* reexport */ definition["H" /* isInterfaceType */]; });
46821__webpack_require__.d(__webpack_exports__, "isUnionType", function() { return /* reexport */ definition["T" /* isUnionType */]; });
46822__webpack_require__.d(__webpack_exports__, "isEnumType", function() { return /* reexport */ definition["E" /* isEnumType */]; });
46823__webpack_require__.d(__webpack_exports__, "isInputObjectType", function() { return /* reexport */ definition["F" /* isInputObjectType */]; });
46824__webpack_require__.d(__webpack_exports__, "isListType", function() { return /* reexport */ definition["J" /* isListType */]; });
46825__webpack_require__.d(__webpack_exports__, "isNonNullType", function() { return /* reexport */ definition["L" /* isNonNullType */]; });
46826__webpack_require__.d(__webpack_exports__, "isInputType", function() { return /* reexport */ definition["G" /* isInputType */]; });
46827__webpack_require__.d(__webpack_exports__, "isOutputType", function() { return /* reexport */ definition["O" /* isOutputType */]; });
46828__webpack_require__.d(__webpack_exports__, "isLeafType", function() { return /* reexport */ definition["I" /* isLeafType */]; });
46829__webpack_require__.d(__webpack_exports__, "isCompositeType", function() { return /* reexport */ definition["D" /* isCompositeType */]; });
46830__webpack_require__.d(__webpack_exports__, "isAbstractType", function() { return /* reexport */ definition["C" /* isAbstractType */]; });
46831__webpack_require__.d(__webpack_exports__, "isWrappingType", function() { return /* reexport */ definition["U" /* isWrappingType */]; });
46832__webpack_require__.d(__webpack_exports__, "isNullableType", function() { return /* reexport */ definition["M" /* isNullableType */]; });
46833__webpack_require__.d(__webpack_exports__, "isNamedType", function() { return /* reexport */ definition["K" /* isNamedType */]; });
46834__webpack_require__.d(__webpack_exports__, "isRequiredArgument", function() { return /* reexport */ definition["P" /* isRequiredArgument */]; });
46835__webpack_require__.d(__webpack_exports__, "isRequiredInputField", function() { return /* reexport */ definition["Q" /* isRequiredInputField */]; });
46836__webpack_require__.d(__webpack_exports__, "isSpecifiedScalarType", function() { return /* reexport */ scalars["f" /* isSpecifiedScalarType */]; });
46837__webpack_require__.d(__webpack_exports__, "isIntrospectionType", function() { return /* reexport */ introspection["n" /* isIntrospectionType */]; });
46838__webpack_require__.d(__webpack_exports__, "isSpecifiedDirective", function() { return /* reexport */ directives["i" /* isSpecifiedDirective */]; });
46839__webpack_require__.d(__webpack_exports__, "assertSchema", function() { return /* reexport */ type_schema["b" /* assertSchema */]; });
46840__webpack_require__.d(__webpack_exports__, "assertDirective", function() { return /* reexport */ directives["g" /* assertDirective */]; });
46841__webpack_require__.d(__webpack_exports__, "assertType", function() { return /* reexport */ definition["x" /* assertType */]; });
46842__webpack_require__.d(__webpack_exports__, "assertScalarType", function() { return /* reexport */ definition["w" /* assertScalarType */]; });
46843__webpack_require__.d(__webpack_exports__, "assertObjectType", function() { return /* reexport */ definition["u" /* assertObjectType */]; });
46844__webpack_require__.d(__webpack_exports__, "assertInterfaceType", function() { return /* reexport */ definition["o" /* assertInterfaceType */]; });
46845__webpack_require__.d(__webpack_exports__, "assertUnionType", function() { return /* reexport */ definition["y" /* assertUnionType */]; });
46846__webpack_require__.d(__webpack_exports__, "assertEnumType", function() { return /* reexport */ definition["l" /* assertEnumType */]; });
46847__webpack_require__.d(__webpack_exports__, "assertInputObjectType", function() { return /* reexport */ definition["m" /* assertInputObjectType */]; });
46848__webpack_require__.d(__webpack_exports__, "assertListType", function() { return /* reexport */ definition["q" /* assertListType */]; });
46849__webpack_require__.d(__webpack_exports__, "assertNonNullType", function() { return /* reexport */ definition["s" /* assertNonNullType */]; });
46850__webpack_require__.d(__webpack_exports__, "assertInputType", function() { return /* reexport */ definition["n" /* assertInputType */]; });
46851__webpack_require__.d(__webpack_exports__, "assertOutputType", function() { return /* reexport */ definition["v" /* assertOutputType */]; });
46852__webpack_require__.d(__webpack_exports__, "assertLeafType", function() { return /* reexport */ definition["p" /* assertLeafType */]; });
46853__webpack_require__.d(__webpack_exports__, "assertCompositeType", function() { return /* reexport */ definition["k" /* assertCompositeType */]; });
46854__webpack_require__.d(__webpack_exports__, "assertAbstractType", function() { return /* reexport */ definition["j" /* assertAbstractType */]; });
46855__webpack_require__.d(__webpack_exports__, "assertWrappingType", function() { return /* reexport */ definition["z" /* assertWrappingType */]; });
46856__webpack_require__.d(__webpack_exports__, "assertNullableType", function() { return /* reexport */ definition["t" /* assertNullableType */]; });
46857__webpack_require__.d(__webpack_exports__, "assertNamedType", function() { return /* reexport */ definition["r" /* assertNamedType */]; });
46858__webpack_require__.d(__webpack_exports__, "getNullableType", function() { return /* reexport */ definition["B" /* getNullableType */]; });
46859__webpack_require__.d(__webpack_exports__, "getNamedType", function() { return /* reexport */ definition["A" /* getNamedType */]; });
46860__webpack_require__.d(__webpack_exports__, "validateSchema", function() { return /* reexport */ type_validate["b" /* validateSchema */]; });
46861__webpack_require__.d(__webpack_exports__, "assertValidSchema", function() { return /* reexport */ type_validate["a" /* assertValidSchema */]; });
46862__webpack_require__.d(__webpack_exports__, "Token", function() { return /* reexport */ language_ast["b" /* Token */]; });
46863__webpack_require__.d(__webpack_exports__, "Source", function() { return /* reexport */ language_source["a" /* Source */]; });
46864__webpack_require__.d(__webpack_exports__, "Location", function() { return /* reexport */ language_ast["a" /* Location */]; });
46865__webpack_require__.d(__webpack_exports__, "getLocation", function() { return /* reexport */ language_location["a" /* getLocation */]; });
46866__webpack_require__.d(__webpack_exports__, "printLocation", function() { return /* reexport */ printLocation["a" /* printLocation */]; });
46867__webpack_require__.d(__webpack_exports__, "printSourceLocation", function() { return /* reexport */ printLocation["b" /* printSourceLocation */]; });
46868__webpack_require__.d(__webpack_exports__, "Lexer", function() { return /* reexport */ language_lexer["a" /* Lexer */]; });
46869__webpack_require__.d(__webpack_exports__, "TokenKind", function() { return /* reexport */ language_tokenKind["a" /* TokenKind */]; });
46870__webpack_require__.d(__webpack_exports__, "parse", function() { return /* reexport */ parser["parse"]; });
46871__webpack_require__.d(__webpack_exports__, "parseValue", function() { return /* reexport */ parser["parseValue"]; });
46872__webpack_require__.d(__webpack_exports__, "parseType", function() { return /* reexport */ parser["parseType"]; });
46873__webpack_require__.d(__webpack_exports__, "print", function() { return /* reexport */ printer["a" /* print */]; });
46874__webpack_require__.d(__webpack_exports__, "visit", function() { return /* reexport */ visitor["c" /* visit */]; });
46875__webpack_require__.d(__webpack_exports__, "visitInParallel", function() { return /* reexport */ visitor["d" /* visitInParallel */]; });
46876__webpack_require__.d(__webpack_exports__, "getVisitFn", function() { return /* reexport */ visitor["b" /* getVisitFn */]; });
46877__webpack_require__.d(__webpack_exports__, "BREAK", function() { return /* reexport */ visitor["a" /* BREAK */]; });
46878__webpack_require__.d(__webpack_exports__, "Kind", function() { return /* reexport */ kinds["a" /* Kind */]; });
46879__webpack_require__.d(__webpack_exports__, "DirectiveLocation", function() { return /* reexport */ directiveLocation["a" /* DirectiveLocation */]; });
46880__webpack_require__.d(__webpack_exports__, "isDefinitionNode", function() { return /* reexport */ predicates["a" /* isDefinitionNode */]; });
46881__webpack_require__.d(__webpack_exports__, "isExecutableDefinitionNode", function() { return /* reexport */ predicates["b" /* isExecutableDefinitionNode */]; });
46882__webpack_require__.d(__webpack_exports__, "isSelectionNode", function() { return /* reexport */ predicates["c" /* isSelectionNode */]; });
46883__webpack_require__.d(__webpack_exports__, "isValueNode", function() { return /* reexport */ predicates["i" /* isValueNode */]; });
46884__webpack_require__.d(__webpack_exports__, "isTypeNode", function() { return /* reexport */ predicates["f" /* isTypeNode */]; });
46885__webpack_require__.d(__webpack_exports__, "isTypeSystemDefinitionNode", function() { return /* reexport */ predicates["g" /* isTypeSystemDefinitionNode */]; });
46886__webpack_require__.d(__webpack_exports__, "isTypeDefinitionNode", function() { return /* reexport */ predicates["d" /* isTypeDefinitionNode */]; });
46887__webpack_require__.d(__webpack_exports__, "isTypeSystemExtensionNode", function() { return /* reexport */ predicates["h" /* isTypeSystemExtensionNode */]; });
46888__webpack_require__.d(__webpack_exports__, "isTypeExtensionNode", function() { return /* reexport */ predicates["e" /* isTypeExtensionNode */]; });
46889__webpack_require__.d(__webpack_exports__, "execute", function() { return /* reexport */ execute["g" /* execute */]; });
46890__webpack_require__.d(__webpack_exports__, "executeSync", function() { return /* reexport */ execute["h" /* executeSync */]; });
46891__webpack_require__.d(__webpack_exports__, "defaultFieldResolver", function() { return /* reexport */ execute["e" /* defaultFieldResolver */]; });
46892__webpack_require__.d(__webpack_exports__, "defaultTypeResolver", function() { return /* reexport */ execute["f" /* defaultTypeResolver */]; });
46893__webpack_require__.d(__webpack_exports__, "responsePathAsArray", function() { return /* reexport */ Path["b" /* pathToArray */]; });
46894__webpack_require__.d(__webpack_exports__, "getDirectiveValues", function() { return /* re
46894export */ values["b" /* getDirectiveValues */]; });
46895__webpack_require__.d(__webpack_exports__, "subscribe", function() { return /* reexport */ subscribe; });
46896__webpack_require__.d(__webpack_exports__, "createSourceEventStream", function() { return /* reexport */ createSourceEventStream; });
46897__webpack_require__.d(__webpack_exports__, "validate", function() { return /* reexport */ validate["c" /* validate */]; });
46898__webpack_require__.d(__webpack_exports__, "ValidationContext", function() { return /* reexport */ ValidationContext["b" /* ValidationContext */]; });
46899__webpack_require__.d(__webpack_exports__, "specifiedRules", function() { return /* reexport */ specifiedRules["a" /* specifiedRules */]; });
46900__webpack_require__.d(__webpack_exports__, "ExecutableDefinitionsRule", function() { return /* reexport */ ExecutableDefinitionsRule["a" /* ExecutableDefinitionsRule */]; });
46901__webpack_require__.d(__webpack_exports__, "FieldsOnCorrectTypeRule", function() { return /* reexport */ FieldsOnCorrectTypeRule["a" /* FieldsOnCorrectTypeRule */]; });
46902__webpack_require__.d(__webpack_exports__, "FragmentsOnCompositeTypesRule", function() { return /* reexport */ FragmentsOnCompositeTypesRule["a" /* FragmentsOnCompositeTypesRule */]; });
46903__webpack_require__.d(__webpack_exports__, "KnownArgumentNamesRule", function() { return /* reexport */ KnownArgumentNamesRule["b" /* KnownArgumentNamesRule */]; });
46904__webpack_require__.d(__webpack_exports__, "KnownDirectivesRule", function() { return /* reexport */ KnownDirectivesRule["a" /* KnownDirectivesRule */]; });
46905__webpack_require__.d(__webpack_exports__, "KnownFragmentNamesRule", function() { return /* reexport */ KnownFragmentNamesRule["a" /* KnownFragmentNamesRule */]; });
46906__webpack_require__.d(__webpack_exports__, "KnownTypeNamesRule", function() { return /* reexport */ KnownTypeNamesRule["a" /* KnownTypeNamesRule */]; });
46907__webpack_require__.d(__webpack_exports__, "LoneAnonymousOperationRule", function() { return /* reexport */ LoneAnonymousOperationRule["a" /* LoneAnonymousOperationRule */]; });
46908__webpack_require__.d(__webpack_exports__, "NoFragmentCyclesRule", function() { return /* reexport */ NoFragmentCyclesRule["a" /* NoFragmentCyclesRule */]; });
46909__webpack_require__.d(__webpack_exports__, "NoUndefinedVariablesRule", function() { return /* reexport */ NoUndefinedVariablesRule["a" /* NoUndefinedVariablesRule */]; });
46910__webpack_require__.d(__webpack_exports__, "NoUnusedFragmentsRule", function() { return /* reexport */ NoUnusedFragmentsRule["a" /* NoUnusedFragmentsRule */]; });
46911__webpack_require__.d(__webpack_exports__, "NoUnusedVariablesRule", function() { return /* reexport */ NoUnusedVariablesRule["a" /* NoUnusedVariablesRule */]; });
46912__webpack_require__.d(__webpack_exports__, "OverlappingFieldsCanBeMergedRule", function() { return /* reexport */ OverlappingFieldsCanBeMergedRule["a" /* OverlappingFieldsCanBeMergedRule */]; });
46913__webpack_require__.d(__webpack_exports__, "PossibleFragmentSpreadsRule", function() { return /* reexport */ PossibleFragmentSpreadsRule["a" /* PossibleFragmentSpreadsRule */]; });
46914__webpack_require__.d(__webpack_exports__, "ProvidedRequiredArgumentsRule", function() { return /* reexport */ ProvidedRequiredArgumentsRule["b" /* ProvidedRequiredArgumentsRule */]; });
46915__webpack_require__.d(__webpack_exports__, "ScalarLeafsRule", function() { return /* reexport */ ScalarLeafsRule["a" /* ScalarLeafsRule */]; });
46916__webpack_require__.d(__webpack_exports__, "SingleFieldSubscriptionsRule", function() { return /* reexport */ SingleFieldSubscriptionsRule["a" /* SingleFieldSubscriptionsRule */]; });
46917__webpack_require__.d(__webpack_exports__, "UniqueArgumentNamesRule", function() { return /* reexport */ UniqueArgumentNamesRule["a" /* UniqueArgumentNamesRule */]; });
46918__webpack_require__.d(__webpack_exports__, "UniqueDirectivesPerLocationRule", function() { return /* reexport */ UniqueDirectivesPerLocationRule["a" /* UniqueDirectivesPerLocationRule */]; });
46919__webpack_require__.d(__webpack_exports__, "UniqueFragmentNamesRule", function() { return /* reexport */ UniqueFragmentNamesRule["a" /* UniqueFragmentNamesRule */]; });
46920__webpack_require__.d(__webpack_exports__, "UniqueInputFieldNamesRule", function() { return /* reexport */ UniqueInputFieldNamesRule["a" /* UniqueInputFieldNamesRule */]; });
46921__webpack_require__.d(__webpack_exports__, "UniqueOperationNamesRule", function() { return /* reexport */ UniqueOperationNamesRule["a" /* UniqueOperationNamesRule */]; });
46922__webpack_require__.d(__webpack_exports__, "UniqueVariableNamesRule", function() { return /* reexport */ UniqueVariableNamesRule["a" /* UniqueVariableNamesRule */]; });
46923__webpack_require__.d(__webpack_exports__, "ValuesOfCorrectTypeRule", function() { return /* reexport */ ValuesOfCorrectTypeRule["a" /* ValuesOfCorrectTypeRule */]; });
46924__webpack_require__.d(__webpack_exports__, "VariablesAreInputTypesRule", function() { return /* reexport */ VariablesAreInputTypesRule["a" /* VariablesAreInputTypesRule */]; });
46925__webpack_require__.d(__webpack_exports__, "VariablesInAllowedPositionRule", function() { return /* reexport */ VariablesInAllowedPositionRule["a" /* VariablesInAllowedPositionRule */]; });
46926__webpack_require__.d(__webpack_exports__, "LoneSchemaDefinitionRule", function() { return /* reexport */ LoneSchemaDefinitionRule["a" /* LoneSchemaDefinitionRule */]; });
46927__webpack_require__.d(__webpack_exports__, "UniqueOperationTypesRule", function() { return /* reexport */ UniqueOperationTypesRule["a" /* UniqueOperationTypesRule */]; });
46928__webpack_require__.d(__webpack_exports__, "UniqueTypeNamesRule", function() { return /* reexport */ UniqueTypeNamesRule["a" /* UniqueTypeNamesRule */]; });
46929__webpack_require__.d(__webpack_exports__, "UniqueEnumValueNamesRule", function() { return /* reexport */ UniqueEnumValueNamesRule["a" /* UniqueEnumValueNamesRule */]; });
46930__webpack_require__.d(__webpack_exports__, "UniqueFieldDefinitionNamesRule", function() { return /* reexport */ UniqueFieldDefinitionNamesRule["a" /* UniqueFieldDefinitionNamesRule */]; });
46931__webpack_require__.d(__webpack_exports__, "UniqueDirectiveNamesRule", function() { return /* reexport */ UniqueDirectiveNamesRule["a" /* UniqueDirectiveNamesRule */]; });
46932__webpack_require__.d(__webpack_exports__, "PossibleTypeExtensionsRule", function() { return /* reexport */ PossibleTypeExtensionsRule["a" /* PossibleTypeExtensionsRule */]; });
46933__webpack_require__.d(__webpack_exports__, "NoDeprecatedCustomRule", function() { return /* reexport */ NoDeprecatedCustomRule; });
46934__webpack_require__.d(__webpack_exports__, "NoSchemaIntrospectionCustomRule", function() { return /* reexport */ NoSchemaIntrospectionCustomRule; });
46935__webpack_require__.d(__webpack_exports__, "GraphQLError", function() { return /* reexport */ GraphQLError["a" /* GraphQLError */]; });
46936__webpack_require__.d(__webpack_exports__, "syntaxError", function() { return /* reexport */ syntaxError["a" /* syntaxError */]; });
46937__webpack_require__.d(__webpack_exports__, "locatedError", function() { return /* reexport */ locatedError["a" /* locatedError */]; });
46938__webpack_require__.d(__webpack_exports__, "printError", function() { return /* reexport */ GraphQLError["b" /* printError */]; });
46939__webpack_require__.d(__webpack_exports__, "formatError", function() { return /* reexport */ formatError; });
46940__webpack_require__.d(__webpack_exports__, "getIntrospectionQuery", function() { return /* reexport */ getIntrospectionQuery["a" /* getIntrospectionQuery */]; });
46941__webpack_require__.d(__webpack_exports__, "getOperationAST", function() { return /* reexport */ getOperationAST["a" /* getOperationAST */]; });
46942__webpack_require__.d(__webpack_exports__, "getOperationRootType", function() { return /* reexport */ getOperationRootType["a" /* getOperationRootType */]; });
46943__webpack_require__.d(__webpack_exports__, "introspectionFromSchema", function() { return /* reexport */ introspectionFromSchema["a" /* introspectionFromSchema */]; });
46944__webpack_require__.d(__webpack_exports__, "buildClientSchema", function() { return /* reexport */ buildClientSchema["a" /* buildClientSchema */]; });
46945__webpack_require__.d(__webpack_exports__, "buildASTSchema", function() { return /* reexport */ buildASTSchema["a" /* buildASTSchema */]; });
46946__webpack_require__.d(__webpack_exports__, "buildSchema", function() { return /* reexport */ buildASTSchema["b" /* buildSchema */]; });
46947__webpack_require__.d(__webpack_exports__, "getDescription", function() { return /* reexport */ extendSchema["c" /* getDescription */]; });
46948__webpack_require__.d(__webpack_exports__, "extendSchema", function() { return /* reexport */ extendSchema["a" /* extendSchema */]; });
46949__webpack_require__.d(__webpack_exports__, "lexicographicSortSchema", function() { return /* reexport */ lexicographicSortSchema["a" /* lexicographicSortSchema */]; });
46950__webpack_require__.d(__webpack_exports__, "printSchema", function() { return /* reexport */ printSchema["b" /* printSchema */]; });
46951__webpack_require__.d(__webpack_exports__, "printType", function() { return /* reexport */ printSchema["c" /* printType */]; });
46952__webpack_require__.d(__webpack_exports__, "printIntrospectionSchema", function() { return /* reexport */ printSchema["a" /* printIntrospectionSchema */]; });
46953__webpack_require__.d(__webpack_exports__, "typeFromAST", function() { return /* reexport */ typeFromAST["a" /* typeFromAST */]; });
46954__webpack_require__.d(__webpack_exports__, "valueFromAST", function() { return /* reexport */ valueFromAST["a" /* valueFromAST */]; });
46955__webpack_require__.d(__webpack_exports__, "valueFromASTUntyped", function() { return /* reexport */ valueFromASTUntyped["a" /* valueFromASTUntyped */]; });
46956__webpack_require__.d(__webpack_exports__, "astFromValue", function() { return /* reexport */ astFromValue["a" /* astFromValue */]; });
46957__webpack_require__.d(__webpack_exports__, "TypeInfo", function() { return /* reexport */ TypeInfo["a" /* TypeInfo */]; });
46958__webpack_require__.d(__webpack_exports__, "visitWithTypeInfo", function() { return /* reexport */ TypeInfo["b" /* visitWithTypeInfo */]; });
46959__webpack_require__.d(__webpack_exports__, "coerceInputValue", function() { return /* reexport */ coerceInputValue["a" /* coerceInputValue */]; });
46960__webpack_require__.d(__webpack_exports__, "concatAST", function() { return /* reexport */ concatAST["a" /* concatAST */]; });
46961__webpack_require__.d(__webpack_exports__, "separateOperations", function() { return /* reexport */ separateOperations; });
46962__webpack_require__.d(__webpack_exports__, "stripIgnoredCharacters", function() { return /* reexport */ stripIgnoredCharacters; });
46963__webpack_require__.d(__webpack_exports__, "isEqualType", function() { return /* reexport */ typeComparators["b" /* isEqualType */]; });
46964__webpack_require__.d(__webpack_exports__, "isTypeSubTypeOf", function() { return /* reexport */ typeComparators["c" /* isTypeSubTypeOf */]; });
46965__webpack_require__.d(__webpack_exports__, "doTypesOverlap", function() { return /* reexport */ typeComparators["a" /* doTypesOverlap */]; });
46966__webpack_require__.d(__webpack_exports__, "assertValidName", function() { return /* reexport */ assertValidName["a" /* assertValidName */]; });
46967__webpack_require__.d(__webpack_exports__, "isValidNameError", function() { return /* reexport */ assertValidName["b" /* isValidNameError */]; });
46968__webpack_require__.d(__webpack_exports__, "BreakingChangeType", function() { return /* reexport */ BreakingChangeType; });
46969__webpack_require__.d(__webpack_exports__, "DangerousChangeType", function() { return /* reexport */ DangerousChangeType; });
46970__webpack_require__.d(__webpack_exports__, "findBreakingChanges", function() { return /* reexport */ findBreakingChanges; });
46971__webpack_require__.d(__webpack_exports__, "findDangerousChanges", function() { return /* reexport */ findDangerousChanges; });
46972__webpack_require__.d(__webpack_exports__, "findDeprecatedUsages", function() { return /* reexport */ findDeprecatedUsages; });
46973
46974// CONCATENATED MODULE: ./node_modules/graphql/version.mjs
46975/**
46976 * Note: This file is autogenerated using "resources/gen-version.js" script and
46977 * automatically updated by "npm version" command.
46978 */
46979
46980/**
46981 * A string containing the version of the GraphQL.js library
46982 */
46983var version = '15.5.1';
46984/**
46985 * An object containing the components of the GraphQL.js version string
46986 */
46987
46988var versionInfo = Object.freeze({
46989  major: 15,
46990  minor: 5,
46991  patch: 1,
46992  preReleaseTag: null
46993});
46994
46995// EXTERNAL MODULE: ./node_modules/graphql/jsutils/isPromise.mjs
46996var isPromise = __webpack_require__("z/Nw");
46997
46998// EXTERNAL MODULE: ./node_modules/graphql/language/parser.mjs
46999var parser = __webpack_require__("EMzn");
47000
47001// EXTERNAL MODULE: ./node_modules/graphql/validation/validate.mjs
47002var validate = __webpack_require__("EkME");
47003
47004// EXTERNAL MODULE: ./node_modules/graphql/type/validate.mjs
47005var type_validate = __webpack_require__("93gR");
47006
47007// EXTERNAL MODULE: ./node_modules/graphql/execution/execute.mjs + 3 modules
47008var execute = __webpack_require__("yRpE");
47009
47010// CONCATENATED MODULE: ./node_modules/graphql/graphql.mjs
47011
47012
47013
47014
47015
47016/**
47017 * This is the primary entry point function for fulfilling GraphQL operations
47018 * by parsing, validating, and executing a GraphQL document along side a
47019 * GraphQL schema.
47020 *
47021 * More sophisticated GraphQL servers, such as those which persist queries,
47022 * may wish to separate the validation and execution phases to a static time
47023 * tooling step, and a server runtime step.
47024 *
47025 * Accepts either an object with named arguments, or individual arguments:
47026 *
47027 * schema:
47028 *    The GraphQL type system to use when validating and executing a query.
47029 * source:
47030 *    A GraphQL language formatted string representing the requested operation.
47031 * rootValue:
47032 *    The value provided as the first argument to resolver functions on the top
47033 *    level type (e.g. the query object type).
47034 * contextValue:
47035 *    The context value is provided as an argument to resolver functions after
47036 *    field arguments. It is used to pass shared information useful at any point
47037 *    during executing this query, for example the currently logged in user and
47038 *    connections to databases or other services.
47039 * variableValues:
47040 *    A mapping of variable name to runtime value to use for all variables
47041 *    defined in the requestString.
47042 * operationName:
47043 *    The name of the operation to use if requestString contains multiple
47044 *    possible operations. Can be omitted if requestString contains only
47045 *    one operation.
47046 * fieldResolver:
47047 *    A resolver function to use when one is not provided by the schema.
47048 *    If not provided, the default field resolver is used (which looks for a
47049 *    value or method on the source value with the field's name).
47050 * typeResolver:
47051 *    A type resolver function to use when none is provided by the schema.
47052 *    If not provided, the default type resolver is used (which looks for a
47053 *    `__typename` field or alternatively calls the `isTypeOf` method).
47054 */
47055
47056function graphql(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {
47057  var _arguments = arguments;
47058
47059  /* eslint-enable no-redeclare */
47060  // Always return a Promise for a consistent API.
47061  return new Promise(function (resolve) {
47062    return resolve( // Extract arguments from object args if provided.
47063    _arguments.length === 1 ? graphqlImpl(argsOrSchema) : graphqlImpl({
47064      schema: argsOrSchema,
47065      source: source,
47066      rootValue: rootValue,
47067      contextValue: contextValue,
47068      variableValues: variableValues,
47069      operationName: operationName,
47070      fieldResolver: fieldResolver,
47071      typeResolver: typeResolver
47072    }));
47073  });
47074}
47075/**
47076 * The graphqlSync function also fulfills GraphQL operations by parsing,
47077 * validating, and executing a GraphQL document along side a GraphQL schema.
47078 * However, it guarantees to complete synchronously (or throw an error) assuming
47079 * that all field resolvers are also synchronous.
47080 */
47081
47082function graphqlSync(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {
47083  /* eslint-enable no-redeclare */
47084  // Extract arguments from object args if provided.
47085  var result = arguments.length === 1 ? graphqlImpl(argsOrSchema) : graphqlImpl({
47086    schema: argsOrSchema,
47087    source: source,
47088    rootValue: rootValue,
47089    contextValue: contextValue,
47090    variableValues: variableValues,
47091    operationName: operationName,
47092    fieldResolver: fieldResolver,
47093    typeResolver: typeResolver
47094  }); // Assert that the execution was synchronous.
47095
47096  if (Object(isPromise["a" /* default */])(result)) {
47097    throw new Error('GraphQL execution failed to complete synchronously.');
47098  }
47099
47100  return result;
47101}
47102
47103function graphqlImpl(args) {
47104  var schema = args.schema,
47105      source = args.source,
47106      rootValue = args.rootValue,
47107      contextValue = args.contextValue,
47108      variableValues = args.variableValues,
47109      operationName = args.operationName,
47110      fieldResolver = args.fieldResolver,
47111      typeResolver = args.typeResolver; // Validate Schema
47112
47113  var schemaValidationErrors = Object(type_validate["b" /* validateSchema */])(schema);
47114
47115  if (schemaValidationErrors.length > 0) {
47116    return {
47117      errors: schemaValidationErrors
47118    };
47119  } // Parse
47120
47121
47122  var document;
47123
47124  try {
47125    document = Object(parser["parse"])(source);
47126  } catch (syntaxError) {
47127    return {
47128      errors: [syntaxError]
47129    };
47130  } // Validate
47131
47132
47133  var validationErrors = Object(validate["c" /* validate */])(schema, document);
47134
47135  if (validationErrors.length > 0) {
47136    return {
47137      errors: validationErrors
47138    };
47139  } // Execute
47140
47141
47142  return Object(execute["g" /* execute */])({
47143    schema: schema,
47144    document: document,
47145    rootValue: rootValue,
47146    contextValue: contextValue,
47147    variableValues: variableValues,
47148    operationName: operationName,
47149    fieldResolver: fieldResolver,
47150    typeResolver: typeResolver
47151  });
47152}
47153
47154// EXTERNAL MODULE: ./node_modules/graphql/type/schema.mjs
47155var type_schema = __webpack_require__("51nL");
47156
47157// EXTERNAL MODULE: ./node_modules/graphql/type/directives.mjs
47158var directives = __webpack_require__("4suF");
47159
47160// EXTERNAL MODULE: ./node_modules/graphql/type/definition.mjs + 1 modules
47161var definition = __webpack_require__("axIb");
47162
47163// EXTERNAL MODULE: ./node_modules/graphql/type/scalars.mjs + 1 modules
47164var scalars = __webpack_require__("19Hc");
47165
47166// EXTERNAL MODULE: ./node_modules/graphql/type/introspection.mjs
47167var introspection = __webpack_require__("LViu");
47168
47169// EXTERNAL MODULE: ./node_modules/graphql/language/ast.mjs
47170var language_ast = __webpack_require__("klf5");
47171
47172// EXTERNAL MODULE: ./node_modules/graphql/language/source.mjs
47173var language_source = __webpack_require__("neE4");
47174
47175// EXTERNAL MODULE: ./node_modules/graphql/language/location.mjs
47176var language_location = __webpack_require__("y4cC");
47177
47178// EXTERNAL MODULE: ./node_modules/graphql/language/printLocation.mjs
47179var printLocation = __webpack_require__("zsKT");
47180
47181// EXTERNAL MODULE: ./node_modules/graphql/language/lexer.mjs
47182var language_lexer = __webpack_require__("CbW8");
47183
47184// EXTERNAL MODULE: ./node_modules/graphql/language/tokenKind.mjs
47185var language_tokenKind = __webpack_require__("JvOi");
47186
47187// EXTERNAL MODULE: ./node_modules/graphql/language/printer.mjs
47188var printer = __webpack_require__("dQau");
47189
47190// EXTERNAL MODULE: ./node_modules/graphql/language/visitor.mjs
47191var visitor = __webpack_require__("L2ys");
47192
47193// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs
47194var kinds = __webpack_require__("/jXB");
47195
47196// EXTERNAL MODULE: ./node_modules/graphql/language/directiveLocation.mjs
47197var directiveLocation = __webpack_require__("F8X2");
47198
47199// EXTERNAL MODULE: ./node_modules/graphql/language/predicates.mjs
47200var predicates = __webpack_require__("Xizt");
47201
47202// EXTERNAL MODULE: ./node_modules/graphql/jsutils/Path.mjs
47203var Path = __webpack_require__("fExb");
47204
47205// EXTERNAL MODULE: ./node_modules/graphql/execution/values.mjs
47206var values = __webpack_require__("5XwX");
47207
47208// EXTERNAL MODULE: ./node_modules/graphql/jsutils/inspect.mjs
47209var inspect = __webpack_require__("rWdj");
47210
47211// EXTERNAL MODULE: ./node_modules/graphql/polyfills/symbols.mjs
47212var symbols = __webpack_require__("2Fve");
47213
47214// CONCATENATED MODULE: ./node_modules/graphql/jsutils/isAsyncIterable.mjs
47215
47216/**
47217 * Returns true if the provided object implements the AsyncIterator protocol via
47218 * either implementing a `Symbol.asyncIterator` or `"@@asyncIterator"` method.
47219 */
47220
47221// eslint-disable-next-line no-redeclare
47222function isAsyncIterable(maybeAsyncIterable) {
47223  return typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[symbols["a" /* SYMBOL_ASYNC_ITERATOR */]]) === 'function';
47224}
47225
47226// EXTERNAL MODULE: ./node_modules/graphql/error/GraphQLError.mjs
47227var GraphQLError = __webpack_require__("dWS+");
47228
47229// EXTERNAL MODULE: ./node_modules/graphql/error/locatedError.mjs
47230var locatedError = __webpack_require__("jI7m");
47231
47232// EXTERNAL MODULE: ./node_modules/graphql/utilities/getOperationRootType.mjs
47233var getOperationRootType = __webpack_require__("gXYT");
47234
47235// CONCATENATED MODULE: ./node_modules/graphql/subscription/mapAsyncIterator.mjs
47236function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
47237
47238
47239
47240/**
47241 * Given an AsyncIterable and a callback function, return an AsyncIterator
47242 * which produces values mapped via calling the callback function.
47243 */
47244function mapAsyncIterator(iterable, callback, rejectCallback) {
47245  // $FlowFixMe[prop-missing]
47246  var iteratorMethod = iterable[symbols["a" /* SYMBOL_ASYNC_ITERATOR */]];
47247  var iterator = iteratorMethod.call(iterable);
47248  var $return;
47249  var abruptClose;
47250
47251  if (typeof iterator.return === 'function') {
47252    $return = iterator.return;
47253
47254    abruptClose = function abruptClose(error) {
47255      var rethrow = function rethrow() {
47256        return Promise.reject(error);
47257      };
47258
47259      return $return.call(iterator).then(rethrow, rethrow);
47260    };
47261  }
47262
47263  function mapResult(result) {
47264    return result.done ? result : asyncMapValue(result.value, callback).then(iteratorResult, abruptClose);
47265  }
47266
47267  var mapReject;
47268
47269  if (rejectCallback) {
47270    // Capture rejectCallback to ensure it cannot be null.
47271    var reject = rejectCallback;
47272
47273    mapReject = function mapReject(error) {
47274      return asyncMapValue(error, reject).then(iteratorResult, abruptClose);
47275    };
47276  }
47277  /* TODO: Flow doesn't support symbols as keys:
47278     https://github.com/facebook/flow/issues/3258 */
47279
47280
47281  return _defineProperty({
47282    next: function next() {
47283      return iterator.next().then(mapResult, mapReject);
47284    },
47285    return: function _return() {
47286      return $return ? $return.call(iterator).then(mapResult, mapReject) : Promise.resolve({
47287        value: undefined,
47288        done: true
47289      });
47290    },
47291    throw: function _throw(error) {
47292      if (typeof iterator.throw === 'function') {
47293        return iterator.throw(error).then(mapResult, mapReject);
47294      }
47295
47296      return Promise.reject(error).catch(abruptClose);
47297    }
47298  }, symbols["a" /* SYMBOL_ASYNC_ITERATOR */], function () {
47299    return this;
47300  });
47301}
47302
47303function asyncMapValue(value, callback) {
47304  return new Promise(function (resolve) {
47305    return resolve(callback(value));
47306  });
47307}
47308
47309function iteratorResult(value) {
47310  return {
47311    value: value,
47312    done: false
47313  };
47314}
47315
47316// CONCATENATED MODULE: ./node_modules/graphql/subscription/subscribe.mjs
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326function subscribe(argsOrSchema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, subscribeFieldResolver) {
47327  /* eslint-enable no-redeclare */
47328  // Extract arguments from object args if provided.
47329  return arguments.length === 1 ? subscribeImpl(argsOrSchema) : subscribeImpl({
47330    schema: argsOrSchema,
47331    document: document,
47332    rootValue: rootValue,
47333    contextValue: contextValue,
47334    variableValues: variableValues,
47335    operationName: operationName,
47336    fieldResolver: fieldResolver,
47337    subscribeFieldResolver: subscribeFieldResolver
47338  });
47339}
47340/**
47341 * This function checks if the error is a GraphQLError. If it is, report it as
47342 * an ExecutionResult, containing only errors and no data. Otherwise treat the
47343 * error as a system-class error and re-throw it.
47344 */
47345
47346function reportGraphQLError(error) {
47347  if (error instanceof GraphQLError["a" /* GraphQLError */]) {
47348    return {
47349      errors: [error]
47350    };
47351  }
47352
47353  throw error;
47354}
47355
47356function subscribeImpl(args) {
47357  var schema = args.schema,
47358      document = args.document,
47359      rootValue = args.rootValue,
47360      contextValue = args.contextValue,
47361      variableValues = args.variableValues,
47362      operationName = args.operationName,
47363      fieldResolver = args.fieldResolver,
47364      subscribeFieldResolver = args.subscribeFieldResolver;
47365  var sourcePromise = createSourceEventStream(schema, document, rootValue, contextValue, variableValues, operationName, subscribeFieldResolver); // For each payload yielded from a subscription, map it over the normal
47366  // GraphQL `execute` function, with `payload` as the rootValue.
47367  // This implements the "MapSourceToResponseEvent" algorithm described 
47367in
47368  // the GraphQL specification. The `execute` function provides the
47369  // "ExecuteSubscriptionEvent" algorithm, as it is nearly identical to the
47370  // "ExecuteQuery" algorithm, for which `execute` is also used.
47371
47372  var mapSourceToResponse = function mapSourceToResponse(payload) {
47373    return Object(execute["g" /* execute */])({
47374      schema: schema,
47375      document: document,
47376      rootValue: payload,
47377      contextValue: contextValue,
47378      variableValues: variableValues,
47379      operationName: operationName,
47380      fieldResolver: fieldResolver
47381    });
47382  }; // Resolve the Source Stream, then map every source value to a
47383  // ExecutionResult value as described above.
47384
47385
47386  return sourcePromise.then(function (resultOrStream) {
47387    return (// Note: Flow can't refine isAsyncIterable, so explicit casts are used.
47388      isAsyncIterable(resultOrStream) ? mapAsyncIterator(resultOrStream, mapSourceToResponse, reportGraphQLError) : resultOrStream
47389    );
47390  });
47391}
47392/**
47393 * Implements the "CreateSourceEventStream" algorithm described in the
47394 * GraphQL specification, resolving the subscription source event stream.
47395 *
47396 * Returns a Promise which resolves to either an AsyncIterable (if successful)
47397 * or an ExecutionResult (error). The promise will be rejected if the schema or
47398 * other arguments to this function are invalid, or if the resolved event stream
47399 * is not an async iterable.
47400 *
47401 * If the client-provided arguments to this function do not result in a
47402 * compliant subscription, a GraphQL Response (ExecutionResult) with
47403 * descriptive errors and no data will be returned.
47404 *
47405 * If the the source stream could not be created due to faulty subscription
47406 * resolver logic or underlying systems, the promise will resolve to a single
47407 * ExecutionResult containing `errors` and no `data`.
47408 *
47409 * If the operation succeeded, the promise resolves to the AsyncIterable for the
47410 * event stream returned by the resolver.
47411 *
47412 * A Source Event Stream represents a sequence of events, each of which triggers
47413 * a GraphQL execution for that event.
47414 *
47415 * This may be useful when hosting the stateful subscription service in a
47416 * different process or machine than the stateless GraphQL execution engine,
47417 * or otherwise separating these two steps. For more on this, see the
47418 * "Supporting Subscriptions at Scale" information in the GraphQL specification.
47419 */
47420
47421
47422function createSourceEventStream(schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver) {
47423  // If arguments are missing or incorrectly typed, this is an internal
47424  // developer mistake which should throw an early error.
47425  Object(execute["a" /* assertValidExecutionArguments */])(schema, document, variableValues);
47426  return new Promise(function (resolve) {
47427    // If a valid context cannot be created due to incorrect arguments,
47428    // this will throw an error.
47429    var exeContext = Object(execute["b" /* buildExecutionContext */])(schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver);
47430    resolve( // Return early errors if execution context failed.
47431    Array.isArray(exeContext) ? {
47432      errors: exeContext
47433    } : executeSubscription(exeContext));
47434  }).catch(reportGraphQLError);
47435}
47436
47437function executeSubscription(exeContext) {
47438  var schema = exeContext.schema,
47439      operation = exeContext.operation,
47440      variableValues = exeContext.variableValues,
47441      rootValue = exeContext.rootValue;
47442  var type = Object(getOperationRootType["a" /* getOperationRootType */])(schema, operation);
47443  var fields = Object(execute["d" /* collectFields */])(exeContext, type, operation.selectionSet, Object.create(null), Object.create(null));
47444  var responseNames = Object.keys(fields);
47445  var responseName = responseNames[0];
47446  var fieldNodes = fields[responseName];
47447  var fieldNode = fieldNodes[0];
47448  var fieldName = fieldNode.name.value;
47449  var fieldDef = Object(execute["i" /* getFieldDef */])(schema, type, fieldName);
47450
47451  if (!fieldDef) {
47452    throw new GraphQLError["a" /* GraphQLError */]("The subscription field \"".concat(fieldName, "\" is not defined."), fieldNodes);
47453  }
47454
47455  var path = Object(Path["a" /* addPath */])(undefined, responseName, type.name);
47456  var info = Object(execute["c" /* buildResolveInfo */])(exeContext, fieldDef, fieldNodes, type, path); // Coerce to Promise for easier error handling and consistent return type.
47457
47458  return new Promise(function (resolveResult) {
47459    var _fieldDef$subscribe;
47460
47461    // Implements the "ResolveFieldEventStream" algorithm from GraphQL specification.
47462    // It differs from "ResolveFieldValue" due to providing a different `resolveFn`.
47463    // Build a JS object of arguments from the field.arguments AST, using the
47464    // variables scope to fulfill any variable references.
47465    var args = Object(values["a" /* getArgumentValues */])(fieldDef, fieldNodes[0], variableValues); // The resolve function's optional third argument is a context value that
47466    // is provided to every resolve function within an execution. It is commonly
47467    // used to represent an authenticated user, or request-specific caches.
47468
47469    var contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an
47470    // AsyncIterable yielding raw payloads.
47471
47472    var resolveFn = (_fieldDef$subscribe = fieldDef.subscribe) !== null && _fieldDef$subscribe !== void 0 ? _fieldDef$subscribe : exeContext.fieldResolver;
47473    resolveResult(resolveFn(rootValue, args, contextValue, info));
47474  }).then(function (eventStream) {
47475    if (eventStream instanceof Error) {
47476      throw Object(locatedError["a" /* locatedError */])(eventStream, fieldNodes, Object(Path["b" /* pathToArray */])(path));
47477    } // Assert field returned an event stream, otherwise yield an error.
47478
47479
47480    if (!isAsyncIterable(eventStream)) {
47481      throw new Error('Subscription field must return Async Iterable. ' + "Received: ".concat(Object(inspect["a" /* default */])(eventStream), "."));
47482    }
47483
47484    return eventStream;
47485  }, function (error) {
47486    throw Object(locatedError["a" /* locatedError */])(error, fieldNodes, Object(Path["b" /* pathToArray */])(path));
47487  });
47488}
47489
47490// EXTERNAL MODULE: ./node_modules/graphql/validation/ValidationContext.mjs
47491var ValidationContext = __webpack_require__("jOXf");
47492
47493// EXTERNAL MODULE: ./node_modules/graphql/validation/specifiedRules.mjs
47494var specifiedRules = __webpack_require__("FQ53");
47495
47496// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs
47497var ExecutableDefinitionsRule = __webpack_require__("tXcb");
47498
47499// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs
47500var FieldsOnCorrectTypeRule = __webpack_require__("dpSA");
47501
47502// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs
47503var FragmentsOnCompositeTypesRule = __webpack_require__("6s7a");
47504
47505// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs
47506var KnownArgumentNamesRule = __webpack_require__("C8Kj");
47507
47508// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/KnownDirectivesRule.mjs
47509var KnownDirectivesRule = __webpack_require__("vSWR");
47510
47511// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs
47512var KnownFragmentNamesRule = __webpack_require__("pRhh");
47513
47514// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs
47515var KnownTypeNamesRule = __webpack_require__("/vyT");
47516
47517// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs
47518var LoneAnonymousOperationRule = __webpack_require__("SrQE");
47519
47520// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs
47521var NoFragmentCyclesRule = __webpack_require__("izjK");
47522
47523// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs
47524var NoUndefinedVariablesRule = __webpack_require__("tFdq");
47525
47526// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs
47527var NoUnusedFragmentsRule = __webpack_require__("fqV+");
47528
47529// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs
47530var NoUnusedVariablesRule = __webpack_require__("dtAw");
47531
47532// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs
47533var OverlappingFieldsCanBeMergedRule = __webpack_require__("lb3J");
47534
47535// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs
47536var PossibleFragmentSpreadsRule = __webpack_require__("wIKA");
47537
47538// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs
47539var ProvidedRequiredArgumentsRule = __webpack_require__("S0S6");
47540
47541// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/ScalarLeafsRule.mjs
47542var ScalarLeafsRule = __webpack_require__("5IOE");
47543
47544// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs
47545var SingleFieldSubscriptionsRule = __webpack_require__("Kg2h");
47546
47547// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs
47548var UniqueArgumentNamesRule = __webpack_require__("awoc");
47549
47550// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs
47551var UniqueDirectivesPerLocationRule = __webpack_require__("XucM");
47552
47553// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs
47554var UniqueFragmentNamesRule = __webpack_require__("YF83");
47555
47556// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs
47557var UniqueInputFieldNamesRule = __webpack_require__("LOfW");
47558
47559// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs
47560var UniqueOperationNamesRule = __webpack_require__("q5gm");
47561
47562// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs
47563var UniqueVariableNamesRule = __webpack_require__("O05/");
47564
47565// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs
47566var ValuesOfCorrectTypeRule = __webpack_require__("b0Ie");
47567
47568// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs
47569var VariablesAreInputTypesRule = __webpack_require__("JW+s");
47570
47571// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs
47572var VariablesInAllowedPositionRule = __webpack_require__("K7U/");
47573
47574// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs
47575var LoneSchemaDefinitionRule = __webpack_require__("w6G1");
47576
47577// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs
47578var UniqueOperationTypesRule = __webpack_require__("tjI6");
47579
47580// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs
47581var UniqueTypeNamesRule = __webpack_require__("WHoc");
47582
47583// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs
47584var UniqueEnumValueNamesRule = __webpack_require__("nIiE");
47585
47586// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs
47587var UniqueFieldDefinitionNamesRule = __webpack_require__("QqNk");
47588
47589// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs
47590var UniqueDirectiveNamesRule = __webpack_require__("gig5");
47591
47592// EXTERNAL MODULE: ./node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs
47593var PossibleTypeExtensionsRule = __webpack_require__("R/MH");
47594
47595// EXTERNAL MODULE: ./node_modules/graphql/jsutils/invariant.mjs
47596var invariant = __webpack_require__("2C6G");
47597
47598// CONCATENATED MODULE: ./node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs
47599
47600
47601
47602
47603/**
47604 * No deprecated
47605 *
47606 * A GraphQL document is only valid if all selected fields and all used enum values have not been
47607 * deprecated.
47608 *
47609 * Note: This rule is optional and is not part of the Validation section of the GraphQL
47610 * Specification. The main purpose of this rule is detection of deprecated usages and not
47611 * necessarily to forbid their use when querying a service.
47612 */
47613function NoDeprecatedCustomRule(context) {
47614  return {
47615    Field: function Field(node) {
47616      var fieldDef = context.getFieldDef();
47617      var deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason;
47618
47619      if (fieldDef && deprecationReason != null) {
47620        var parentType = context.getParentType();
47621        parentType != null || Object(invariant["a" /* default */])(0);
47622        context.reportError(new GraphQLError["a" /* GraphQLError */]("The field ".concat(parentType.name, ".").concat(fieldDef.name, " is deprecated. ").concat(deprecationReason), node));
47623      }
47624    },
47625    Argument: function Argument(node) {
47626      var argDef = context.getArgument();
47627      var deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason;
47628
47629      if (argDef && deprecationReason != null) {
47630        var directiveDef = context.getDirective();
47631
47632        if (directiveDef != null) {
47633          context.reportError(new GraphQLError["a" /* GraphQLError */]("Directive \"@".concat(directiveDef.name, "\" argument \"").concat(argDef.name, "\" is deprecated. ").concat(deprecationReason), node));
47634        } else {
47635          var parentType = context.getParentType();
47636          var fieldDef = context.getFieldDef();
47637          parentType != null && fieldDef != null || Object(invariant["a" /* default */])(0);
47638          context.reportError(new GraphQLError["a" /* GraphQLError */]("Field \"".concat(parentType.name, ".").concat(fieldDef.name, "\" argument \"").concat(argDef.name, "\" is deprecated. ").concat(deprecationReason), node));
47639        }
47640      }
47641    },
47642    ObjectField: function ObjectField(node) {
47643      var inputObjectDef = Object(definition["A" /* getNamedType */])(context.getParentInputType());
47644
47645      if (Object(definition["F" /* isInputObjectType */])(inputObjectDef)) {
47646        var inputFieldDef = inputObjectDef.getFields()[node.name.value]; // flowlint-next-line unnecessary-optional-chain:off
47647
47648        var deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason;
47649
47650        if (deprecationReason != null) {
47651          context.reportError(new GraphQLError["a" /* GraphQLError */]("The input field ".concat(inputObjectDef.name, ".").concat(inputFieldDef.name, " is deprecated. ").concat(deprecationReason), node));
47652        }
47653      }
47654    },
47655    EnumValue: function EnumValue(node) {
47656      var enumValueDef = context.getEnumValue();
47657      var deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason;
47658
47659      if (enumValueDef && deprecationReason != null) {
47660        var enumTypeDef = Object(definition["A" /* getNamedType */])(context.getInputType());
47661        enumTypeDef != null || Object(invariant["a" /* default */])(0);
47662        context.reportError(new GraphQLError["a" /* GraphQLError */]("The enum value \"".concat(enumTypeDef.name, ".").concat(enumValueDef.name, "\" is deprecated. ").concat(deprecationReason), node));
47663      }
47664    }
47665  };
47666}
47667
47668// CONCATENATED MODULE: ./node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs
47669
47670
47671
47672
47673/**
47674 * Prohibit introspection queries
47675 *
47676 * A GraphQL document is only valid if all fields selected are not fields that
47677 * return an introspection type.
47678 *
47679 * Note: This rule is optional and is not part of the Validation section of the
47680 * GraphQL Specification. This rule effectively disables introspection, which
47681 * does not reflect best practices and should only be done if absolutely necessary.
47682 */
47683function NoSchemaIntrospectionCustomRule(context) {
47684  return {
47685    Field: function Field(node) {
47686      var type = Object(definition["A" /* getNamedType */])(context.getType());
47687
47688      if (type && Object(introspection["n" /* isIntrospectionType */])(type)) {
47689        context.reportError(new GraphQLError["a" /* GraphQLError */]("GraphQL introspection has been disabled, but the requested query contained the field \"".concat(node.name.value, "\"."), node));
47690      }
47691    }
47692  };
47693}
47694
47695// EXTERNAL MODULE: ./node_modules/graphql/error/syntaxError.mjs
47696var syntaxError = __webpack_require__("oycr");
47697
47698// EXTERNAL MODULE: ./node_modules/graphql/jsutils/devAssert.mjs
47699var devAssert = __webpack_require__("t3R0");
47700
47701// CONCATENATED MODULE: ./node_modules/graphql/error/formatError.mjs
47702
47703
47704/**
47705 * Given a GraphQLError, format it according to the rules described by the
47706 * Response Format, Errors section of the GraphQL Specification.
47707 */
47708function formatError(error) {
47709  var _error$message;
47710
47711  error || Object(devAssert["a" /* default */])(0, 'Received null or undefined error.');
47712  var message = (_error$message = error.message) !== null && _error$message !== void 0 ? _error$message : 'An unknown error occurred.';
47713  var locations = error.locations;
47714  var path = error.path;
47715  var extensions = error.extensions;
47716  return extensions ? {
47717    message: message,
47718    locations: locations,
47719    path: path,
47720    extensions: extensions
47721  } : {
47722    message: message,
47723    locations: locations,
47724    path: path
47725  };
47726}
47727/**
47728 * @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors
47729 */
47730
47731// EXTERNAL MODULE: ./node_modules/graphql/utilities/getIntrospectionQuery.mjs
47732var getIntrospectionQuery = __webpack_require__("hRS1");
47733
47734// EXTERNAL MODULE: ./node_modules/graphql/utilities/getOperationAST.mjs
47735var getOperationAST = __webpack_require__("SYjR");
47736
47737// EXTERNAL MODULE: ./node_modules/graphql/utilities/introspectionFromSchema.mjs
47738var introspectionFromSchema = __webpack_require__("FAQy");
47739
47740// EXTERNAL MODULE: ./node_modules/graphql/utilities/buildClientSchema.mjs
47741var buildClientSchema = __webpack_require__("TirB");
47742
47743// EXTERNAL MODULE: ./node_modules/graphql/utilities/buildASTSchema.mjs
47744var buildASTSchema = __webpack_require__("Yen0");
47745
47746// EXTERNAL MODULE: ./node_modules/graphql/utilities/extendSchema.mjs
47747var extendSchema = __webpack_require__("cbkQ");
47748
47749// EXTERNAL MODULE: ./node_modules/graphql/utilities/lexicographicSortSchema.mjs
47750var lexicographicSortSchema = __webpack_require__("X4IK");
47751
47752// EXTERNAL MODULE: ./node_modules/graphql/utilities/printSchema.mjs
47753var printSchema = __webpack_require__("3vMM");
47754
47755// EXTERNAL MODULE: ./node_modules/graphql/utilities/typeFromAST.mjs
47756var typeFromAST = __webpack_require__("umOc");
47757
47758// EXTERNAL MODULE: ./node_modules/graphql/utilities/valueFromAST.mjs
47759var valueFromAST = __webpack_require__("Mbdf");
47760
47761// EXTERNAL MODULE: ./node_modules/graphql/utilities/valueFromASTUntyped.mjs
47762var valueFromASTUntyped = __webpack_require__("ADFt");
47763
47764// EXTERNAL MODULE: ./node_modules/graphql/utilities/astFromValue.mjs
47765var astFromValue = __webpack_require__("3HNt");
47766
47767// EXTERNAL MODULE: ./node_modules/graphql/utilities/TypeInfo.mjs
47768var TypeInfo = __webpack_require__("4RMZ");
47769
47770// EXTERNAL MODULE: ./node_modules/graphql/utilities/coerceInputValue.mjs
47771var coerceInputValue = __webpack_require__("67eP");
47772
47773// EXTERNAL MODULE: ./node_modules/graphql/utilities/concatAST.mjs
47774var concatAST = __webpack_require__("h5lq");
47775
47776// CONCATENATED MODULE: ./node_modules/graphql/utilities/separateOperations.mjs
47777
47778
47779/**
47780 * separateOperations accepts a single AST document which may contain many
47781 * operations and fragments and returns a collection of AST documents each of
47782 * which contains a single operation as well the fragment definitions it
47783 * refers to.
47784 */
47785
47786function separateOperations(documentAST) {
47787  var operations = [];
47788  var depGraph = Object.create(null); // Populate metadata and build a dependency graph.
47789
47790  for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) {
47791    var definitionNode = _documentAST$definiti2[_i2];
47792
47793    switch (definitionNode.kind) {
47794      case kinds["a" /* Kind */].OPERATION_DEFINITION:
47795        operations.push(definitionNode);
47796        break;
47797
47798      case kinds["a" /* Kind */].FRAGMENT_DEFINITION:
47799        depGraph[definitionNode.name.value] = collectDependencies(definitionNode.selectionSet);
47800        break;
47801    }
47802  } // For each operation, produce a new synthesized AST which includes only what
47803  // is necessary for completing that operation.
47804
47805
47806  var separatedDocumentASTs = Object.create(null);
47807
47808  var _loop = function _loop(_i4) {
47809    var operation = operations[_i4];
47810    var dependencies = new Set();
47811
47812    for (var _i6 = 0, _collectDependencies2 = collectDependencies(operation.selectionSet); _i6 < _collectDependencies2.length; _i6++) {
47813      var fragmentName = _collectDependencies2[_i6];
47814      collectTransitiveDependencies(dependencies, depGraph, fragmentName);
47815    } // Provides the empty string for anonymous operations.
47816
47817
47818    var operationName = operation.name ? operation.name.value : ''; // The list of definition nodes to be included for this operation, sorted
47819    // to retain the same order as the original document.
47820
47821    separatedDocumentASTs[operationName] = {
47822      kind: kinds["a" /* Kind */].DOCUMENT,
47823      definitions: documentAST.definitions.filter(function (node) {
47824        return node === operation || node.kind === kinds["a" /* Kind */].FRAGMENT_DEFINITION && dependencies.has(node.name.value);
47825      })
47826    };
47827  };
47828
47829  for (var _i4 = 0; _i4 < operations.length; _i4++) {
47830    _loop(_i4);
47831  }
47832
47833  return separatedDocumentASTs;
47834}
47835
47836// From a dependency graph, collects a list of transitive dependencies by
47837// recursing through a dependency graph.
47838function collectTransitiveDependencies(collected, depGraph, fromName) {
47839  if (!collected.has(fromName)) {
47840    collected.add(fromName);
47841    var immediateDeps = depGraph[fromName];
47842
47843    if (immediateDeps !== undefined) {
47844      for (var _i8 = 0; _i8 < immediateDeps.length; _i8++) {
47845        var toName = immediateDeps[_i8];
47846        collectTransitiveDependencies(collected, depGraph, toName);
47847      }
47848    }
47849  }
47850}
47851
47852function collectDependencies(selectionSet) {
47853  var dependencies = [];
47854  Object(visitor["c" /* visit */])(selectionSet, {
47855    FragmentSpread: function FragmentSpread(node) {
47856      dependencies.push(node.name.value);
47857    }
47858  });
47859  return dependencies;
47860}
47861
47862// EXTERNAL MODULE: ./node_modules/graphql/language/blockString.mjs
47863var blockString = __webpack_require__("BLR7");
47864
47865// CONCATENATED MODULE: ./node_modules/graphql/utilities/stripIgnoredCharacters.mjs
47866
47867
47868
47869
47870/**
47871 * Strips characters that are not significant to the validity or execution
47872 * of a GraphQL document:
47873 *   - UnicodeBOM
47874 *   - WhiteSpace
47875 *   - LineTerminator
47876 *   - Comment
47877 *   - Comma
47878 *   - BlockString indentation
47879 *
47880 * Note: It is required to have a delimiter character between neighboring
47881 * non-punctuator tokens and this function always uses single space as delimiter.
47882 *
47883 * It is guaranteed that both input and output documents if parsed would result
47884 * in the exact same AST except for nodes location.
47885 *
47886 * Warning: It is guaranteed that this function will always produce stable results.
47887 * However, it's not guaranteed that it will stay the same between different
47888 * releases due to bugfixes or changes in the GraphQL specification.
47889 *
47890 * Query example:
47891 *
47892 * query SomeQuery($foo: String!, $bar: String) {
47893 *   someField(foo: $foo, bar: $bar) {
47894 *     a
47895 *     b {
47896 *       c
47897 *       d
47898 *     }
47899 *   }
47900 * }
47901 *
47902 * Becomes:
47903 *
47904 * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}}
47905 *
47906 * SDL example:
47907 *
47908 * """
47909 * Type description
47910 * """
47911 * type Foo {
47912 *   """
47913 *   Field description
47914 *   """
47915 *   bar: String
47916 * }
47917 *
47918 * Becomes:
47919 *
47920 * """Type description""" type Foo{"""Field description""" bar:String}
47921 */
47922
47923function stripIgnoredCharacters(source) {
47924  var sourceObj = Object(language_source["b" /* isSource */])(source) ? source : new language_source["a" /* Source */](source);
47925  var body = sourceObj.body;
47926  var lexer = new language_lexer["a" /* Lexer */](sourceObj);
47927  var strippedBody = '';
47928  var wasLastAddedTokenNonPunctuator = false;
47929
47930  while (lexer.advance().kind !== language_tokenKind["a" /* TokenKind */].EOF) {
47931    var currentToken = lexer.token;
47932    var tokenKind = currentToken.kind;
47933    /**
47934     * Every two non-punctuator tokens should have space between them.
47935     * Also prevent case of non-punctuator token following by spread resulting
47936     * in invalid token (e.g. `1...` is invalid Float token).
47937     */
47938
47939    var isNonPunctuator = !Object(language_lexer["b" /* isPunctuatorTokenKind */])(currentToken.kind);
47940
47941    if (wasLastAddedTokenNonPunctuator) {
47942      if (isNonPunctuator || currentToken.kind === language_tokenKind["a" /* TokenKind */].SPREAD) {
47943        strippedBody += ' ';
47944      }
47945    }
47946
47947    var tokenBody = body.slice(currentToken.start, currentToken.end);
47948
47949    if (tokenKind === language_tokenKind["a" /* TokenKind */].BLOCK_STRING) {
47950      strippedBody += dedentBlockString(tokenBody);
47951    } else {
47952      strippedBody += tokenBody;
47953    }
47954
47955    wasLastAddedTokenNonPunctuator = isNonPunctuator;
47956  }
47957
47958  return strippedBody;
47959}
47960
47961function dedentBlockString(blockStr) {
47962  // skip leading and trailing triple quotations
47963  var rawStr = blockStr.slice(3, -3);
47964  var body = Object(blockString["a" /* dedentBlockStringValue */])(rawStr);
47965
47966  if (Object(blockString["b" /* getBlockStringIndentation */])(body) > 0) {
47967    body = '\n' + body;
47968  }
47969
47970  var lastChar = body[body.length - 1];
47971  var hasTrailingQuote = lastChar === '"' && body.slice(-4) !== '\\"""';
47972
47973  if (hasTrailingQuote || lastChar === '\\') {
47974    body += '\n';
47975  }
47976
47977  return '"""' + body + '"""';
47978}
47979
47980// EXTERNAL MODULE: ./node_modules/graphql/utilities/typeComparators.mjs
47981var typeComparators = __webpack_require__("sJV+");
47982
47983// EXTERNAL MODULE: ./node_modules/graphql/utilities/assertValidName.mjs
47984var assertValidName = __webpack_require__("5PMP");
47985
47986// EXTERNAL MODULE: ./node_modules/graphql/polyfills/objectValues.mjs
47987var objectValues = __webpack_require__("1QEH");
47988
47989// EXTERNAL MODULE: ./node_modules/graphql/jsutils/keyMap.mjs
47990var keyMap = __webpack_require__("kBjl");
47991
47992// EXTERNAL MODULE: ./node_modules/graphql/jsutils/naturalCompare.mjs
47993var naturalCompare = __webpack_require__("Y5C7");
47994
47995// CONCATENATED MODULE: ./node_modules/graphql/utilities/findBreakingChanges.mjs
47996function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
47997
47998function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { findBreakingChanges_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
47999
48000function findBreakingChanges_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
48001
48002
48003
48004
48005
48006
48007
48008
48009
48010
48011
48012var BreakingChangeType = Object.freeze({
48013  TYPE_REMOVED: 'TYPE_REMOVED',
48014  TYPE_CHANGED_KIND: 'TYPE_CHANGED_KIND',
48015  TYPE_REMOVED_FROM_UNION: 'TYPE_REMOVED_FROM_UNION',
48016  VALUE_REMOVED_FROM_ENUM: 'VALUE_REMOVED_FROM_ENUM',
48017  REQUIRED_INPUT_FIELD_ADDED: 'REQUIRED_INPUT_FIELD_ADDED',
48018  IMPLEMENTED_INTERFACE_REMOVED: 'IMPLEMENTED_INTERFACE_REMOVED',
48019  FIELD_REMOVED: 'FIELD_REMOVED',
48020  FIELD_CHANGED_KIND: 'FIELD_CHANGED_KIND',
48021  REQUIRED_ARG_ADDED: 'REQUIRED_ARG_ADDED',
48022  ARG_REMOVED: 'ARG_REMOVED',
48023  ARG_CHANGED_KIND: 'ARG_CHANGED_KIND',
48024  DIRECTIVE_REMOVED: 'DIRECTIVE_REMOVED',
48025  DIRECTIVE_ARG_REMOVED: 'DIRECTIVE_ARG_REMOVED',
48026  REQUIRED_DIRECTIVE_ARG_ADDED: 'REQUIRED_DIRECTIVE_ARG_ADDED',
48027  DIRECTIVE_REPEATABLE_REMOVED: 'DIRECTIVE_REPEATABLE_REMOVED',
48028  DIRECTIVE_LOCATION_REMOVED: 'DIRECTIVE_LOCATION_REMOVED'
48029});
48030var DangerousChangeType = Object.freeze({
48031  VALUE_ADDED_TO_ENUM: 'VALUE_ADDED_TO_ENUM',
48032  TYPE_ADDED_TO_UNION: 'TYPE_ADDED_TO_UNION',
48033  OPTIONAL_INPUT_FIELD_ADDED: 'OPTIONAL_INPUT_FIELD_ADDED',
48034  OPTIONAL_ARG_ADDED: 'OPTIONAL_ARG_ADDED',
48035  IMPLEMENTED_INTERFACE_ADDED: 'IMPLEMENTED_INTERFACE_ADDED',
48036  ARG_DEFAULT_VALUE_CHANGE: 'ARG_DEFAULT_VALUE_CHANGE'
48037});
48038
48039/**
48040 * Given two schemas, returns an Array containing descriptions of all the types
48041 * of breaking changes covered by the other functions down below.
48042 */
48043function findBreakingChanges(oldSchema, newSchema) {
48044  var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {
48045    return change.type in BreakingChangeType;
48046  });
48047  return breakingChanges;
48048}
48049/**
48050 * Given two schemas, returns an Array containing descriptions of all the types
48051 * of potentially dangerous changes covered by the other functions down below.
48052 */
48053
48054function findDangerousChanges(oldSchema, newSchema) {
48055  var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {
48056    return change.type in DangerousChangeType;
48057  });
48058  return dangerousChanges;
48059}
48060
48061function findSchemaChanges(oldSchema, newSchema) {
48062  return [].concat(findTypeChanges(oldSchema, newSchema), findDirectiveChanges(oldSchema, newSchema));
48063}
48064
48065function findDirectiveChanges(oldSchema, newSchema) {
48066  var schemaChanges = [];
48067  var directivesDiff = diff(oldSchema.getDirectives(), newSchema.getDirectives());
48068
48069  for (var _i2 = 0, _directivesDiff$remov2 = directivesDiff.removed; _i2 < _directivesDiff$remov2.length; _i2++) {
48070    var oldDirective = _directivesDiff$remov2[_i2];
48071    schemaChanges.push({
48072      type: BreakingChangeType.DIRECTIVE_REMOVED,
48073      description: "".concat(oldDirective.name, " was removed.")
48074    });
48075  }
48076
48077  for (var _i4 = 0, _directivesDiff$persi2 = directivesDiff.persisted; _i4 < _directivesDiff$persi2.length; _i4++) {
48078    var _ref2 = _directivesDiff$persi2[_i4];
48079    var _oldDirective = _ref2[0];
48080    var newDirective = _ref2[1];
48081    var argsDiff = diff(_oldDirective.args, newDirective.args);
48082
48083    for (var _i6 = 0, _argsDiff$added2 = argsDiff.added; _i6 < _argsDiff$added2.length; _i6++) {
48084      var newArg = _argsDiff$added2[_i6];
48085
48086      if (Object(definition["P" /* isRequiredArgument */])(newArg)) {
48087        schemaChanges.push({
48088          type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,
48089          description: "A required arg ".concat(newArg.name, " on directive ").concat(_oldDirective.name, " was added.")
48090        });
48091      }
48092    }
48093
48094    for (var _i8 = 0, _argsDiff$removed2 = argsDiff.removed; _i8 < _argsDiff$removed2.length; _i8++) {
48095      var oldArg = _argsDiff$removed2[_i8];
48096      schemaChanges.push({
48097        type: BreakingChangeType.DIRECTIVE_ARG_REMOVED,
48098        description: "".concat(oldArg.name, " was removed from ").concat(_oldDirective.name, ".")
48099      });
48100    }
48101
48102    if (_oldDirective.isRepeatable && !newDirective.isRepeatable) {
48103      schemaChanges.push({
48104        type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,
48105        description: "Repeatable flag was removed from ".concat(_oldDirective.name, ".")
48106      });
48107    }
48108
48109    for (var _i10 = 0, _oldDirective$locatio2 = _oldDirective.locations; _i10 < _oldDirective$locatio2.length; _i10++) {
48110      var location = _oldDirective$locatio2[_i10];
48111
48112      if (newDirective.locations.indexOf(location) === -1) {
48113        schemaChanges.push({
48114          type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,
48115          description: "".concat(location, " was removed from ").concat(_oldDirective.name, ".")
48116        });
48117      }
48118    }
48119  }
48120
48121  return schemaChanges;
48122}
48123
48124function findTypeChanges(oldSchema, newSchema) {
48125  var schemaChanges = [];
48126  var typesDiff = diff(Object(objectValues["a" /* default */])(oldSchema.getTypeMap()), Object(objectValues["a" /* default */])(newSchema.getTypeMap()));
48127
48128  for (var _i12 = 0, _typesDiff$removed2 = typesDiff.removed; _i12 < _typesDiff$removed2.length; _i12++) {
48129    var oldType = _typesDiff$removed2[_i12];
48130    schemaChanges.push({
48131      type: BreakingChangeType.TYPE_REMOVED,
48132      description: Object(scalars["f" /* isSpecifiedScalarType */])(oldType) ? "Standard scalar ".concat(oldType.name, " was removed because it is not referenced anymore.") 
48132: "".concat(oldType.name, " was removed.")
48133    });
48134  }
48135
48136  for (var _i14 = 0, _typesDiff$persisted2 = typesDiff.persisted; _i14 < _typesDiff$persisted2.length; _i14++) {
48137    var _ref4 = _typesDiff$persisted2[_i14];
48138    var _oldType = _ref4[0];
48139    var newType = _ref4[1];
48140
48141    if (Object(definition["E" /* isEnumType */])(_oldType) && Object(definition["E" /* isEnumType */])(newType)) {
48142      schemaChanges.push.apply(schemaChanges, findEnumTypeChanges(_oldType, newType));
48143    } else if (Object(definition["T" /* isUnionType */])(_oldType) && Object(definition["T" /* isUnionType */])(newType)) {
48144      schemaChanges.push.apply(schemaChanges, findUnionTypeChanges(_oldType, newType));
48145    } else if (Object(definition["F" /* isInputObjectType */])(_oldType) && Object(definition["F" /* isInputObjectType */])(newType)) {
48146      schemaChanges.push.apply(schemaChanges, findInputObjectTypeChanges(_oldType, newType));
48147    } else if (Object(definition["N" /* isObjectType */])(_oldType) && Object(definition["N" /* isObjectType */])(newType)) {
48148      schemaChanges.push.apply(schemaChanges, findFieldChanges(_oldType, newType).concat(findImplementedInterfacesChanges(_oldType, newType)));
48149    } else if (Object(definition["H" /* isInterfaceType */])(_oldType) && Object(definition["H" /* isInterfaceType */])(newType)) {
48150      schemaChanges.push.apply(schemaChanges, findFieldChanges(_oldType, newType).concat(findImplementedInterfacesChanges(_oldType, newType)));
48151    } else if (_oldType.constructor !== newType.constructor) {
48152      schemaChanges.push({
48153        type: BreakingChangeType.TYPE_CHANGED_KIND,
48154        description: "".concat(_oldType.name, " changed from ") + "".concat(typeKindName(_oldType), " to ").concat(typeKindName(newType), ".")
48155      });
48156    }
48157  }
48158
48159  return schemaChanges;
48160}
48161
48162function findInputObjectTypeChanges(oldType, newType) {
48163  var schemaChanges = [];
48164  var fieldsDiff = diff(Object(objectValues["a" /* default */])(oldType.getFields()), Object(objectValues["a" /* default */])(newType.getFields()));
48165
48166  for (var _i16 = 0, _fieldsDiff$added2 = fieldsDiff.added; _i16 < _fieldsDiff$added2.length; _i16++) {
48167    var newField = _fieldsDiff$added2[_i16];
48168
48169    if (Object(definition["Q" /* isRequiredInputField */])(newField)) {
48170      schemaChanges.push({
48171        type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,
48172        description: "A required field ".concat(newField.name, " on input type ").concat(oldType.name, " was added.")
48173      });
48174    } else {
48175      schemaChanges.push({
48176        type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,
48177        description: "An optional field ".concat(newField.name, " on input type ").concat(oldType.name, " was added.")
48178      });
48179    }
48180  }
48181
48182  for (var _i18 = 0, _fieldsDiff$removed2 = fieldsDiff.removed; _i18 < _fieldsDiff$removed2.length; _i18++) {
48183    var oldField = _fieldsDiff$removed2[_i18];
48184    schemaChanges.push({
48185      type: BreakingChangeType.FIELD_REMOVED,
48186      description: "".concat(oldType.name, ".").concat(oldField.name, " was removed.")
48187    });
48188  }
48189
48190  for (var _i20 = 0, _fieldsDiff$persisted2 = fieldsDiff.persisted; _i20 < _fieldsDiff$persisted2.length; _i20++) {
48191    var _ref6 = _fieldsDiff$persisted2[_i20];
48192    var _oldField = _ref6[0];
48193    var _newField = _ref6[1];
48194    var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(_oldField.type, _newField.type);
48195
48196    if (!isSafe) {
48197      schemaChanges.push({
48198        type: BreakingChangeType.FIELD_CHANGED_KIND,
48199        description: "".concat(oldType.name, ".").concat(_oldField.name, " changed type from ") + "".concat(String(_oldField.type), " to ").concat(String(_newField.type), ".")
48200      });
48201    }
48202  }
48203
48204  return schemaChanges;
48205}
48206
48207function findUnionTypeChanges(oldType, newType) {
48208  var schemaChanges = [];
48209  var possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes());
48210
48211  for (var _i22 = 0, _possibleTypesDiff$ad2 = possibleTypesDiff.added; _i22 < _possibleTypesDiff$ad2.length; _i22++) {
48212    var newPossibleType = _possibleTypesDiff$ad2[_i22];
48213    schemaChanges.push({
48214      type: DangerousChangeType.TYPE_ADDED_TO_UNION,
48215      description: "".concat(newPossibleType.name, " was added to union type ").concat(oldType.name, ".")
48216    });
48217  }
48218
48219  for (var _i24 = 0, _possibleTypesDiff$re2 = possibleTypesDiff.removed; _i24 < _possibleTypesDiff$re2.length; _i24++) {
48220    var oldPossibleType = _possibleTypesDiff$re2[_i24];
48221    schemaChanges.push({
48222      type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,
48223      description: "".concat(oldPossibleType.name, " was removed from union type ").concat(oldType.name, ".")
48224    });
48225  }
48226
48227  return schemaChanges;
48228}
48229
48230function findEnumTypeChanges(oldType, newType) {
48231  var schemaChanges = [];
48232  var valuesDiff = diff(oldType.getValues(), newType.getValues());
48233
48234  for (var _i26 = 0, _valuesDiff$added2 = valuesDiff.added; _i26 < _valuesDiff$added2.length; _i26++) {
48235    var newValue = _valuesDiff$added2[_i26];
48236    schemaChanges.push({
48237      type: DangerousChangeType.VALUE_ADDED_TO_ENUM,
48238      description: "".concat(newValue.name, " was added to enum type ").concat(oldType.name, ".")
48239    });
48240  }
48241
48242  for (var _i28 = 0, _valuesDiff$removed2 = valuesDiff.removed; _i28 < _valuesDiff$removed2.length; _i28++) {
48243    var oldValue = _valuesDiff$removed2[_i28];
48244    schemaChanges.push({
48245      type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,
48246      description: "".concat(oldValue.name, " was removed from enum type ").concat(oldType.name, ".")
48247    });
48248  }
48249
48250  return schemaChanges;
48251}
48252
48253function findImplementedInterfacesChanges(oldType, newType) {
48254  var schemaChanges = [];
48255  var interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces());
48256
48257  for (var _i30 = 0, _interfacesDiff$added2 = interfacesDiff.added; _i30 < _interfacesDiff$added2.length; _i30++) {
48258    var newInterface = _interfacesDiff$added2[_i30];
48259    schemaChanges.push({
48260      type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,
48261      description: "".concat(newInterface.name, " added to interfaces implemented by ").concat(oldType.name, ".")
48262    });
48263  }
48264
48265  for (var _i32 = 0, _interfacesDiff$remov2 = interfacesDiff.removed; _i32 < _interfacesDiff$remov2.length; _i32++) {
48266    var oldInterface = _interfacesDiff$remov2[_i32];
48267    schemaChanges.push({
48268      type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,
48269      description: "".concat(oldType.name, " no longer implements interface ").concat(oldInterface.name, ".")
48270    });
48271  }
48272
48273  return schemaChanges;
48274}
48275
48276function findFieldChanges(oldType, newType) {
48277  var schemaChanges = [];
48278  var fieldsDiff = diff(Object(objectValues["a" /* default */])(oldType.getFields()), Object(objectValues["a" /* default */])(newType.getFields()));
48279
48280  for (var _i34 = 0, _fieldsDiff$removed4 = fieldsDiff.removed; _i34 < _fieldsDiff$removed4.length; _i34++) {
48281    var oldField = _fieldsDiff$removed4[_i34];
48282    schemaChanges.push({
48283      type: BreakingChangeType.FIELD_REMOVED,
48284      description: "".concat(oldType.name, ".").concat(oldField.name, " was removed.")
48285    });
48286  }
48287
48288  for (var _i36 = 0, _fieldsDiff$persisted4 = fieldsDiff.persisted; _i36 < _fieldsDiff$persisted4.length; _i36++) {
48289    var _ref8 = _fieldsDiff$persisted4[_i36];
48290    var _oldField2 = _ref8[0];
48291    var newField = _ref8[1];
48292    schemaChanges.push.apply(schemaChanges, findArgChanges(oldType, _oldField2, newField));
48293    var isSafe = isChangeSafeForObjectOrInterfaceField(_oldField2.type, newField.type);
48294
48295    if (!isSafe) {
48296      schemaChanges.push({
48297        type: BreakingChangeType.FIELD_CHANGED_KIND,
48298        description: "".concat(oldType.name, ".").concat(_oldField2.name, " changed type from ") + "".concat(String(_oldField2.type), " to ").concat(String(newField.type), ".")
48299      });
48300    }
48301  }
48302
48303  return schemaChanges;
48304}
48305
48306function findArgChanges(oldType, oldField, newField) {
48307  var schemaChanges = [];
48308  var argsDiff = diff(oldField.args, newField.args);
48309
48310  for (var _i38 = 0, _argsDiff$removed4 = argsDiff.removed; _i38 < _argsDiff$removed4.length; _i38++) {
48311    var oldArg = _argsDiff$removed4[_i38];
48312    schemaChanges.push({
48313      type: BreakingChangeType.ARG_REMOVED,
48314      description: "".concat(oldType.name, ".").concat(oldField.name, " arg ").concat(oldArg.name, " was removed.")
48315    });
48316  }
48317
48318  for (var _i40 = 0, _argsDiff$persisted2 = argsDiff.persisted; _i40 < _argsDiff$persisted2.length; _i40++) {
48319    var _ref10 = _argsDiff$persisted2[_i40];
48320    var _oldArg = _ref10[0];
48321    var newArg = _ref10[1];
48322    var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(_oldArg.type, newArg.type);
48323
48324    if (!isSafe) {
48325      schemaChanges.push({
48326        type: BreakingChangeType.ARG_CHANGED_KIND,
48327        description: "".concat(oldType.name, ".").concat(oldField.name, " arg ").concat(_oldArg.name, " has changed type from ") + "".concat(String(_oldArg.type), " to ").concat(String(newArg.type), ".")
48328      });
48329    } else if (_oldArg.defaultValue !== undefined) {
48330      if (newArg.defaultValue === undefined) {
48331        schemaChanges.push({
48332          type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,
48333          description: "".concat(oldType.name, ".").concat(oldField.name, " arg ").concat(_oldArg.name, " defaultValue was removed.")
48334        });
48335      } else {
48336        // Since we looking only for client's observable changes we should
48337        // compare default values in the same representation as they are
48338        // represented inside introspection.
48339        var oldValueStr = stringifyValue(_oldArg.defaultValue, _oldArg.type);
48340        var newValueStr = stringifyValue(newArg.defaultValue, newArg.type);
48341
48342        if (oldValueStr !== newValueStr) {
48343          schemaChanges.push({
48344            type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,
48345            description: "".concat(oldType.name, ".").concat(oldField.name, " arg ").concat(_oldArg.name, " has changed defaultValue from ").concat(oldValueStr, " to ").concat(newValueStr, ".")
48346          });
48347        }
48348      }
48349    }
48350  }
48351
48352  for (var _i42 = 0, _argsDiff$added4 = argsDiff.added; _i42 < _argsDiff$added4.length; _i42++) {
48353    var _newArg = _argsDiff$added4[_i42];
48354
48355    if (Object(definition["P" /* isRequiredArgument */])(_newArg)) {
48356      schemaChanges.push({
48357        type: BreakingChangeType.REQUIRED_ARG_ADDED,
48358        description: "A required arg ".concat(_newArg.name, " on ").concat(oldType.name, ".").concat(oldField.name, " was added.")
48359      });
48360    } else {
48361      schemaChanges.push({
48362        type: DangerousChangeType.OPTIONAL_ARG_ADDED,
48363        description: "An optional arg ".concat(_newArg.name, " on ").concat(oldType.name, ".").concat(oldField.name, " was added.")
48364      });
48365    }
48366  }
48367
48368  return schemaChanges;
48369}
48370
48371function isChangeSafeForObjectOrInterfaceField(oldType, newType) {
48372  if (Object(definition["J" /* isListType */])(oldType)) {
48373    return (// if they're both lists, make sure the underlying types are compatible
48374      Object(definition["J" /* isListType */])(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType) || // moving from nullable to non-null of the same underlying type is safe
48375      Object(definition["L" /* isNonNullType */])(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)
48376    );
48377  }
48378
48379  if (Object(definition["L" /* isNonNullType */])(oldType)) {
48380    // if they're both non-null, make sure the underlying types are compatible
48381    return Object(definition["L" /* isNonNullType */])(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType);
48382  }
48383
48384  return (// if they're both named types, see if their names are equivalent
48385    Object(definition["K" /* isNamedType */])(newType) && oldType.name === newType.name || // moving from nullable to non-null of the same underlying type is safe
48386    Object(definition["L" /* isNonNullType */])(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)
48387  );
48388}
48389
48390function isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) {
48391  if (Object(definition["J" /* isListType */])(oldType)) {
48392    // if they're both lists, make sure the underlying types are compatible
48393    return Object(definition["J" /* isListType */])(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType);
48394  }
48395
48396  if (Object(definition["L" /* isNonNullType */])(oldType)) {
48397    return (// if they're both non-null, make sure the underlying types are
48398      // compatible
48399      Object(definition["L" /* isNonNullType */])(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType) || // moving from non-null to nullable of the same underlying type is safe
48400      !Object(definition["L" /* isNonNullType */])(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType)
48401    );
48402  } // if they're both named types, see if their names are equivalent
48403
48404
48405  return Object(definition["K" /* isNamedType */])(newType) && oldType.name === newType.name;
48406}
48407
48408function typeKindName(type) {
48409  if (Object(definition["R" /* isScalarType */])(type)) {
48410    return 'a Scalar type';
48411  }
48412
48413  if (Object(definition["N" /* isObjectType */])(type)) {
48414    return 'an Object type';
48415  }
48416
48417  if (Object(definition["H" /* isInterfaceType */])(type)) {
48418    return 'an Interface type';
48419  }
48420
48421  if (Object(definition["T" /* isUnionType */])(type)) {
48422    return 'a Union type';
48423  }
48424
48425  if (Object(definition["E" /* isEnumType */])(type)) {
48426    return 'an Enum type';
48427  } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
48428
48429
48430  if (Object(definition["F" /* isInputObjectType */])(type)) {
48431    return 'an Input type';
48432  } // istanbul ignore next (Not reachable. All possible named types have been considered)
48433
48434
48435   false || Object(invariant["a" /* default */])(0, 'Unexpected type: ' + Object(inspect["a" /* default */])(type));
48436}
48437
48438function stringifyValue(value, type) {
48439  var ast = Object(astFromValue["a" /* astFromValue */])(value, type);
48440  ast != null || Object(invariant["a" /* default */])(0);
48441  var sortedAST = Object(visitor["c" /* visit */])(ast, {
48442    ObjectValue: function ObjectValue(objectNode) {
48443      // Make a copy since sort mutates array
48444      var fields = [].concat(objectNode.fields);
48445      fields.sort(function (fieldA, fieldB) {
48446        return Object(naturalCompare["a" /* default */])(fieldA.name.value, fieldB.name.value);
48447      });
48448      return _objectSpread(_objectSpread({}, objectNode), {}, {
48449        fields: fields
48450      });
48451    }
48452  });
48453  return Object(printer["a" /* print */])(sortedAST);
48454}
48455
48456function diff(oldArray, newArray) {
48457  var added = [];
48458  var removed = [];
48459  var persisted = [];
48460  var oldMap = Object(keyMap["a" /* default */])(oldArray, function (_ref11) {
48461    var name = _ref11.name;
48462    return name;
48463  });
48464  var newMap = Object(keyMap["a" /* default */])(newArray, function (_ref12) {
48465    var name = _ref12.name;
48466    return name;
48467  });
48468
48469  for (var _i44 = 0; _i44 < oldArray.length; _i44++) {
48470    var oldItem = oldArray[_i44];
48471    var newItem = newMap[oldItem.name];
48472
48473    if (newItem === undefined) {
48474      removed.push(oldItem);
48475    } else {
48476      persisted.push([oldItem, newItem]);
48477    }
48478  }
48479
48480  for (var _i46 = 0; _i46 < newArray.length; _i46++) {
48481    var _newItem = newArray[_i46];
48482
48483    if (oldMap[_newItem.name] === undefined) {
48484      added.push(_newItem);
48485    }
48486  }
48487
48488  return {
48489    added: added,
48490    persisted: persisted,
48491    removed: removed
48492  };
48493}
48494
48495// CONCATENATED MODULE: ./node_modules/graphql/utilities/findDeprecatedUsages.mjs
48496
48497
48498/**
48499 * A validation rule which reports deprecated usages.
48500 *
48501 * Returns a list of GraphQLError instances describing each deprecated use.
48502 *
48503 * @deprecated Please use `validate` with `NoDeprecatedCustomRule` instead:
48504 *
48505 * ```
48506 * import { validate, NoDeprecatedCustomRule } from 'graphql'
48507 *
48508 * const errors = validate(schema, document, [NoDeprecatedCustomRule])
48509 * ```
48510 */
48511
48512function findDeprecatedUsages(schema, ast) {
48513  return Object(validate["c" /* validate */])(schema, ast, [NoDeprecatedCustomRule]);
48514}
48515
48516// CONCATENATED MODULE: ./node_modules/graphql/index.mjs
48517/**
48518 * GraphQL.js provides a reference implementation for the GraphQL specification
48519 * but is also a useful utility for operating on GraphQL files and building
48520 * sophisticated tools.
48521 *
48522 * This primary module exports a general purpose function for fulfilling all
48523 * steps of the GraphQL specification in a single operation, but also includes
48524 * utilities for every part of the GraphQL specification:
48525 *
48526 *   - Parsing the GraphQL language.
48527 *   - Building a GraphQL type schema.
48528 *   - Validating a GraphQL request against a type schema.
48529 *   - Executing a GraphQL request against a type schema.
48530 *
48531 * This also includes utility functions for operating on GraphQL types and
48532 * GraphQL documents to facilitate building tools.
48533 *
48534 * You may also import from each sub-directory directly. For example, the
48535 * following two import statements are equivalent:
48536 *
48537 *     import { parse } from 'graphql';
48538 *     import { parse } from 'graphql/language';
48539 */
48540// The GraphQL.js version info.
48541 // The primary entry point into fulfilling a GraphQL request.
48542
48543 // Create and operate on GraphQL type definitions and schema.
48544
48545
48546// Parse and operate on GraphQL language source files.
48547
48548// Execute GraphQL queries.
48549
48550
48551// Validate GraphQL documents.
48552
48553// Create, format, and print GraphQL errors.
48554
48555// Utilities for operating on GraphQL type schema and parsed sources.
48556
48557
48558
48559/***/ }),
48560
48561/***/ "U/hW":
48562/***/ (function(module, __webpack_exports__, __webpack_require__) {
48563
48564"use strict";
48565__webpack_require__.r(__webpack_exports__);
48566/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lowerCaseFirst", function() { return lowerCaseFirst; });
48567/**
48568 * Lower case the first character of an input string.
48569 */
48570function lowerCaseFirst(input) {
48571    return input.charAt(0).toLowerCase() + input.substr(1);
48572}
48573//# sourceMappingURL=index.js.map
48574
48575/***/ }),
48576
48577/***/ "UGla":
48578/***/ (function(module, exports, __webpack_require__) {
48579
48580"use strict";
48581/**
48582 * Copyright (c) Facebook, Inc. and its affiliates.
48583 *
48584 * This source code is licensed under the MIT license found in the
48585 * LICENSE file in the root directory of this source tree.
48586 *
48587 * 
48588 * @format
48589 */
48590// flowlint ambiguous-object-type:error
48591
48592
48593var _require = __webpack_require__("VrDQ"),
48594    createUserError = _require.createUserError,
48595    eachWithCombinedError = _require.eachWithCombinedError;
48596
48597/**
48598 * Creates a scope for a `Root`, with each argument mapped to a variable of the
48599 * same name. Example:
48600 *
48601 * Query:
48602 * query Foo($id: ID, $size: Int = 42) { ... }
48603 *
48604 * Scope:
48605 * {
48606 *   id: $id,
48607 *   size: $size,
48608 * }
48609 *
48610 * Note that even though a default value is defined for $size, the scope must
48611 * assume that this could be overridden at runtime. The value cannot be decided
48612 * statically and therefore is set to a variable.
48613 */
48614function getRootScope(definitions) {
48615  var scope = {};
48616  definitions.forEach(function (definition) {
48617    scope[definition.name] = {
48618      kind: 'Variable',
48619      loc: definition.loc,
48620      variableName: definition.name,
48621      type: definition.type
48622    };
48623  });
48624  return scope;
48625}
48626/**
48627 * Creates a scope for a `Fragment` by translating fragment spread arguments in
48628 * the context of a parent scope into a new scope and validating them against
48629 * the argument definitions.
48630 *
48631 *
48632 * Parent Scope:
48633 * {
48634 *   active: $parentActive
48635 * }
48636 *
48637 * Fragment Spread:
48638 * ...Bar(size: 42, enabled: $active)
48639 *
48640 * Fragment:
48641 * fragment Bar on Foo @argumentDefinitions(
48642 *   id: {type: "ID"}
48643 *   size: {type: "Int"}
48644 *   enabled: {type: "Boolean}
48645 *   scale: {type: "Int", imports: "pixelRatio"}
48646 * )
48647 *
48648 * Scope:
48649 * {
48650 *   // No argument is provided for $id, it gets the default value which in this
48651 *   // case is `null`:
48652 *   id: null,
48653 *
48654 *   // The parent passes 42 as a literal value for $size:
48655 *   size: 42,
48656 *
48657 *   // The parent passes a variable as the value of $enabled. This variable is
48658 *   // resolved in the parent scope to the value $parentActive, which becomes
48659 *   // the value of $enabled:
48660 *   $enabled: $parentActive,
48661 *
48662 *   // $scale imports pixelRatio from the root scope. Since any argument in a
48663 *   // root scope maps to a variable of the same name, that means the value of
48664 *   // pixelRatio in the root is $pixelRatio:
48665 *   $scale: $pixelRatio,
48666 * }
48667 */
48668
48669
48670function getFragmentScope(schema, definitions, args, parentScope, spread) {
48671  var argMap = new Map();
48672  args.forEach(function (arg) {
48673    if (arg.value.kind === 'Literal') {
48674      argMap.set(arg.name, arg.value);
48675    } else if (arg.value.kind === 'Variable') {
48676      argMap.set(arg.name, parentScope[arg.value.variableName]);
48677    }
48678  });
48679  var fragmentScope = {};
48680  eachWithCombinedError(definitions, function (definition) {
48681    if (definition.kind === 'RootArgumentDefinition') {
48682      if (argMap.has(definition.name)) {
48683        var _argNode$loc;
48684
48685        var argNode = args.find(function (a) {
48686          return a.name === definition.name;
48687        });
48688        throw createUserError("Unexpected argument '".concat(definition.name, "' supplied to fragment '").concat(spread.name, "'. @arguments may only be provided for variables defined in the fragment's @argumentDefinitions."), [(_argNode$loc = argNode === null || argNode === void 0 ? void 0 : argNode.loc) !== null && _argNode$loc !== void 0 ? _argNode$loc : spread.loc]);
48689      }
48690
48691      fragmentScope[definition.name] = {
48692        kind: 'Variable',
48693        loc: definition.loc,
48694        variableName: definition.name,
48695        type: definition.type
48696      };
48697    } else {
48698      var arg = argMap.get(definition.name);
48699
48700      if (arg == null || arg.kind === 'Literal' && arg.value == null) {
48701        // No variable or literal null was passed, fall back to default
48702        // value.
48703        if (definition.defaultValue == null && schema.isNonNull(definition.type)) {
48704          var _argNode$loc2;
48705
48706          var _argNode = args.find(function (a) {
48707            return a.name === definition.name;
48708          });
48709
48710          throw createUserError("No value found for required argument '".concat(definition.name, ": ").concat(schema.getTypeString(definition.type), "' on fragment '").concat(spread.name, "'."), [(_argNode$loc2 = _argNode === null || _argNode === void 0 ? void 0 : _argNode.loc) !== null && _argNode$loc2 !== void 0 ? _argNode$loc2 : spread.loc]);
48711        }
48712
48713        fragmentScope[definition.name] = {
48714          kind: 'Literal',
48715          value: definition.defaultValue
48716        };
48717      } else {
48718        // Variable or non-null literal.
48719        fragmentScope[definition.name] = arg;
48720      }
48721    }
48722  });
48723  return fragmentScope;
48724}
48725
48726module.exports = {
48727  getFragmentScope: getFragmentScope,
48728  getRootScope: getRootScope
48729};
48730
48731/***/ }),
48732
48733/***/ "URYG":
48734/***/ (function(module, exports, __webpack_require__) {
48735
48736"use strict";
48737
48738
48739var GetIntrinsic = __webpack_require__("AM7I");
48740
48741var $Object = GetIntrinsic('%Object%');
48742
48743var isPrimitive = __webpack_require__("9dO7");
48744
48745var $preventExtensions = $Object.preventExtensions;
48746var $isExtensible = $Object.isExtensible;
48747
48748// https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
48749
48750module.exports = $preventExtensions
48751	? function IsExtensible(obj) {
48752		return !isPrimitive(obj) && $isExtensible(obj);
48753	}
48754	: function IsExtensible(obj) {
48755		return !isPrimitive(obj);
48756	};
48757
48758
48759/***/ }),
48760
48761/***/ "UVaH":
48762/***/ (function(module, exports, __webpack_require__) {
48763
48764"use strict";
48765/* WEBPACK VAR INJECTION */(function(global) {
48766
48767var origSymbol = global.Symbol;
48768var hasSymbolSham = __webpack_require__("FpZJ");
48769
48770module.exports = function hasNativeSymbols() {
48771	if (typeof origSymbol !== 'function') { return false; }
48772	if (typeof Symbol !== 'function') { return false; }
48773	if (typeof origSymbol('foo') !== 'symbol') { return false; }
48774	if (typeof Symbol('bar') !== 'symbol') { return false; }
48775
48776	return hasSymbolSham();
48777};
48778
48779/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("ntbh")))
48780
48781/***/ }),
48782
48783/***/ "UtIy":
48784/***/ (function(module, exports, __webpack_require__) {
48785
48786"use strict";
48787/**
48788 * Copyright (c) Facebook, Inc. and its affiliates.
48789 *
48790 * This source code is licensed under the MIT license found in the
48791 * LICENSE file in the root directory of this source tree.
48792 *
48793 * 
48794 * @format
48795 */
48796// flowlint ambiguous-object-type:error
48797
48798
48799var _interopRequireDefault = __webpack_require__("TqRt");
48800
48801var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA"));
48802
48803var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("RIqP"));
48804
48805function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
48806
48807function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); }
vendor: 4,125 bytes, lines 48807-48873
48807 else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
48808
48809function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
48810
48811function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
48812
48813function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
48814
48815var IRTransformer = __webpack_require__("OHCT");
48816
48817var RelayCompilerScope = __webpack_require__("UGla");
48818
48819var getIdentifierForArgumentValue = __webpack_require__("arJZ");
48820
48821var murmurHash = __webpack_require__("VqSG");
48822
48823var _require = __webpack_require__("VrDQ"),
48824    createCompilerError = _require.createCompilerError,
48825    createNonRecoverableUserError = _require.createNonRecoverableUserError;
48826
48827var getFragmentScope = RelayCompilerScope.getFragmentScope,
48828    getRootScope = RelayCompilerScope.getRootScope;
48829
48830/**
48831 * A transform that converts a set of documents containing fragments/fragment
48832 * spreads *with* arguments to one where all arguments have been inlined. This
48833 * is effectively static currying of functions. Nodes are changed as follows:
48834 * - Fragment spreads with arguments are replaced with references to an inlined
48835 *   version of the referenced fragment.
48836 * - Fragments with argument definitions are cloned once per unique set of
48837 *   arguments, with the name changed to original name + hash and all nested
48838 *   variable references changed to the value of that variable given its
48839 *   arguments.
48840 * - Field & directive argument variables are replaced with the value of those
48841 *   variables in context.
48842 * - All nodes are cloned with updated children.
48843 *
48844 * The transform also handles statically passing/failing Condition nodes:
48845 * - Literal Conditions with a passing value are elided and their selections
48846 *   inlined in their parent.
48847 * - Literal Conditions with a failing value are removed.
48848 * - Nodes that would become empty as a result of the above are removed.
48849 *
48850 * Note that unreferenced fragments are not added to the output.
48851 */
48852function applyFragmentArgumentTransform(context) {
48853  var fragments = new Map();
48854  var nextContext = IRTransformer.transform(context, {
48855    Root: function Root(node) {
48856      var scope = getRootScope(node.argumentDefinitions);
48857      return transformNode(context, fragments, scope, node, [node]);
48858    },
48859    SplitOperation: function SplitOperation(node) {
48860      return transformNode(context, fragments, {}, node, [node]);
48861    },
48862    // Fragments are included below where referenced.
48863    // Unreferenced fragments are not included.
48864    Fragment: function Fragment() {
48865      return null;
48866    }
48867  });
48868
48869  var _iterator = _createForOfIteratorHelper(fragments.values()),
48870      _step;
48871
48872  try {
48873    for (_iterator.s();
48873 !(_step = _iterator.n()).done;) {
48874      var pendingFragment = _step.value;
48875
48876      if (pendingFragment.kind === 'resolved' && pendingFragment.value) {
48877        nextContext = nextContext.add(pendingFragment.value);
48878      }
48879    }
48880  } catch (err) {
48881    _iterator.e(err);
48882  } finally {
48883    _iterator.f();
48884  }
48885
48886  return nextContext;
48887}
48888
48889function transformNode(context, fragments, scope, node, errorContext) {
48890  var selections = transformSelections(context, fragments, scope, node.selections, errorContext);
48891
48892  if (!selections) {
48893    return null;
48894  }
48895
48896  if (node.hasOwnProperty('directives')) {
48897    var directives = transformDirectives(scope, node.directives, errorContext);
48898    return _objectSpread(_objectSpread({}, node), {}, {
48899      directives: directives,
48900      selections: selections
48901    });
48902  }
48903
48904  return _objectSpread(_objectSpread({}, node), {}, {
48905    selections: selections
48906  });
48907}
48908
48909function transformDeferStreamNode(context, fragments, scope, node, errorContext) {
48910  var nextNode = transformNode(context, fragments, scope, node, errorContext);
48911
48912  if (!nextNode) {
48913    return null;
48914  }
48915
48916  nextNode;
48917
48918  if (nextNode["if"]) {
48919    var ifVal = transformValue(scope, nextNode["if"], errorContext);
48920
48921    if (ifVal.kind === 'Literal' && ifVal.value === false && node.selections && node.selections.length === 1) {
48922      // Skip Defer/Stream wrapper with literal if: false
48923      return node.selections[0];
48924    } // $FlowFixMe[cannot-write] nextNode is uniquely owned
48925
48926
48927    nextNode["if"] = ifVal;
48928  }
48929
48930  if (nextNode.useCustomizedBatch) {
48931    // $FlowFixMe[cannot-write] nextNode is uniquely owned
48932    nextNode.useCustomizedBatch = transformValue(scope, nextNode.useCustomizedBatch, errorContext);
48933  }
48934
48935  if (nextNode.initialCount) {
48936    // $FlowFixMe[cannot-write] nextNode is uniquely owned
48937    nextNode.initialCount = transformValue(scope, nextNode.initialCount, errorContext);
48938  }
48939
48940  return nextNode;
48941}
48942
48943function transformFragmentSpread(context, fragments, scope, spread, errorContext) {
48944  var directives = transformDirectives(scope, spread.directives, errorContext);
48945  var appliedFragment = transformFragment(context, fragments, scope, spread, spread.args, [].concat((0, _toConsumableArray2["default"])(errorContext), [spread]));
48946
48947  if (!appliedFragment) {
48948    return null;
48949  }
48950
48951  var transformed = _objectSpread(_objectSpread({}, spread), {}, {
48952    kind: 'FragmentSpread',
48953    args: [],
48954    directives: directives,
48955    name: appliedFragment.name
48956  });
48957
48958  return transformed;
48959}
48960
48961function transformField(context, fragments, scope, field, errorContext) {
48962  var args = transformArguments(scope, field.args, errorContext);
48963  var directives = transformDirectives(scope, field.directives, errorContext);
48964
48965  if (field.kind === 'LinkedField') {
48966    var selections = transformSelections(context, fragments, scope, field.selections, errorContext);
48967
48968    if (!selections) {
48969      return null;
48970    }
48971
48972    return _objectSpread(_objectSpread({}, field), {}, {
48973      args: args,
48974      directives: directives,
48975      selections: selections
48976    });
48977  } else {
48978    return _objectSpread(_objectSpread({}, field), {}, {
48979      args: args,
48980      directives: directives
48981    });
48982  }
48983}
48984
48985function transformCondition(context, fragments, scope, node, errorContext) {
48986  var condition = transformValue(scope, node.condition, errorContext);
48987
48988  if (!(condition.kind === 'Literal' || condition.kind === 'Variable')) {
48989    // This transform does whole-program optimization, errors in
48990    // a single document could break invariants and/or cause
48991    // additional spurious errors.
48992    throw createNonRecoverableUserError('A non-scalar value was applied to an @include or @skip directive, ' + 'the `if` argument value must be a ' + 'variable or a literal Boolean.', [condition.loc]);
48993  }
48994
48995  if (condition.kind === 'Literal' && condition.value !== node.passingValue) {
48996    // Dead code, no need to traverse further.
48997    return null;
48998  }
48999
49000  var selections = transformSelections(context, fragments, scope, node.selections, errorContext);
49001
49002  if (!selections) {
49003    return null;
49004  }
49005
49006  if (condition.kind === 'Literal' && condition.value === node.passingValue) {
49007    // Always passes, return inlined selections
49008    return selections;
49009  }
49010
49011  return [_objectSpread(_objectSpread({}, node), {}, {
49012    condition: condition,
49013    selections: selections
49014  })];
49015}
49016
49017function transformSelections(context, fragments, scope, selections, errorContext) {
49018  var nextSelections = null;
49019  selections.forEach(function (selection) {
49020    var nextSelection;
49021
49022    if (selection.kind === 'ClientExtension' || selection.kind === 'InlineDataFragmentSpread' || selection.kind === 'InlineFragment' || selection.kind === 'ModuleImport') {
49023      nextSelection = transformNode(context, fragments, scope, selection, errorContext);
49024    } else if (selection.kind === 'Defer' || selection.kind === 'Stream') {
49025      nextSelection = transformDeferStreamNode(context, fragments, scope, selection, errorContext);
49026    } else if (selection.kind === 'FragmentSpread') {
49027      nextSelection = transformFragmentSpread(context, fragments, scope, selection, errorContext);
49028    } else if (selection.kind === 'Condition') {
49029      var conditionSelections = transformCondition(context, fragments, scope, selection, errorContext);
49030
49031      if (conditionSelections) {
49032        var _nextSelections;
49033
49034        nextSelections = nextSelections || [];
49035
49036        (_nextSelections = nextSelections).push.apply(_nextSelections, (0, _toConsumableArray2["default"])(conditionSelections));
49037      }
49038    } else if (selection.kind === 'LinkedField' || selection.kind === 'ScalarField') {
49039      nextSelection = transformField(context, fragments, scope, selection, errorContext);
49040    } else {
49041      selection;
49042      throw createCompilerError("ApplyFragmentArgumentTransform: Unsupported kind '".concat(selection.kind, "'."), [selection.loc]);
49043    }
49044
49045    if (nextSelection) {
49046      nextSelections = nextSelections || [];
49047      nextSelections.push(nextSelection);
49048    }
49049  });
49050  return nextSelections;
49051}
49052
49053function transformDirectives(scope, directives, errorContext) {
49054  return directives.map(function (directive) {
49055    var args = transformArguments(scope, directive.args, errorContext);
49056    return _objectSpread(_objectSpread({}, directive), {}, {
49057      args: args
49058    });
49059  });
49060}
49061
49062function transformArguments(scope, args, errorContext) {
49063  return args.map(function (arg) {
49064    var value = transformValue(scope, arg.value, errorContext);
49065    return value === arg.value ? arg : _objectSpread(_objectSpread({}, arg), {}, {
49066      value: value
49067    });
49068  });
49069}
49070
49071function transformValue(scope, value, errorContext) {
49072  if (value.kind === 'Variable') {
49073    var scopeValue = scope[value.variableName];
49074
49075    if (scopeValue == null) {
49076      var _errorContext$;
49077
49078      // This transform does whole-program optimization, errors in
49079      // a single document could break invariants and/or cause
49080      // additional spurious errors.
49081      throw createNonRecoverableUserError("Variable '$".concat(value.variableName, "' is not in scope."), [(_errorContext$ = errorContext[0]) === null || _errorContext$ === void 0 ? void 0 : _errorContext$.loc, value.loc].filter(
49081Boolean));
49082    }
49083
49084    return scopeValue;
49085  } else if (value.kind === 'ObjectValue') {
49086    return _objectSpread(_objectSpread({}, value), {}, {
49087      fields: value.fields.map(function (field) {
49088        return _objectSpread(_objectSpread({}, field), {}, {
49089          value: transformValue(scope, field.value, errorContext)
49090        });
49091      })
49092    });
49093  } else if (value.kind === 'ListValue') {
49094    return _objectSpread(_objectSpread({}, value), {}, {
49095      items: value.items.map(function (item) {
49096        return transformValue(scope, item, errorContext);
49097      })
49098    });
49099  }
49100
49101  return value;
49102}
49103/**
49104 * Apply arguments to a fragment, creating a new fragment (with the given name)
49105 * with all values recursively applied.
49106 */
49107
49108
49109function transformFragment(context, fragments, parentScope, spread, args, errorContext) {
49110  var schema = context.getSchema();
49111  var fragment = context.getFragment(spread.name, spread.loc);
49112  var argumentsHash = hashArguments(args, parentScope, errorContext);
49113  var fragmentName = argumentsHash ? "".concat(fragment.name, "_").concat(argumentsHash) : fragment.name;
49114  var appliedFragment = fragments.get(fragmentName);
49115
49116  if (appliedFragment) {
49117    if (appliedFragment.kind === 'resolved') {
49118      return appliedFragment.value;
49119    } else {
49120      // This transform does whole-program optimization, errors in
49121      // a single document could break invariants and/or cause
49122      // additional spurious errors.
49123      throw createNonRecoverableUserError("Found a circular reference from fragment '".concat(fragment.name, "'."), errorContext.map(function (node) {
49124        return node.loc;
49125      }));
49126    }
49127  }
49128
49129  var fragmentScope = getFragmentScope(schema, fragment.argumentDefinitions, args, parentScope, spread); // record that this fragment is pending to detect circular references
49130
49131  fragments.set(fragmentName, {
49132    kind: 'pending'
49133  });
49134  var transformedFragment = null;
49135  var selections = transformSelections(context, fragments, fragmentScope, fragment.selections, errorContext);
49136
49137  if (selections) {
49138    transformedFragment = _objectSpread(_objectSpread({}, fragment), {}, {
49139      selections: selections,
49140      name: fragmentName,
49141      argumentDefinitions: []
49142    });
49143  }
49144
49145  fragments.set(fragmentName, {
49146    kind: 'resolved',
49147    value: transformedFragment
49148  });
49149  return transformedFragment;
49150}
49151
49152function hashArguments(args, scope, errorContext) {
49153  if (!args.length) {
49154    return null;
49155  }
49156
49157  var sortedArgs = (0, _toConsumableArray2["default"])(args).sort(function (a, b) {
49158    return a.name < b.name ? -1 : a.name > b.name ? 1 : 0;
49159  });
49160  var printedArgs = JSON.stringify(sortedArgs.map(function (arg) {
49161    var value;
49162
49163    if (arg.value.kind === 'Variable') {
49164      value = scope[arg.value.variableName];
49165
49166      if (value == null) {
49167        var _errorContext$2;
49168
49169        // This transform does whole-program optimization, errors in
49170        // a single document could break invariants and/or cause
49171        // additional spurious errors.
49172        throw createNonRecoverableUserError("Variable '$".concat(arg.value.variableName, "' is not in scope."), [(_errorContext$2 = errorContext[0]) === null || _errorContext$2 === void 0 ? void 0 : _errorContext$2.loc, arg.value.loc].filter(Boolean));
49173      }
49174    } else {
49175      value = arg.value;
49176    }
49177
49178    return {
49179      name: arg.name,
49180      value: getIdentifierForArgumentValue(value)
49181    };
49182  }));
49183  return murmurHash(printedArgs);
49184}
49185
49186module.exports = {
49187  transform: applyFragmentArgumentTransform
49188};
49189
49190/***/ }),
49191
49192/***/ "V/hC":
49193/***/ (function(module, exports, __webpack_require__) {
49194
49195"use strict";
49196
49197
49198var GetIntrinsic = __webpack_require__("AM7I");
49199
49200var $TypeError = GetIntrinsic('%TypeError%');
49201
49202var inspect = __webpack_require__("Rska");
49203
49204var IsPropertyKey = __webpack_require__("ml7t");
49205var Type = __webpack_require__("zOLO");
49206
49207/**
49208 * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p
49209 * 1. Assert: Type(O) is Object.
49210 * 2. Assert: IsPropertyKey(P) is true.
49211 * 3. Return O.[[Get]](P, O).
49212 */
49213
49214module.exports = function Get(O, P) {
49215	// 7.3.1.1
49216	if (Type(O) !== 'Object') {
49217		throw new $TypeError('Assertion failed: Type(O) is not Object');
49218	}
49219	// 7.3.1.2
49220	if (!IsPropertyKey(P)) {
49221		throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));
49222	}
49223	// 7.3.1.3
49224	return O[P];
49225};
49226
49227
49228/***/ }),
49229
49230/***/ "VF6F":
49231/***/ (function(module, exports, __webpack_require__) {
49232
49233"use strict";
49234
49235
49236var GetIntrinsic = __webpack_require__("AM7I");
49237
49238var callBind = __webpack_require__("PrET");
49239
49240var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
49241
49242module.exports = function callBoundIntrinsic(name, allowMissing) {
49243	var intrinsic = GetIntrinsic(name, !!allowMissing);
49244	if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
49245		return callBind(intrinsic);
49246	}
49247	return intrinsic;
49248};
49249
49250
49251/***/ }),
49252
49253/***/ "VbXa":
49254/***/ (function(module, exports) {
49255
49256function _inheritsLoose(subClass, superClass) {
49257  subClass.prototype = Object.create(superClass.prototype);
49258  subClass.prototype.constructor = subClass;
49259  subClass.__proto__ = superClass;
49260}
49261
49262module.exports = _inheritsLoose;
49263
49264/***/ }),
49265
49266/***/ "VqSG":
49267/***/ (function(module, exports, __webpack_require__) {
49268
49269"use strict";
49270/**
49271 * Copyright (c) Facebook, Inc. and its affiliates.
49272 *
49273 * This source code is licensed under the MIT license found in the
49274 * LICENSE file in the root directory of this source tree.
49275 *
49276 * 
49277 * @format
49278 */
49279// flowlint ambiguous-object-type:error
49280
49281/**
49282 * Based on implementations by Gary Court and Austin Appleby, 2011, MIT.
49283 * @preserve-header
49284 */
49285
49286
49287var BASE62 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
49288/**
49289 * @param {string} key A UTF-16 or ASCII string
49290 * @return {string} a base62 murmur hash
49291 */
49292
49293function murmurHash(str) {
49294  /* eslint-disable no-bitwise */
49295  var length = str.length;
49296  var rem = length & 3;
49297  var len = length ^ rem;
49298  var h = 0;
49299  var i = 0;
49300  var k;
49301
49302  while (i !== len) {
49303    var ch4 = str.charCodeAt(i + 3);
49304    k = str.charCodeAt(i) ^ str.charCodeAt(i + 1) << 8 ^ str.charCodeAt(i + 2) << 16 ^ (ch4 & 0xff) << 24 ^ (ch4 & 0xff00) >> 8;
49305    i += 4;
49306    k = k * 0x2d51 + (k & 0xffff) * 0xcc9e0000 >>> 0;
49307    k = k << 15 | k >>> 17;
49308    k = k * 0x3593 + (k & 0xffff) * 0x1b870000 >>> 0;
49309    h ^= k;
49310    h = h << 13 | h >>> 19;
49311    h = h * 5 + 0xe6546b64 >>> 0;
49312  }
49313
49314  k = 0;
49315
49316  switch (rem) {
49317    /* eslint-disable no-fallthrough */
49318    case 3:
49319      k ^= str.charCodeAt(len + 2) << 16;
49320
49321    case 2:
49322      k ^= str.charCodeAt(len + 1) << 8;
49323
49324    case 1:
49325      k ^= str.charCodeAt(len);
49326      k = k * 0x2d51 + (k & 0xffff) * 0xcc9e0000 >>> 0;
49327      k = k << 15 | k >>> 17;
49328      k = k * 0x3593 + (k & 0xffff) * 0x1b870000 >>> 0;
49329      h ^= k;
49330  }
49331
49332  h ^= length;
49333  h ^= h >>> 16;
49334  h = h * 0xca6b + (h & 0xffff) * 0x85eb0000 >>> 0;
49335  h ^= h >>> 13;
49336  h = h * 0xae35 + (h & 0xffff) * 0xc2b20000 >>> 0;
49337  h ^= h >>> 16;
49338  h >>>= 0;
49339
49340  if (!h) {
49341    return '0';
49342  }
49343
49344  var s = '';
49345
49346  while (h) {
49347    var d = h % 62;
49348    s = BASE62[d] + s;
49349    h = (h - d) / 62;
49350  }
49351
49352  return s;
49353}
49354
49355module.exports = murmurHash;
49356
49357/***/ }),
49358
49359/***/ "VrDQ":
49360/***/ (function(module, exports, __webpack_require__) {
49361
49362"use strict";
49363/**
49364 * Copyright (c) Facebook, Inc. and its affiliates.
49365 *
49366 * This source code is licensed under the MIT license found in the
49367 * LICENSE file in the root directory of this source tree.
49368 *
49369 * 
49370 * @format
49371 */
49372// flowlint ambiguous-object-type:error
49373
49374
49375function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
49376
49377function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
49378
49379function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
49380
49381var _require = __webpack_require__("Tzvz"),
49382    GraphQLError = _require.GraphQLError;
49383
49384/**
49385 * Creates an error describing invalid application code (GraphQL/Schema)
49386 * that must be fixed by the end developer. This should only be used
49387 * for local errors that don't affect processing of other user co
49387de.
49388 */
49389function createUserError(message, locations, nodes) {
49390  var messageWithLocations = message;
49391
49392  if (locations != null) {
49393    var printedLocations = printLocations(locations);
49394    messageWithLocations = printedLocations.length === 0 ? message : [message].concat(printedLocations).join('\n\n') + '\n';
49395  }
49396
49397  return new GraphQLError(messageWithLocations, nodes !== null && nodes !== void 0 ? nodes : []);
49398}
49399/**
49400 * Similar to createUserError but for errors that are *not* recoverable:
49401 * the compiler should not continue to process other inputs because their
49402 * validity can't be determined.
49403 */
49404
49405
49406function createNonRecoverableUserError(message, locations, nodes) {
49407  var messageWithLocations = message;
49408
49409  if (locations != null) {
49410    var printedLocations = printLocations(locations);
49411    messageWithLocations = printedLocations.length === 0 ? message : [message].concat(printedLocations).join('\n\n') + '\n';
49412  }
49413
49414  var error = new GraphQLError(messageWithLocations, nodes !== null && nodes !== void 0 ? nodes : []);
49415  return new Error(error.message);
49416}
49417/**
49418 * Creates an error describing a problem with the compiler itself - such
49419 * as a broken invariant - that must be fixed within the compiler.
49420 */
49421
49422
49423function createCompilerError(message, locations, nodes) {
49424  var messageWithLocations = message;
49425
49426  if (locations != null) {
49427    var printedLocations = printLocations(locations);
49428    messageWithLocations = printedLocations.length === 0 ? message : [message].concat(printedLocations).join('\n\n') + '\n';
49429  }
49430
49431  var error = new GraphQLError("Internal Error: ".concat(messageWithLocations), nodes !== null && nodes !== void 0 ? nodes : []);
49432  return new Error(error.message);
49433}
49434/**
49435 * Iterates over the elements of some iterable value, calling the
49436 * supplied callback for each item with a guard for user errors.
49437 *
49438 * Non-user errors abort the iteration and are instantly rethrown.
49439 * User errors are collected and rethrown at the end, if multiple user errors
49440 * occur, a combined error is thrown.
49441 */
49442
49443
49444function eachWithCombinedError(iterable, fn) {
49445  var errors = [];
49446
49447  var _iterator = _createForOfIteratorHelper(iterable),
49448      _step;
49449
49450  try {
49451    for (_iterator.s(); !(_step = _iterator.n()).done;) {
49452      var item = _step.value;
49453
49454      try {
49455        fn(item);
49456      } catch (error) {
49457        if (error instanceof GraphQLError) {
49458          errors.push(error);
49459        } else {
49460          throw error;
49461        }
49462      }
49463    }
49464  } catch (err) {
49465    _iterator.e(err);
49466  } finally {
49467    _iterator.f();
49468  }
49469
49470  if (errors.length > 0) {
49471    if (errors.length === 1) {
49472      throw errors[0];
49473    }
49474
49475    throw createUserError("Encountered ".concat(errors.length, " errors:\n") + errors.map(function (error) {
49476      return String(error).split('\n').map(function (line, index) {
49477        return index === 0 ? "- ".concat(line) : "  ".concat(line);
49478      }).join('\n');
49479    }).join('\n'));
49480  }
49481}
49482
49483function printLocations(locations) {
49484  var printedLocations = [];
49485
49486  var _iterator2 = _createForOfIteratorHelper(locations),
49487      _step2;
49488
49489  try {
49490    for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
49491      var location = _step2.value;
49492      var sourceLocation = location;
49493
49494      while (sourceLocation.kind === 'Derived') {
49495        sourceLocation = sourceLocation.source;
49496      }
49497
49498      switch (sourceLocation.kind) {
49499        case 'Source':
49500          {
49501            // source location
49502            var prefix = sourceLocation === location ? 'Source: ' : 'Source (derived): ';
49503            printedLocations.push(prefix + highlightSourceAtLocation(sourceLocation.source, getLocation(sourceLocation.source, sourceLocation.start)));
49504            break;
49505          }
49506
49507        case 'Generated':
49508          {
49509            printedLocations.push('Source: (generated)');
49510            break;
49511          }
49512
49513        case 'Unknown':
49514          {
49515            printedLocations.push('Source: (unknown)');
49516            break;
49517          }
49518
49519        default:
49520          {
49521            sourceLocation;
49522            throw createCompilerError("CompilerError: cannot print location '".concat(String(sourceLocation), "'."));
49523          }
49524      }
49525    }
49526  } catch (err) {
49527    _iterator2.e(err);
49528  } finally {
49529    _iterator2.f();
49530  }
49531
49532  return printedLocations;
49533}
49534/**
49535 * Render a helpful description of the location of the error in the GraphQL
49536 * Source document.
49537 */
49538
49539
49540function highlightSourceAtLocation(source, location) {
49541  var firstLineColumnOffset = source.locationOffset.column - 1;
49542  var body = whitespace(firstLineColumnOffset) + source.body;
49543  var lineIndex = location.line - 1;
49544  var lineOffset = source.locationOffset.line - 1;
49545  var lineNum = location.line + lineOffset;
49546  var columnOffset = location.line === 1 ? firstLineColumnOffset : 0;
49547  var columnNum = location.column + columnOffset;
49548  var lines = body.split(/\r\n|[\n\r]/g);
49549  return "".concat(source.name, " (").concat(lineNum, ":").concat(columnNum, ")\n") + printPrefixedLines([// Lines specified like this: ["prefix", "string"],
49550  ["".concat(lineNum - 1, ": "), lines[lineIndex - 1]], ["".concat(lineNum, ": "), lines[lineIndex]], ['', whitespace(columnNum - 1) + '^'], ["".concat(lineNum + 1, ": "), lines[lineIndex + 1]]]);
49551}
49552
49553function printPrefixedLines(lines) {
49554  var existingLines = lines.filter(function (_ref) {
49555    var _ = _ref[0],
49556        line = _ref[1];
49557    return line !== undefined;
49558  });
49559  var padLen = 0;
49560
49561  var _iterator3 = _createForOfIteratorHelper(existingLines),
49562      _step3;
49563
49564  try {
49565    for (_iterator3.s();
49565 !(_step3 = _iterator3.n()).done;) {
49566      var _step3$value = _step3.value,
49567          prefix = _step3$value[0];
49568      padLen = Math.max(padLen, prefix.length);
49569    }
49570  } catch (err) {
49571    _iterator3.e(err);
49572  } finally {
49573    _iterator3.f();
49574  }
49575
49576  return existingLines.map(function (_ref2) {
49577    var prefix = _ref2[0],
49578        line = _ref2[1];
49579    return lpad(padLen, prefix) + line;
49580  }).join('\n');
49581}
49582
49583function whitespace(len) {
49584  return Array(len + 1).join(' ');
49585}
49586
49587function lpad(len, str) {
49588  return whitespace(len - str.length) + str;
49589}
49590
49591function getLocation(source, position) {
49592  var lineRegexp = /\r\n|[\n\r]/g;
49593  var line = 1;
49594  var column = position + 1;
49595  var match;
49596
49597  while ((match = lineRegexp.exec(source.body)) && match.index < position) {
49598    line += 1;
49599    column = position + 1 - (match.index + match[0].length);
49600  }
49601
49602  return {
49603    line: line,
49604    column: column
49605  };
49606}
49607
49608module.exports = {
49609  createCompilerError: createCompilerError,
49610  createNonRecoverableUserError: createNonRecoverableUserError,
49611  createUserError: createUserError,
49612  eachWithCombinedError: eachWithCombinedError
49613};
49614
49615/***/ }),
49616
49617/***/ "WAOt":
49618/***/ (function(module, exports, __webpack_require__) {
49619
49620"use strict";
49621
49622
49623var isUncPath = __webpack_require__("q34w");
49624
49625module.exports = function isRelative(filepath) {
49626  if (typeof filepath !== 'string') {
49627    throw new TypeError('expected filepath to be a string');
49628  }
49629
49630  // Windows UNC paths are always considered to be absolute.
49631  return !isUncPath(filepath) && !/^([a-z]:)?[\\\/]/i.test(filepath);
49632};
49633
49634
49635/***/ }),
49636
49637/***/ "WHoc":
49638/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
49639
49640"use strict";
49641/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueTypeNamesRule; });
49642/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
49643
49644
49645/**
49646 * Unique type names
49647 *
49648 * A GraphQL document is only valid if all defined types have unique names.
49649 */
49650function UniqueTypeNamesRule(context) {
49651  var knownTypeNames = Object.create(null);
49652  var schema = context.getSchema();
49653  return {
49654    ScalarTypeDefinition: checkTypeName,
49655    ObjectTypeDefinition: checkTypeName,
49656    InterfaceTypeDefinition: checkTypeName,
49657    UnionTypeDefinition: checkTypeName,
49658    EnumTypeDefinition: checkTypeName,
49659    InputObjectTypeDefinition: checkTypeName
49660  };
49661
49662  function checkTypeName(node) {
49663    var typeName = node.name.value;
49664
49665    if (schema !== null && schema !== void 0 && schema.getType(typeName)) {
49666      context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Type \"".concat(typeName, "\" already exists in the schema. It cannot also be defined in this type definition."), node.name));
49667      return;
49668    }
49669
49670    if (knownTypeNames[typeName]) {
49671      context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("There can be only one type named \"".concat(typeName, "\"."), [knownTypeNames[typeName], node.name]));
49672    } else {
49673      knownTypeNames[typeName] = node.name;
49674    }
49675
49676    return false;
49677  }
49678}
49679
49680
49681/***/ }),
49682
49683/***/ "WXJZ":
49684/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
49685
49686"use strict";
49687/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return keyValMap; });
49688/**
49689 * Creates a keyed JS object from an array, given a function to produce the keys
49690 * and a function to produce the values from each item in the array.
49691 *
49692 *     const phoneBook = [
49693 *       { name: 'Jon', num: '555-1234' },
49694 *       { name: 'Jenny', num: '867-5309' }
49695 *     ]
49696 *
49697 *     // { Jon: '555-1234', Jenny: '867-5309' }
49698 *     const phonesByName = keyValMap(
49699 *       phoneBook,
49700 *       entry => entry.name,
49701 *       entry => entry.num
49702 *     )
49703 *
49704 */
49705function keyValMap(list, keyFn, valFn) {
49706  return list.reduce(function (map, item) {
49707    map[keyFn(item)] = valFn(item);
49708    return map;
49709  }, Object.create(null));
49710}
49711
49712
49713/***/ }),
49714
49715/***/ "WZeS":
49716/***/ (function(module, exports, __webpack_require__) {
49717
49718"use strict";
49719
49720
49721var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
49722
49723var isPrimitive = __webpack_require__("Teho");
49724var isCallable = __webpack_require__("IdCN");
49725var isDate = __webpack_require__("DmXP");
49726var isSymbol = __webpack_require__("/sVA");
49727
49728var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {
49729	if (typeof O === 'undefined' || O === null) {
49730		throw new TypeError('Cannot call method on ' + O);
49731	}
49732	if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {
49733		throw new TypeError('hint must be "string" or "number"');
49734	}
49735	var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
49736	var method, result, i;
49737	for (i = 0; i < methodNames.length; ++i) {
49738		method = O[methodNames[i]];
49739		if (isCallable(method)) {
49740			result = method.call(O);
49741			if (isPrimitive(result)) {
49742				return result;
49743			}
49744		}
49745	}
49746	throw new TypeError('No default value');
49747};
49748
49749var GetMethod = function GetMethod(O, P) {
49750	var func = O[P];
49751	if (func !== null && typeof func !== 'undefined') {
49752		if (!isCallable(func)) {
49753			throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');
49754		}
49755		return func;
49756	}
49757	return void 0;
49758};
49759
49760// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive
49761module.exports = function ToPrimitive(input) {
49762	if (isPrimitive(input)) {
49763		return input;
49764	}
49765	var hint = 'default';
49766	if (arguments.length > 1) {
49767		if (arguments[1] === String) {
49768			hint = 'string';
49769		} else if (arguments[1] === Number) {
49770			hint = 'number';
49771		}
49772	}
49773
49774	var exoticToPrim;
49775	if (hasSymbols) {
49776		if (Symbol.toPrimitive) {
49777			exoticToPrim = GetMethod(input, Symbol.toPrimitive);
49778		} else if (isSymbol(input)) {
49779			exoticToPrim = Symbol.prototype.valueOf;
49780		}
49781	}
49782	if (typeof exoticToPrim !== 'undefined') {
49783		var result = exoticToPrim.call(input, hint);
49784		if (isPrimitive(result)) {
49785			return result;
49786		}
49787		throw new TypeError('unable to convert exotic object to primitive');
49788	}
49789	if (hint === 'default' && (isDate(input) || isSymbol(input))) {
49790		hint = 'string';
49791	}
49792	return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);
49793};
49794
49795
49796/***/ }),
49797
49798/***/ "WkPL":
49799/***/ (function(module, exports) {
49800
49801function _arrayLikeToArray(arr, len) {
49802  if (len == null || len > arr.length) len = arr.length;
49803
49804  for (var i = 0, arr2 = new Array(len); i < len; i++) {
49805    arr2[i] = arr[i];
49806  }
49807
49808  return arr2;
49809}
49810
49811module.exports = _arrayLikeToArray;
49812
49813/***/ }),
49814
49815/***/ "Wyu6":
49816/***/ (function(module, __webpack_exports__, __webpack_require__) {
49817
49818"use strict";
49819__webpack_require__.r(__webpack_exports__);
49820/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "localeLowerCase", function() { return localeLowerCase; });
49821/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lowerCase", function() { return lowerCase; });
49822/**
49823 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
49824 */
49825var SUPPORTED_LOCALE = {
49826    tr: {
49827        regexp: /\u0130|\u0049|\u0049\u0307/g,
49828        map: {
49829            İ: "\u0069",
49830            I: "\u0131",
49831            İ: "\u0069",
49832        },
49833    },
49834    az: {
49835        regexp: /\u0130/g,
49836        map: {
49837            İ: "\u0069",
49838            I: "\u0131",
49839            İ: "\u0069",
49840        },
49841    },
49842    lt: {
49843        regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
49844        map: {
49845            I: "\u0069\u0307",
49846            J: "\u006A\u0307",
49847            Ä®: "\u012F\u0307",
49848            Ì: "\u0069\u0307\u0300",
49849            Í: "\u0069\u0307\u0301",
49850            Ĩ: "\u0069\u0307\u0303",
49851        },
49852    },
49853};
49854/**
49855 * Localized lower case.
49856 */
49857function localeLowerCase(str, locale) {
49858    var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
49859    if (lang)
49860        return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
49861    return lowerCase(str);
49862}
49863/**
49864 * Lower case as a function.
49865 */
49866function lowerCase(str) {
49867    return str.toLowerCase();
49868}
49869//# sourceMappingURL=index.js.map
49870
49871/***/ }),
49872
49873/***/ "Wzjs":
49874/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
49875
49876"use strict";
49877/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return mapValue; });
49878/* harmony import */ var _polyfills_objectEntries_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Y/la");
49879
49880
49881/**
49882 * Creates an object map with the same keys as `map` and values generated by
49883 * running each value of `map` thru `fn`.
49884 */
49885function mapValue(map, fn) {
49886  var result = Object.create(null);
49887
49888  for (var _i2 = 0, _objectEntries2 = Object(_polyfills_objectEntries_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(map); _i2 < _objectEntries2.length; _i2++) {
49889    var _ref2 = _objectEntries2[_i2];
49890    var _key = _ref2[0];
49891    var _value = _ref2[1];
49892    result[_key] = fn(_value, _key);
49893  }
49894
49895  return result;
49896}
49897
49898
49899/***/ }),
49900
49901/***/ "X4IK":
49902/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
49903
49904"use strict";
49905/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return lexicographicSortSchema; });
49906/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1QEH");
49907/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rWdj");
49908/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2C6G");
49909/* harmony import */ var _jsutils_keyValMap_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("WXJZ");
49910/* harmony import */ var _jsutils_naturalCompare_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Y5C7");
49911/* harmony import */ var _type_schema_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("51nL");
49912/* harmony import */ var _type_directives_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("4suF");
49913/* harmony import */ var _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("LViu");
49914/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("axIb");
49915function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
49916
49917function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
49918
49919function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
49920
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930/**
49931 * Sort GraphQLSchema.
49932 *
49933 * This function returns a sorted copy of the given GraphQLSchema.
49934 */
49935
49936function lexicographicSortSchema(schema) {
49937  var schemaConfig = schema.toConfig();
49938  var typeMap = Object(_jsutils_keyValMap_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(sortByName(schemaConfig.types), function (type) {
49939    return type.name;
49940  }, sortNamedType);
49941  return new _type_schema_mjs__WEBPACK_IMPORTED_MODULE_5__[/* GraphQLSchema */ "a"](_objectSpread(_objectSpread({}, schemaConfig), {}, {
49942    types: Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(typeMap),
49943    directives: sortByName(schemaConfig.directives).map(sortDirective),
49944    query: replaceMaybeType(schemaConfig.query),
49945    mutation: replaceMaybeType(schemaConfig.mutation),
49946    subscription: replaceMaybeType(schemaConfig.subscription)
49947  }));
49948
49949  function replaceType(type) {
49950    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isListType */ "J"])(type)) {
49951      // $FlowFixMe[incompatible-return]
49952      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* GraphQLList */ "d"](replaceType(type.ofType));
49953    } else if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isNonNullType */ "L"])(type)) {
49954      // $FlowFixMe[incompatible-return]
49955      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* GraphQLNonNull */ "e"](replaceType(type.ofType));
49956    }
49957
49958    return replaceNamedType(type);
49959  }
49960
49961  function replaceNamedType(type) {
49962    return typeMap[type.name];
49963  }
49964
49965  function replaceMaybeType(maybeType) {
49966    return maybeType && replaceNamedType(maybeType);
49967  }
49968
49969  function sortDirective(directive) {
49970    var config = directive.toConfig();
49971    return new _type_directives_mjs__WEBPACK_IMPORTED_MODULE_6__[/* GraphQLDirective */ "c"](_objectSpread(_objectSpread({}, config), {}, {
49972      locations: sortBy(config.locations, function (x) {
49973        return x;
49974      }),
49975      args: sortArgs(config.args)
49976    }));
49977  }
49978
49979  function sortArgs(args) {
49980    return sortObjMap(args, function (arg) {
49981      return _objectSpread(_objectSpread({}, arg), {}, {
49982        type: replaceType(arg.type)
49983      });
49984    });
49985  }
49986
49987  function sortFields(fieldsMap) {
49988    return sortObjMap(fieldsMap, function (field) {
49989      return _objectSpread(_objectSpread({}, field), {}, {
49990        type: replaceType(field.type),
49991        args: sortArgs(field.args)
49992      });
49993    });
49994  }
49995
49996  function sortInputFields(fieldsMap) {
49997    return sortObjMap(fieldsMap, function (field) {
49998      return _objectSpread(_objectSpread({}, field), {}, {
49999        type: replaceType(field.type)
50000      });
50001    });
50002  }
50003
50004  function sortTypes(arr) {
50005    return sortByName(arr).map(replaceNamedType);
50006  }
50007
50008  function sortNamedType(type) {
50009    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isScalarType */ "R"])(type) || Object(_type_introspection_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isIntrospectionType */ "n"])(type)) {
50010      return type;
50011    }
50012
50013    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isObjectType */ "N"])(type)) {
50014      var config = type.toConfig();
50015      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* GraphQLObjectType */ "f"](_objectSpread(_objectSpread({}, config), {}, {
50016        interfaces: function interfaces() {
50017          return sortTypes(config.interfaces);
50018        },
50019        fields: function fields() {
50020          return sortFields(config.fields);
50021        }
50022      }));
50023    }
50024
50025    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isInterfaceType */ "H"])(type)) {
50026      var _config = type.toConfig();
50027
50028      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* GraphQLInterfaceType */ "c"](_objectSpread(_objectSpread({}, _config), {}, {
50029        interfaces: function interfaces() {
50030          return sortTypes(_config.interfaces);
50031        },
50032        fields: function fields() {
50033          return sortFields(_config.fields);
50034        }
50035      }));
50036    }
50037
50038    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isUnionType */ "T"])(type)) {
50039      var _config2 = type.toConfig();
50040
50041      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* GraphQLUnionType */ "h"](_objectSpread(_objectSpread({}, _config2), {}, {
50042        types: function types() {
50043          return sortTypes(_config2.types);
50044        }
50045      }));
50046    }
50047
50048    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isEnumType */ "E"])(type)) {
50049      var _config3 = type.toConfig();
50050
50051      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* GraphQLEnumType */ "a"](_objectSpread(_objectSpread({}, _config3), {}, {
50052        values: sortObjMap(_config3.values)
50053      }));
50054    } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
50055
50056
50057    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* isInputObjectType */ "F"])(type)) {
50058      var _config4 = type.toConfig();
50059
50060      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_8__[/* GraphQLInputObjectType */ "b"](_objectSpread(_objectSpread({}, _config4), {}, {
50061        fields: function fields() {
50062          return sortInputFields(_config4.fields);
50063        }
50064      }));
50065    } // istanbul ignore next (Not reachable. All possible types have been considered)
50066
50067
50068     false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(0, 'Unexpected type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(type));
50069  }
50070}
50071
50072function sortObjMap(map, sortValueFn) {
50073  var sortedMap = Object.create(null);
50074  var sortedKeys = sortBy(Object.keys(map), function (x) {
50075    return x;
50076  });
50077
50078  for (var _i2 = 0; _i2 < sortedKeys.length; _i2++) {
50079    var key = sortedKeys[_i2];
50080    var value = map[key];
50081    sortedMap[key] = sortValueFn ? sortValueFn(value) : value;
50082  }
50083
50084  return sortedMap;
50085}
50086
50087function sortByName(array) {
50088  return sortBy(array, function (obj) {
50089    return obj.name;
50090  });
50091}
50092
50093function sortBy(array, mapToKey) {
50094  return array.slice().sort(function (obj1, obj2) {
50095    var key1 = mapToKey(obj1);
50096    var key2 = mapToKey(obj2);
50097    return Object(_jsutils_naturalCompare_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(key1, key2);
50098  });
50099}
50100
50101
50102/***/ }),
50103
50104/***/ "XCPT":
50105/***/ (function(module, exports) {
50106
50107/**
50108 * A simple dependency graph
50109 */
50110
50111/**
50112 * Helper for creating a Topological Sort using Depth-First-Search on a set of edges.
50113 *
50114 * Detects cycles and throws an Error if one is detected (unless the "circular"
50115 * parameter is "true" in which case it ignores them).
50116 *
50117 * @param edges The set of edges to DFS through
50118 * @param leavesOnly Whether to only return "leaf" nodes (ones who have no edges)
50119 * @param result An array in which the results will be populated
50120 * @param circular A boolean to allow circular dependencies
50121 */
50122function createDFS(edges, leavesOnly, result, circular) {
50123  var visited = {};
50124  return function (start) {
50125    if (visited[start]) {
50126      return;
50127    }
50128    var inCurrentPath = {};
50129    var currentPath = [];
50130    var todo = []; // used as a stack
50131    todo.push({ node: start, processed: false });
50132    while (todo.length > 0) {
50133      var current = todo[todo.length - 1]; // peek at the todo stack
50134      var processed = current.processed;
50135      var node = current.node;
50136      if (!processed) {
50137        // Haven't visited edges yet (visiting phase)
50138        if (visited[node]) {
50139          todo.pop();
50140          continue;
50141        } else if (inCurrentPath[node]) {
50142          // It's not a DAG
50143          if (circular) {
50144            todo.pop();
50145            // If we're tolerating cycles, don't revisit the node
50146            continue;
50147          }
50148          currentPath.push(node);
50149          throw new DepGraphCycleError(currentPath);
50150        }
50151
50152        inCurrentPath[node] = true;
50153        currentPath.push(node);
50154        var nodeEdges = edges[node];
50155        // (push edges onto the todo stack in reverse order to be order-compatible with the old DFS implementation)
50156        for (var i = nodeEdges.length - 1; i >= 0; i--) {
50157          todo.push({ node: nodeEdges[i], processed: false });
50158        }
50159        current.processed = true;
50160      } else {
50161        // Have visited edges (stack unrolling phase)
50162        todo.pop();
50163        currentPath.pop();
50164        inCurrentPath[node] = false;
50165        visited[node] = true;
50166        if (!leavesOnly || edges[node].length === 0) {
50167          result.push(node);
50168        }
50169      }
50170    }
50171  };
50172}
50173
50174/**
50175 * Simple Dependency Graph
50176 */
50177var DepGraph = (exports.DepGraph = function DepGraph(opts) {
50178  this.nodes = {}; // Node -> Node/Data (treated like a Set)
50179  this.outgoingEdges = {}; // Node -> [Dependency Node]
50180  this.incomingEdges = {}; // Node -> [Dependant Node]
50181  this.circular = opts && !!opts.circular; // Allows circular deps
50182});
50183DepGraph.prototype = {
50184  /**
50185   * The number of nodes in the graph.
50186   */
50187  size: function () {
50188    return Object.keys(this.nodes).length;
50189  },
50190  /**
50191   * Add a node to the dependency graph. If a node already exists, this method will do nothing.
50192   */
50193  addNode: function (node, data) {
50194    if (!this.hasNode(node)) {
50195      // Checking the arguments length allows the user to add a node with undefined data
50196      if (arguments.length === 2) {
50197        this.nodes[node] = data;
50198      } else {
50199        this.nodes[node] = node;
50200      }
50201      this.outgoingEdges[node] = [];
50202      this.incomingEdges[node] = [];
50203    }
50204  },
50205  /**
50206   * Remove a node from the dependency graph. If a node does not exist, this method will do nothing.
50207   */
50208  removeNode: function (node) {
50209    if (this.hasNode(node)) {
50210      delete this.nodes[node];
50211      delete this.outgoingEdges[node];
50212      delete this.incomingEdges[node];
50213      [this.incomingEdges, this.outgoingEdges].forEach(function (edgeList) {
50214        Object.keys(edgeList).forEach(function (key) {
50215          var idx = edgeList[key].indexOf(node);
50216          if (idx >= 0) {
50217            edgeList[key].splice(idx, 1);
50218          }
50219        }, this);
50220      });
50221    }
50222  },
50223  /**
50224   * Check if a node exists in the graph
50225   */
50226  hasNode: function (node) {
50227    return this.nodes.hasOwnProperty(node);
50228  },
50229  /**
50230   * Get the data associated with a node name
50231   */
50232  getNodeData: function (node) {
50233    if (this.hasNode(node)) {
50234      return this.nodes[node];
50235    } else {
50236      throw new Error("Node does not exist: " + node);
50237    }
50238  },
50239  /**
50240   * Set the associated data for a given node name. If the node does not exist, this method will throw an error
50241   */
50242  setNodeData: function (node, data) {
50243    if (this.hasNode(node)) {
50244      this.nodes[node] = data;
50245    } else {
50246      throw new Error("Node does not exist: " + node);
50247    }
50248  },
50249  /**
50250   * Add a dependency between two nodes. If either of the nodes does not exist,
50251   * an Error will be thrown.
50252   */
50253  addDependency: function (from, to) {
50254    if (!this.hasNode(from)) {
50255      throw new Error("Node does not exist: " + from);
50256    }
50257    if (!this.hasNode(to)) {
50258      throw new Error("Node does not exist: " + to);
50259    }
50260    if (this.outgoingEdges[from].indexOf(to) === -1) {
50261      this.outgoingEdges[from].push(to);
50262    }
50263    if (this.incomingEdges[to].indexOf(from) === -1) {
50264      this.incomingEdges[to].push(from);
50265    }
50266    return true;
50267  },
50268  /**
50269   * Remove a dependency between two nodes.
50270   */
50271  removeDependency: function (from, to) {
50272    var idx;
50273    if (this.hasNode(from)) {
50274      idx = this.outgoingEdges[from].indexOf(to);
50275      if (idx >= 0) {
50276        this.outgoingEdges[from].splice(idx, 1);
50277      }
50278    }
50279
50280    if (this.hasNode(to)) {
50281      idx = this.incomingEdges[to].indexOf(from);
50282      if (idx >= 0) {
50283        this.incomingEdges[to].splice(idx, 1);
50284      }
50285    }
50286  },
50287  /**
50288   * Return a clone of the dependency graph. If any custom data is attached
50289   * to the nodes, it will only be shallow copied.
50290   */
50291  clone: function () {
50292    var source = this;
50293    var result = new DepGraph();
50294    var keys = Object.keys(source.nodes);
50295    keys.forEach(function (n) {
50296      result.nodes[n] = source.nodes[n];
50297      result.outgoingEdges[n] = source.outgoingEdges[n].slice(0);
50298      result.incomingEdges[n] = source.incomingEdges[n].slice(0);
50299    });
50300    return result;
50301  },
50302  /**
50303   * Get an array containing the direct dependencies of the specified node.
50304   *
50305   * Throws an Error if the specified node does not exist.
50306   */
50307  directDependenciesOf: function (node) {
50308    if (this.hasNode(node)) {
50309      return this.outgoingEdges[node].slice(0);
50310    } else {
50311      throw new Error("Node does not exist: " + node);
50312    }
50313  },
50314  /**
50315   * Get an array containing the nodes that directly depend on the specified node.
50316   *
50317   * Throws an Error if the specified node does not exist.
50318   */
50319  directDependantsOf: function (node) {
50320    if (this.hasNode(node)) {
50321      return this.incomingEdges[node].slice(0);
50322    } else {
50323      throw new Error("Node does not exist: " + node);
50324    }
50325  },
50326  /**
50327   * Get an array containing the nodes that the specified node depends on (transitively).
50328   *
50329   * Throws an Error if the graph has a cycle, or the specified node does not exist.
50330   *
50331   * If `leavesOnly` is true, only nodes that do not depend on any other nodes will be returned
50332   * in the array.
50333   */
50334  dependenciesOf: function (node, leavesOnly) {
50335    if (this.hasNode(node)) {
50336      var result = [];
50337      var DFS = createDFS(
50338        this.outgoingEdges,
50339        leavesOnly,
50340        result,
50341        this.circular
50342      );
50343      DFS(node);
50344      var idx = result.indexOf(node);
50345      if (idx >= 0) {
50346        result.splice(idx, 1);
50347      }
50348      return result;
50349    } else {
50350      throw new Error("Node does not exist: " + node);
50351    }
50352  },
50353  /**
50354   * get an array containing the nodes that depend on the specified node (transitively).
50355   *
50356   * Throws an Error if the graph has a cycle, or the specified node does not exist.
50357   *
50358   * If `leavesOnly` is true, only nodes that do not have any dependants will be returned in the array.
50359   */
50360  dependantsOf: function (node, leavesOnly) {
50361    if (this.hasNode(node)) {
50362      var result = [];
50363      var DFS = createDFS(
50364        this.incomingEdges,
50365        leavesOnly,
50366        result,
50367        this.circular
50368      );
50369      DFS(node);
50370      var idx = result.indexOf(node);
50371      if (idx >= 0) {
50372        result.splice(idx, 1);
50373      }
50374      return result;
50375    } else {
50376      throw new Error("Node does not exist: " + node);
50377    }
50378  },
50379  /**
50380   * Construct the overall processing order for the dependency graph.
50381   *
50382   * Throws an Error if the graph has a cycle.
50383   *
50384   * If `leavesOnly` is true, only nodes that do not depend on any other nodes will be returned.
50385   */
50386  overallOrder: function (leavesOnly) {
50387    var self = this;
50388    var result = [];
50389    var keys = Object.keys(this.nodes);
50390    if (keys.length === 0) {
50391      return result; // Empty graph
50392    } else {
50393      if (!this.circular) {
50394        // Look for cycles - we run the DFS starting at all the nodes in case there
50395        // are several disconnected subgraphs inside this dependency graph.
50396        var CycleDFS = createDFS(this.outgoingEdges, false, [], this.circular);
50397        keys.forEach(function (n) {
50398          CycleDFS(n);
50399        });
50400      }
50401
50402      var DFS = createDFS(
50403        this.outgoingEdges,
50404        leavesOnly,
50405        result,
50406        this.circular
50407      );
50408      // Find all potential starting points (nodes with nothing depending on them) an
50409      // run a DFS starting at these points to get the order
50410      keys
50411        .filter(function (node) {
50412          return self.incomingEdges[node].length === 0;
50413        })
50414        .forEach(function (n) {
50415          DFS(n);
50416        });
50417
50418      // If we're allowing cycles - we need to run the DFS against any remaining
50419      // nodes that did not end up in the initial result (as they are part of a
50420      // subgraph that does not have a clear starting point)
50421      if (this.circular) {
50422        keys
50423          .filter(function (node) {
50424            return result.indexOf(node) === -1;
50425          })
50426          .forEach(function (n) {
50427            DFS(n);
50428          });
50429      }
50430
50431      return result;
50432    }
50433  },
50434  /**
50435   * Get an array of nodes that have no dependants (i.e. nothing depends on them).
50436   */
50437  entryNodes: function () {
50438    var self = this;
50439    return Object.keys(this.nodes).filter(function (node) {
50440      return self.incomingEdges[node].length === 0;
50441    });
50442  }
50443};
50444
50445// Create some aliases
50446DepGraph.prototype.directDependentsOf = DepGraph.prototype.directDependantsOf;
50447DepGraph.prototype.dependentsOf = DepGraph.prototype.dependantsOf;
50448
50449/**
50450 * Cycle error, including the path of the cycle.
50451 */
50452var DepGraphCycleError = (exports.DepGraphCycleError = function (cyclePath) {
50453  var message = "Dependency Cycle Found: " + cyclePath.join(" -> ");
50454  var instance = new Error(message);
50455  instance.cyclePath = cyclePath;
50456  Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
50457  if (Error.captureStackTrace) {
50458    Error.captureStackTrace(instance, DepGraphCycleError);
50459  }
50460  return instance;
50461});
50462DepGraphCycleError.prototype = Object.create(Error.prototype, {
50463  constructor: {
50464    value: Error,
50465    enumerable: false,
50466    writable: true,
50467    configurable: true
50468  }
50469});
50470Object.setPrototypeOf(DepGraphCycleError, Error);
50471
50472
50473/***/ }),
50474
50475/***/ "Xizt":
50476/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
50477
50478"use strict";
50479/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefinitionNode; });
50480/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isExecutableDefinitionNode; });
50481/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isSelectionNode; });
50482/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return isValueNode; });
50483/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isTypeNode; });
50484/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return isTypeSystemDefinitionNode; });
50485/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isTypeDefinitionNode; });
50486/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return isTypeSystemExtensionNode; });
50487/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isTypeExtensionNode; });
50488/* harmony import */ var _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("/jXB");
50489
50490function isDefinitionNode(node) {
50491  return isExecutableDefinitionNode(node) || isTypeSystemDefinitionNode(node) || isTypeSystemExtensionNode(node);
50492}
50493function isExecutableDefinitionNode(node) {
50494  return node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].OPERATION_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].FRAGMENT_DEFINITION;
50495}
50496function isSelectionNode(node) {
50497  return node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].FIELD || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].FRAGMENT_SPREAD || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].INLINE_FRAGMENT;
50498}
50499function isValueNode(node) {
50500  return node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].VARIABLE || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].INT || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].FLOAT || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].STRING || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].BOOLEAN || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].NULL || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].ENUM || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].LIST || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].OBJECT;
50501}
50502function isTypeNode(node) {
50503  return node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].NAMED_TYPE || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].LIST_TYPE || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].NON_NULL_TYPE;
50504}
50505function isTypeSystemDefinitionNode(node) {
50506  return node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].DIRECTIVE_DEFINITION;
50507}
50508function isTypeDefinitionNode(node) {
50509  return node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].SCALAR_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].OBJECT_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].INTERFACE_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].UNION_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].ENUM_TYPE_DEFINITION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].INPUT_OBJECT_TYPE_DEFINITION;
50510}
50511function isTypeSystemExtensionNode(node) {
50512  return node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].SCHEMA_EXTENSION || isTypeExtensionNode(node);
50513}
50514function isTypeExtensionNode(node) {
50515  return node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].SCALAR_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].OBJECT_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].INTERFACE_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].UNION_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].ENUM_TYPE_EXTENSION || node.kind === _kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].INPUT_OBJECT_TYPE_EXTENSION;
50516}
50517
50518
50519/***/ }),
50520
50521/***/ "XucM":
50522/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
50523
50524"use strict";
50525/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueDirectivesPerLocationRule; });
50526/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
50527/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("/jXB");
50528/* harmony import */ var _language_predicates_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xizt");
50529/* harmony import */ var _type_directives_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("4suF");
50530
50531
50532
50533
50534
50535/**
50536 * Unique directive names per location
50537 *
50538 * A GraphQL document is only valid if all non-repeatable directives at
50539 * a given location are uniquely named.
50540 */
50541function UniqueDirectivesPerLocationRule(context) {
50542  var uniqueDirectiveMap = Object.create(null);
50543  var schema = context.getSchema();
50544  var definedDirectives = schema ? schema.getDirectives() : _type_directives_mjs__WEBPACK_IMPORTED_MODULE_3__[/* specifiedDirectives */ "j"];
50545
50546  for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {
50547    var directive = definedDirectives[_i2];
50548    uniqueDirectiveMap[directive.name] = !directive.isRepeatable;
50549  }
50550
50551  var astDefinitions = context.getDocument().definitions;
50552
50553  for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {
50554    var def = astDefinitions[_i4];
50555
50556    if (def.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].DIRECTIVE_DEFINITION) {
50557      uniqueDirectiveMap[def.name.value] = !def.repeatable;
50558    }
50559  }
50560
50561  var schemaDirectives = Object.create(null);
50562  var typeDirectivesMap = Object.create(null);
50563  return {
50564    // Many different AST nodes may contain directives. Rather than listing
50565    // them all, just listen for entering any node, and check to see if it
50566    // defines any directives.
50567    enter: function enter(node) {
50568      if (node.directives == null) {
50569        return;
50570      }
50571
50572      var seenDirectives;
50573
50574      if (node.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SCHEMA_DEFINITION || node.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SCHEMA_EXTENSION) {
50575        seenDirectives = schemaDirectives;
50576      } else if (Object(_language_predicates_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isTypeDefinitionNode */ "d"])(node) || Object(_language_predicates_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isTypeExtensionNode */ "e"])(node)) {
50577        var typeName = node.name.value;
50578        seenDirectives = typeDirectivesMap[typeName];
50579
50580        if (seenDirectives === undefined) {
50581          typeDirectivesMap[typeName] = seenDirectives = Object.create(null);
50582        }
50583      } else {
50584        seenDirectives = Object.create(null);
50585      }
50586
50587      for (var _i6 = 0, _node$directives2 = node.directives; _i6 < _node$directives2.length; _i6++) {
50588        var _directive = _node$directives2[_i6];
50589        var directiveName = _directive.name.value;
50590
50591        if (uniqueDirectiveMap[directiveName]) {
50592          if (seenDirectives[directiveName]) {
50593            context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("The directive \"@".concat(directiveName, "\" can only be used once at this location."), [seenDirectives[directiveName], _directive]));
50594          } else {
50595            seenDirectives[directiveName] = _directive;
50596          }
50597        }
50598      }
50599    }
50600  };
50601}
50602
50603
50604/***/ }),
50605
50606/***/ "Y/4B":
50607/***/ (function(module, exports, __webpack_require__) {
50608
50609"use strict";
50610/**
50611 * Copyright (c) Facebook, Inc. and its affiliates.
50612 *
50613 * This source code is licensed under the MIT license found in the
50614 * LICENSE file in the root directory of this source tree.
50615 *
50616 * 
50617 * @format
50618 */
50619// flowlint ambiguous-object-type:error
50620
50621
50622var aStackPool = [];
50623var bStackPool = [];
50624/**
50625 * Checks if two values are equal. Values may be primitives, arrays, or objects.
50626 * Returns true if both arguments have the same keys and values.
50627 *
50628 * @see http://underscorejs.org
50629 * @copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
50630 * @license MIT
50631 */
50632
50633function areEqual(a, b) {
50634  var aStack = aStackPool.length ? aStackPool.pop() : [];
50635  var bStack = bStackPool.length ? bStackPool.pop() : [];
50636  var result = eq(a, b, aStack, bStack);
50637  aStack.length = 0;
50638  bStack.length = 0;
50639  aStackPool.push(aStack);
50640  bStackPool.push(bStack);
50641  return result;
50642}
50643
50644function eq(a, b, aStack, bStack) {
50645  if (a === b) {
50646    // Identical objects are equal. `0 === -0`, but they aren't identical.
50647    return a !== 0 || 1 / a === 1 / b;
50648  }
50649
50650  if (a == null || b == null) {
50651    // a or b can be `null` or `undefined`
50652    return false;
50653  }
50654
50655  if (typeof a !== 'object' || typeof b !== 'object') {
50656    return false;
50657  }
50658
50659  var objToStr = Object.prototype.toString;
50660  var className = objToStr.call(a);
50661
50662  if (className !== objToStr.call(b)) {
50663    return false;
50664  }
50665
50666  switch (className) {
50667    case '[object String]':
50668      return a === String(b);
50669
50670    case '[object Number]':
50671      return isNaN(a) || isNaN(b) ? false : a === Number(b);
50672
50673    case '[object Date]':
50674    case '[object Boolean]':
50675      return +a === +b;
50676
50677    case '[object RegExp]':
50678      return a.source === b.source && a.global === b.global && a.multiline === b.multiline && a.ignoreCase === b.ignoreCase;
50679  } // Assume equality for cyclic structures.
50680
50681
50682  var length = aStack.length;
50683
50684  while (length--) {
50685    if (aStack[length] === a) {
50686      return bStack[length] === b;
50687    }
50688  }
50689
50690  aStack.push(a);
50691  bStack.push(b);
50692  var size = 0; // Recursively compare objects and arrays.
50693
50694  if (className === '[object Array]') {
50695    size = a.length;
50696
50697    if (size !== b.length) {
50698      return false;
50699    } // Deep compare the contents, ignoring non-numeric properties.
50700
50701
50702    while (size--) {
50703      if (!eq(a[size], b[size], aStack, bStack)) {
50704        return false;
50705      }
50706    }
50707  } else {
50708    if (a.constructor !== b.constructor) {
50709      return false;
50710    }
50711
50712    if (a.hasOwnProperty('valueOf') && b.hasOwnProperty('valueOf')) {
50713      return a.valueOf() === b.valueOf();
50714    }
50715
50716    var keys = Object.keys(a);
50717
50718    if (keys.length !== Object.keys(b).length) {
50719      return false;
50720    }
50721
50722    for (var i = 0; i < keys.length; i++) {
50723      if (keys[i] === '_owner') {
50724        // HACK: Comparing deeply nested React trees is slow since you end up
50725        // comparing the entire tree (all ancestors and all children) and
50726        // likely not what you want if you're comparing two elements with
50727        // areEqual. We bail out here for now.
50728        continue;
50729      }
50730
50731      if (!b.hasOwnProperty(keys[i]) || !eq(a[keys[i]], b[keys[i]], aStack, bStack)) {
50732        return false;
50733      }
50734    }
50735  }
50736
50737  aStack.pop();
50738  bStack.pop();
50739  return true;
50740}
50741
50742module.exports = areEqual;
50743
50744/***/ }),
50745
50746/***/ "Y/la":
50747/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
50748
50749"use strict";
50750/* eslint-disable no-redeclare */
50751// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441
50752var objectEntries = Object.entries || function (obj) {
50753  return Object.keys(obj).map(function (key) {
50754    return [key, obj[key]];
50755  });
50756};
50757
50758/* harmony default export */ __webpack_exports__["a"] = (objectEntries);
50759
50760
50761/***/ }),
50762
50763/***/ "Y5C7":
50764/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
50765
50766"use strict";
50767/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return naturalCompare; });
50768/**
50769 * Returns a number indicating whether a reference string comes before, or after,
50770 * or is the same as the given string in natural sort order.
50771 *
50772 * See: https://en.wikipedia.org/wiki/Natural_sort_order
50773 *
50774 */
50775function naturalCompare(aStr, bStr) {
50776  var aIdx = 0;
50777  var bIdx = 0;
50778
50779  while (aIdx < aStr.length && bIdx < bStr.length) {
50780    var aChar = aStr.charCodeAt(aIdx);
50781    var bChar = bStr.charCodeAt(bIdx);
50782
50783    if (isDigit(aChar) && isDigit(bChar)) {
50784      var aNum = 0;
50785
50786      do {
50787        ++aIdx;
50788        aNum = aNum * 10 + aChar - DIGIT_0;
50789        aChar = aStr.charCodeAt(aIdx);
50790      } while (isDigit(aChar) && aNum > 0);
50791
50792      var bNum = 0;
50793
50794      do {
50795        ++bIdx;
50796        bNum = bNum * 10 + bChar - DIGIT_0;
50797        bChar = bStr.charCodeAt(bIdx);
50798      } while (isDigit(bChar) && bNum > 0);
50799
50800      if (aNum < bNum) {
50801        return -1;
50802      }
50803
50804      if (aNum > bNum) {
50805        return 1;
50806      }
50807    } else {
50808      if (aChar < bChar) {
50809        return -1;
50810      }
50811
50812      if (aChar > bChar) {
50813        return 1;
50814      }
50815
50816      ++aIdx;
50817      ++bIdx;
50818    }
50819  }
50820
50821  return aStr.length - bStr.length;
50822}
50823var DIGIT_0 = 48;
50824var DIGIT_9 = 57;
50825
50826function isDigit(code) {
50827  return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9;
50828}
50829
50830
50831/***/ }),
50832
50833/***/ "YAvM":
50834/***/ (function(module, __webpack_exports__, __webpack_require__) {
50835
50836"use strict";
50837/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return pascalCaseTransform; });
50838/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return pascalCaseTransformMerge; });
50839/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pascalCase; });
50840/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mrSG");
50841/* harmony import */ var no_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Hb8o");
50842
50843
50844function pascalCaseTransform(input, index) {
50845    var firstChar = input.charAt(0);
50846    var lowerChars = input.substr(1).toLowerCase();
50847    if (index > 0 && firstChar >= "0" && firstChar <= "9") {
50848        return "_" + firstChar + lowerChars;
50849    }
50850    return "" + firstChar.toUpperCase() + lowerChars;
50851}
50852function pascalCaseTransformMerge(input) {
50853    return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();
50854}
50855function pascalCase(input, options) {
50856    if (options === void 0) { options = {}; }
50857    return Object(no_case__WEBPACK_IMPORTED_MODULE_1__[/* noCase */ "a"])(input, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ delimiter: "", transform: pascalCaseTransform }, options));
50858}
50859//# sourceMappingURL=index.js.map
50860
50861/***/ }),
50862
50863/***/ "YF83":
50864/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
50865
50866"use strict";
50867/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueFragmentNamesRule; });
50868/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
50869
50870
50871/**
50872 * Unique fragment names
50873 *
50874 * A GraphQL document is only valid if all defined fragments have unique names.
50875 */
50876function UniqueFragmentNamesRule(context) {
50877  var knownFragmentNames = Object.create(null);
50878  return {
50879    OperationDefinition: function OperationDefinition() {
50880      return false;
50881    },
50882    FragmentDefinition: function FragmentDefinition(node) {
50883      var fragmentName = node.name.value;
50884
50885      if (knownFragmentNames[fragmentName]) {
50886        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("There can be only one fragment named \"".concat(fragmentName, "\"."), [knownFragmentNames[fragmentName], node.name]));
50887      } else {
50888        knownFragmentNames[fragmentName] = node.name;
50889      }
50890
50891      return false;
50892    }
50893  };
50894}
50895
50896
50897/***/ }),
50898
50899/***/ "Yen0":
50900/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
50901
50902"use strict";
50903/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return buildASTSchema; });
50904/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return buildSchema; });
50905/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("t3R0");
50906/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("/jXB");
50907/* harmony import */ var _language_parser_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("EMzn");
50908/* harmony import */ var _validation_validate_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("EkME");
50909/* harmony import */ var _type_schema_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("51nL");
50910/* harmony import */ var _type_directives_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("4suF");
50911/* harmony import */ var _extendSchema_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("cbkQ");
50912
50913
50914
50915
50916
50917
50918
50919
50920/**
50921 * This takes the ast of a schema document produced by the parse function in
50922 * src/language/parser.js.
50923 *
50924 * If no schema definition is provided, then it will look for types named Query
50925 * and Mutation.
50926 *
50927 * Given that AST it constructs a GraphQLSchema. The resulting schema
50928 * has no resolve methods, so execution will use default resolvers.
50929 *
50930 * Accepts options as a second argument:
50931 *
50932 *    - commentDescriptions:
50933 *        Provide true to use preceding comments as the description.
50934 *
50935 */
50936function buildASTSchema(documentAST, options) {
50937  documentAST != null && documentAST.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].DOCUMENT || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(0, 'Must provide valid Document AST.');
50938
50939  if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {
50940    Object(_validation_validate_mjs__WEBPACK_IMPORTED_MODULE_3__[/* assertValidSDL */ "a"])(documentAST);
50941  }
50942
50943  var emptySchemaConfig = {
50944    description: undefined,
50945    types: [],
50946    directives: [],
50947    extensions: undefined,
50948    extensionASTNodes: [],
50949    assumeValid: false
50950  };
50951  var config = Object(_extendSchema_mjs__WEBPACK_IMPORTED_MODULE_6__[/* extendSchemaImpl */ "b"])(emptySchemaConfig, documentAST, options);
50952
50953  if (config.astNode == null) {
50954    for (var _i2 = 0, _config$types2 = config.types; _i2 < _config$types2.length; _i2++) {
50955      var type = _config$types2[_i2];
50956
50957      switch (type.name) {
50958        // Note: While this could make early assertions to get the correctly
50959        // typed values below, that would throw immediately while type system
50960        // validation with validateSchema() will produce more actionable results.
50961        case 'Query':
50962          config.query = type;
50963          break;
50964
50965        case 'Mutation':
50966          config.mutation = type;
50967          break;
50968
50969        case 'Subscription':
50970          config.subscription = type;
50971          break;
50972      }
50973    }
50974  }
50975
50976  var directives = config.directives; // If specified directives were not explicitly declared, add them.
50977
50978  var _loop = function _loop(_i4) {
50979    var stdDirective = _type_directives_mjs__WEBPACK_IMPORTED_MODULE_5__[/* specifiedDirectives */ "j"][_i4];
50980
50981    if (directives.every(function (directive) {
50982      return directive.name !== stdDirective.name;
50983    })) {
50984      directives.push(stdDirective);
50985    }
50986  };
50987
50988  for (var _i4 = 0; _i4 < _type_directives_mjs__WEBPACK_IMPORTED_MODULE_5__[/* specifiedDirectives */ "j"].length; _i4++) {
50989    _loop(_i4);
50990  }
50991
50992  return new _type_schema_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLSchema */ "a"](config);
50993}
50994/**
50995 * A helper function to build a GraphQLSchema directly from a source
50996 * document.
50997 */
50998
50999function buildSchema(source, options) {
51000  var document = Object(_language_parser_mjs__WEBPACK_IMPORTED_MODULE_2__["parse"])(source, {
51001    noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
51002    allowLegacySDLEmptyFields: options === null || options === void 0 ? void 0 : options.allowLegacySDLEmptyFields,
51003    allowLegacySDLImplementsInterfaces: options === null || options === void 0 ? void 0 : options.allowLegacySDLImplementsInterfaces,
51004    experimentalFragmentVariables: options === null || options === void 0 ? void 0 : options.experimentalFragmentVariables
51005  });
51006  return buildASTSchema(document, {
51007    commentDescriptions: options === null || options === void 0 ? void 0 : options.commentDescriptions,
51008    assumeValidSDL: options === null || options === void 0 ? void 0 : options.assumeValidSDL,
51009    assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid
51010  });
51011}
51012
51013
51014/***/ }),
51015
51016/***/ "Z4WY":
51017/***/ (function(module, exports, __webpack_require__) {
51018
51019"use strict";
51020/*!
51021 * path-root <https://github.com/jonschlinkert/path-root>
51022 *
51023 * Copyright (c) 2016, Jon Schlinkert.
51024 * Licensed under the MIT License.
51025 */
51026
51027
51028
51029var pathRootRegex = __webpack_require__("NIw6");
51030
51031module.exports = function(filepath) {
51032  if (typeof filepath !== 'string') {
51033    throw new TypeError('expected a string');
51034  }
51035
51036  var match = pathRootRegex().exec(filepath);
51037  if (match) {
51038    return match[0];
51039  }
51040};
51041
51042
51043/***/ }),
51044
51045/***/ "ZF9o":
51046/***/ (function(module, exports, __webpack_require__) {
51047
51048"use strict";
51049/**
51050 * Copyright (c) Facebook, Inc. and its affiliates.
51051 *
51052 * This source code is licensed under the MIT license found in the
51053 * LICENSE file in the root directory of this source tree.
51054 *
51055 * 
51056 * @format
51057 */
51058// flowlint ambiguous-object-type:error
51059
51060
51061var _interopRequireDefault = __webpack_require__("TqRt");
51062
51063var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA"));
51064
51065var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("RIqP"));
51066
51067function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
51068
51069function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
51070
51071var IRTransformer = __webpack_require__("OHCT");
51072
51073var IMap = __webpack_require__("r4ky").Map;
51074
51075var partitionArray = __webpack_require__("E690");
51076
51077var getIdentifierForSelection = __webpack_require__("EQxW");
51078
51079var invariant = __webpack_require__("OUqe");
51080
51081/**
51082 * A transform that removes redundant fields and fragment spreads. Redundancy is
51083 * defined in this context as any selection that is guaranteed to already be
51084 * fetched by an ancestor selection. This can occur in two cases:
51085 *
51086 * 1. Simple duplicates at the same level of the document can always be skipped:
51087 *
51088 * ```
51089 * fragment Foo on FooType {
51090 *   id
51091 *   id
51092 *   ...Bar
51093 *   ...Bar
51094 * }
51095 * ```
51096 *
51097 * Becomes
51098 *
51099 * ```
51100 * fragment Foo on FooType {
51101 *   id
51102 *   ...Bar
51103 * }
51104 * ```
51105 *
51106 * 2. Inline fragments and conditions introduce the possibility for duplication
51107 * at different levels of the tree. Whenever a selection is fetched in a parent,
51108 * it is redundant to also fetch it in a child:
51109 *
51110 * ```
51111 * fragment Foo on FooType {
51112 *   id
51113 *   ... on OtherType {
51114 *     id # 1
51115 *   }
51116 *   ... on FooType @include(if: $cond) {
51117 *     id # 2
51118 *   }
51119 * }
51120 * ```
51121 *
51122 * Becomes:
51123 *
51124 * ```
51125 * fragment Foo on FooType {
51126 *   id
51127 * }
51128 * ```
51129 *
51130 * In this example:
51131 * - 1 can be skipped because `id` is already fetched by the parent. Even
51132 *   though the type is different (FooType/OtherType), the inline fragment
51133 *   cannot match without the outer fragment matching so the outer `id` is
51134 *   guaranteed to already be fetched.
51135 * - 2 can be skipped for similar reasons: it doesn't matter if the condition
51136 *   holds, `id` is already fetched by the parent regardless.
51137 *
51138 * This transform also handles more complicated cases in which selections are
51139 * nested:
51140 *
51141 * ```
51142 * fragment Foo on FooType {
51143 *   a {
51144 *     bb
51145 *   }
51146 *   ... on OtherType {
51147 *     a {
51148 *       bb # 1
51149 *       cc
51150 *     }
51151 *   }
51152 *  }
51153 * ```
51154 *
51155 * Becomes
51156 *
51157 * ```
51158 * fragment Foo on FooType {
51159 *   a {
51160 *     bb
51161 *   }
51162 *   ... on OtherType {
51163 *     a {
51164 *       cc
51165 *     }
51166 *   }
51167 *  }
51168 * ```
51169 *
51170 * 1 can be skipped because it is already fetched at the outer level.
51171 */
51172function skipRedundantNodesTransform(context) {
51173  return IRTransformer.transform(context, {
51174    Root: visitNode,
51175    SplitOperation: visitNode,
51176    Fragment: visitNode
51177  });
51178}
51179
51180var cache = new Map();
51181
51182function visitNode(node) {
51183  cache = new Map();
51184  var context = this.getContext();
51185  return transformNode(context.getSchema(), node, new IMap()).node;
51186}
51187/**
51188 * The most straightforward approach would be two passes: one to record the
51189 * structure of the document, one to prune duplicates. This implementation uses
51190 * a single pass. Selections are sorted with fields first, "conditionals"
51191 * (inline fragments & conditions) last. This means that all fields that are
51192 * guaranteed to be fetched are encountered prior to any duplicates that may be
51193 * fetched within a conditional.
51194 *
51195 * Because selections fetched within a conditional are not guaranteed to be
51196 * fetched in the parent, a fork of the selection map is created when entering a
51197 * conditional. The sort ensures that guaranteed fields have already been seen
51198 * prior to the clone.
51199 */
51200
51201
51202function transformNode(schema, node, selectionMap) {
51203  // This will optimize a traversal of the same subselections.
51204  // If it's the same node, and selectionMap is empty
51205  // result of transformNode has to be the same.
51206  var isEmptySelectionMap = selectionMap.size === 0;
51207  var result;
51208
51209  if (isEmptySelectionMap) {
51210    // $FlowFixMe[escaped-generic]
51211    result = cache.get(node);
51212
51213    if (result != null) {
51214      return result;
51215    }
51216  }
51217
51218  var selections = [];
51219  sortSelections(node.selections).forEach(function (selection) {
51220    var identifier = getIdentifierForSelection(schema, selection);
51221
51222    switch (selection.kind) {
51223      case 'ScalarField':
51224      case 'FragmentSpread':
51225        {
51226          if (!selectionMap.has(identifier)) {
51227            selections.push(selection);
51228            selectionMap = selectionMap.set(identifier, null);
51229          }
51230
51231          break;
51232        }
51233
51234      case 'Defer':
51235      case 'Stream':
51236      case 'ModuleImport':
51237      case 'ClientExtension':
51238      case 'InlineDataFragmentSpread':
51239      case 'LinkedField':
51240        {
51241          var transformed = transformNode(schema, selection, selectionMap.get(identifier) || new IMap());
51242
51243          if (transformed.node) {
51244            selections.push(transformed.node);
51245            selectionMap = selectionMap.set(identifier, transformed.selectionMap);
51246          }
51247
51248          break;
51249        }
51250
51251      case 'InlineFragment':
51252      case 'Condition':
51253        {
51254          // Fork the selection map to prevent conditional selections from
51255          // affecting the outer "guaranteed" selections.
51256          var _transformed = transformNode(schema, selection, selectionMap.get(identifier) || selectionMap);
51257
51258          if (_transformed.node) {
51259            selections.push(_transformed.node);
51260            selectionMap = selectionMap.set(identifier, _transformed.selectionMap);
51261          }
51262
51263          break;
51264        }
51265
51266      default:
51267        selection;
51268         true ?  false ? undefined : invariant(false) : undefined;
51269    }
51270  });
51271  var nextNode = selections.length ? _objectSpread(_objectSpread({}, node), {}, {
51272    selections: selections
51273  }) : null;
51274  result = {
51275    selectionMap: selectionMap,
51276    node: nextNode
51277  };
51278
51279  if (isEmptySelectionMap) {
51280    // $FlowFixMe[escaped-generic]
51281    cache.set(node, result);
51282  }
51283
51284  return result;
51285}
51286/**
51287 * Sort inline fragments and conditions after other selections.
51288 */
51289
51290
51291function sortSelections(selections) {
51292  var isScalarOrLinkedField = function isScalarOrLinkedField(selection) {
51293    return selection.kind === 'ScalarField' || selection.kind === 'LinkedField';
51294  };
51295
51296  var _partitionArray = partitionArray(selections, isScalarOrLinkedField),
51297      scalarsAndLinkedFields = _partitionArray[0],
51298      rest = _partitionArray[1];
51299
51300  return [].concat((0, _toConsumableArray2["default"])(scalarsAndLinkedFields), (0, _toConsumableArray2["default"])(rest));
51301}
51302
51303module.exports = {
51304  transform: skipRedundantNodesTransform
51305};
51306
51307/***/ }),
51308
51309/***/ "ZXHR":
51310/***/ (function(module, exports, __webpack_require__) {
51311
51312"use strict";
51313
51314
51315var GetIntrinsic = __webpack_require__("AM7I");
51316
51317var $TypeError = GetIntrinsic('%TypeError%');
51318
51319var Get = __webpack_require__("V/hC");
51320var ToLength = __webpack_require__("JyDY");
51321var Type = __webpack_require__("zOLO");
51322
51323// https://262.ecma-international.org/11.0/#sec-lengthofarraylike
51324
51325module.exports = function LengthOfArrayLike(obj) {
51326	if (Type(obj) !== 'Object') {
51327		throw new $TypeError('Assertion failed: `obj` must be an Object');
51328	}
51329	return ToLength(Get(obj, 'length'));
51330};
51331
51332// TODO: use this all over
51333
51334
51335/***/ }),
51336
51337/***/ "ZhPi":
51338/***/ (function(module, exports, __webpack_require__) {
51339
51340var arrayLikeToArray = __webpack_require__("WkPL");
51341
51342function _unsupportedIterableToArray(o, minLen) {
51343  if (!o) return;
51344  if (typeof o === "string") return arrayLikeToArray(o, minLen);
51345  var n = Object.prototype.toString.call(o).slice(8, -1);
51346  if (n === "Object" && o.constructor) n = o.constructor.name;
51347  if (n === "Map" || n === "Set") return Array.from(o);
51348  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
51349}
51350
51351module.exports = _unsupportedIterableToArray;
51352
51353/***/ }),
51354
51355/***/ "aI7X":
51356/***/ (function(module, exports, __webpack_require__) {
51357
51358"use strict";
51359
51360
51361/* eslint no-invalid-this: 1 */
51362
51363var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
51364var slice = Array.prototype.slice;
51365var toStr = Object.prototype.toString;
51366var funcType = '[object Function]';
51367
51368module.exports = function bind(that) {
51369    var target = this;
51370    if (typeof target !== 'function' || toStr.call(target) !== funcType) {
51371        throw new TypeError(ERROR_MESSAGE + target);
51372    }
51373    var args = slice.call(arguments, 1);
51374
51375    var bound;
51376    var binder = function () {
51377        if (this instanceof bound) {
51378            var result = target.apply(
51379                this,
51380                args.concat(slice.call(arguments))
51381            );
51382            if (Object(result) === result) {
51383                return result;
51384            }
51385            return this;
51386        } else {
51387            return target.apply(
51388                that,
51389                args.concat(slice.call(arguments))
51390            );
51391        }
51392    };
51393
51394    var boundLength = Math.max(0, target.length - args.length);
51395    var boundArgs = [];
51396    for (var i = 0; i < boundLength; i++) {
51397        boundArgs.push('$' + i);
51398    }
51399
51400    bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
51401
51402    if (target.prototype) {
51403        var Empty = function Empty() {};
51404        Empty.prototype = target.prototype;
51405        bound.prototype = new Empty();
51406        Empty.prototype = null;
51407    }
51408
51409    return bound;
51410};
51411
51412
51413/***/ }),
51414
51415/***/ "arJZ":
51416/***/ (function(module, exports, __webpack_require__) {
51417
51418"use strict";
51419/**
51420 * Copyright (c) Facebook, Inc. and its affiliates.
51421 *
51422 * This source code is licensed under the MIT license found in the
51423 * LICENSE file in the root directory of this source tree.
51424 *
51425 * 
51426 * @format
51427 */
51428// flowlint ambiguous-object-type:error
51429
51430
51431var invariant = __webpack_require__("OUqe");
51432
51433/**
51434 * Generates an identifier for an argument value. The identifier is based on the
51435 * structure/order of items and keys in the value.
51436 */
51437function getIdentifierForArgumentValue(value) {
51438  switch (value.kind) {
51439    case 'Variable':
51440      return {
51441        variable: value.variableName
51442      };
51443
51444    case 'Literal':
51445      return {
51446        value: value.value
51447      };
51448
51449    case 'ListValue':
51450      return {
51451        list: value.items.map(function (item) {
51452          return getIdentifierForArgumentValue(item);
51453        })
51454      };
51455
51456    case 'ObjectValue':
51457      return {
51458        object: value.fields.map(function (field) {
51459          return {
51460            name: field.name,
51461            value: getIdentifierForArgumentValue(field.value)
51462          };
51463        })
51464      };
51465
51466    default:
51467       true ?  false ? undefined : invariant(false) : undefined;
51468  }
51469}
51470
51471module.exports = getIdentifierForArgumentValue;
51472
51473/***/ }),
51474
51475/***/ "atWj":
51476/***/ (function(module, exports, __webpack_require__) {
51477
51478"use strict";
51479
51480
51481var ES5ToInteger = __webpack_require__("hm8L");
51482
51483var ToNumber = __webpack_require__("cptH");
51484
51485// https://262.ecma-international.org/11.0/#sec-tointeger
51486
51487module.exports = function ToInteger(value) {
51488	var number = ToNumber(value);
51489	if (number !== 0) {
51490		number = ES5ToInteger(number);
51491	}
51492	return number === 0 ? 0 : number;
51493};
51494
51495
51496/***/ }),
51497
51498/***/ "awoc":
51499/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
51500
51501"use strict";
51502/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueArgumentNamesRule; });
51503/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
51504
51505
51506/**
51507 * Unique argument names
51508 *
51509 * A GraphQL field or directive is only valid if all supplied arguments are
51510 * uniquely named.
51511 */
51512function UniqueArgumentNamesRule(context) {
51513  var knownArgNames = Object.create(null);
51514  return {
51515    Field: function Field() {
51516      knownArgNames = Object.create(null);
51517    },
51518    Directive: function Directive() {
51519      knownArgNames = Object.create(null);
51520    },
51521    Argument: function Argument(node) {
51522      var argName = node.name.value;
51523
51524      if (knownArgNames[argName]) {
51525        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("There can be only one argument named \"".concat(argName, "\"."), [knownArgNames[argName], node.name]));
51526      } else {
51527        knownArgNames[argName] = node.name;
51528      }
51529
51530      return false;
51531    }
51532  };
51533}
51534
51535
51536/***/ }),
51537
51538/***/ "axIb":
51539/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
51540
51541"use strict";
51542
51543// EXPORTS
51544__webpack_require__.d(__webpack_exports__, "S", function() { return /* binding */ isType; });
51545__webpack_require__.d(__webpack_exports__, "x", function() { return /* binding */ assertType; });
51546__webpack_require__.d(__webpack_exports__, "R", function() { return /* binding */ isScalarType; });
51547__webpack_require__.d(__webpack_exports__, "w", function() { return /* binding */ assertScalarType; });
51548__webpack_require__.d(__webpack_exports__, "N", function() { return /* binding */ isObjectType; });
51549__webpack_require__.d(__webpack_exports__, "u", function() { return /* binding */ assertObjectType; });
51550__webpack_require__.d(__webpack_exports__, "H", function() { return /* binding */ isInterfaceType; });
51551__webpack_require__.d(__webpack_exports__, "o", function() { return /* binding */ assertInterfaceType; });
51552__webpack_require__.d(__webpack_exports__, "T", function() { return /* binding */ isUnionType; });
51553__webpack_require__.d(__webpack_exports__, "y", function() { return /* binding */ assertUnionType; });
51554__webpack_require__.d(__webpack_exports__, "E", function() { return /* binding */ isEnumType; });
51555__webpack_require__.d(__webpack_exports__, "l", function() { return /* binding */ assertEnumType; });
51556__webpack_require__.d(__webpack_exports__, "F", function() { return /* binding */ isInputObjectType; });
51557__webpack_require__.d(__webpack_exports__, "m", function() { return /* binding */ assertInputObjectType; });
51558__webpack_require__.d(__webpack_exports__, "J", function() { return /* binding */ isListType; });
51559__webpack_require__.d(__webpack_exports__, "q", function() { return /* binding */ assertListType; });
51560__webpack_require__.d(__webpack_exports__, "L", function() { return /* binding */ isNonNullType; });
51561__webpack_require__.d(__webpack_exports__, "s", function() { return /* binding */ assertNonNullType; });
51562__webpack_require__.d(__webpack_exports__, "G", function() { return /* binding */ isInputType; });
51563__webpack_require__.d(__webpack_exports__, "n", function() { return /* binding */ assertInputType; });
51564__webpack_require__.d(__webpack_exports__, "O", function() { return /* binding */ isOutputType; });
51565__webpack_require__.d(__webpack_exports__, "v", function() { return /* binding */ assertOutputType; });
51566__webpack_require__.d(__webpack_exports__, "I", function() { return /* binding */ isLeafType; });
51567__webpack_require__.d(__webpack_exports__, "p", function() { return /* binding */ assertLeafType; });
51568__webpack_require__.d(__webpack_exports__, "D", function() { return /* binding */ isCompositeType; });
51569__webpack_require__.d(__webpack_exports__, "k", function() { return /* binding */ assertCompositeType; });
51570__webpack_require__.d(__webpack_exports__, "C", function() { return /* binding */ isAbstractType; });
51571__webpack_require__.d(__webpack_exports__, "j", function() { return /* binding */ assertAbstractType; });
51572__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ GraphQLList; });
51573__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ GraphQLNonNull; });
51574__webpack_require__.d(__webpack_exports__, "U", function() { return /* binding */ isWrappingType; });
51575__webpack_require__.d(__webpack_exports__, "z", function() { return /* binding */ assertWrappingType; });
51576__webpack_require__.d(__webpack_exports__, "M", function() { return /* binding */ isNullableType; });
51577__webpack_require__.d(__webpack_exports__, "t", function() { return /* binding */ assertNullableType; });
51578__webpack_require__.d(__webpack_exports__, "B", function() { return /* binding */ getNullableType; });
51579__webpack_require__.d(__webpack_exports__, "K", function() { return /* binding */ isNamedType; });
51580__webpack_require__.d(__webpack_exports__, "r", function() { return /* binding */ assertNamedType; });
51581__webpack_require__.d(__webpack_exports__, "A", function() { return /* binding */ getNamedType; });
51582__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ definition_GraphQLScalarType; });
51583__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ definition_GraphQLObjectType; });
51584__webpack_require__.d(__webpack_exports__, "i", function() { return /* binding */ argsToArgsConfig; });
51585__webpack_require__.d(__webpack_exports__, "P", function() { return /* binding */ isRequiredArgument; });
51586__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ definition_GraphQLInterfaceType; });
51587__webpack_require__.d(__webpack_exports__, "h", function() { return /* binding */ definition_GraphQLUnionType; });
51588__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ definition_GraphQLEnumType; });
51589__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ definition_GraphQLInputObjectType; });
51590__webpack_require__.d(__webpack_exports__, "Q", function() { return /* binding */ isRequiredInputField; });
51591
51592// EXTERNAL MODULE: ./node_modules/graphql/polyfills/objectEntries.mjs
51593var objectEntries = __webpack_require__("Y/la");
51594
51595// EXTERNAL MODULE: ./node_modules/graphql/polyfills/symbols.mjs
51596var symbols = __webpack_require__("2Fve");
51597
51598// EXTERNAL MODULE: ./node_modules/graphql/jsutils/inspect.mjs
51599var inspect = __webpack_require__("rWdj");
51600
51601// EXTERNAL MODULE: ./node_modules/graphql/jsutils/keyMap.mjs
51602var keyMap = __webpack_require__("kBjl");
51603
51604// EXTERNAL MODULE: ./node_modules/graphql/jsutils/mapValue.mjs
51605var mapValue = __webpack_require__("Wzjs");
51606
51607// EXTERNAL MODULE: ./node_modules/graphql/jsutils/toObjMap.mjs
51608var toObjMap = __webpack_require__("E9SJ");
51609
51610// EXTERNAL MODULE: ./node_modules/graphql/jsutils/devAssert.mjs
51611var devAssert = __webpack_require__("t3R0");
51612
51613// EXTERNAL MODULE: ./node_modules/graphql/jsutils/keyValMap.mjs
51614var keyValMap = __webpack_require__("WXJZ");
51615
51616// EXTERNAL MODULE: ./node_modules/graphql/jsutils/instanceOf.mjs
51617var instanceOf = __webpack_require__("Mw0p");
51618
51619// EXTERNAL MODULE: ./node_modules/graphql/jsutils/didYouMean.mjs
51620var didYouMean = __webpack_require__("pv/G");
51621
51622// EXTERNAL MODULE: ./node_modules/graphql/jsutils/isObjectLike.mjs
51623var isObjectLike = __webpack_require__("zpYP");
51624
51625// CONCATENATED MODULE: ./node_modules/graphql/jsutils/identityFunc.mjs
51626/**
51627 * Returns the first argument it receives.
51628 */
51629function identityFunc(x) {
51630  return x;
51631}
51632
51633// EXTERNAL MODULE: ./node_modules/graphql/jsutils/defineInspect.mjs
51634var defineInspect = __webpack_require__("+dZ+");
51635
51636// EXTERNAL MODULE: ./node_modules/graphql/jsutils/suggestionList.mjs
51637var suggestionList = __webpack_require__("T95z");
51638
51639// EXTERNAL MODULE: ./node_modules/graphql/error/GraphQLError.mjs
51640var GraphQLError = __webpack_require__("dWS+");
51641
51642// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs
51643var kinds = __webpack_require__("/jXB");
51644
51645// EXTERNAL MODULE: ./node_modules/graphql/language/printer.mjs
51646var printer = __webpack_require__("dQau");
51647
51648// EXTERNAL MODULE: ./node_modules/graphql/utilities/valueFromASTUntyped.mjs
51649var valueFromASTUntyped = __webpack_require__("ADFt");
51650
51651// CONCATENATED MODULE: ./node_modules/graphql/type/definition.mjs
51652function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
51653
51654function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674function isType(type) {
51675  return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type) || isListType(type) || isNonNullType(type);
51676}
51677function assertType(type) {
51678  if (!isType(type)) {
51679    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL type."));
51680  }
51681
51682  return type;
51683}
51684/**
51685 * There are predicates for each kind of GraphQL type.
51686 */
51687
51688// eslint-disable-next-line no-redeclare
51689function isScalarType(type) {
51690  return Object(instanceOf["a" /* default */])(type, definition_GraphQLScalarType);
51691}
51692function assertScalarType(type) {
51693  if (!isScalarType(type)) {
51694    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL Scalar type."));
51695  }
51696
51697  return type;
51698}
51699// eslint-disable-next-line no-redeclare
51700function isObjectType(type) {
51701  return Object(instanceOf["a" /* default */])(type, definition_GraphQLObjectType);
51702}
51703function assertObjectType(type) {
51704  if (!isObjectType(type)) {
51705    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL Object type."));
51706  }
51707
51708  return type;
51709}
51710// eslint-disable-next-line no-redeclare
51711function isInterfaceType(type) {
51712  return Object(instanceOf["a" /* default */])(type, definition_GraphQLInterfaceType);
51713}
51714function assertInterfaceType(type) {
51715  if (!isInterfaceType(type)) {
51716    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL Interface type."));
51717  }
51718
51719  return type;
51720}
51721// eslint-disable-next-line no-redeclare
51722function isUnionType(type) {
51723  return Object(instanceOf["a" /* default */])(type, definition_GraphQLUnionType);
51724}
51725function assertUnionType(type) {
51726  if (!isUnionType(type)) {
51727    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL Union type."));
51728  }
51729
51730  return type;
51731}
51732// eslint-disable-next-line no-redeclare
51733function isEnumType(type) {
51734  return Object(instanceOf["a" /* default */])(type, definition_GraphQLEnumType);
51735}
51736function assertEnumType(type) {
51737  if (!isEnumType(type)) {
51738    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL Enum type."));
51739  }
51740
51741  return type;
51742}
51743// eslint-disable-next-line no-redeclare
51744function isInputObjectType(type) {
51745  return Object(instanceOf["a" /* default */])(type, definition_GraphQLInputObjectType);
51746}
51747function assertInputObjectType(type) {
51748  if (!isInputObjectType(type)) {
51749    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL Input Object type."));
51750  }
51751
51752  return type;
51753}
51754// eslint-disable-next-line no-redeclare
51755function isListType(type) {
51756  return Object(instanceOf["a" /* default */])(type, GraphQLList);
51757}
51758function assertListType(type) {
51759  if (!isListType(type)) {
51760    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL List type."));
51761  }
51762
51763  return type;
51764}
51765// eslint-disable-next-line no-redeclare
51766function isNonNullType(type) {
51767  return Object(instanceOf["a" /* default */])(type, GraphQLNonNull);
51768}
51769function assertNonNullType(type) {
51770  if (!isNonNullType(type)) {
51771    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL Non-Null type."));
51772  }
51773
51774  return type;
51775}
51776/**
51777 * These types may be used as input types for arguments and directives.
51778 */
51779
51780function isInputType(type) {
51781  return isScalarType(type) || isEnumType(type) || isInputObjectType(type) || isWrappingType(type) && isInputType(type.ofType);
51782}
51783function assertInputType(type) {
51784  if (!isInputType(type)) {
51785    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL input type."));
51786  }
51787
51788  return type;
51789}
51790/**
51791 * These types may be used as output types as the result of fields.
51792 */
51793
51794function isOutputType(type) {
51795  return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isWrappingType(type) && isOutputType(type.ofType);
51796}
51797function assertOutputType(type) {
51798  if (!isOutputType(type)) {
51799    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL output type."));
51800  }
51801
51802  return type;
51803}
51804/**
51805 * These types may describe types which may be leaf values.
51806 */
51807
51808function isLeafType(type) {
51809  return isScalarType(type) || isEnumType(type);
51810}
51811function assertLeafType(type) {
51812  if (!isLeafType(type)) {
51813    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL leaf type."));
51814  }
51815
51816  return type;
51817}
51818/**
51819 * These types may describe the parent context of a selection set.
51820 */
51821
51822function isCompositeType(type) {
51823  return isObjectType(type) || isInterfaceType(type) || isUnionType(type);
51824}
51825function assertCompositeType(type) {
51826  if (!isCompositeType(type)) {
51827    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL composite type."));
51828  }
51829
51830  return type;
51831}
51832/**
51833 * These types may describe the parent context of a selection set.
51834 */
51835
51836function isAbstractType(type) {
51837  return isInterfaceType(type) || isUnionType(type);
51838}
51839function assertAbstractType(type) {
51840  if (!isAbstractType(type)) {
51841    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL abstract type."));
51842  }
51843
51844  return type;
51845}
51846/**
51847 * List Type Wrapper
51848 *
51849 * A list is a wrapping type which points to another type.
51850 * Lists are often created within the context of defining the fields of
51851 * an object type.
51852 *
51853 * Example:
51854 *
51855 *     const PersonType = new GraphQLObjectType({
51856 *       name: 'Person',
51857 *       fields: () => ({
51858 *         parents: { type: new GraphQLList(PersonType) },
51859 *         children: { type: new GraphQLList(PersonType) },
51860 *       })
51861 *     })
51862 *
51863 */
51864// FIXME: workaround to fix issue with Babel parser
51865
51866/* ::
51867declare class GraphQLList<+T: GraphQLType> {
51868  +ofType: T;
51869  static <T>(ofType: T): GraphQLList<T>;
51870  // Note: constructors cannot be used for covariant types. Drop the "new".
51871  constructor(ofType: GraphQLType): void;
51872}
51873*/
51874
51875function GraphQLList(ofType) {
51876  // istanbul ignore else (to be removed in v16.0.0)
51877  if (this instanceof GraphQLList) {
51878    this.ofType = assertType(ofType);
51879  } else {
51880    return new GraphQLList(ofType);
51881  }
51882} // Need to cast through any to alter the prototype.
51883
51884GraphQLList.prototype.toString = function toString() {
51885  return '[' + String(this.ofType) + ']';
51886};
51887
51888GraphQLList.prototype.toJSON = function toJSON() {
51889  return this.toString();
51890};
51891
51892Object.defineProperty(GraphQLList.prototype, symbols["c" /* SYMBOL_TO_STRING_TAG */], {
51893  get: function get() {
51894    return 'GraphQLList';
51895  }
51896}); // Print a simplified form when appearing in `inspect` and `util.inspect`.
51897
51898Object(defineInspect["a" /* default */])(GraphQLList);
51899/**
51900 * Non-Null Type Wrapper
51901 *
51902 * A non-null is a wrapping type which points to another type.
51903 * Non-null types enforce that their values are never null and can ensure
51904 * an error is raised if this ever occurs during a request. It is useful for
51905 * fields which you can make a strong guarantee on non-nullability, for example
51906 * usually the id field of a database row will never be null.
51907 *
51908 * Example:
51909 *
51910 *     const RowType = new GraphQLObjectType({
51911 *       name: 'Row',
51912 *       fields: () => ({
51913 *         id: { type: new GraphQLNonNull(GraphQLString) },
51914 *       })
51915 *     })
51916 *
51917 * Note: the enforcement of non-nullability occurs within the executor.
51918 */
51919// FIXME: workaround to fix issue with Babel parser
51920
51921/* ::
51922declare class GraphQLNonNull<+T: GraphQLNullableType> {
51923  +ofType: T;
51924  static <T>(ofType: T): GraphQLNonNull<T>;
51925  // Note: constructors cannot be used for covariant types. Drop the "new".
51926  constructor(ofType: GraphQLType): void;
51927}
51928*/
51929
51930function GraphQLNonNull(ofType) {
51931  // istanbul ignore else (to be removed in v16.0.0)
51932  if (this instanceof GraphQLNonNull) {
51933    this.ofType = assertNullableType(ofType);
51934  } else {
51935    return new GraphQLNonNull(ofType);
51936  }
51937} // Need to cast through any to alter the prototype.
51938
51939GraphQLNonNull.prototype.toString = function toString() {
51940  return String(this.ofType) + '!';
51941};
51942
51943GraphQLNonNull.prototype.toJSON = function toJSON() {
51944  return this.toString();
51945};
51946
51947Object.defineProperty(GraphQLNonNull.prototype, symbols["c" /* SYMBOL_TO_STRING_TAG */], {
51948  get: function get() {
51949    return 'GraphQLNonNull';
51950  }
51951}); // Print a simplified form when appearing in `inspect` and `util.inspect`.
51952
51953Object(defineInspect["a" /* default */])(GraphQLNonNull);
51954/**
51955 * These types wrap and modify other types
51956 */
51957
51958function isWrappingType(type) {
51959  return isListType(type) || isNonNullType(type);
51960}
51961function assertWrappingType(type) {
51962  if (!isWrappingType(type)) {
51963    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL wrapping type."));
51964  }
51965
51966  return type;
51967}
51968/**
51969 * These types can all accept null as a value.
51970 */
51971
51972function isNullableType(type) {
51973  return isType(type) && !isNonNullType(type);
51974}
51975function assertNullableType(type) {
51976  if (!isNullableType(type)) {
51977    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL nullable type."));
51978  }
51979
51980  return type;
51981}
51982/* eslint-disable no-redeclare */
51983
51984function getNullableType(type) {
51985  /* eslint-enable no-redeclare */
51986  if (type) {
51987    return isNonNullType(type) ? type.ofType : type;
51988  }
51989}
51990/**
51991 * These named types do not include modifiers like List or NonNull.
51992 */
51993
51994function isNamedType(type) {
51995  return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type);
51996}
51997function assertNamedType(type) {
51998  if (!isNamedType(type)) {
51999    throw new Error("Expected ".concat(Object(inspect["a" /* default */])(type), " to be a GraphQL named type."));
52000  }
52001
52002  return type;
52003}
52004/* eslint-disable no-redeclare */
52005
52006function getNamedType(type) {
52007  /* eslint-enable no-redeclare */
52008  if (type) {
52009    var unwrappedType = type;
52010
52011    while (isWrappingType(unwrappedType)) {
52012      unwrappedType = unwrappedType.ofType;
52013    }
52014
52015    return unwrappedType;
52016  }
52017}
52018/**
52019 * Used while defining GraphQL types to allow for circular references in
52020 * otherwise immutable type definitions.
52021 */
52022
52023function resolveThunk(thunk) {
52024  // $FlowFixMe[incompatible-use]
52025  return typeof thunk === 'function' ? thunk() : thunk;
52026}
52027
52028function undefineIfEmpty(arr) {
52029  return arr && arr.length > 0 ? arr : undefined;
52030}
52031/**
52032 * Scalar Type Definition
52033 *
52034 * The leaf values of any request and input values to arguments are
52035 * Scalars (or Enums) and are defined with a name and a series of functions
52036 * used to parse input from ast or variables and to ensure validity.
52037 *
52038 * If a type's serialize function does not return a value (i.e. it returns
52039 * `undefined`) then an error will be raised and a `null` value will be returned
52040 * in the response. If the serialize function returns `null`, then no error will
52041 * be included in the response.
52042 *
52043 * Example:
52044 *
52045 *     const OddType = new GraphQLScalarType({
52046 *       name: 'Odd',
52047 *       serialize(value) {
52048 *         if (value % 2 === 1) {
52049 *           return value;
52050 *         }
52051 *       }
52052 *     });
52053 *
52054 */
52055
52056
52057var definition_GraphQLScalarType = /*#__PURE__*/function () {
52058  function GraphQLScalarType(config) {
52059    var _config$parseValue, _config$serialize, _config$parseLiteral;
52060
52061    var parseValue = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : identityFunc;
52062    this.name = config.name;
52063    this.description = config.description;
52064    this.specifiedByUrl = config.specifiedByUrl;
52065    this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : identityFunc;
52066    this.parseValue = parseValue;
52067    this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function (node, variables) {
52068      return parseValue(Object(valueFromASTUntyped["a" /* valueFromASTUntyped */])(node, variables));
52069    };
52070    this.extensions = config.extensions && Object(toObjMap["a" /* default */])(config.extensions);
52071    this.astNode = config.astNode;
52072    this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);
52073    typeof config.name === 'string' || Object(devAssert["a" /* default */])(0, 'Must provide name.');
52074    config.specifiedByUrl == null || typeof config.specifiedByUrl === 'string' || Object(devAssert["a" /* default */])(0, "".concat(this.name, " must provide \"specifiedByUrl\" as a string, ") + "but got: ".concat(Object(inspect["a" /* default */])(config.specifiedByUrl), "."));
52075    config.serialize == null || typeof config.serialize === 'function' || Object(devAssert["a" /* default */])(0, "".concat(this.name, " must provide \"serialize\" function. If this custom Scalar is also used as an input type, ensure \"parseValue\" and \"parseLiteral\" functions are also provided."));
52076
52077    if (config.parseLiteral) {
52078      typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function' || Object(devAssert["a" /* default */])(0, "".concat(this.name, " must provide both \"parseValue\" and \"parseLiteral\" functions."));
52079    }
52080  }
52081
52082  var _proto = GraphQLScalarType.prototype;
52083
52084  _proto.toConfig = function toConfig() {
52085    var _this$extensionASTNod;
52086
52087    return {
52088      name: this.name,
52089      description: this.description,
52090      specifiedByUrl: this.specifiedByUrl,
52091      serialize: this.serialize,
52092      parseValue: this.parseValue,
52093      parseLiteral: this.parseLiteral,
52094      extensions: this.extensions,
52095      astNode: this.astNode,
52096      extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []
52097    };
52098  };
52099
52100  _proto.toString = function toString() {
52101    return this.name;
52102  };
52103
52104  _proto.toJSON = function toJSON() {
52105    return this.toString();
52106  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
52107  ;
52108
52109  _createClass(GraphQLScalarType, [{
52110    key: symbols["c" /* SYMBOL_TO_STRING_TAG */],
52111    get: function get() {
52112      return 'GraphQLScalarType';
52113    }
52114  }]);
52115
52116  return GraphQLScalarType;
52117}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
52118
52119Object(defineInspect["a" /* default */])(definition_GraphQLScalarType);
52120
52121/**
52122 * Object Type Definition
52123 *
52124 * Almost all of the GraphQL types you define will be object types. Object types
52125 * have a name, but most importantly describe their fields.
52126 *
52127 * Example:
52128 *
52129 *     const AddressType = new GraphQLObjectType({
52130 *       name: 'Address',
52131 *       fields: {
52132 *         street: { type: GraphQLString },
52133 *         number: { type: GraphQLInt },
52134 *         formatted: {
52135 *           type: GraphQLString,
52136 *           resolve(obj) {
52137 *             return obj.number + ' ' + obj.street
52138 *           }
52139 *         }
52140 *       }
52141 *     });
52142 *
52143 * When two types need to refer to each other, or a type needs to refer to
52144 * itself in a field, you can use a function expression (aka a closure or a
52145 * thunk) to supply the fields lazily.
52146 *
52147 * Example:
52148 *
52149 *     const PersonType = new GraphQLObjectType({
52150 *       name: 'Person',
52151 *       fields: () => ({
52152 *         name: { type: GraphQLString },
52153 *         bestFriend: { type: PersonType },
52154 *       })
52155 *     });
52156 *
52157 */
52158var definition_GraphQLObjectType = /*#__PURE__*/function () {
52159  function GraphQLObjectType(config) {
52160    this.name = config.name;
52161    this.description = config.description;
52162    this.isTypeOf = config.isTypeOf;
52163    this.extensions = config.extensions && Object(toObjMap["a" /* default */])(config.extensions);
52164    this.astNode = config.astNode;
52165    this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);
52166    this._fields = defineFieldMap.bind(undefined, config);
52167    this._interfaces = defineInterfaces.bind(undefined, config);
52168    typeof config.name === 'string' || Object(devAssert["a" /* default */])(0, 'Must provide name.');
52169    config.isTypeOf == null || typeof config.isTypeOf === 'function' || Object(devAssert["a" /* default */])(0, "".concat(this.name, " must provide \"isTypeOf\" as a function, ") + "but got: ".concat(Object(inspect["a" /* default */])(config.isTypeOf), "."));
52170  }
52171
52172  var _proto2 = GraphQLObjectType.prototype;
52173
52174  _proto2.getFields = function getFields() {
52175    if (typeof this._fields === 'function') {
52176      this._fields = this._fields();
52177    }
52178
52179    return this._fields;
52180  };
52181
52182  _proto2.getInterfaces = function getInterfaces() {
52183    if (typeof this._interfaces === 'function') {
52184      this._interfaces = this._interfaces();
52185    }
52186
52187    return this._interfaces;
52188  };
52189
52190  _proto2.toConfig = function toConfig() {
52191    return {
52192      name: this.name,
52193      description: this.description,
52194      interfaces: this.getInterfaces(),
52195      fields: fieldsToFieldsConfig(this.getFields()),
52196      isTypeOf: this.isTypeOf,
52197      extensions: this.extensions,
52198      astNode: this.astNode,
52199      extensionASTNodes: this.extensionASTNodes || []
52200    };
52201  };
52202
52203  _proto2.toString = function toString() {
52204    return this.name;
52205  };
52206
52207  _proto2.toJSON = function toJSON() {
52208    return this.toString();
52209  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
52210  ;
52211
52212  _createClass(GraphQLObjectType, [{
52213    key: symbols["c" /* SYMBOL_TO_STRING_TAG */],
52214    get: function get() {
52215      return 'GraphQLObjectType';
52216    }
52217  }]);
52218
52219  return GraphQLObjectType;
52220}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
52221
52222Object(defineInspect["a" /* default */])(definition_GraphQLObjectType);
52223
52224function defineInterfaces(config) {
52225  var _resolveThunk;
52226
52227  var interfaces = (_resolveThunk = resolveThunk(config.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];
52228  Array.isArray(interfaces) || Object(devAssert["a" /* default */])(0, "".concat(config.name, " interfaces must be an Array or a function which returns an Array."));
52229  return interfaces;
52230}
52231
52232function defineFieldMap(config) {
52233  var fieldMap = resolveThunk(config.fields);
52234  isPlainObj(fieldMap) || Object(devAssert["a" /* default */])(0, "".concat(config.name, " fields must be an object with field names as keys or a function which returns such an object."));
52235  return Object(mapValue["a" /* default */])(fieldMap, function (fieldConfig, fieldName) {
52236    var _fieldConfig$args;
52237
52238    isPlainObj(fieldConfig) || Object(devAssert["a" /* default */])(0, "".concat(config.name, ".").concat(fieldName, " field config must be an object."));
52239    !('isDeprecated' in fieldConfig) || Object(devAssert["a" /* default */])(0, "".concat(config.name, ".").concat(fieldName, " should provide \"deprecationReason\" instead of \"isDeprecated\"."));
52240    fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || Object(devAssert["a" /* default */])(0, "".concat(config.name, ".").concat(fieldName, " field resolver must be a function if ") + "provided, but got: ".concat(Object(inspect["a" /* default */])(fieldConfig.resolve), "."));
52241    var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};
52242    isPlainObj(argsConfig) || Object(devAssert["a" /* default */])(0, "".concat(config.name, ".").concat(fieldName, " args must be an object with argument names as keys."));
52243    var args = Object(objectEntries["a" /* default */])(argsConfig).map(function (_ref) {
52244      var argName = _ref[0],
52245          argConfig = _ref[1];
52246      return {
52247        name: argName,
52248        description: argConfig.description,
52249        type: argConfig.type,
52250        defaultValue: argConfig.defaultValue,
52251        deprecationReason: argConfig.deprecationReason,
52252        extensions: argConfig.extensions && Object(toObjMap["a" /* default */])(argConfig.extensions),
52253        astNode: argConfig.astNode
52254      };
52255    });
52256    return {
52257      name: fieldName,
52258      description: fieldConfig.description,
52259      type: fieldConfig.type,
52260      args: args,
52261      resolve: fieldConfig.resolve,
52262      subscribe: fieldConfig.subscribe,
52263      isDeprecated: fieldConfig.deprecationReason != null,
52264      deprecationReason: fieldConfig.deprecationReason,
52265      extensions: fieldConfig.extensions && Object(toObjMap["a" /* default */])(fieldConfig.extensions),
52266      astNode: fieldConfig.astNode
52267    };
52268  });
52269}
52270
52271function isPlainObj(obj) {
52272  return Object(isObjectLike["a" /* default */])(obj) && !Array.isArray(obj);
52273}
52274
52275function fieldsToFieldsConfig(fields) {
52276  return Object(mapValue["a" /* default */])(fields, function (field) {
52277    return {
52278      description: field.description,
52279      type: field.type,
52280      args: argsToArgsConfig(field.args),
52281      resolve: field.resolve,
52282      subscribe: field.subscribe,
52283      deprecationReason: field.deprecationReason,
52284      extensions: field.extensions,
52285      astNode: field.astNode
52286    };
52287  });
52288}
52289/**
52290 * @internal
52291 */
52292
52293
52294function argsToArgsConfig(args) {
52295  return Object(keyValMap["a" /* default */])(args, function (arg) {
52296    return arg.name;
52297  }, function (arg) {
52298    return {
52299      description: arg.description,
52300      type: arg.type,
52301      defaultValue: arg.defaultValue,
52302      deprecationReason: arg.deprecationReason,
52303      extensions: arg.extensions,
52304      astNode: arg.astNode
52305    };
52306  });
52307}
52308function isRequiredArgument(arg) {
52309  return isNonNullType(arg.type) && arg.defaultValue === undefined;
52310}
52311
52312/**
52313 * Interface Type Definition
52314 *
52315 * When a field can return one of a heterogeneous set of types, a Interface type
52316 * is used to describe what types are possible, what fields are in common across
52317 * all types, as well as a function to determine which type is actually used
52318 * when the field is resolved.
52319 *
52320 * Example:
52321 *
52322 *     const EntityType = new GraphQLInterfaceType({
52323 *       name: 'Entity',
52324 *       fields: {
52325 *         name: { type: GraphQLString }
52326 *       }
52327 *     });
52328 *
52329 */
52330var definition_GraphQLInterfaceType = /*#__PURE__*/function () {
52331  function GraphQLInterfaceType(config) {
52332    this.name = config.name;
52333    this.description = config.description;
52334    this.resolveType = config.resolveType;
52335    this.extensions = config.extensions && Object(toObjMap["a" /* default */])(config.extensions);
52336    this.astNode = config.astNode;
52337    this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);
52338    this._fields = defineFieldMap.bind(undefined, config);
52339    this._interfaces = defineInterfaces.bind(undefined, config);
52340    typeof config.name === 'string' || Object(devAssert["a" /* default */])(0, 'Must provide name.');
52341    config.resolveType == null || typeof config.resolveType === 'function' || Object(devAssert["a" /* default */])(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat(Object(inspect["a" /* default */])(config.resolveType), "."));
52342  }
52343
52344  var _proto3 = GraphQLInterfaceType.prototype;
52345
52346  _proto3.getFields = function getFields() {
52347    if (typeof this._fields === 'function') {
52348      this._fields = this._fields();
52349    }
52350
52351    return this._fields;
52352  };
52353
52354  _proto3.getInterfaces = function getInterfaces() {
52355    if (typeof this._interfaces === 'function') {
52356      this._interfaces = this._interfaces();
52357    }
52358
52359    return this._interfaces;
52360  };
52361
52362  _proto3.toConfig = function toConfig() {
52363    var _this$extensionASTNod2;
52364
52365    return {
52366      name: this.name,
52367      description: this.description,
52368      interfaces: this.getInterfaces(),
52369      fields: fieldsToFieldsConfig(this.getFields()),
52370      resolveType: this.resolveType,
52371      extensions: this.extensions,
52372      astNode: this.astNode,
52373      extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []
52374    };
52375  };
52376
52377  _proto3.toString = function toString() {
52378    return this.name;
52379  };
52380
52381  _proto3.toJSON = function toJSON() {
52382    return this.toString();
52383  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
52384  ;
52385
52386  _createClass(GraphQLInterfaceType, [{
52387    key: symbols["c" /* SYMBOL_TO_STRING_TAG */],
52388    get: function get() {
52389      return 'GraphQLInterfaceType';
52390    }
52391  }]);
52392
52393  return GraphQLInterfaceType;
52394}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
52395
52396Object(defineInspect["a" /* default */])(definition_GraphQLInterfaceType);
52397
52398/**
52399 * Union Type Definition
52400 *
52401 * When a field can return one of a heterogeneous set of types, a Union type
52402 * is used to describe what types are possible as well as providing a function
52403 * to determine which type is actually used when the field is resolved.
52404 *
52405 * Example:
52406 *
52407 *     const PetType = new GraphQLUnionType({
52408 *       name: 'Pet',
52409 *       types: [ DogType, CatType ],
52410 *       resolveType(value) {
52411 *         if (value instanceof Dog) {
52412 *           return DogType;
52413 *         }
52414 *         if (value instanceof Cat) {
52415 *           return CatType;
52416 *         }
52417 *       }
52418 *     });
52419 *
52420 */
52421var definition_GraphQLUnionType = /*#__PURE__*/function () {
52422  function GraphQLUnionType(config) {
52423    this.name = config.name;
52424    this.description = config.description;
52425    this.resolveType = config.resolveType;
52426    this.extensions = config.extensions && Object(toObjMap["a" /* default */])(config.extensions);
52427    this.astNode = config.astNode;
52428    this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);
52429    this._types = defineTypes.bind(undefined, config);
52430    typeof config.name === 'string' || Object(devAssert["a" /* default */])(0, 'Must provide name.');
52431    config.resolveType == null || typeof config.resolveType === 'function' || Object(devAssert["a" /* default */])(0, "".concat(this.name, " must provide \"resolveType\" as a function, ") + "but got: ".concat(Object(inspect["a" /* default */])(config.resolveType), "."));
52432  }
52433
52434  var _proto4 = GraphQLUnionType.prototype;
52435
52436  _proto4.getTypes = function getTypes() {
52437    if (typeof this._types === 'function') {
52438      this._types = this._types();
52439    }
52440
52441    return this._types;
52442  };
52443
52444  _proto4.toConfig = function toConfig() {
52445    var _this$extensionASTNod3;
52446
52447    return {
52448      name: this.name,
52449      description: this.description,
52450      types: this.getTypes(),
52451      resolveType: this.resolveType,
52452      extensions: this.extensions,
52453      astNode: this.astNode,
52454      extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []
52455    };
52456  };
52457
52458  _proto4.toString = function toString() {
52459    return this.name;
52460  };
52461
52462  _proto4.toJSON = function toJSON() {
52463    return this.toString();
52464  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
52465  ;
52466
52467  _createClass(GraphQLUnionType, [{
52468    key: symbols["c" /* SYMBOL_TO_STRING_TAG */],
52469    get: function get() {
52470      return 'GraphQLUnionType';
52471    }
52472  }]);
52473
52474  return GraphQLUnionType;
52475}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
52476
52477Object(defineInspect["a" /* default */])(definition_GraphQLUnionType);
52478
52479function defineTypes(config) {
52480  var types = resolveThunk(config.types);
52481  Array.isArray(types) || Object(devAssert["a" /* default */])(0, "Must provide Array of types or a function which returns such an array for Union ".concat(config.name, "."));
52482  return types;
52483}
52484
52485/**
52486 * Enum Type Definition
52487 *
52488 * Some leaf values of requests and input values are Enums. GraphQL serializes
52489 * Enum values as strings, however internally Enums can be represented by any
52490 * kind of type, often integers.
52491 *
52492 * Example:
52493 *
52494 *     const RGBType = new GraphQLEnumType({
52495 *       name: 'RGB',
52496 *       values: {
52497 *         RED: { value: 0 },
52498 *         GREEN: { value: 1 },
52499 *         BLUE: { value: 2 }
52500 *       }
52501 *     });
52502 *
52503 * Note: If a value is not provided in a definition, the name of the enum value
52504 * will be used as its internal value.
52505 */
52506var definition_GraphQLEnumType
52507/* <T> */
52508= /*#__PURE__*/function () {
52509  function GraphQLEnumType(config) {
52510    this.name = config.name;
52511    this.description = config.description;
52512    this.extensions = config.extensions && Object(toObjMap["a" /* default */])(config.extensions);
52513    this.astNode = config.astNode;
52514    this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);
52515    this._values = defineEnumValues(this.name, config.values);
52516    this._valueLookup = new Map(this._values.map(function (enumValue) {
52517      return [enumValue.value, enumValue];
52518    }));
52519    this._nameLookup = Object(keyMap["a" /* default */])(this._values, function (value) {
52520      return value.name;
52521    });
52522    typeof config.name === 'string' || Object(devAssert["a" /* default */])(0, 'Must provide name.');
52523  }
52524
52525  var _proto5 = GraphQLEnumType.prototype;
52526
52527  _proto5.getValues = function getValues() {
52528    return this._values;
52529  };
52530
52531  _proto5.getValue = function getValue(name) {
52532    return this._nameLookup[name];
52533  };
52534
52535  _proto5.serialize = function serialize(outputValue) {
52536    var enumValue = this._valueLookup.get(outputValue);
52537
52538    if (enumValue === undefined) {
52539      throw new GraphQLError["a" /* GraphQLError */]("Enum \"".concat(this.name, "\" cannot represent value: ").concat(Object(inspect["a" /* default */])(outputValue)));
52540    }
52541
52542    return enumValue.name;
52543  };
52544
52545  _proto5.parseValue = function parseValue(inputValue)
52546  /* T */
52547  {
52548    if (typeof inputValue !== 'string') {
52549      var valueStr = Object(inspect["a" /* default */])(inputValue);
52550      throw new GraphQLError["a" /* GraphQLError */]("Enum \"".concat(this.name, "\" cannot represent non-string value: ").concat(valueStr, ".") + didYouMeanEnumValue(this, valueStr));
52551    }
52552
52553    var enumValue = this.getValue(inputValue);
52554
52555    if (enumValue == null) {
52556      throw new GraphQLError["a" /* GraphQLError */]("Value \"".concat(inputValue, "\" does not exist in \"").concat(this.name, "\" enum.") + didYouMeanEnumValue(this, inputValue));
52557    }
52558
52559    return enumValue.value;
52560  };
52561
52562  _proto5.parseLiteral = function parseLiteral(valueNode, _variables)
52563  /* T */
52564  {
52565    // Note: variables will be resolved to a value before calling this function.
52566    if (valueNode.kind !== kinds["a" /* Kind */].ENUM) {
52567      var valueStr = Object(printer["a" /* print */])(valueNode);
52568      throw new GraphQLError["a" /* GraphQLError */]("Enum \"".concat(this.name, "\" cannot represent non-enum value: ").concat(valueStr, ".") + didYouMeanEnumValue(this, valueStr), valueNode);
52569    }
52570
52571    var enumValue = this.getValue(valueNode.value);
52572
52573    if (enumValue == null) {
52574      var _valueStr = Object(printer["a" /* print */])(valueNode);
52575
52576      throw new GraphQLError["a" /* GraphQLError */]("Value \"".concat(_valueStr, "\" does not exist in \"").concat(this.name, "\" enum.") + didYouMeanEnumValue(this, _valueStr), valueNode);
52577    }
52578
52579    return enumValue.value;
52580  };
52581
52582  _proto5.toConfig = function toConfig() {
52583    var _this$extensionASTNod4;
52584
52585    var values = Object(keyValMap["a" /* default */])(this.getValues(), function (value) {
52586      return value.name;
52587    }, function (value) {
52588      return {
52589        description: value.description,
52590        value: value.value,
52591        deprecationReason: value.deprecationReason,
52592        extensions: value.extensions,
52593        astNode: value.astNode
52594      };
52595    });
52596    return {
52597      name: this.name,
52598      description: this.description,
52599      values: values,
52600      extensions: this.extensions,
52601      astNode: this.astNode,
52602      extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []
52603    };
52604  };
52605
52606  _proto5.toString = function toString() {
52607    return this.name;
52608  };
52609
52610  _proto5.toJSON = function toJSON() {
52611    return this.toString();
52612  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
52613  ;
52614
52615  _createClass(GraphQLEnumType, [{
52616    key: symbols["c" /* SYMBOL_TO_STRING_TAG */],
52617    get: function get() {
52618      return 'GraphQLEnumType';
52619    }
52620  }]);
52621
52622  return GraphQLEnumType;
52623}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
52624
52625Object(defineInspect["a" /* default */])(definition_GraphQLEnumType);
52626
52627function didYouMeanEnumValue(enumType, unknownValueStr) {
52628  var allNames = enumType.getValues().map(function (value) {
52629    return value.name;
52630  });
52631  var suggestedValues = Object(suggestionList["a" /* default */])(unknownValueStr, allNames);
52632  return Object(didYouMean["a" /* default */])('the enum value', suggestedValues);
52633}
52634
52635function defineEnumValues(typeName, valueMap) {
52636  isPlainObj(valueMap) || Object(devAssert["a" /* default */])(0, "".concat(typeName, " values must be an object with value names as keys."));
52637  return Object(objectEntries["a" /* default */])(valueMap).map(function (_ref2) {
52638    var valueName = _ref2[0],
52639        valueConfig = _ref2[1];
52640    isPlainObj(valueConfig) || Object(devAssert["a" /* default */])(0, "".concat(typeName, ".").concat(valueName, " must refer to an object with a \"value\" key ") + "representing an internal value but got: ".concat(Object(inspect["a" /* default */])(valueConfig), "."));
52641    !('isDeprecated' in valueConfig) || Object(devAssert["a" /* default */])(0, "".concat(typeName, ".").concat(valueName, " should provide \"deprecationReason\" instead of \"isDeprecated\"."));
52642    return {
52643      name: valueName,
52644      description: valueConfig.description,
52645      value: valueConfig.value !== undefined ? valueConfig.value : valueName,
52646      isDeprecated: valueConfig.deprecationReason != null,
52647      deprecationReason: valueConfig.deprecationReason,
52648      extensions: valueConfig.extensions && Object(toObjMap["a" /* default */])(valueConfig.extensions),
52649      astNode: valueConfig.astNode
52650    };
52651  });
52652}
52653
52654/**
52655 * Input Object Type Definition
52656 *
52657 * An input object defines a structured collection of fields which may be
52658 * supplied to a field argument.
52659 *
52660 * Using `NonNull` will ensure that a value must be provided by the query
52661 *
52662 * Example:
52663 *
52664 *     const GeoPoint = new GraphQLInputObjectType({
52665 *       name: 'GeoPoint',
52666 *       fields: {
52667 *         lat: { type: new GraphQLNonNull(GraphQLFloat) },
52668 *         lon: { type: new GraphQLNonNull(GraphQLFloat) },
52669 *         alt: { type: GraphQLFloat, defaultValue: 0 },
52670 *       }
52671 *     });
52672 *
52673 */
52674var definition_GraphQLInputObjectType = /*#__PURE__*/function () {
52675  function GraphQLInputObjectType(config) {
52676    this.name = config.name;
52677    this.description = config.description;
52678    this.extensions = config.extensions && Object(toObjMap["a" /* default */])(config.extensions);
52679    this.astNode = config.astNode;
52680    this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);
52681    this._fields = defineInputFieldMap.bind(undefined, config);
52682    typeof config.name === 'string' || Object(devAssert["a" /* default */])(0, 'Must provide name.');
52683  }
52684
52685  var _proto6 = GraphQLInputObjectType.prototype;
52686
52687  _proto6.getFields = function getFields() {
52688    if (typeof this._fields === 'function') {
52689      this._fields = this._fields();
52690    }
52691
52692    return this._fields;
52693  };
52694
52695  _proto6.toConfig = function toConfig() {
52696    var _this$extensionASTNod5;
52697
52698    var fields = Object(mapValue["a" /* default */])(this.getFields(), function (field) {
52699      return {
52700        description: field.description,
52701        type: field.type,
52702        defaultValue: field.defaultValue,
52703        extensions: field.extensions,
52704        astNode: field.astNode
52705      };
52706    });
52707    return {
52708      name: this.name,
52709      description: this.description,
52710      fields: fields,
52711      extensions: this.extensions,
52712      astNode: this.astNode,
52713      extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []
52714    };
52715  };
52716
52717  _proto6.toString = function toString() {
52718    return this.name;
52719  };
52720
52721  _proto6.toJSON = function toJSON() {
52722    return this.toString();
52723  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
52724  ;
52725
52726  _createClass(GraphQLInputObjectType, [{
52727    key: symbols["c" /* SYMBOL_TO_STRING_TAG */],
52728    get: function get() {
52729      return 'GraphQLInputObjectType';
52730    }
52731  }]);
52732
52733  return GraphQLInputObjectType;
52734}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
52735
52736Object(defineInspect["a" /* default */])(definition_GraphQLInputObjectType);
52737
52738function defineInputFieldMap(config) {
52739  var fieldMap = resolveThunk(config.fields);
52740  isPlainObj(fieldMap) || Object(devAssert["a" /* default */])(0, "".concat(config.name, " fields must be an object with field names as keys or a function which returns such an object."));
52741  return Object(mapValue["a" /* default */])(fieldMap, function (fieldConfig, fieldName) {
52742    !('resolve' in fieldConfig) || Object(devAssert["a" /* default */])(0, "".concat(config.name, ".").concat(fieldName, " field has a resolve property, but Input Types cannot define resolvers."));
52743    return {
52744      name: fieldName,
52745      description: fieldConfig.description,
52746      type: fieldConfig.type,
52747      defaultValue: fieldConfig.defaultValue,
52748      deprecationReason: fieldConfig.deprecationReason,
52749      extensions: fieldConfig.extensions && Object(toObjMap["a" /* default */])(fieldConfig.extensions),
52750      astNode: fieldConfig.astNode
52751    };
52752  });
52753}
52754
52755function isRequiredInputField(field) {
52756  return isNonNullType(field.type) && field.defaultValue === undefined;
52757}
52758
52759
52760/***/ }),
52761
52762/***/ "ayMG":
52763/***/ (function(module, exports, __webpack_require__) {
52764
52765"use strict";
52766
52767
52768var has = __webpack_require__("oNNP");
52769
52770var assertRecord = __webpack_require__("DELC");
52771
52772var Type = __webpack_require__("zOLO");
52773
52774// https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
52775
52776module.exports = function IsDataDescriptor(Desc) {
52777	if (typeof Desc === 'undefined') {
52778		return false;
52779	}
52780
52781	assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
52782
52783	if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {
52784		return false;
52785	}
52786
52787	return true;
52788};
52789
52790
52791/***/ }),
52792
52793/***/ "b0Ie":
52794/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
52795
52796"use strict";
52797/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ValuesOfCorrectTypeRule; });
52798/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1QEH");
52799/* harmony import */ var _jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("kBjl");
52800/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rWdj");
52801/* harmony import */ var _jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("pv/G");
52802/* harmony import */ var _jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("T95z");
52803/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("dWS+");
52804/* harmony import */ var _language_printer_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("dQau");
52805/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("axIb");
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815/**
52816 * Value literals of correct type
52817 *
52818 * A GraphQL document is only valid if all value literals are of the type
52819 * expected at their position.
52820 */
52821function ValuesOfCorrectTypeRule(context) {
52822  return {
52823    ListValue: function ListValue(node) {
52824      // Note: TypeInfo will traverse into a list's item type, so look to the
52825      // parent input type to check if it is a list.
52826      var type = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* getNullableType */ "B"])(context.getParentInputType());
52827
52828      if (!Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isListType */ "J"])(type)) {
52829        isValidValueNode(context, node);
52830        return false; // Don't traverse further.
52831      }
52832    },
52833    ObjectValue: function ObjectValue(node) {
52834      var type = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* getNamedType */ "A"])(context.getInputType());
52835
52836      if (!Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInputObjectType */ "F"])(type)) {
52837        isValidValueNode(context, node);
52838        return false; // Don't traverse further.
52839      } // Ensure every required field exists.
52840
52841
52842      var fieldNodeMap = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(node.fields, function (field) {
52843        return field.name.value;
52844      });
52845
52846      for (var _i2 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(type.getFields()); _i2 < _objectValues2.length; _i2++) {
52847        var fieldDef = _objectValues2[_i2];
52848        var fieldNode = fieldNodeMap[fieldDef.name];
52849
52850        if (!fieldNode && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isRequiredInputField */ "Q"])(fieldDef)) {
52851          var typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(fieldDef.type);
52852          context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_5__[/* GraphQLError */ "a"]("Field \"".concat(type.name, ".").concat(fieldDef.name, "\" of required type \"").concat(typeStr, "\" was not provided."), node));
52853        }
52854      }
52855    },
52856    ObjectField: function ObjectField(node) {
52857      var parentType = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* getNamedType */ "A"])(context.getParentInputType());
52858      var fieldType = context.getInputType();
52859
52860      if (!fieldType && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isInputObjectType */ "F"])(parentType)) {
52861        var suggestions = Object(_jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(node.name.value, Object.keys(parentType.getFields()));
52862        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_5__[/* GraphQLError */ "a"]("Field \"".concat(node.name.value, "\" is not defined by type \"").concat(parentType.name, "\".") + Object(_jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(suggestions), node));
52863      }
52864    },
52865    NullValue: function NullValue(node) {
52866      var type = context.getInputType();
52867
52868      if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isNonNullType */ "L"])(type)) {
52869        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_5__[/* GraphQLError */ "a"]("Expected value of type \"".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type), "\", found ").concat(Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_6__[/* print */ "a"])(node), "."), node));
52870      }
52871    },
52872    EnumValue: function EnumValue(node) {
52873      return isValidValueNode(context, node);
52874    },
52875    IntValue: function IntValue(node) {
52876      return isValidValueNode(context, node);
52877    },
52878    FloatValue: function FloatValue(node) {
52879      return isValidValueNode(context, node);
52880    },
52881    StringValue: function StringValue(node) {
52882      return isValidValueNode(context, node);
52883    },
52884    BooleanValue: function BooleanValue(node) {
52885      return isValidValueNode(context, node);
52886    }
52887  };
52888}
52889/**
52890 * Any value literal may be a valid representation of a Scalar, depending on
52891 * that scalar type.
52892 */
52893
52894function isValidValueNode(context, node) {
52895  // Report any error at the full type expected by the location.
52896  var locationType = context.getInputType();
52897
52898  if (!locationType) {
52899    return;
52900  }
52901
52902  var type = Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* getNamedType */ "A"])(locationType);
52903
52904  if (!Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_7__[/* isLeafType */ "I"])(type)) {
52905    var typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(locationType);
52906    context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_5__[/* GraphQLError */ "a"]("Expected value of type \"".concat(typeStr, "\", found ").concat(Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_6__[/* print */ "a"])(node), "."), node));
52907    return;
52908  } // Scalars and Enums determine if a literal value is valid via parseLiteral(),
52909  // which may throw or return an invalid value to indicate failure.
52910
52911
52912  try {
52913    var parseResult = type.parseLiteral(node, undefined
52914    /* variables */
52915    );
52916
52917    if (parseResult === undefined) {
52918      var _typeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(locationType);
52919
52920      context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_5__[/* GraphQLError */ "a"]("Expected value of type \"".concat(_typeStr, "\", found ").concat(Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_6__[/* print */ "a"])(node), "."), node));
52921    }
52922  } catch (error) {
52923    var _typeStr2 = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(locationType);
52924
52925    if (error instanceof _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_5__[/* GraphQLError */ "a"]) {
52926      context.reportError(error);
52927    } else {
52928      context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_5__[/* GraphQLError */ "a"]("Expected value of type \"".concat(_typeStr2, "\", found ").concat(Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_6__[/* print */ "a"])(node), "; ") + error.message, node, undefined, undefined, undefined, error));
52929    }
52930  }
52931}
52932
52933
52934/***/ }),
52935
52936/***/ "bs7P":
52937/***/ (function(module, exports, __webpack_require__) {
52938
52939"use strict";
52940
52941
52942var GetIntrinsic = __webpack_require__("AM7I");
52943
52944var $abs = GetIntrinsic('%Math.abs%');
52945
52946// http://262.ecma-international.org/5.1/#sec-5.2
52947
52948module.exports = function abs(x) {
52949	return $abs(x);
52950};
52951
52952
52953/***/ }),
52954
52955/***/ "cbkQ":
52956/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
52957
52958"use strict";
52959/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return extendSchema; });
52960/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return extendSchemaImpl; });
52961/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getDescription; });
52962/* harmony import */ var _polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1QEH");
52963/* harmony import */ var _jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("kBjl");
52964/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rWdj");
52965/* harmony import */ var _jsutils_mapValue_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Wzjs");
52966/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2C6G");
52967/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("t3R0");
52968/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("/jXB");
52969/* harmony import */ var _language_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("JvOi");
52970/* harmony import */ var _language_blockString_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("BLR7");
52971/* harmony import */ var _language_predicates_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("Xizt");
52972/* harmony import */ var _validation_validate_mjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("EkME");
52973/* harmony import */ var _execution_values_mjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("5XwX");
52974/* harmony import */ var _type_schema_mjs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("51nL");
52975/* harmony import */ var _type_scalars_mjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("19Hc");
52976/* harmony import */ var _type_introspection_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("LViu");
52977/* harmony import */ var _type_directives_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("4suF");
52978/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("axIb");
52979/* harmony import */ var _valueFromAST_mjs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("Mbdf");
52980function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
52981
52982function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); }
52982 else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
52983
52984function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005/**
53006 * Produces a new schema given an existing schema and a document which may
53007 * contain GraphQL type extensions and definitions. The original schema will
53008 * remain unaltered.
53009 *
53010 * Because a schema represents a graph of references, a schema cannot be
53011 * extended without effectively making an entire copy. We do not know until it's
53012 * too late if subgraphs remain unchanged.
53013 *
53014 * This algorithm copies the provided schema, applying extensions while
53015 * producing the copy. The original schema remains unaltered.
53016 *
53017 * Accepts options as a third argument:
53018 *
53019 *    - commentDescriptions:
53020 *        Provide true to use preceding comments as the description.
53021 *
53022 */
53023function extendSchema(schema, documentAST, options) {
53024  Object(_type_schema_mjs__WEBPACK_IMPORTED_MODULE_12__[/* assertSchema */ "b"])(schema);
53025  documentAST != null && documentAST.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].DOCUMENT || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(0, 'Must provide valid Document AST.');
53026
53027  if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {
53028    Object(_validation_validate_mjs__WEBPACK_IMPORTED_MODULE_10__[/* assertValidSDLExtension */ "b"])(documentAST, schema);
53029  }
53030
53031  var schemaConfig = schema.toConfig();
53032  var extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options);
53033  return schemaConfig === extendedConfig ? schema : new _type_schema_mjs__WEBPACK_IMPORTED_MODULE_12__[/* GraphQLSchema */ "a"](extendedConfig);
53034}
53035/**
53036 * @internal
53037 */
53038
53039function extendSchemaImpl(schemaConfig, documentAST, options) {
53040  var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid;
53041
53042  // Collect the type definitions and extensions found in the document.
53043  var typeDefs = [];
53044  var typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can
53045  // have the same name. For example, a type named "skip".
53046
53047  var directiveDefs = [];
53048  var schemaDef; // Schema extensions are collected which may add additional operation types.
53049
53050  var schemaExtensions = [];
53051
53052  for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) {
53053    var def = _documentAST$definiti2[_i2];
53054
53055    if (def.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].SCHEMA_DEFINITION) {
53056      schemaDef = def;
53057    } else if (def.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].SCHEMA_EXTENSION) {
53058      schemaExtensions.push(def);
53059    } else if (Object(_language_predicates_mjs__WEBPACK_IMPORTED_MODULE_9__[/* isTypeDefinitionNode */ "d"])(def)) {
53060      typeDefs.push(def);
53061    } else if (Object(_language_predicates_mjs__WEBPACK_IMPORTED_MODULE_9__[/* isTypeExtensionNode */ "e"])(def)) {
53062      var extendedTypeName = def.name.value;
53063      var existingTypeExtensions = typeExtensionsMap[extendedTypeName];
53064      typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def];
53065    } else if (def.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].DIRECTIVE_DEFINITION) {
53066      directiveDefs.push(def);
53067    }
53068  } // If this document contains no new types, extensions, or directives then
53069  // return the same unmodified GraphQLSchema instance.
53070
53071
53072  if (Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null) {
53073    return schemaConfig;
53074  }
53075
53076  var typeMap = Object.create(null);
53077
53078  for (var _i4 = 0, _schemaConfig$types2 = schemaConfig.types; _i4 < _schemaConfig$types2.length; _i4++) {
53079    var existingType = _schemaConfig$types2[_i4];
53080    typeMap[existingType.name] = extendNamedType(existingType);
53081  }
53082
53083  for (var _i6 = 0; _i6 < typeDefs.length; _i6++) {
53084    var _stdTypeMap$name;
53085
53086    var typeNode = typeDefs[_i6];
53087    var name = typeNode.name.value;
53088    typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode);
53089  }
53090
53091  var operationTypes = _objectSpread(_objectSpread({
53092    // Get the extended root operation types.
53093    query: schemaConfig.query && replaceNamedType(schemaConfig.query),
53094    mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation),
53095    subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription)
53096  }, schemaDef && getOperationTypes([schemaDef])), getOperationTypes(schemaExtensions)); // Then produce and return a Schema config with these types.
53097
53098
53099  return _objectSpread(_objectSpread({
53100    description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value
53101  }, operationTypes), {}, {
53102    types: Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(typeMap),
53103    directives: [].concat(schemaConfig.directives.map(replaceDirective), directiveDefs.map(buildDirective)),
53104    extensions: undefined,
53105    astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode,
53106    extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions),
53107    assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false
53108  }); // Below are functions used for producing this schema that have closed over
53109  // this scope and have access to the schema, cache, and newly defined types.
53110
53111  function replaceType(type) {
53112    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* isListType */ "J"])(type)) {
53113      // $FlowFixMe[incompatible-return]
53114      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLList */ "d"](replaceType(type.ofType));
53115    }
53116
53117    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* isNonNullType */ "L"])(type)) {
53118      // $FlowFixMe[incompatible-return]
53119      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLNonNull */ "e"](replaceType(type.ofType));
53120    }
53121
53122    return replaceNamedType(type);
53123  }
53124
53125  function replaceNamedType(type) {
53126    // Note: While this could make early assertions to get the correctly
53127    // typed values, that would throw immediately while type system
53128    // validation with validateSchema() will produce more actionable results.
53129    return typeMap[type.name];
53130  }
53131
53132  function replaceDirective(directive) {
53133    var config = directive.toConfig();
53134    return new _type_directives_mjs__WEBPACK_IMPORTED_MODULE_15__[/* GraphQLDirective */ "c"](_objectSpread(_objectSpread({}, config), {}, {
53135      args: Object(_jsutils_mapValue_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(config.args, extendArg)
53136    }));
53137  }
53138
53139  function extendNamedType(type) {
53140    if (Object(_type_introspection_mjs__WEBPACK_IMPORTED_MODULE_14__[/* isIntrospectionType */ "n"])(type) || Object(_type_scalars_mjs__WEBPACK_IMPORTED_MODULE_13__[/* isSpecifiedScalarType */ "f"])(type)) {
53141      // Builtin types are not extended.
53142      return type;
53143    }
53144
53145    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* isScalarType */ "R"])(type)) {
53146      return extendScalarType(type);
53147    }
53148
53149    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* isObjectType */ "N"])(type)) {
53150      return extendObjectType(type);
53151    }
53152
53153    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* isInterfaceType */ "H"])(type)) {
53154      return extendInterfaceType(type);
53155    }
53156
53157    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* isUnionType */ "T"])(type)) {
53158      return extendUnionType(type);
53159    }
53160
53161    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* isEnumType */ "E"])(type)) {
53162      return extendEnumType(type);
53163    } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
53164
53165
53166    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* isInputObjectType */ "F"])(type)) {
53167      return extendInputObjectType(type);
53168    } // istanbul ignore next (Not reachable. All possible types have been considered)
53169
53170
53171     false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Unexpected type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type));
53172  }
53173
53174  function extendInputObjectType(type) {
53175    var _typeExtensionsMap$co;
53176
53177    var config = type.toConfig();
53178    var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];
53179    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLInputObjectType */ "b"](_objectSpread(_objectSpread({}, config), {}, {
53180      fields: function fields() {
53181        return _objectSpread(_objectSpread({}, Object(_jsutils_mapValue_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(config.fields, function (field) {
53182          return _objectSpread(_objectSpread({}, field), {}, {
53183            type: replaceType(field.type)
53184          });
53185        })), buildInputFieldMap(extensions));
53186      },
53187      extensionASTNodes: config.extensionASTNodes.concat(extensions)
53188    }));
53189  }
53190
53191  function extendEnumType(type) {
53192    var _typeExtensionsMap$ty;
53193
53194    var config = type.toConfig();
53195    var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];
53196    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLEnumType */ "a"](_objectSpread(_objectSpread({}, config), {}, {
53197      values: _objectSpread(_objectSpread({}, config.values), buildEnumValueMap(extensions)),
53198      extensionASTNodes: config.extensionASTNodes.concat(extensions)
53199    }));
53200  }
53201
53202  function extendScalarType(type) {
53203    var _typeExtensionsMap$co2;
53204
53205    var config = type.toConfig();
53206    var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];
53207    var specifiedByUrl = config.specifiedByUrl;
53208
53209    for (var _i8 = 0; _i8 < extensions.length; _i8++) {
53210      var _getSpecifiedByUrl;
53211
53212      var extensionNode = extensions[_i8];
53213      specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;
53214    }
53215
53216    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLScalarType */ "g"](_objectSpread(_objectSpread({}, config), {}, {
53217      specifiedByUrl: specifiedByUrl,
53218      extensionASTNodes: config.extensionASTNodes.concat(extensions)
53219    }));
53220  }
53221
53222  function extendObjectType(type) {
53223    var _typeExtensionsMap$co3;
53224
53225    var config = type.toConfig();
53226    var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];
53227    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLObjectType */ "f"](_objectSpread(_objectSpread({}, config), {}, {
53228      interfaces: function interfaces() {
53229        return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
53230      },
53231      fields: function fields() {
53232        return _objectSpread(_objectSpread({}, Object(_jsutils_mapValue_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(config.fields, extendField)), buildFieldMap(extensions));
53233      },
53234      extensionASTNodes: config.extensionASTNodes.concat(extensions)
53235    }));
53236  }
53237
53238  function extendInterfaceType(type) {
53239    var _typeExtensionsMap$co4;
53240
53241    var config = type.toConfig();
53242    var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];
53243    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLInterfaceType */ "c"](_objectSpread(_objectSpread({}, config), {}, {
53244      interfaces: function interfaces() {
53245        return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));
53246      },
53247      fields: function fields() {
53248        return _objectSpread(_objectSpread({}, Object(_jsutils_mapValue_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(config.fields, extendField)), buildFieldMap(extensions));
53249      },
53250      extensionASTNodes: config.extensionASTNodes.concat(extensions)
53251    }));
53252  }
53253
53254  function extendUnionType(type) {
53255    var _typeExtensionsMap$co5;
53256
53257    var config = type.toConfig();
53258    var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];
53259    return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLUnionType */ "h"](_objectSpread(_objectSpread({}, config), {}, {
53260      types: function types() {
53261        return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));
53262      },
53263      extensionASTNodes: config.extensionASTNodes.concat(extensions)
53264    }));
53265  }
53266
53267  function extendField(field) {
53268    return _objectSpread(_objectSpread({}, field), {}, {
53269      type: replaceType(field.type),
53270      // $FlowFixMe[incompatible-call]
53271      args: Object(_jsutils_mapValue_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(field.args, extendArg)
53272    });
53273  }
53274
53275  function extendArg(arg) {
53276    return _objectSpread(_objectSpread({}, arg), {}, {
53277      type: replaceType(arg.type)
53278    });
53279  }
53280
53281  function getOperationTypes(nodes) {
53282    var opTypes = {};
53283
53284    for (var _i10 = 0; _i10 < nodes.length; _i10++) {
53285      var _node$operationTypes;
53286
53287      var node = nodes[_i10];
53288      // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
53289      var operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];
53290
53291      for (var _i12 = 0; _i12 < operationTypesNodes.length; _i12++) {
53292        var operationType = operationTypesNodes[_i12];
53293        opTypes[operationType.operation] = getNamedType(operationType.type);
53294      }
53295    } // Note: While this could make early assertions to get the correctly
53296    // typed values below, that would throw immediately while type system
53297    // validation with validateSchema() will produce more actionable results.
53298
53299
53300    return opTypes;
53301  }
53302
53303  function getNamedType(node) {
53304    var _stdTypeMap$name2;
53305
53306    var name = node.name.value;
53307    var type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name];
53308
53309    if (type === undefined) {
53310      throw new Error("Unknown type: \"".concat(name, "\"."));
53311    }
53312
53313    return type;
53314  }
53315
53316  function getWrappedType(node) {
53317    if (node.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].LIST_TYPE) {
53318      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLList */ "d"](getWrappedType(node.type));
53319    }
53320
53321    if (node.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].NON_NULL_TYPE) {
53322      return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLNonNull */ "e"](getWrappedType(node.type));
53323    }
53324
53325    return getNamedType(node);
53326  }
53327
53328  function buildDirective(node) {
53329    var locations = node.locations.map(function (_ref) {
53330      var value = _ref.value;
53331      return value;
53332    });
53333    return new _type_directives_mjs__WEBPACK_IMPORTED_MODULE_15__[/* GraphQLDirective */ "c"]({
53334      name: node.name.value,
53335      description: getDescription(node, options),
53336      locations: locations,
53337      isRepeatable: node.repeatable,
53338      args: buildArgumentMap(node.arguments),
53339      astNode: node
53340    });
53341  }
53342
53343  function buildFieldMap(nodes) {
53344    var fieldConfigMap = Object.create(null);
53345
53346    for (var _i14 = 0; _i14 < nodes.length; _i14++) {
53347      var _node$fields;
53348
53349      var node = nodes[_i14];
53350      // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
53351      var nodeFields = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];
53352
53353      for (var _i16 = 0; _i16 < nodeFields.length; _i16++) {
53354        var field = nodeFields[_i16];
53355        fieldConfigMap[field.name.value] = {
53356          // Note: While this could make assertions to get the correctly typed
53357          // value, that would throw immediately while type system validation
53358          // with validateSchema() will produce more actionable results.
53359          type: getWrappedType(field.type),
53360          description: getDescription(field, options),
53361          args: buildArgumentMap(field.arguments),
53362          deprecationReason: getDeprecationReason(field),
53363          astNode: field
53364        };
53365      }
53366    }
53367
53368    return fieldConfigMap;
53369  }
53370
53371  function buildArgumentMap(args) {
53372    // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
53373    var argsNodes = args !== null && args !== void 0 ? args : [];
53374    var argConfigMap = Object.create(null);
53375
53376    for (var _i18 = 0; _i18 < argsNodes.length; _i18++) {
53377      var arg = argsNodes[_i18];
53378      // Note: While this could make assertions to get the correctly typed
53379      // value, that would throw immediately while type system validation
53380      // with validateSchema() will produce more actionable results.
53381      var type = getWrappedType(arg.type);
53382      argConfigMap[arg.name.value] = {
53383        type: type,
53384        description: getDescription(arg, options),
53385        defaultValue: Object(_valueFromAST_mjs__WEBPACK_IMPORTED_MODULE_17__[/* valueFromAST */ "a"])(arg.defaultValue, type),
53386        deprecationReason: getDeprecationReason(arg),
53387        astNode: arg
53388      };
53389    }
53390
53391    return argConfigMap;
53392  }
53393
53394  function buildInputFieldMap(nodes) {
53395    var inputFieldMap = Object.create(null);
53396
53397    for (var _i20 = 0; _i20 < nodes.length; _i20++) {
53398      var _node$fields2;
53399
53400      var node = nodes[_i20];
53401      // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
53402      var fieldsNodes = (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : [];
53403
53404      for (var _i22 = 0; _i22 < fieldsNodes.length; _i22++) {
53405        var field = fieldsNodes[_i22];
53406        // Note: While this could make assertions to get the correctly typed
53407        // value, that would throw immediately while type system validation
53408        // with validateSchema() will produce more actionable results.
53409        var type = getWrappedType(field.type);
53410        inputFieldMap[field.name.value] = {
53411          type: type,
53412          description: getDescription(field, options),
53413          defaultValue: Object(_valueFromAST_mjs__WEBPACK_IMPORTED_MODULE_17__[/* valueFromAST */ "a"])(field.defaultValue, type),
53414          deprecationReason: getDeprecationReason(field),
53415          astNode: field
53416        };
53417      }
53418    }
53419
53420    return inputFieldMap;
53421  }
53422
53423  function buildEnumValueMap(nodes) {
53424    var enumValueMap = Object.create(null);
53425
53426    for (var _i24 = 0; _i24 < nodes.length; _i24++) {
53427      var _node$values;
53428
53429      var node = nodes[_i24];
53430      // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
53431      var valuesNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];
53432
53433      for (var _i26 = 0;
53433 _i26 < valuesNodes.length; _i26++) {
53434        var value = valuesNodes[_i26];
53435        enumValueMap[value.name.value] = {
53436          description: getDescription(value, options),
53437          deprecationReason: getDeprecationReason(value),
53438          astNode: value
53439        };
53440      }
53441    }
53442
53443    return enumValueMap;
53444  }
53445
53446  function buildInterfaces(nodes) {
53447    var interfaces = [];
53448
53449    for (var _i28 = 0; _i28 < nodes.length; _i28++) {
53450      var _node$interfaces;
53451
53452      var node = nodes[_i28];
53453      // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
53454      var interfacesNodes = (_node$interfaces = node.interfaces) !== null && _node$interfaces !== void 0 ? _node$interfaces : [];
53455
53456      for (var _i30 = 0; _i30 < interfacesNodes.length; _i30++) {
53457        var type = interfacesNodes[_i30];
53458        // Note: While this could make assertions to get the correctly typed
53459        // values below, that would throw immediately while type system
53460        // validation with validateSchema() will produce more actionable
53461        // results.
53462        interfaces.push(getNamedType(type));
53463      }
53464    }
53465
53466    return interfaces;
53467  }
53468
53469  function buildUnionTypes(nodes) {
53470    var types = [];
53471
53472    for (var _i32 = 0; _i32 < nodes.length; _i32++) {
53473      var _node$types;
53474
53475      var node = nodes[_i32];
53476      // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
53477      var typeNodes = (_node$types = node.types) !== null && _node$types !== void 0 ? _node$types : [];
53478
53479      for (var _i34 = 0; _i34 < typeNodes.length; _i34++) {
53480        var type = typeNodes[_i34];
53481        // Note: While this could make assertions to get the correctly typed
53482        // values below, that would throw immediately while type system
53483        // validation with validateSchema() will produce more actionable
53484        // results.
53485        types.push(getNamedType(type));
53486      }
53487    }
53488
53489    return types;
53490  }
53491
53492  function buildType(astNode) {
53493    var _typeExtensionsMap$na;
53494
53495    var name = astNode.name.value;
53496    var description = getDescription(astNode, options);
53497    var extensionNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : [];
53498
53499    switch (astNode.kind) {
53500      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].OBJECT_TYPE_DEFINITION:
53501        {
53502          var extensionASTNodes = extensionNodes;
53503          var allNodes = [astNode].concat(extensionASTNodes);
53504          return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLObjectType */ "f"]({
53505            name: name,
53506            description: description,
53507            interfaces: function interfaces() {
53508              return buildInterfaces(allNodes);
53509            },
53510            fields: function fields() {
53511              return buildFieldMap(allNodes);
53512            },
53513            astNode: astNode,
53514            extensionASTNodes: extensionASTNodes
53515          });
53516        }
53517
53518      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].INTERFACE_TYPE_DEFINITION:
53519        {
53520          var _extensionASTNodes = extensionNodes;
53521
53522          var _allNodes = [astNode].concat(_extensionASTNodes);
53523
53524          return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLInterfaceType */ "c"]({
53525            name: name,
53526            description: description,
53527            interfaces: function interfaces() {
53528              return buildInterfaces(_allNodes);
53529            },
53530            fields: function fields() {
53531              return buildFieldMap(_allNodes);
53532            },
53533            astNode: astNode,
53534            extensionASTNodes: _extensionASTNodes
53535          });
53536        }
53537
53538      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].ENUM_TYPE_DEFINITION:
53539        {
53540          var _extensionASTNodes2 = extensionNodes;
53541
53542          var _allNodes2 = [astNode].concat(_extensionASTNodes2);
53543
53544          return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLEnumType */ "a"]({
53545            name: name,
53546            description: description,
53547            values: buildEnumValueMap(_allNodes2),
53548            astNode: astNode,
53549            extensionASTNodes: _extensionASTNodes2
53550          });
53551        }
53552
53553      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].UNION_TYPE_DEFINITION:
53554        {
53555          var _extensionASTNodes3 = extensionNodes;
53556
53557          var _allNodes3 = [astNode].concat(_extensionASTNodes3);
53558
53559          return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLUnionType */ "h"]({
53560            name: name,
53561            description: description,
53562            types: function types() {
53563              return buildUnionTypes(_allNodes3);
53564            },
53565            astNode: astNode,
53566            extensionASTNodes: _extensionASTNodes3
53567          });
53568        }
53569
53570      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].SCALAR_TYPE_DEFINITION:
53571        {
53572          var _extensionASTNodes4 = extensionNodes;
53573          return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLScalarType */ "g"]({
53574            name: name,
53575            description: description,
53576            specifiedByUrl: getSpecifiedByUrl(astNode),
53577            astNode: astNode,
53578            extensionASTNodes: _extensionASTNodes4
53579          });
53580        }
53581
53582      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_6__[/* Kind */ "a"].INPUT_OBJECT_TYPE_DEFINITION:
53583        {
53584          var _extensionASTNodes5 = extensionNodes;
53585
53586          var _allNodes4 = [astNode].concat(_extensionASTNodes5);
53587
53588          return new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_16__[/* GraphQLInputObjectType */ "b"]({
53589            name: name,
53590            description: description,
53591            fields: function fields() {
53592              return buildInputFieldMap(_allNodes4);
53593            },
53594            astNode: astNode,
53595            extensionASTNodes: _extensionASTNodes5
53596          });
53597        }
53598    } // istanbul ignore next (Not reachable. All possible type definition nodes have been considered)
53599
53600
53601     false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(0, 'Unexpected type definition node: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(astNode));
53602  }
53603}
53604var stdTypeMap = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_type_scalars_mjs__WEBPACK_IMPORTED_MODULE_13__[/* specifiedScalarTypes */ "g"].concat(_type_introspection_mjs__WEBPACK_IMPORTED_MODULE_14__[/* introspectionTypes */ "m"]), function (type) {
53605  return type.name;
53606});
53607/**
53608 * Given a field or enum value node, returns the string value for the
53609 * deprecation reason.
53610 */
53611
53612function getDeprecationReason(node) {
53613  var deprecated = Object(_execution_values_mjs__WEBPACK_IMPORTED_MODULE_11__[/* getDirectiveValues */ "b"])(_type_directives_mjs__WEBPACK_IMPORTED_MODULE_15__[/* GraphQLDeprecatedDirective */ "b"], node);
53614  return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason;
53615}
53616/**
53617 * Given a scalar node, returns the string value for the specifiedByUrl.
53618 */
53619
53620
53621function getSpecifiedByUrl(node) {
53622  var specifiedBy = Object(_execution_values_mjs__WEBPACK_IMPORTED_MODULE_11__[/* getDirectiveValues */ "b"])(_type_directives_mjs__WEBPACK_IMPORTED_MODULE_15__[/* GraphQLSpecifiedByDirective */ "f"], node);
53623  return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url;
53624}
53625/**
53626 * Given an ast node, returns its string description.
53627 * @deprecated: provided to ease adoption and will be removed in v16.
53628 *
53629 * Accepts options as a second argument:
53630 *
53631 *    - commentDescriptions:
53632 *        Provide true to use preceding comments as the description.
53633 *
53634 */
53635
53636
53637function getDescription(node, options) {
53638  if (node.description) {
53639    return node.description.value;
53640  }
53641
53642  if ((options === null || options === void 0 ? void 0 : options.commentDescriptions) === true) {
53643    var rawValue = getLeadingCommentBlock(node);
53644
53645    if (rawValue !== undefined) {
53646      return Object(_language_blockString_mjs__WEBPACK_IMPORTED_MODULE_8__[/* dedentBlockStringValue */ "a"])('\n' + rawValue);
53647    }
53648  }
53649}
53650
53651function getLeadingCommentBlock(node) {
53652  var loc = node.loc;
53653
53654  if (!loc) {
53655    return;
53656  }
53657
53658  var comments = [];
53659  var token = loc.startToken.prev;
53660
53661  while (token != null && token.kind === _language_tokenKind_mjs__WEBPACK_IMPORTED_MODULE_7__[/* TokenKind */ "a"].COMMENT && token.next && token.prev && token.line + 1 === token.next.line && token.line !== token.prev.line) {
53662    var value = String(token.value);
53663    comments.push(value);
53664    token = token.prev;
53665  }
53666
53667  return comments.length > 0 ? comments.reverse().join('\n') : undefined;
53668}
53669
53670
53671/***/ }),
53672
53673/***/ "cptH":
53674/***/ (function(module, exports, __webpack_require__) {
53675
53676"use strict";
53677
53678
53679var GetIntrinsic = __webpack_require__("AM7I");
53680
53681var $TypeError = GetIntrinsic('%TypeError%');
53682var $Number = GetIntrinsic('%Number%');
53683var $RegExp = GetIntrinsic('%RegExp%');
53684var $parseInteger = GetIntrinsic('%parseInt%');
53685
53686var callBound = __webpack_require__("VF6F");
53687var regexTester = __webpack_require__("NePw");
53688var isPrimitive = __webpack_require__("9dO7");
53689
53690var $strSlice = callBound('String.prototype.slice');
53691var isBinary = regexTester(/^0b[01]+$/i);
53692var isOctal = regexTester(/^0o[0-7]+$/i);
53693var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
53694var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
53695var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
53696var hasNonWS = regexTester(nonWSregex);
53697
53698// whitespace from: https://es5.github.io/#x15.5.4.20
53699// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324
53700var ws = [
53701	'\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003',
53702	'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028',
53703	'\u2029\uFEFF'
53704].join('');
53705var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g');
53706var $replace = callBound('String.prototype.replace');
53707var $trim = function (value) {
53708	return $replace(value, trimRegex, '');
53709};
53710
53711var ToPrimitive = __webpack_require__("HZad");
53712
53713// https://ecma-international.org/ecma-262/6.0/#sec-tonumber
53714
53715module.exports = function ToNumber(argument) {
53716	var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
53717	if (typeof value === 'symbol') {
53718		throw new $TypeError('Cannot convert a Symbol value to a number');
53719	}
53720	if (typeof value === 'bigint') {
53721		throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.');
53722	}
53723	if (typeof value === 'string') {
53724		if (isBinary(value)) {
53725			return ToNumber($parseInteger($strSlice(value, 2), 2));
53726		} else if (isOctal(value)) {
53727			return ToNumber($parseInteger($strSlice(value, 2), 8));
53728		} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
53729			return NaN;
53730		} else {
53731			var trimmed = $trim(value);
53732			if (trimmed !== value) {
53733				return ToNumber(trimmed);
53734			}
53735		}
53736	}
53737	return $Number(value);
53738};
53739
53740
53741/***/ }),
53742
53743/***/ "cuPQ
vendor: 12,734 bytes, lines 53743-54088
53743":
53744/***/ (function(module, exports, __webpack_require__) {
53745
53746/**
53747 * Copyright (c) 2014-present, Facebook, Inc.
53748 *
53749 * This source code is licensed under the MIT license found in the
53750 * LICENSE file in the root directory of this source tree.
53751 */
53752
53753var runtime = (function (exports) {
53754  "use strict";
53755
53756  var Op = Object.prototype;
53757  var hasOwn = Op.hasOwnProperty;
53758  var undefined; // More compressible than void 0.
53759  var $Symbol = typeof Symbol === "function" ? Symbol : {};
53760  var iteratorSymbol = $Symbol.iterator || "@@iterator";
53761  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
53762  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
53763
53764  function define(obj, key, value) {
53765    Object.defineProperty(obj, key, {
53766      value: value,
53767      enumerable: true,
53768      configurable: true,
53769      writable: true
53770    });
53771    return obj[key];
53772  }
53773  try {
53774    // IE 8 has a broken Object.defineProperty that only works on DOM objects.
53775    define({}, "");
53776  } catch (err) {
53777    define = function(obj, key, value) {
53778      return obj[key] = value;
53779    };
53780  }
53781
53782  function wrap(innerFn, outerFn, self, tryLocsList) {
53783    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
53784    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
53785    var generator = Object.create(protoGenerator.prototype);
53786    var context = new Context(tryLocsList || []);
53787
53788    // The ._invoke method unifies the implementations of the .next,
53789    // .throw, and .return methods.
53790    generator._invoke = makeInvokeMethod(innerFn, self, context);
53791
53792    return generator;
53793  }
53794  exports.wrap = wrap;
53795
53796  // Try/catch helper to minimize deoptimizations. Returns a completion
53797  // record like context.tryEntries[i].completion. This interface could
53798  // have been (and was previously) designed to take a closure to be
53799  // invoked without arguments, but in all the cases we care about we
53800  // already have an existing method we want to call, so there's no need
53801  // to create a new function object. We can even get away with assuming
53802  // the method takes exactly one argument, since that happens to be true
53803  // in every case, so we don't have to touch the arguments object. The
53804  // only additional allocation required is the completion record, which
53805  // has a stable shape and so hopefully should be cheap to allocate.
53806  function tryCatch(fn, obj, arg) {
53807    try {
53808      return { type: "normal", arg: fn.call(obj, arg) };
53809    } catch (err) {
53810      return { type: "throw", arg: err };
53811    }
53812  }
53813
53814  var GenStateSuspendedStart = "suspendedStart";
53815  var GenStateSuspendedYield = "suspendedYield";
53816  var GenStateExecuting = "executing";
53817  var GenStateCompleted = "completed";
53818
53819  // Returning this object from the innerFn has the same effect as
53820  // breaking out of the dispatch switch statement.
53821  var ContinueSentinel = {};
53822
53823  // Dummy constructor functions that we use as the .constructor and
53824  // .constructor.prototype properties for functions that return Generator
53825  // objects. For full spec compliance, you may wish to configure your
53826  // minifier not to mangle the names of these two functions.
53827  function Generator() {}
53828  function GeneratorFunction() {}
53829  function GeneratorFunctionPrototype() {}
53830
53831  // This is a polyfill for %IteratorPrototype% for environments that
53832  // don't natively support it.
53833  var IteratorPrototype = {};
53834  IteratorPrototype[iteratorSymbol] = function () {
53835    return this;
53836  };
53837
53838  var getProto = Object.getPrototypeOf;
53839  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
53840  if (NativeIteratorPrototype &&
53841      NativeIteratorPrototype !== Op &&
53842      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
53843    // This environment has a native %IteratorPrototype%; use it instead
53844    // of the polyfill.
53845    IteratorPrototype = NativeIteratorPrototype;
53846  }
53847
53848  var Gp = GeneratorFunctionPrototype.prototype =
53849    Generator.prototype = Object.create(IteratorPrototype);
53850  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
53851  GeneratorFunctionPrototype.constructor = GeneratorFunction;
53852  GeneratorFunction.displayName = define(
53853    GeneratorFunctionPrototype,
53854    toStringTagSymbol,
53855    "GeneratorFunction"
53856  );
53857
53858  // Helper for defining the .next, .throw, and .return methods of the
53859  // Iterator interface in terms of a single ._invoke method.
53860  function defineIteratorMethods(prototype) {
53861    ["next", "throw", "return"].forEach(function(method) {
53862      define(prototype, method, function(arg) {
53863        return this._invoke(method, arg);
53864      });
53865    });
53866  }
53867
53868  exports.isGeneratorFunction = function(genFun) {
53869    var ctor = typeof genFun === "function" && genFun.constructor;
53870    return ctor
53871      ? ctor === GeneratorFunction ||
53872        // For the native GeneratorFunction constructor, the best we can
53873        // do is to check its .name property.
53874        (ctor.displayName || ctor.name) === "GeneratorFunction"
53875      : false;
53876  };
53877
53878  exports.mark = function(genFun) {
53879    if (Object.setPrototypeOf) {
53880      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
53881    } else {
53882      genFun.__proto__ = GeneratorFunctionPrototype;
53883      define(genFun, toStringTagSymbol, "GeneratorFunction");
53884    }
53885    genFun.prototype = Object.create(Gp);
53886    return genFun;
53887  };
53888
53889  // Within the body of any async function, `await x` is transformed to
53890  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
53891  // `hasOwn.call(value, "__await")` to determine if the yielded value is
53892  // meant to be awaited.
53893  exports.awrap = function(arg) {
53894    return { __await: arg };
53895  };
53896
53897  function AsyncIterator(generator, PromiseImpl) {
53898    function invoke(method, arg, resolve, reject) {
53899      var record = tryCatch(generator[method], generator, arg);
53900      if (record.type === "throw") {
53901        reject(record.arg);
53902      } else {
53903        var result = record.arg;
53904        var value = result.value;
53905        if (value &&
53906            typeof value === "object" &&
53907            hasOwn.call(value, "__await")) {
53908          return PromiseImpl.resolve(value.__await).then(function(value) {
53909            invoke("next", value, resolve, reject);
53910          }, function(err) {
53911            invoke("throw", err, resolve, reject);
53912          });
53913        }
53914
53915        return PromiseImpl.resolve(value).then(function(unwrapped) {
53916          // When a yielded Promise is resolved, its final value becomes
53917          // the .value of the Promise<{value,done}> result for the
53918          // current iteration.
53919          result.value = unwrapped;
53920          resolve(result);
53921        }, function(error) {
53922          // If a rejected Promise was yielded, throw the rejection back
53923          // into the async generator function so it can be handled there.
53924          return invoke("throw", error, resolve, reject);
53925        });
53926      }
53927    }
53928
53929    var previousPromise;
53930
53931    function enqueue(method, arg) {
53932      function callInvokeWithMethodAndArg() {
53933        return new PromiseImpl(function(resolve, reject) {
53934          invoke(method, arg, resolve, reject);
53935        });
53936      }
53937
53938      return previousPromise =
53939        // If enqueue has been called before, then we want to wait until
53940        // all previous Promises have been resolved before calling invoke,
53941        // so that results are always delivered in the correct order. If
53942        // enqueue has not been called before, then it is important to
53943        // call invoke immediately, without waiting on a callback to fire,
53944        // so that the async generator function has the opportunity to do
53945        // any necessary setup in a predictable way. This predictability
53946        // is why the Promise constructor synchronously invokes its
53947        // executor callback, and why async functions synchronously
53948        // execute code before the first await. Since we implement simple
53949        // async functions in terms of async generators, it is especially
53950        // important to get this right, even though it requires care.
53951        previousPromise ? previousPromise.then(
53952          callInvokeWithMethodAndArg,
53953          // Avoid propagating failures to Promises returned by later
53954          // invocations of the iterator.
53955          callInvokeWithMethodAndArg
53956        ) : callInvokeWithMethodAndArg();
53957    }
53958
53959    // Define the unified helper method that is used to implement .next,
53960    // .throw, and .return (see defineIteratorMethods).
53961    this._invoke = enqueue;
53962  }
53963
53964  defineIteratorMethods(AsyncIterator.prototype);
53965  AsyncIterator.prototype[asyncIteratorSymbol] = function () {
53966    return this;
53967  };
53968  exports.AsyncIterator = AsyncIterator;
53969
53970  // Note that simple async functions are implemented on top of
53971  // AsyncIterator objects; they just return a Promise for the value of
53972  // the final result produced by the iterator.
53973  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
53974    if (PromiseImpl === void 0) PromiseImpl = Promise;
53975
53976    var iter = new AsyncIterator(
53977      wrap(innerFn, outerFn, self, tryLocsList),
53978      PromiseImpl
53979    );
53980
53981    return exports.isGeneratorFunction(outerFn)
53982      ? iter // If outerFn is a generator, return the full iterator.
53983      : iter.next().then(function(result) {
53984          return result.done ? result.value : iter.next();
53985        });
53986  };
53987
53988  function makeInvokeMethod(innerFn, self, context) {
53989    var state = GenStateSuspendedStart;
53990
53991    return function invoke(method, arg) {
53992      if (state === GenStateExecuting) {
53993        throw new Error("Generator is already running");
53994      }
53995
53996      if (state === GenStateCompleted) {
53997        if (method === "throw") {
53998          throw arg;
53999        }
54000
54001        // Be forgiving, per 25.3.3.3.3 of the spec:
54002        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
54003        return doneResult();
54004      }
54005
54006      context.method = method;
54007      context.arg = arg;
54008
54009      while (true) {
54010        var delegate = context.delegate;
54011        if (delegate) {
54012          var delegateResult = maybeInvokeDelegate(delegate, context);
54013          if (delegateResult) {
54014            if (delegateResult === ContinueSentinel) continue;
54015            return delegateResult;
54016          }
54017        }
54018
54019        if (context.method === "next") {
54020          // Setting context._sent for legacy support of Babel's
54021          // function.sent implementation.
54022          context.sent = context._sent = context.arg;
54023
54024        } else if (context.method === "throw") {
54025          if (state === GenStateSuspendedStart) {
54026            state = GenStateCompleted;
54027            throw context.arg;
54028          }
54029
54030          context.dispatchException(context.arg);
54031
54032        } else if (context.method === "return") {
54033          context.abrupt("return", context.arg);
54034        }
54035
54036        state = GenStateExecuting;
54037
54038        var record = tryCatch(innerFn, self, context);
54039        if (record.type === "normal") {
54040          // If an exception is thrown from innerFn, we leave state ===
54041          // GenStateExecuting and loop back for another invocation.
54042          state = context.done
54043            ? GenStateCompleted
54044            : GenStateSuspendedYield;
54045
54046          if (record.arg === ContinueSentinel) {
54047            continue;
54048          }
54049
54050          return {
54051            value: record.arg,
54052            done: context.done
54053          };
54054
54055        } else if (record.type === "throw") {
54056          state = GenStateCompleted;
54057          // Dispatch the exception by looping back around to the
54058          // context.dispatchException(context.arg) call above.
54059          context.method = "throw";
54060          context.arg = record.arg;
54061        }
54062      }
54063    };
54064  }
54065
54066  // Call delegate.iterator[context.method](context.arg) and handle the
54067  // result, either by returning a { value, done } result from the
54068  // delegate iterator, or by modifying context.method and context.arg,
54069  // setting context.delegate to null, and returning the ContinueSentinel.
54070  function maybeInvokeDelegate(delegate, context) {
54071    var method = delegate.iterator[context.method];
54072    if (method === undefined) {
54073      // A .throw or .return when the delegate iterator has no .throw
54074      // method always terminates the yield* loop.
54075      context.delegate = null;
54076
54077      if (context.method === "throw") {
54078        // Note: ["return"] must be used for ES3 parsing compatibility.
54079        if (delegate.iterator["return"]) {
54080          // If the delegate iterator has a return method, give it a
54081          // chance to clean up.
54082          context.method = "return";
54083          context.arg = undefined;
54084          maybeInvokeDelegate(delegate, context);
54085
54086          if (context.method === "throw") {
54087            // If maybeInvokeDelegate(context) changed context.method from
54088            // "return" to "throw", let that override the TypeError below.
vendor: 11,070 bytes, lines 54089-54477
54089            return ContinueSentinel;
54090          }
54091        }
54092
54093        context.method = "throw";
54094        context.arg = new TypeError(
54095          "The iterator does not provide a 'throw' method");
54096      }
54097
54098      return ContinueSentinel;
54099    }
54100
54101    var record = tryCatch(method, delegate.iterator, context.arg);
54102
54103    if (record.type === "throw") {
54104      context.method = "throw";
54105      context.arg = record.arg;
54106      context.delegate = null;
54107      return ContinueSentinel;
54108    }
54109
54110    var info = record.arg;
54111
54112    if (! info) {
54113      context.method = "throw";
54114      context.arg = new TypeError("iterator result is not an object");
54115      context.delegate = null;
54116      return ContinueSentinel;
54117    }
54118
54119    if (info.done) {
54120      // Assign the result of the finished delegate to the temporary
54121      // variable specified by delegate.resultName (see delegateYield).
54122      context[delegate.resultName] = info.value;
54123
54124      // Resume execution at the desired location (see delegateYield).
54125      context.next = delegate.nextLoc;
54126
54127      // If context.method was "throw" but the delegate handled the
54128      // exception, let the outer generator proceed normally. If
54129      // context.method was "next", forget context.arg since it has been
54130      // "consumed" by the delegate iterator. If context.method was
54131      // "return", allow the original .return call to continue in the
54132      // outer generator.
54133      if (context.method !== "return") {
54134        context.method = "next";
54135        context.arg = undefined;
54136      }
54137
54138    } else {
54139      // Re-yield the result returned by the delegate method.
54140      return info;
54141    }
54142
54143    // The delegate iterator is finished, so forget it and continue with
54144    // the outer generator.
54145    context.delegate = null;
54146    return ContinueSentinel;
54147  }
54148
54149  // Define Generator.prototype.{next,throw,return} in terms of the
54150  // unified ._invoke helper method.
54151  defineIteratorMethods(Gp);
54152
54153  define(Gp, toStringTagSymbol, "Generator");
54154
54155  // A Generator should always return itself as the iterator object when the
54156  // @@iterator function is called on it. Some browsers' implementations of the
54157  // iterator prototype chain incorrectly implement this, causing the Generator
54158  // object to not be returned from this call. This ensures that doesn't happen.
54159  // See https://github.com/facebook/regenerator/issues/274 for more details.
54160  Gp[iteratorSymbol] = function() {
54161    return this;
54162  };
54163
54164  Gp.toString = function() {
54165    return "[object Generator]";
54166  };
54167
54168  function pushTryEntry(locs) {
54169    var entry = { tryLoc: locs[0] };
54170
54171    if (1 in locs) {
54172      entry.catchLoc = locs[1];
54173    }
54174
54175    if (2 in locs) {
54176      entry.finallyLoc = locs[2];
54177      entry.afterLoc = locs[3];
54178    }
54179
54180    this.tryEntries.push(entry);
54181  }
54182
54183  function resetTryEntry(entry) {
54184    var record = entry.completion || {};
54185    record.type = "normal";
54186    delete record.arg;
54187    entry.completion = record;
54188  }
54189
54190  function Context(tryLocsList) {
54191    // The root entry object (effectively a try statement without a catch
54192    // or a finally block) gives us a place to store values thrown from
54193    // locations where there is no enclosing try statement.
54194    this.tryEntries = [{ tryLoc: "root" }];
54195    tryLocsList.forEach(pushTryEntry, this);
54196    this.reset(true);
54197  }
54198
54199  exports.keys = function(object) {
54200    var keys = [];
54201    for (var key in object) {
54202      keys.push(key);
54203    }
54204    keys.reverse();
54205
54206    // Rather than returning an object with a next method, we keep
54207    // things simple and return the next function itself.
54208    return function next() {
54209      while (keys.length) {
54210        var key = keys.pop();
54211        if (key in object) {
54212          next.value = key;
54213          next.done = false;
54214          return next;
54215        }
54216      }
54217
54218      // To avoid creating an additional object, we just hang the .value
54219      // and .done properties off the next function object itself. This
54220      // also ensures that the minifier will not anonymize the function.
54221      next.done = true;
54222      return next;
54223    };
54224  };
54225
54226  function values(iterable) {
54227    if (iterable) {
54228      var iteratorMethod = iterable[iteratorSymbol];
54229      if (iteratorMethod) {
54230        return iteratorMethod.call(iterable);
54231      }
54232
54233      if (typeof iterable.next === "function") {
54234        return iterable;
54235      }
54236
54237      if (!isNaN(iterable.length)) {
54238        var i = -1, next = function next() {
54239          while (++i < iterable.length) {
54240            if (hasOwn.call(iterable, i)) {
54241              next.value = iterable[i];
54242              next.done = false;
54243              return next;
54244            }
54245          }
54246
54247          next.value = undefined;
54248          next.done = true;
54249
54250          return next;
54251        };
54252
54253        return next.next = next;
54254      }
54255    }
54256
54257    // Return an iterator with no values.
54258    return { next: doneResult };
54259  }
54260  exports.values = values;
54261
54262  function doneResult() {
54263    return { value: undefined, done: true };
54264  }
54265
54266  Context.prototype = {
54267    constructor: Context,
54268
54269    reset: function(skipTempReset) {
54270      this.prev = 0;
54271      this.next = 0;
54272      // Resetting context._sent for legacy support of Babel's
54273      // function.sent implementation.
54274      this.sent = this._sent = undefined;
54275      this.done = false;
54276      this.delegate = null;
54277
54278      this.method = "next";
54279      this.arg = undefined;
54280
54281      this.tryEntries.forEach(resetTryEntry);
54282
54283      if (!skipTempReset) {
54284        for (var name in this) {
54285          // Not sure about the optimal order of these conditions:
54286          if (name.charAt(0) === "t" &&
54287              hasOwn.call(this, name) &&
54288              !isNaN(+name.slice(1))) {
54289            this[name] = undefined;
54290          }
54291        }
54292      }
54293    },
54294
54295    stop: function() {
54296      this.done = true;
54297
54298      var rootEntry = this.tryEntries[0];
54299      var rootRecord = rootEntry.completion;
54300      if (rootRecord.type === "throw") {
54301        throw rootRecord.arg;
54302      }
54303
54304      return this.rval;
54305    },
54306
54307    dispatchException: function(exception) {
54308      if (this.done) {
54309        throw exception;
54310      }
54311
54312      var context = this;
54313      function handle(loc, caught) {
54314        record.type = "throw";
54315        record.arg = exception;
54316        context.next = loc;
54317
54318        if (caught) {
54319          // If the dispatched exception was caught by a catch block,
54320          // then let that catch block handle the exception normally.
54321          context.method = "next";
54322          context.arg = undefined;
54323        }
54324
54325        return !! caught;
54326      }
54327
54328      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
54329        var entry = this.tryEntries[i];
54330        var record = entry.completion;
54331
54332        if (entry.tryLoc === "root") {
54333          // Exception thrown outside of any try block that could handle
54334          // it, so set the completion value of the entire function to
54335          // throw the exception.
54336          return handle("end");
54337        }
54338
54339        if (entry.tryLoc <= this.prev) {
54340          var hasCatch = hasOwn.call(entry, "catchLoc");
54341          var hasFinally = hasOwn.call(entry, "finallyLoc");
54342
54343          if (hasCatch && hasFinally) {
54344            if (this.prev < entry.catchLoc) {
54345              return handle(entry.catchLoc, true);
54346            } else if (this.prev < entry.finallyLoc) {
54347              return handle(entry.finallyLoc);
54348            }
54349
54350          } else if (hasCatch) {
54351            if (this.prev < entry.catchLoc) {
54352              return handle(entry.catchLoc, true);
54353            }
54354
54355          } else if (hasFinally) {
54356            if (this.prev < entry.finallyLoc) {
54357              return handle(entry.finallyLoc);
54358            }
54359
54360          } else {
54361            throw new Error("try statement without catch or finally");
54362          }
54363        }
54364      }
54365    },
54366
54367    abrupt: function(type, arg) {
54368      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
54369        var entry = this.tryEntries[i];
54370        if (entry.tryLoc <= this.prev &&
54371            hasOwn.call(entry, "finallyLoc") &&
54372            this.prev < entry.finallyLoc) {
54373          var finallyEntry = entry;
54374          break;
54375        }
54376      }
54377
54378      if (finallyEntry &&
54379          (type === "break" ||
54380           type === "continue") &&
54381          finallyEntry.tryLoc <= arg &&
54382          arg <= finallyEntry.finallyLoc) {
54383        // Ignore the finally entry if control is not jumping to a
54384        // location outside the try/catch block.
54385        finallyEntry = null;
54386      }
54387
54388      var record = finallyEntry ? finallyEntry.completion : {};
54389      record.type = type;
54390      record.arg = arg;
54391
54392      if (finallyEntry) {
54393        this.method = "next";
54394        this.next = finallyEntry.finallyLoc;
54395        return ContinueSentinel;
54396      }
54397
54398      return this.complete(record);
54399    },
54400
54401    complete: function(record, afterLoc) {
54402      if (record.type === "throw") {
54403        throw record.arg;
54404      }
54405
54406      if (record.type === "break" ||
54407          record.type === "continue") {
54408        this.next = record.arg;
54409      } else if (record.type === "return") {
54410        this.rval = this.arg = record.arg;
54411        this.method = "return";
54412        this.next = "end";
54413      } else if (record.type === "normal" && afterLoc) {
54414        this.next = afterLoc;
54415      }
54416
54417      return ContinueSentinel;
54418    },
54419
54420    finish: function(finallyLoc) {
54421      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
54422        var entry = this.tryEntries[i];
54423        if (entry.finallyLoc === finallyLoc) {
54424          this.complete(entry.completion, entry.afterLoc);
54425          resetTryEntry(entry);
54426          return ContinueSentinel;
54427        }
54428      }
54429    },
54430
54431    "catch": function(tryLoc) {
54432      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
54433        var entry = this.tryEntries[i];
54434        if (entry.tryLoc === tryLoc) {
54435          var record = entry.completion;
54436          if (record.type === "throw") {
54437            var thrown = record.arg;
54438            resetTryEntry(entry);
54439          }
54440          return thrown;
54441        }
54442      }
54443
54444      // The context.catch method must only be called with a location
54445      // argument that corresponds to a known catch block.
54446      throw new Error("illegal catch attempt");
54447    },
54448
54449    delegateYield: function(iterable, resultName, nextLoc) {
54450      this.delegate = {
54451        iterator: values(iterable),
54452        resultName: resultName,
54453        nextLoc: nextLoc
54454      };
54455
54456      if (this.method === "next") {
54457        // Deliberately forget the last sent value so that we don't
54458        // accidentally pass it on to the delegate.
54459        this.arg = undefined;
54460      }
54461
54462      return ContinueSentinel;
54463    }
54464  };
54465
54466  // Regardless of whether this script is executing as a CommonJS module
54467  // or not, return the runtime object so that we can declare the variable
54468  // regeneratorRuntime in the outer scope, which allows this module to be
54469  // injected easily by `bin/regenerator --include-runtime script.js`.
54470  return exports;
54471
54472}(
54473  // If this script is executing as a CommonJS module, use module.exports
54474  // as the regeneratorRuntime namespace. Otherwise create a new empty
54475  // object. Either way, the resulting object will be used to initialize
54476  // the regeneratorRuntime variable at the top of this file.
54477  
vendor: 19,412 bytes, lines 54477-54911
54477 true ? module.exports : undefined
54478));
54479
54480try {
54481  regeneratorRuntime = runtime;
54482} catch (accidentalStrictMode) {
54483  // This module should not be running in strict mode, so the above
54484  // assignment should always work unless something is misconfigured. Just
54485  // in case runtime.js accidentally runs in strict mode, we can escape
54486  // strict mode using a global Function call. This could conceivably fail
54487  // if a Content Security Policy forbids using Function, but in that case
54488  // the proper solution is to fix the accidental strict mode problem. If
54489  // you've misconfigured your bundler to force strict mode and applied a
54490  // CSP to forbid Function, and you're not willing to fix either of those
54491  // problems, please detail your unique predicament in a GitHub issue.
54492  Function("r", "regeneratorRuntime = r")(runtime);
54493}
54494
54495
54496/***/ }),
54497
54498/***/ "dQau":
54499/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
54500
54501"use strict";
54502/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return print; });
54503/* harmony import */ var _visitor_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("L2ys");
54504/* harmony import */ var _blockString_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("BLR7");
54505
54506
54507/**
54508 * Converts an AST into a string, using one set of reasonable
54509 * formatting rules.
54510 */
54511
54512function print(ast) {
54513  return Object(_visitor_mjs__WEBPACK_IMPORTED_MODULE_0__[/* visit */ "c"])(ast, {
54514    leave: printDocASTReducer
54515  });
54516}
54517var MAX_LINE_LENGTH = 80; // TODO: provide better type coverage in future
54518
54519var printDocASTReducer = {
54520  Name: function Name(node) {
54521    return node.value;
54522  },
54523  Variable: function Variable(node) {
54524    return '$' + node.name;
54525  },
54526  // Document
54527  Document: function Document(node) {
54528    return join(node.definitions, '\n\n') + '\n';
54529  },
54530  OperationDefinition: function OperationDefinition(node) {
54531    var op = node.operation;
54532    var name = node.name;
54533    var varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');
54534    var directives = join(node.directives, ' ');
54535    var selectionSet = node.selectionSet; // Anonymous queries with no directives or variable definitions can use
54536    // the query short form.
54537
54538    return !name && !directives && !varDefs && op === 'query' ? selectionSet : join([op, join([name, varDefs]), directives, selectionSet], ' ');
54539  },
54540  VariableDefinition: function VariableDefinition(_ref) {
54541    var variable = _ref.variable,
54542        type = _ref.type,
54543        defaultValue = _ref.defaultValue,
54544        directives = _ref.directives;
54545    return variable + ': ' + type + wrap(' = ', defaultValue) + wrap(' ', join(directives, ' '));
54546  },
54547  SelectionSet: function SelectionSet(_ref2) {
54548    var selections = _ref2.selections;
54549    return block(selections);
54550  },
54551  Field: function Field(_ref3) {
54552    var alias = _ref3.alias,
54553        name = _ref3.name,
54554        args = _ref3.arguments,
54555        directives = _ref3.directives,
54556        selectionSet = _ref3.selectionSet;
54557    var prefix = wrap('', alias, ': ') + name;
54558    var argsLine = prefix + wrap('(', join(args, ', '), ')');
54559
54560    if (argsLine.length > MAX_LINE_LENGTH) {
54561      argsLine = prefix + wrap('(\n', indent(join(args, '\n')), '\n)');
54562    }
54563
54564    return join([argsLine, join(directives, ' '), selectionSet], ' ');
54565  },
54566  Argument: function Argument(_ref4) {
54567    var name = _ref4.name,
54568        value = _ref4.value;
54569    return name + ': ' + value;
54570  },
54571  // Fragments
54572  FragmentSpread: function FragmentSpread(_ref5) {
54573    var name = _ref5.name,
54574        directives = _ref5.directives;
54575    return '...' + name + wrap(' ', join(directives, ' '));
54576  },
54577  InlineFragment: function InlineFragment(_ref6) {
54578    var typeCondition = _ref6.typeCondition,
54579        directives = _ref6.directives,
54580        selectionSet = _ref6.selectionSet;
54581    return join(['...', wrap('on ', typeCondition), join(directives, ' '), selectionSet], ' ');
54582  },
54583  FragmentDefinition: function FragmentDefinition(_ref7) {
54584    var name = _ref7.name,
54585        typeCondition = _ref7.typeCondition,
54586        variableDefinitions = _ref7.variableDefinitions,
54587        directives = _ref7.directives,
54588        selectionSet = _ref7.selectionSet;
54589    return (// Note: fragment variable definitions are experimental and may be changed
54590      // or removed in the future.
54591      "fragment ".concat(name).concat(wrap('(', join(variableDefinitions, ', '), ')'), " ") + "on ".concat(typeCondition, " ").concat(wrap('', join(directives, ' '), ' ')) + selectionSet
54592    );
54593  },
54594  // Value
54595  IntValue: function IntValue(_ref8) {
54596    var value = _ref8.value;
54597    return value;
54598  },
54599  FloatValue: function FloatValue(_ref9) {
54600    var value = _ref9.value;
54601    return value;
54602  },
54603  StringValue: function StringValue(_ref10, key) {
54604    var value = _ref10.value,
54605        isBlockString = _ref10.block;
54606    return isBlockString ? Object(_blockString_mjs__WEBPACK_IMPORTED_MODULE_1__[/* printBlockString */ "c"])(value, key === 'description' ? '' : '  ') : JSON.stringify(value);
54607  },
54608  BooleanValue: function BooleanValue(_ref11) {
54609    var value = _ref11.value;
54610    return value ? 'true' : 'false';
54611  },
54612  NullValue: function NullValue() {
54613    return 'null';
54614  },
54615  EnumValue: function EnumValue(_ref12) {
54616    var value = _ref12.value;
54617    return value;
54618  },
54619  ListValue: function ListValue(_ref13) {
54620    var values = _ref13.values;
54621    return '[' + join(values, ', ') + ']';
54622  },
54623  ObjectValue: function ObjectValue(_ref14) {
54624    var fields = _ref14.fields;
54625    return '{' + join(fields, ', ') + '}';
54626  },
54627  ObjectField: function ObjectField(_ref15) {
54628    var name = _ref15.name,
54629        value = _ref15.value;
54630    return name + ': ' + value;
54631  },
54632  // Directive
54633  Directive: function Directive(_ref16) {
54634    var name = _ref16.name,
54635        args = _ref16.arguments;
54636    return '@' + name + wrap('(', join(args, ', '), ')');
54637  },
54638  // Type
54639  NamedType: function NamedType(_ref17) {
54640    var name = _ref17.name;
54641    return name;
54642  },
54643  ListType: function ListType(_ref18) {
54644    var type = _ref18.type;
54645    return '[' + type + ']';
54646  },
54647  NonNullType: function NonNullType(_ref19) {
54648    var type = _ref19.type;
54649    return type + '!';
54650  },
54651  // Type System Definitions
54652  SchemaDefinition: addDescription(function (_ref20) {
54653    var directives = _ref20.directives,
54654        operationTypes = _ref20.operationTypes;
54655    return join(['schema', join(directives, ' '), block(operationTypes)], ' ');
54656  }),
54657  OperationTypeDefinition: function OperationTypeDefinition(_ref21) {
54658    var operation = _ref21.operation,
54659        type = _ref21.type;
54660    return operation + ': ' + type;
54661  },
54662  ScalarTypeDefinition: addDescription(function (_ref22) {
54663    var name = _ref22.name,
54664        directives = _ref22.directives;
54665    return join(['scalar', name, join(directives, ' ')], ' ');
54666  }),
54667  ObjectTypeDefinition: addDescription(function (_ref23) {
54668    var name = _ref23.name,
54669        interfaces = _ref23.interfaces,
54670        directives = _ref23.directives,
54671        fields = _ref23.fields;
54672    return join(['type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');
54673  }),
54674  FieldDefinition: addDescription(function (_ref24) {
54675    var name = _ref24.name,
54676        args = _ref24.arguments,
54677        type = _ref24.type,
54678        directives = _ref24.directives;
54679    return name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + ': ' + type + wrap(' ', join(directives, ' '));
54680  }),
54681  InputValueDefinition: addDescription(function (_ref25) {
54682    var name = _ref25.name,
54683        type = _ref25.type,
54684        defaultValue = _ref25.defaultValue,
54685        directives = _ref25.directives;
54686    return join([name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')], ' ');
54687  }),
54688  InterfaceTypeDefinition: addDescription(function (_ref26) {
54689    var name = _ref26.name,
54690        interfaces = _ref26.interfaces,
54691        directives = _ref26.directives,
54692        fields = _ref26.fields;
54693    return join(['interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');
54694  }),
54695  UnionTypeDefinition: addDescription(function (_ref27) {
54696    var name = _ref27.name,
54697        directives = _ref27.directives,
54698        types = _ref27.types;
54699    return join(['union', name, join(directives, ' '), types && types.length !== 0 ? '= ' + join(types, ' | ') : ''], ' ');
54700  }),
54701  EnumTypeDefinition: addDescription(function (_ref28) {
54702    var name = _ref28.name,
54703        directives = _ref28.directives,
54704        values = _ref28.values;
54705    return join(['enum', name, join(directives, ' '), block(values)], ' ');
54706  }),
54707  EnumValueDefinition: addDescription(function (_ref29) {
54708    var name = _ref29.name,
54709        directives = _ref29.directives;
54710    return join([name, join(directives, ' ')], ' ');
54711  }),
54712  InputObjectTypeDefinition: addDescription(function (_ref30) {
54713    var name = _ref30.name,
54714        directives = _ref30.directives,
54715        fields = _ref30.fields;
54716    return join(['input', name, join(directives, ' '), block(fields)], ' ');
54717  }),
54718  DirectiveDefinition: addDescription(function (_ref31) {
54719    var name = _ref31.name,
54720        args = _ref31.arguments,
54721        repeatable = _ref31.repeatable,
54722        locations = _ref31.locations;
54723    return 'directive @' + name + (hasMultilineItems(args) ? wrap('(\n', indent(join(args, '\n')), '\n)') : wrap('(', join(args, ', '), ')')) + (repeatable ? ' repeatable' : '') + ' on ' + join(locations, ' | ');
54724  }),
54725  SchemaExtension: function SchemaExtension(_ref32) {
54726    var directives = _ref32.directives,
54727        operationTypes = _ref32.operationTypes;
54728    return join(['extend schema', join(directives, ' '), block(operationTypes)], ' ');
54729  },
54730  ScalarTypeExtension: function ScalarTypeExtension(_ref33) {
54731    var name = _ref33.name,
54732        directives = _ref33.directives;
54733    return join(['extend scalar', name, join(directives, ' ')], ' ');
54734  },
54735  ObjectTypeExtension: function ObjectTypeExtension(_ref34) {
54736    var name = _ref34.name,
54737        interfaces = _ref34.interfaces,
54738        directives = _ref34.directives,
54739        fields = _ref34.fields;
54740    return join(['extend type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');
54741  },
54742  InterfaceTypeExtension: function InterfaceTypeExtension(_ref35) {
54743    var name = _ref35.name,
54744        interfaces = _ref35.interfaces,
54745        directives = _ref35.directives,
54746        fields = _ref35.fields;
54747    return join(['extend interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');
54748  },
54749  UnionTypeExtension: function UnionTypeExtension(_ref36) {
54750    var name = _ref36.name,
54751        directives = _ref36.directives,
54752        types = _ref36.types;
54753    return join(['extend union', name, join(directives, ' '), types && types.length !== 0 ? '= ' + join(types, ' | ') : ''], ' ');
54754  },
54755  EnumTypeExtension: function EnumTypeExtension(_ref37) {
54756    var name = _ref37.name,
54757        directives = _ref37.directives,
54758        values = _ref37.values;
54759    return join(['extend enum', name, join(directives, ' '), block(values)], ' ');
54760  },
54761  InputObjectTypeExtension: function InputObjectTypeExtension(_ref38) {
54762    var name = _ref38.name,
54763        directives = _ref38.directives,
54764        fields = _ref38.fields;
54765    return join(['extend input', name, join(directives, ' '), block(fields)], ' ');
54766  }
54767};
54768
54769function addDescription(cb) {
54770  return function (node) {
54771    return join([node.description, cb(node)], '\n');
54772  };
54773}
54774/**
54775 * Given maybeArray, print an empty string if it is null or empty, otherwise
54776 * print all items together separated by separator if provided
54777 */
54778
54779
54780function join(maybeArray) {
54781  var _maybeArray$filter$jo;
54782
54783  var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
54784  return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {
54785    return x;
54786  }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';
54787}
54788/**
54789 * Given array, print each item on its own line, wrapped in an
54790 * indented "{ }" block.
54791 */
54792
54793
54794function block(array) {
54795  return wrap('{\n', indent(join(array, '\n')), '\n}');
54796}
54797/**
54798 * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.
54799 */
54800
54801
54802function wrap(start, maybeString) {
54803  var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
54804  return maybeString != null && maybeString !== '' ? start + maybeString + end : '';
54805}
54806
54807function indent(str) {
54808  return wrap('  ', str.replace(/\n/g, '\n  '));
54809}
54810
54811function isMultiline(str) {
54812  return str.indexOf('\n') !== -1;
54813}
54814
54815function hasMultilineItems(maybeArray) {
54816  return maybeArray != null && maybeArray.some(isMultiline);
54817}
54818
54819
54820/***/ }),
54821
54822/***/ "dWS+":
54823/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
54824
54825"use strict";
54826/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GraphQLError; });
54827/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return printError; });
54828/* harmony import */ var _jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("zpYP");
54829/* harmony import */ var _polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2Fve");
54830/* harmony import */ var _language_location_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("y4cC");
54831/* harmony import */ var _language_printLocation_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("zsKT");
54832function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
54833
54834function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
54835
54836function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
54837
54838function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
54839
54840function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
54841
54842function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
54843
54844function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
54845
54846function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
54847
54848function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
54849
54850function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
54851
54852function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
54853
54854function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
54855
54856function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
54857
54858function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
54859
54860// FIXME:
54861// flowlint uninitialized-instance-property:off
54862
54863
54864
54865
54866/**
54867 * A GraphQLError describes an Error found during the parse, validate, or
54868 * execute phases of performing a GraphQL operation. In addition to a message
54869 * and stack trace, it also includes information about the locations in a
54870 * GraphQL document and/or execution result that correspond to the Error.
54871 */
54872
54873var GraphQLError = /*#__PURE__*/function (_Error) {
54874  _inherits(GraphQLError, _Error);
54875
54876  var _super = _createSuper(GraphQLError);
54877
54878  /**
54879   * A message describing the Error for debugging purposes.
54880   *
54881   * Enumerable, and appears in the result of JSON.stringify().
54882   *
54883   * Note: should be treated as readonly, despite invariant usage.
54884   */
54885
54886  /**
54887   * An array of { line, column } locations within the source GraphQL document
54888   * which correspond to this error.
54889   *
54890   * Errors during validation often contain multiple locations, for example to
54891   * point out two things with the same name. Errors during execution include a
54892   * single location, the field which produced the error.
54893   *
54894   * Enumerable, and appears in the result of JSON.stringify().
54895   */
54896
54897  /**
54898   * An array describing the JSON-path into the execution response which
54899   * corresponds to this error. Only included for errors during execution.
54900   *
54901   * Enumerable, and appears in the result of JSON.stringify().
54902   */
54903
54904  /**
54905   * An array of GraphQL AST Nodes corresponding to this error.
54906   */
54907
54908  /**
54909   * The source GraphQL document for the first location of this error.
54910   *
54911   * Note that if this Error represents more than one node, the source may 
vendor: 7,975 bytes, lines 54911-55144
54911not
54912   * represent nodes after the first node.
54913   */
54914
54915  /**
54916   * An array of character offsets within the source GraphQL document
54917   * which correspond to this error.
54918   */
54919
54920  /**
54921   * The original error thrown from a field resolver during execution.
54922   */
54923
54924  /**
54925   * Extension fields to add to the formatted error.
54926   */
54927  function GraphQLError(message, nodes, source, positions, path, originalError, extensions) {
54928    var _locations2, _source2, _positions2, _extensions2;
54929
54930    var _this;
54931
54932    _classCallCheck(this, GraphQLError);
54933
54934    _this = _super.call(this, message); // Compute list of blame nodes.
54935
54936    var _nodes = Array.isArray(nodes) ? nodes.length !== 0 ? nodes : undefined : nodes ? [nodes] : undefined; // Compute locations in the source for the given nodes/positions.
54937
54938
54939    var _source = source;
54940
54941    if (!_source && _nodes) {
54942      var _nodes$0$loc;
54943
54944      _source = (_nodes$0$loc = _nodes[0].loc) === null || _nodes$0$loc === void 0 ? void 0 : _nodes$0$loc.source;
54945    }
54946
54947    var _positions = positions;
54948
54949    if (!_positions && _nodes) {
54950      _positions = _nodes.reduce(function (list, node) {
54951        if (node.loc) {
54952          list.push(node.loc.start);
54953        }
54954
54955        return list;
54956      }, []);
54957    }
54958
54959    if (_positions && _positions.length === 0) {
54960      _positions = undefined;
54961    }
54962
54963    var _locations;
54964
54965    if (positions && source) {
54966      _locations = positions.map(function (pos) {
54967        return Object(_language_location_mjs__WEBPACK_IMPORTED_MODULE_2__[/* getLocation */ "a"])(source, pos);
54968      });
54969    } else if (_nodes) {
54970      _locations = _nodes.reduce(function (list, node) {
54971        if (node.loc) {
54972          list.push(Object(_language_location_mjs__WEBPACK_IMPORTED_MODULE_2__[/* getLocation */ "a"])(node.loc.source, node.loc.start));
54973        }
54974
54975        return list;
54976      }, []);
54977    }
54978
54979    var _extensions = extensions;
54980
54981    if (_extensions == null && originalError != null) {
54982      var originalExtensions = originalError.extensions;
54983
54984      if (Object(_jsutils_isObjectLike_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(originalExtensions)) {
54985        _extensions = originalExtensions;
54986      }
54987    }
54988
54989    Object.defineProperties(_assertThisInitialized(_this), {
54990      name: {
54991        value: 'GraphQLError'
54992      },
54993      message: {
54994        value: message,
54995        // By being enumerable, JSON.stringify will include `message` in the
54996        // resulting output. This ensures that the simplest possible GraphQL
54997        // service adheres to the spec.
54998        enumerable: true,
54999        writable: true
55000      },
55001      locations: {
55002        // Coercing falsy values to undefined ensures they will not be included
55003        // in JSON.stringify() when not provided.
55004        value: (_locations2 = _locations) !== null && _locations2 !== void 0 ? _locations2 : undefined,
55005        // By being enumerable, JSON.stringify will include `locations` in the
55006        // resulting output. This ensures that the simplest possible GraphQL
55007        // service adheres to the spec.
55008        enumerable: _locations != null
55009      },
55010      path: {
55011        // Coercing falsy values to undefined ensures they will not be included
55012        // in JSON.stringify() when not provided.
55013        value: path !== null && path !== void 0 ? path : undefined,
55014        // By being enumerable, JSON.stringify will include `path` in the
55015        // resulting output. This ensures that the simplest possible GraphQL
55016        // service adheres to the spec.
55017        enumerable: path != null
55018      },
55019      nodes: {
55020        value: _nodes !== null && _nodes !== void 0 ? _nodes : undefined
55021      },
55022      source: {
55023        value: (_source2 = _source) !== null && _source2 !== void 0 ? _source2 : undefined
55024      },
55025      positions: {
55026        value: (_positions2 = _positions) !== null && _positions2 !== void 0 ? _positions2 : undefined
55027      },
55028      originalError: {
55029        value: originalError
55030      },
55031      extensions: {
55032        // Coercing falsy values to undefined ensures they will not be included
55033        // in JSON.stringify() when not provided.
55034        value: (_extensions2 = _extensions) !== null && _extensions2 !== void 0 ? _extensions2 : undefined,
55035        // By being enumerable, JSON.stringify will include `path` in the
55036        // resulting output. This ensures that the simplest possible GraphQL
55037        // service adheres to the spec.
55038        enumerable: _extensions != null
55039      }
55040    }); // Include (non-enumerable) stack trace.
55041
55042    if (originalError !== null && originalError !== void 0 && originalError.stack) {
55043      Object.defineProperty(_assertThisInitialized(_this), 'stack', {
55044        value: originalError.stack,
55045        writable: true,
55046        configurable: true
55047      });
55048      return _possibleConstructorReturn(_this);
55049    } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
55050
55051
55052    if (Error.captureStackTrace) {
55053      Error.captureStackTrace(_assertThisInitialized(_this), GraphQLError);
55054    } else {
55055      Object.defineProperty(_assertThisInitialized(_this), 'stack', {
55056        value: Error().stack,
55057        writable: true,
55058        configurable: true
55059      });
55060    }
55061
55062    return _this;
55063  }
55064
55065  _createClass(GraphQLError, [{
55066    key: "toString",
55067    value: function toString() {
55068      return printError(this);
55069    } // FIXME: workaround to not break chai comparisons, should be remove in v16
55070    // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
55071
55072  }, {
55073    key: _polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_1__[/* SYMBOL_TO_STRING_TAG */ "c"],
55074    get: function get() {
55075      return 'Object';
55076    }
55077  }]);
55078
55079  return GraphQLError;
55080}( /*#__PURE__*/_wrapNativeSuper(Error));
55081/**
55082 * Prints a GraphQLError to a string, representing useful location information
55083 * about the error's position in the source.
55084 */
55085
55086function printError(error) {
55087  var output = error.message;
55088
55089  if (error.nodes) {
55090    for (var _i2 = 0, _error$nodes2 = error.nodes; _i2 < _error$nodes2.length; _i2++) {
55091      var node = _error$nodes2[_i2];
55092
55093      if (node.loc) {
55094        output += '\n\n' + Object(_language_printLocation_mjs__WEBPACK_IMPORTED_MODULE_3__[/* printLocation */ "a"])(node.loc);
55095      }
55096    }
55097  } else if (error.source && error.locations) {
55098    for (var _i4 = 0, _error$locations2 = error.locations; _i4 < _error$locations2.length; _i4++) {
55099      var location = _error$locations2[_i4];
55100      output += '\n\n' + Object(_language_printLocation_mjs__WEBPACK_IMPORTED_MODULE_3__[/* printSourceLocation */ "b"])(error.source, location);
55101    }
55102  }
55103
55104  return output;
55105}
55106
55107
55108/***/ }),
55109
55110/***/ "dpSA":
55111/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55112
55113"use strict";
55114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FieldsOnCorrectTypeRule; });
55115/* harmony import */ var _polyfills_arrayFrom_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Qx16");
55116/* harmony import */ var _jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("pv/G");
55117/* harmony import */ var _jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("T95z");
55118/* harmony import */ var _jsutils_naturalCompare_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Y5C7");
55119/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("dWS+");
55120/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("axIb");
55121
55122
55123
55124
55125
55126
55127
55128/**
55129 * Fields on correct type
55130 *
55131 * A GraphQL document is only valid if all fields selected are defined by the
55132 * parent type, or are an allowed meta field such as __typename.
55133 */
55134function FieldsOnCorrectTypeRule(context) {
55135  return {
55136    Field: function Field(node) {
55137      var type = context.getParentType();
55138
55139      if (type) {
55140        var fieldDef = context.getFieldDef();
55141
55142        if (!fieldDef) {
55143          // This field doesn't exist, lets look for suggestions.
55144          var schema = context.getSchema();
55145          var fieldName = node.name.value; // First determine if there are any suggested types to condition on.
55146
55147          var suggestion = Object(_jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('to use an inline fragment on', getSuggestedTypeNames(schema, type, fieldName)); // If there are no suggested types, then perhaps this was a typo?
55148
55149          if (suggestion === '') {
55150            suggestion = Object(_jsutils_didYouMean_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(getSuggestedFieldNames(type, fieldName));
55151          } // Report an error, including helpful suggestions.
55152
55153
55154          context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_4__[/* GraphQLError */ "a"]("Cannot query field \"".concat(fieldName, "\" on type \"").concat(type.name, "\".") + suggestion, node));
55155        }
55156      }
55157    }
55158  };
55159}
55160/**
55161 * Go through all of the implementations of type, as well as the interfaces that
55162 * they implement. If any of those types include the provided field, suggest them,
55163 * sorted by how often the type is referenced.
55164 */
55165
55166function getSuggestedTypeNames(schema, type, fieldName) {
55167  if (!Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isAbstractType */ "C"])(type)) {
55168    // Must be an Object type, which does not have possible fields.
55169    return [];
55170  }
55171
55172  var suggestedTypes = new Set();
55173  var usageCount = Object.create(null);
55174
55175  for (var _i2 = 0, _schema$getPossibleTy2 = schema.getPossibleTypes(type); _i2 < _schema$getPossibleTy2.length; _i2++) {
55176    var possibleType = _schema$getPossibleTy2[_i2];
55177
55178    if (!possibleType.getFields()[fieldName]) {
55179      continue;
55180    } // This object type defines this field.
55181
55182
55183    suggestedTypes.add(possibleType);
55184    usageCount[possibleType.name] = 1;
55185
55186    for (var _i4 = 0, _possibleType$getInte2 = possibleType.getInterfaces(); _i4 < _possibleType$getInte2.length; _i4++) {
55187      var _usageCount$possibleI;
55188
55189      var possibleInterface = _possibleType$getInte2[_i4];
55190
55191      if (!possibleInterface.getFields()[fieldName]) {
55192        continue;
55193      } // This interface type defines this field.
55194
55195
55196      suggestedTypes.add(possibleInterface);
55197      usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1;
55198    }
55199  }
55200
55201  return Object(_polyfills_arrayFrom_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(suggestedTypes).sort(function (typeA, typeB) {
55202    // Suggest both interface and object types based on how common they are.
55203    var usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name];
55204
55205    if (usageCountDiff !== 0) {
55206      return usageCountDiff;
55207    } // Suggest super types first followed by subtypes
55208
55209
55210    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isInterfaceType */ "H"])(typeA) && schema.isSubType(typeA, typeB)) {
55211      return -1;
55212    }
55213
55214    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isInterfaceType */ "H"])(typeB) && schema.isSubType(typeB, typeA)) {
55215      return 1;
55216    }
55217
55218    return Object(_jsutils_naturalCompare_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(typeA.name, typeB.name);
55219  }).map(function (x) {
55220    return x.name;
55221  });
55222}
55223/**
55224 * For the field name provided, determine if there are any similar field names
55225 * that may be the result of a typo.
55226 */
55227
55228
55229function getSuggestedFieldNames(type, fieldName) {
55230  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isObjectType */ "N"])(type) || Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[/* isInterfaceType */ "H"])(type)) {
55231    var possibleFieldNames = Object.keys(type.getFields());
55232    return Object(_jsutils_suggestionList_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(fieldName, possibleFieldNames);
55233  } // Otherwise, must be a Union type, which does not define fields.
55234
55235
55236  return [];
55237}
55238
55239
55240/***/ }),
55241
55242/***/ "dtAw":
55243/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55244
55245"use strict";
55246/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NoUnusedVariablesRule; });
55247/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
55248
55249
55250/**
55251 * No unused variables
55252 *
55253 * A GraphQL operation is only valid if all variables defined by an operation
55254 * are used, either directly or within a spread fragment.
55255 */
55256function NoUnusedVariablesRule(context) {
55257  var variableDefs = [];
55258  return {
55259    OperationDefinition: {
55260      enter: function enter() {
55261        variableDefs = [];
55262      },
55263      leave: function leave(operation) {
55264        var variableNameUsed = Object.create(null);
55265        var usages = context.getRecursiveVariableUsages(operation);
55266
55267        for (var _i2 = 0; _i2 < usages.length; _i2++) {
55268          var _ref2 = usages[_i2];
55269          var node = _ref2.node;
55270          variableNameUsed[node.name.value] = true;
55271        }
55272
55273        for (var _i4 = 0, _variableDefs2 = variableDefs; _i4 < _variableDefs2.length; _i4++) {
55274          var variableDef = _variableDefs2[_i4];
55275          var variableName = variableDef.variable.name.value;
55276
55277          if (variableNameUsed[variableName] !== true) {
55278            context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"](operation.name ? "Variable \"$".concat(variableName, "\" is never used in operation \"").concat(operation.name.value, "\".") : "Variable \"$".concat(variableName, "\" is never used."), variableDef));
55279          }
55280        }
55281      }
55282    },
55283    VariableDefinition: function VariableDefinition(def) {
55284      variableDefs.push(def);
55285    }
55286  };
55287}
55288
55289
55290/***/ }),
55291
55292/***/ "fExb":
55293/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55294
55295"use strict";
55296/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addPath; });
55297/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return pathToArray; });
55298/**
55299 * Given a Path and a key, return a new Path containing the new key.
55300 */
55301function addPath(prev, key, typename) {
55302  return {
55303    prev: prev,
55304    key: key,
55305    typename: typename
55306  };
55307}
55308/**
55309 * Given a Path, return an Array of the path keys.
55310 */
55311
55312function pathToArray(path) {
55313  var flattened = [];
55314  var curr = path;
55315
55316  while (curr) {
55317    flattened.push(curr.key);
55318    curr = curr.prev;
55319  }
55320
55321  return flattened.reverse();
55322}
55323
55324
55325/***/ }),
55326
55327/***/ "fqV+":
55328/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55329
55330"use strict";
55331/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NoUnusedFragmentsRule; });
55332/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
55333
55334
55335/**
55336 * No unused fragments
55337 *
55338 * A GraphQL document is only valid if all fragment definitions are spread
55339 * within operations, or spread within other fragments spread within operations.
55340 */
55341function NoUnusedFragmentsRule(context) {
55342  var operationDefs = [];
55343  var fragmentDefs = [];
55344  return {
55345    OperationDefinition: function OperationDefinition(node) {
55346      operationDefs.push(node);
55347      return false;
55348    },
55349    FragmentDefinition: function FragmentDefinition(node) {
55350      fragmentDefs.push(node);
55351      return false;
55352    },
55353    Document: {
55354      leave: function leave() {
55355        var fragmentNameUsed = Object.create(null);
55356
55357        for (var _i2 = 0; _i2 < operationDefs.length; _i2++) {
55358          var operation = operationDefs[_i2];
55359
55360          for (var _i4 = 0, _context$getRecursive2 = context.getRecursivelyReferencedFragments(operation); _i4 < _context$getRecursive2.length; _i4++) {
55361            var fragment = _context$getRecursive2[_i4];
55362            fragmentNameUsed[fragment.name.value] = true;
55363          }
55364        }
55365
55366        for (var _i6 = 0; _i6 < fragmentDefs.length; _i6++) {
55367          var fragmentDef = fragmentDefs[_i6];
55368          var fragName = fragmentDef.name.value;
55369
55370          if (fragmentNameUsed[fragName] !== true) {
55371            context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Fragment \"".concat(fragName, "\" is never used."), fragmentDef));
55372          }
55373        }
55374      }
55375    }
55376  };
55377}
55378
55379
55380/***/ }),
55381
55382/***/ "fzwd":
55383/***/ (function(module, exports, __webpack_require__) {
55384
55385"use strict";
55386/**
55387 * Copyright (c) Facebook, Inc. and its affiliates.
55388 *
55389 * This source code is licensed under the MIT license found in the
55390 * LICENSE file in the root directory of this source tree.
55391 *
55392 * 
55393 * @format
55394 */
55395// flowlint ambiguous-object-type:error
55396
55397
55398var OR_LIST_MAX_LENGTH = 5;
55399
55400var _require = __webpack_require__("VrDQ"),
55401    createCompilerError = _require.createCompilerError;
55402
55403function orList(items) {
55404  if (items.length === 0) {
55405    throw createCompilerError('Expected an array of strings. Got empty array');
55406  }
55407
55408  if (items.length === 1) {
55409    return items[0];
55410  }
55411
55412  if (items.length > OR_LIST_MAX_LENGTH) {
55413    return items.slice(0, OR_LIST_MAX_LENGTH).join(', ') + ', ...';
55414  }
55415
55416  var selected = items.slice();
55417  var lastItem = selected.pop();
55418  return selected.join(', ') + ' or ' + lastItem;
55419}
55420
55421module.exports = orList;
55422
55423/***/ }),
55424
55425/***/ "gXYT":
55426/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55427
55428"use strict";
55429/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getOperationRootType; });
55430/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
55431
55432
55433/**
55434 * Extracts the root type of the operation from the schema.
55435 */
55436function getOperationRootType(schema, operation) {
55437  if (operation.operation === 'query') {
55438    var queryType = schema.getQueryType();
55439
55440    if (!queryType) {
55441      throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]('Schema does not define the required query root type.', operation);
55442    }
55443
55444    return queryType;
55445  }
55446
55447  if (operation.operation === 'mutation') {
55448    var mutationType = schema.getMutationType();
55449
55450    if (!mutationType) {
55451      throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]('Schema is not configured for mutations.', operation);
55452    }
55453
55454    return mutationType;
55455  }
55456
55457  if (operation.operation === 'subscription') {
55458    var subscriptionType = schema.getSubscriptionType();
55459
55460    if (!subscriptionType) {
55461      throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]('Schema is not configured for subscriptions.', operation);
55462    }
55463
55464    return subscriptionType;
55465  }
55466
55467  throw new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]('Can only have query, mutation and subscription operations.', operation);
55468}
55469
55470
55471/***/ }),
55472
55473/***/ "gi2y":
55474/***/ (function(module, exports, __webpack_require__) {
55475
55476"use strict";
55477
55478
55479var GetIntrinsic = __webpack_require__("AM7I");
55480
55481var $TypeError = GetIntrinsic('%TypeError%');
55482
55483var MAX_SAFE_INTEGER = __webpack_require__("yVdY");
55484
55485var Call = __webpack_require__("3lu9");
55486var CreateDataPropertyOrThrow = __webpack_require__("BwaV");
55487var Get = __webpack_require__("V/hC");
55488var HasProperty = __webpack_require__("LidF");
55489var IsArray = __webpack_require__("plxK");
55490var LengthOfArrayLike = __webpack_require__("ZXHR");
55491var ToString = __webpack_require__("SYRf");
55492
55493// https://262.ecma-international.org/11.0/#sec-flattenintoarray
55494
55495// eslint-disable-next-line max-params
55496module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) {
55497	var mapperFunction;
55498	if (arguments.length > 5) {
55499		mapperFunction = arguments[5];
55500	}
55501
55502	var targetIndex = start;
55503	var sourceIndex = 0;
55504	while (sourceIndex < sourceLen) {
55505		var P = ToString(sourceIndex);
55506		var exists = HasProperty(source, P);
55507		if (exists === true) {
55508			var element = Get(source, P);
55509			if (typeof mapperFunction !== 'undefined') {
55510				if (arguments.length <= 6) {
55511					throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided');
55512				}
55513				element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]);
55514			}
55515			var shouldFlatten = false;
55516			if (depth > 0) {
55517				shouldFlatten = IsArray(element);
55518			}
55519			if (shouldFlatten) {
55520				var elementLen = LengthOfArrayLike(element);
55521				targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1);
55522			} else {
55523				if (targetIndex >= MAX_SAFE_INTEGER) {
55524					throw new $TypeError('index too large');
55525				}
55526				CreateDataPropertyOrThrow(target, ToString(targetIndex), element);
55527				targetIndex += 1;
55528			}
55529		}
55530		sourceIndex += 1;
55531	}
55532
55533	return targetIndex;
55534};
55535
55536
55537/***/ }),
55538
55539/***/ "gig5":
55540/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55541
55542"use strict";
55543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueDirectiveNamesRule; });
55544/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
55545
55546
55547/**
55548 * Unique directive names
55549 *
55550 * A GraphQL document is only valid if all defined directives have unique names.
55551 */
55552function UniqueDirectiveNamesRule(context) {
55553  var knownDirectiveNames = Object.create(null);
55554  var schema = context.getSchema();
55555  return {
55556    DirectiveDefinition: function DirectiveDefinition(node) {
55557      var directiveName = node.name.value;
55558
55559      if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) {
55560        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Directive \"@".concat(directiveName, "\" already exists in the schema. It cannot be redefined."), node.name));
55561        return;
55562      }
55563
55564      if (knownDirectiveNames[directiveName]) {
55565        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("There can be only one directive named \"@".concat(directiveName, "\"."), [knownDirectiveNames[directiveName], node.name]));
55566      } else {
55567        knownDirectiveNames[directiveName] = node.name;
55568      }
55569
55570      return false;
55571    }
55572  };
55573}
55574
55575
55576/***/ }),
55577
55578/***/ "h5lq":
55579/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55580
55581"use strict";
55582/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return concatAST; });
55583/**
55584 * Provided a collection of ASTs, presumably each from different files,
55585 * concatenate the ASTs together into batched AST, useful for validating many
55586 * GraphQL source files which together represent one conceptual application.
55587 */
55588function concatAST(documents) {
55589  var definitions = [];
55590
55591  for (var _i2 = 0; _i2 < documents.length; _i2++) {
55592    var doc = documents[_i2];
55593    definitions = definitions.concat(doc.definitions);
55594  }
55595
55596  return {
55597    kind: 'Document',
55598    definitions: definitions
55599  };
55600}
55601
55602
55603/***/ }),
55604
55605/***/ "h6tn":
55606/***/ (function(module, __webpack_exports__, __webpack_require__) {
55607
55608"use strict";
55609/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return camelCaseTransform; });
55610/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return camelCaseTransformMerge; });
55611/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return camelCase; });
55612/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mrSG");
55613/* harmony import */ var pascal_case__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("YAvM");
55614
55615
55616function camelCaseTransform(input, index) {
55617    if (index === 0)
55618        return input.toLowerCase();
55619    return Object(pascal_case__WEBPACK_IMPORTED_MODULE_1__[/* pascalCaseTransform */ "b"])(input, index);
55620}
55621function camelCaseTransformMerge(input, index) {
55622    if (index === 0)
55623        return input.toLowerCase();
55624    return Object(pascal_case__WEBPACK_IMPORTED_MODULE_1__[/* pascalCaseTransformMerge */ "c"])(input);
55625}
55626function camelCase(input, options) {
55627    if (options === void 0) { options = {}; }
55628    return Object(pascal_case__WEBPACK_IMPORTED_MODULE_1__[/* pascalCase */ "a"])(input, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ transform: camelCaseTransform }, options));
55629}
55630//# sourceMappingURL=index.js.map
55631
55632/***/ }),
55633
55634/***/ "hOcR":
55635/***/ (function(module, exports, __webpack_require__) {
55636
55637"use strict";
55638
55639
55640// var modulo = require('./modulo');
55641var $floor = Math.floor;
55642
55643// http://262.ecma-international.org/5.1/#sec-5.2
55644
55645module.exports = function floor(x) {
55646	// return x - modulo(x, 1);
55647	return $floor(x);
55648};
55649
55650
55651/***/ }),
55652
55653/***/ "hRS1":
55654/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55655
55656"use strict";
55657/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getIntrospectionQuery; });
55658function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
55659
55660function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); }
55660 else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
55661
55662function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
55663
55664function getIntrospectionQuery(options) {
55665  var optionsWithDefault = _objectSpread({
55666    descriptions: true,
55667    specifiedByUrl: false,
55668    directiveIsRepeatable: false,
55669    schemaDescription: false,
55670    inputValueDeprecation: false
55671  }, options);
55672
55673  var descriptions = optionsWithDefault.descriptions ? 'description' : '';
55674  var specifiedByUrl = optionsWithDefault.specifiedByUrl ? 'specifiedByUrl' : '';
55675  var directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable ? 'isRepeatable' : '';
55676  var schemaDescription = optionsWithDefault.schemaDescription ? descriptions : '';
55677
55678  function inputDeprecation(str) {
55679    return optionsWithDefault.inputValueDeprecation ? str : '';
55680  }
55681
55682  return "\n    query IntrospectionQuery {\n      __schema {\n        ".concat(schemaDescription, "\n        queryType { name }\n        mutationType { name }\n        subscriptionType { name }\n        types {\n          ...FullType\n        }\n        directives {\n          name\n          ").concat(descriptions, "\n          ").concat(directiveIsRepeatable, "\n          locations\n          args").concat(inputDeprecation('(includeDeprecated: true)'), " {\n            ...InputValue\n          }\n        }\n      }\n    }\n\n    fragment FullType on __Type {\n      kind\n      name\n      ").concat(descriptions, "\n      ").concat(specifiedByUrl, "\n      fields(includeDeprecated: true) {\n        name\n        ").concat(descriptions, "\n        args").concat(inputDeprecation('(includeDeprecated: true)'), " {\n          ...InputValue\n        }\n        type {\n          ...TypeRef\n        }\n        isDeprecated\n        deprecationReason\n      }\n      inputFields").concat(inputDeprecation('(includeDeprecated: true)'), " {\n        ...InputValue\n      }\n      interfaces {\n        ...TypeRef\n      }\n      enumValues(includeDeprecated: true) {\n        name\n        ").concat(descriptions, "\n        isDeprecated\n        deprecationReason\n      }\n      possibleTypes {\n        ...TypeRef\n      }\n    }\n\n    fragment InputValue on __InputValue {\n      name\n      ").concat(descriptions, "\n      type { ...TypeRef }\n      defaultValue\n      ").concat(inputDeprecation('isDeprecated'), "\n      ").concat(inputDeprecation('deprecationReason'), "\n    }\n\n    fragment TypeRef on __Type {\n      kind\n      name\n      ofType {\n        kind\n        name\n        ofType {\n          kind\n          name\n          ofType {\n            kind\n            name\n            ofType {\n              kind\n              name\n              ofType {\n                kind\n                name\n                ofType {\n                  kind\n                  name\n                  ofType {\n                    kind\n                    name\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  ");
55683}
55684
55685
55686/***/ }),
55687
55688/***/ "hYbJ":
55689/***/ (function(module, exports, __webpack_require__) {
55690
55691"use strict";
55692
55693
55694var assertRecord = __webpack_require__("DELC");
55695
55696var Type = __webpack_require__("zOLO");
55697
55698// https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
55699
55700module.exports = function FromPropertyDescriptor(Desc) {
55701	if (typeof Desc === 'undefined') {
55702		return Desc;
55703	}
55704
55705	assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
55706
55707	var obj = {};
55708	if ('[[Value]]' in Desc) {
55709		obj.value = Desc['[[Value]]'];
55710	}
55711	if ('[[Writable]]' in Desc) {
55712		obj.writable = Desc['[[Writable]]'];
55713	}
55714	if ('[[Get]]' in Desc) {
55715		obj.get = Desc['[[Get]]'];
55716	}
55717	if ('[[Set]]' in Desc) {
55718		obj.set = Desc['[[Set]]'];
55719	}
55720	if ('[[Enumerable]]' in Desc) {
55721		obj.enumerable = Desc['[[Enumerable]]'];
55722	}
55723	if ('[[Configurable]]' in Desc) {
55724		obj.configurable = Desc['[[Configurable]]'];
55725	}
55726	return obj;
55727};
55728
55729
55730/***/ }),
55731
55732/***/ "hm8L":
55733/***/ (function(module, exports, __webpack_require__) {
55734
55735"use strict";
55736
55737
55738var abs = __webpack_require__("bs7P");
55739var floor = __webpack_require__("hOcR");
55740var ToNumber = __webpack_require__("MlE5");
55741
55742var $isNaN = __webpack_require__("7qPd");
55743var $isFinite = __webpack_require__("QO3R");
55744var $sign = __webpack_require__("Bgkv");
55745
55746// http://262.ecma-international.org/5.1/#sec-9.4
55747
55748module.exports = function ToInteger(value) {
55749	var number = ToNumber(value);
55750	if ($isNaN(number)) { return 0; }
55751	if (number === 0 || !$isFinite(number)) { return number; }
55752	return $sign(number) * floor(abs(number));
55753};
55754
55755
55756/***/ }),
55757
55758/***/ "izjK":
55759/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55760
55761"use strict";
55762/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NoFragmentCyclesRule; });
55763/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
55764
55765function NoFragmentCyclesRule(context) {
55766  // Tracks already visited fragments to maintain O(N) and to ensure that cycles
55767  // are not redundantly reported.
55768  var visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors
55769
55770  var spreadPath = []; // Position in the spread path
55771
55772  var spreadPathIndexByName = Object.create(null);
55773  return {
55774    OperationDefinition: function OperationDefinition() {
55775      return false;
55776    },
55777    FragmentDefinition: function FragmentDefinition(node) {
55778      detectCycleRecursive(node);
55779      return false;
55780    }
55781  }; // This does a straight-forward DFS to find cycles.
55782  // It does not terminate when a cycle was found but continues to explore
55783  // the graph to find all possible cycles.
55784
55785  function detectCycleRecursive(fragment) {
55786    if (visitedFrags[fragment.name.value]) {
55787      return;
55788    }
55789
55790    var fragmentName = fragment.name.value;
55791    visitedFrags[fragmentName] = true;
55792    var spreadNodes = context.getFragmentSpreads(fragment.selectionSet);
55793
55794    if (spreadNodes.length === 0) {
55795      return;
55796    }
55797
55798    spreadPathIndexByName[fragmentName] = spreadPath.length;
55799
55800    for (var _i2 = 0; _i2 < spreadNodes.length; _i2++) {
55801      var spreadNode = spreadNodes[_i2];
55802      var spreadName = spreadNode.name.value;
55803      var cycleIndex = spreadPathIndexByName[spreadName];
55804      spreadPath.push(spreadNode);
55805
55806      if (cycleIndex === undefined) {
55807        var spreadFragment = context.getFragment(spreadName);
55808
55809        if (spreadFragment) {
55810          detectCycleRecursive(spreadFragment);
55811        }
55812      } else {
55813        var cyclePath = spreadPath.slice(cycleIndex);
55814        var viaPath = cyclePath.slice(0, -1).map(function (s) {
55815          return '"' + s.name.value + '"';
55816        }).join(', ');
55817        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Cannot spread fragment \"".concat(spreadName, "\" within itself") + (viaPath !== '' ? " via ".concat(viaPath, ".") : '.'), cyclePath));
55818      }
55819
55820      spreadPath.pop();
55821    }
55822
55823    spreadPathIndexByName[fragmentName] = undefined;
55824  }
55825}
55826
55827
55828/***/ }),
55829
55830/***/ "jI7m":
55831/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55832
55833"use strict";
55834/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return locatedError; });
55835/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
55836/* harmony import */ var _GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dWS+");
55837
55838
55839/**
55840 * Given an arbitrary value, presumably thrown while attempting to execute a
55841 * GraphQL operation, produce a new GraphQLError aware of the location in the
55842 * document responsible for the original Error.
55843 */
55844
55845function locatedError(rawOriginalError, nodes, path) {
55846  var _nodes;
55847
55848  // Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.
55849  var originalError = rawOriginalError instanceof Error ? rawOriginalError : new Error('Unexpected error value: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(rawOriginalError)); // Note: this uses a brand-check to support GraphQL errors originating from other contexts.
55850
55851  if (Array.isArray(originalError.path)) {
55852    return originalError;
55853  }
55854
55855  return new _GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLError */ "a"](originalError.message, (_nodes = originalError.nodes) !== null && _nodes !== void 0 ? _nodes : nodes, originalError.source, originalError.positions, path, originalError);
55856}
55857
55858
55859/***/ }),
55860
55861/***/ "jOXf":
55862/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
55863
55864"use strict";
55865/* unused harmony export ASTValidationContext */
55866/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SDLValidationContext; });
55867/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ValidationContext; });
55868/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("/jXB");
55869/* harmony import */ var _language_visitor_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("L2ys");
55870/* harmony import */ var _utilities_TypeInfo_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("4RMZ");
55871function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
55872
55873
55874
55875
55876
55877/**
55878 * An instance of this class is passed as the "this" context to all validators,
55879 * allowing access to commonly useful contextual information from within a
55880 * validation rule.
55881 */
55882var ASTValidationContext = /*#__PURE__*/function () {
55883  function ASTValidationContext(ast, onError) {
55884    this._ast = ast;
55885    this._fragments = undefined;
55886    this._fragmentSpreads = new Map();
55887    this._recursivelyReferencedFragments = new Map();
55888    this._onError = onError;
55889  }
55890
55891  var _proto = ASTValidationContext.prototype;
55892
55893  _proto.reportError = function reportError(error) {
55894    this._onError(error);
55895  };
55896
55897  _proto.getDocument = function getDocument() {
55898    return this._ast;
55899  };
55900
55901  _proto.getFragment = function getFragment(name) {
55902    var fragments = this._fragments;
55903
55904    if (!fragments) {
55905      this._fragments = fragments = this.getDocument().definitions.reduce(function (frags, statement) {
55906        if (statement.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].FRAGMENT_DEFINITION) {
55907          frags[statement.name.value] = statement;
55908        }
55909
55910        return frags;
55911      }, Object.create(null));
55912    }
55913
55914    return fragments[name];
55915  };
55916
55917  _proto.getFragmentSpreads = function getFragmentSpreads(node) {
55918    var spreads = this._fragmentSpreads.get(node);
55919
55920    if (!spreads) {
55921      spreads = [];
55922      var setsToVisit = [node];
55923
55924      while (setsToVisit.length !== 0) {
55925        var set = setsToVisit.pop();
55926
55927        for (var _i2 = 0, _set$selections2 = set.selections; _i2 < _set$selections2.length; _i2++) {
55928          var selection = _set$selections2[_i2];
55929
55930          if (selection.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_0__[/* Kind */ "a"].FRAGMENT_SPREAD) {
55931            spreads.push(selection);
55932          } else if (selection.selectionSet) {
55933            setsToVisit.push(selection.selectionSet);
55934          }
55935        }
55936      }
55937
55938      this._fragmentSpreads.set(node, spreads);
55939    }
55940
55941    return spreads;
55942  };
55943
55944  _proto.getRecursivelyReferencedFragments = function getRecursivelyReferencedFragments(operation) {
55945    var fragments = this._recursivelyReferencedFragments.get(operation);
55946
55947    if (!fragments) {
55948      fragments = [];
55949      var collectedNames = Object.create(null);
55950      var nodesToVisit = [operation.selectionSet];
55951
55952      while (nodesToVisit.length !== 0) {
55953        var node = nodesToVisit.pop();
55954
55955        for (var _i4 = 0, _this$getFragmentSpre2 = this.getFragmentSpreads(node); _i4 < _this$getFragmentSpre2.length; _i4++) {
55956          var spread = _this$getFragmentSpre2[_i4];
55957          var fragName = spread.name.value;
55958
55959          if (collectedNames[fragName] !== true) {
55960            collectedNames[fragName] = true;
55961            var fragment = this.getFragment(fragName);
55962
55963            if (fragment) {
55964              fragments.push(fragment);
55965              nodesToVisit.push(fragment.selectionSet);
55966            }
55967          }
55968        }
55969      }
55970
55971      this._recursivelyReferencedFragments.set(operation, fragments);
55972    }
55973
55974    return fragments;
55975  };
55976
55977  return ASTValidationContext;
55978}();
55979var SDLValidationContext = /*#__PURE__*/function (_ASTValidationContext) {
55980  _inheritsLoose(SDLValidationContext, _ASTValidationContext);
55981
55982  function SDLValidationContext(ast, schema, onError) {
55983    var _this;
55984
55985    _this = _ASTValidationContext.call(this, ast, onError) || this;
55986    _this._schema = schema;
55987    return _this;
55988  }
55989
55990  var _proto2 = SDLValidationContext.prototype;
55991
55992  _proto2.getSchema = function getSchema() {
55993    return this._schema;
55994  };
55995
55996  return SDLValidationContext;
55997}(ASTValidationContext);
55998var ValidationContext = /*#__PURE__*/function (_ASTValidationContext2) {
55999  _inheritsLoose(ValidationContext, _ASTValidationContext2);
56000
56001  function ValidationContext(schema, ast, typeInfo, onError) {
56002    var _this2;
56003
56004    _this2 = _ASTValidationContext2.call(this, ast, onError) || this;
56005    _this2._schema = schema;
56006    _this2._typeInfo = typeInfo;
56007    _this2._variableUsages = new Map();
56008    _this2._recursiveVariableUsages = new Map();
56009    return _this2;
56010  }
56011
56012  var _proto3 = ValidationContext.prototype;
56013
56014  _proto3.getSchema = function getSchema() {
56015    return this._schema;
56016  };
56017
56018  _proto3.getVariableUsages = function getVariableUsages(node) {
56019    var usages = this._variableUsages.get(node);
56020
56021    if (!usages) {
56022      var newUsages = [];
56023      var typeInfo = new _utilities_TypeInfo_mjs__WEBPACK_IMPORTED_MODULE_2__[/* TypeInfo */ "a"](this._schema);
56024      Object(_language_visitor_mjs__WEBPACK_IMPORTED_MODULE_1__[/* visit */ "c"])(node, Object(_utilities_TypeInfo_mjs__WEBPACK_IMPORTED_MODULE_2__[/* visitWithTypeInfo */ "b"])(typeInfo, {
56025        VariableDefinition: function VariableDefinition() {
56026          return false;
56027        },
56028        Variable: function Variable(variable) {
56029          newUsages.push({
56030            node: variable,
56031            type: typeInfo.getInputType(),
56032            defaultValue: typeInfo.getDefaultValue()
56033          });
56034        }
56035      }));
56036      usages = newUsages;
56037
56038      this._variableUsages.set(node, usages);
56039    }
56040
56041    return usages;
56042  };
56043
56044  _proto3.getRecursiveVariableUsages = function getRecursiveVariableUsages(operation) {
56045    var usages = this._recursiveVariableUsages.get(operation);
56046
56047    if (!usages) {
56048      usages = this.getVariableUsages(operation);
56049
56050      for (var _i6 = 0, _this$getRecursivelyR2 = this.getRecursivelyReferencedFragments(operation); _i6 < _this$getRecursivelyR2.length; _i6++) {
56051        var frag = _this$getRecursivelyR2[_i6];
56052        usages = usages.concat(this.getVariableUsages(frag));
56053      }
56054
56055      this._recursiveVariableUsages.set(operation, usages);
56056    }
56057
56058    return usages;
56059  };
56060
56061  _proto3.getType = function getType() {
56062    return this._typeInfo.getType();
56063  };
56064
56065  _proto3.getParentType = function getParentType() {
56066    return this._typeInfo.getParentType();
56067  };
56068
56069  _proto3.getInputType = function getInputType() {
56070    return this._typeInfo.getInputType();
56071  };
56072
56073  _proto3.getParentInputType = function getParentInputType() {
56074    return this._typeInfo.getParentInputType();
56075  };
56076
56077  _proto3.getFieldDef = function getFieldDef() {
56078    return this._typeInfo.getFieldDef();
56079  };
56080
56081  _proto3.getDirective = function getDirective() {
56082    return this._typeInfo.getDirective();
56083  };
56084
56085  _proto3.getArgument = function getArgument() {
56086    return this._typeInfo.getArgument();
56087  };
56088
56089  _proto3.getEnumValue = function getEnumValue() {
56090    return this._typeInfo.getEnumValue();
56091  };
56092
56093  return ValidationContext;
56094}(ASTValidationContext);
56095
56096
56097/***/ }),
56098
56099/***/ "k9pe":
56100/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
56101
56102"use strict";
56103/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return safeArrayFrom; });
56104/* harmony import */ var _polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2Fve");
56105function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
56106
56107
56108/**
56109 * Safer version of `Array.from` that return `null` if value isn't convertible to array.
56110 * Also protects against Array-like objects without items.
56111 *
56112 * @example
56113 *
56114 * safeArrayFrom([ 1, 2, 3 ]) // [1, 2, 3]
56115 * safeArrayFrom('ABC') // null
56116 * safeArrayFrom({ length: 1 }) // null
56117 * safeArrayFrom({ length: 1, 0: 'Alpha' }) // ['Alpha']
56118 * safeArrayFrom({ key: 'value' }) // null
56119 * safeArrayFrom(new Map()) // []
56120 *
56121 */
56122
56123function safeArrayFrom(collection) {
56124  var mapFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (item) {
56125    return item;
56126  };
56127
56128  if (collection == null || _typeof(collection) !== 'object') {
56129    return null;
56130  }
56131
56132  if (Array.isArray(collection)) {
56133    return collection.map(mapFn);
56134  } // Is Iterable?
56135
56136
56137  var iteratorMethod = collection[_polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_0__[/* SYMBOL_ITERATOR */ "b"]];
56138
56139  if (typeof iteratorMethod === 'function') {
56140    // $FlowFixMe[incompatible-use]
56141    var iterator = iteratorMethod.call(collection);
56142    var result = [];
56143    var step;
56144
56145    for (var i = 0; !(step = iterator.next()).done; ++i) {
56146      result.push(mapFn(step.value, i));
56147    }
56148
56149    return result;
56150  } // Is Array like?
56151
56152
56153  var length = collection.length;
56154
56155  if (typeof length === 'number' && length >= 0 && length % 1 === 0) {
56156    var _result = [];
56157
56158    for (var _i = 0; _i < length; ++_i) {
56159      if (!Object.prototype.hasOwnProperty.call(collection, _i)) {
56160        return null;
56161      }
56162
56163      _result.push(mapFn(collection[String(_i)], _i));
56164    }
56165
56166    return _result;
56167  }
56168
56169  return null;
56170}
56171
56172
56173/***/ }),
56174
56175/***/ "kBjl":
56176/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
56177
56178"use strict";
56179/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return keyMap; });
56180/**
56181 * Creates a keyed JS object from an array, given a function to produce the keys
56182 * for each value in the array.
56183 *
56184 * This provides a convenient lookup for the array items if the key function
56185 * produces unique results.
56186 *
56187 *     const phoneBook = [
56188 *       { name: 'Jon', num: '555-1234' },
56189 *       { name: 'Jenny', num: '867-5309' }
56190 *     ]
56191 *
56192 *     // { Jon: { name: 'Jon', num: '555-1234' },
56193 *     //   Jenny: { name: 'Jenny', num: '867-5309' } }
56194 *     const entriesByName = keyMap(
56195 *       phoneBook,
56196 *       entry => entry.name
56197 *     )
56198 *
56199 *     // { name: 'Jenny', num: '857-6309' }
56200 *     const jennyEntry = entriesByName['Jenny']
56201 *
56202 */
56203function keyMap(list, keyFn) {
56204  return list.reduce(function (map, item) {
56205    map[keyFn(item)] = item;
56206    return map;
56207  }, Object.create(null));
56208}
56209
56210
56211/***/ }),
56212
56213/***/ "kCea":
56214/***/ (function(module, exports, __webpack_require__) {
56215
56216"use strict";
56217
56218
56219/* eslint complexity: [2, 18], max-statements: [2, 33] */
56220module.exports = function hasSymbols() {
56221	if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
56222	if (typeof Symbol.iterator === 'symbol') { return true; }
56223
56224	var obj = {};
56225	var sym = Symbol('test');
56226	var symObj = Object(sym);
56227	if (typeof sym === 'string') { return false; }
56228
56229	if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
56230	if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
56231
56232	// temp disabled per https://github.com/ljharb/object.assign/issues/17
56233	// if (sym instanceof Symbol) { return false; }
56234	// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
56235	// if (!(symObj instanceof Symbol)) { return false; }
56236
56237	// if (typeof Symbol.prototype.toString !== 'function') { return false; }
56238	// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
56239
56240	var symVal = 42;
56241	obj[sym] = symVal;
56242	for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
56243	if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
56244
56245	if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
56246
56247	var syms = Object.getOwnPropertySymbols(obj);
56248	if (syms.length !== 1 || syms[0] !== sym) { return false; }
56249
56250	if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
56251
56252	if (typeof Object.getOwnPropertyDescriptor === 'function') {
56253		var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
56254		if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
56255	}
56256
56257	return true;
56258};
56259
56260
56261/***/ }),
56262
56263/***/ "kIST":
56264/***/ (function(module, exports, __webpack_require__) {
56265
56266/*!
56267 * normalize-path <https://github.com/jonschlinkert/normalize-path>
56268 *
56269 * Copyright (c) 2014-2017, Jon Schlinkert.
56270 * Released under the MIT License.
56271 */
56272
56273var removeTrailingSeparator = __webpack_require__("8ocz");
56274
56275module.exports = function normalizePath(str, stripTrailing) {
56276  if (typeof str !== 'string') {
56277    throw new TypeError('expected a string');
56278  }
56279  str = str.replace(/[\\\/]+/g, '/');
56280  if (stripTrailing !== false) {
56281    str = removeTrailingSeparator(str);
56282  }
56283  return str;
56284};
56285
56286
56287/***/ }),
56288
56289/***/ "klf5":
56290/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
56291
56292"use strict";
56293/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Location; });
56294/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Token; });
56295/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isNode; });
56296/* harmony import */ var _jsutils_defineInspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("+dZ+");
56297
56298
56299/**
56300 * Contains a range of UTF-8 character offsets and token references that
56301 * identify the region of the source from which the AST derived.
56302 */
56303var Location = /*#__PURE__*/function () {
56304  /**
56305   * The character offset at which this Node begins.
56306   */
56307
56308  /**
56309   * The character offset at which this Node ends.
56310   */
56311
56312  /**
56313   * The Token at which this Node begins.
56314   */
56315
56316  /**
56317   * The Token at which this Node ends.
56318   */
56319
56320  /**
56321   * The Source document the AST represents.
56322   */
56323  function Location(startToken, endToken, source) {
56324    this.start = startToken.start;
56325    this.end = endToken.end;
56326    this.startToken = startToken;
56327    this.endToken = endToken;
56328    this.source = source;
56329  }
56330
56331  var _proto = Location.prototype;
56332
56333  _proto.toJSON = function toJSON() {
56334    return {
56335      start: this.start,
56336      end: this.end
56337    };
56338  };
56339
56340  return Location;
56341}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
56342
56343Object(_jsutils_defineInspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Location);
56344/**
56345 * Represents a range of characters represented by a lexical token
56346 * within a Source.
56347 */
56348
56349var Token = /*#__PURE__*/function () {
56350  /**
56351   * The kind of Token.
56352   */
56353
56354  /**
56355   * The character offset at which this Node begins.
56356   */
56357
56358  /**
56359   * The character offset at which this Node ends.
56360   */
56361
56362  /**
56363   * The 1-indexed line number on which this Token appears.
56364   */
56365
56366  /**
56367   * The 1-indexed column number at which this Token begins.
56368   */
56369
56370  /**
56371   * For non-punctuation tokens, represents the interpreted value of the token.
56372   */
56373
56374  /**
56375   * Tokens exist as nodes in a double-linked-list amongst all tokens
56376   * including ignored tokens. <SOF> is always the first node and <EOF>
56377   * the last.
56378   */
56379  function Token(kind, start, end, line, column, prev, value) {
56380    this.kind = kind;
56381    this.start = start;
56382    this.end = end;
56383    this.line = line;
56384    this.column = column;
56385    this.value = value;
56386    this.prev = prev;
56387    this.next = null;
56388  }
56389
56390  var _proto2 = Token.prototype;
56391
56392  _proto2.toJSON = function toJSON() {
56393    return {
56394      kind: this.kind,
56395      value: this.value,
56396      line: this.line,
56397      column: this.column
56398    };
56399  };
56400
56401  return Token;
56402}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
56403
56404Object(_jsutils_defineInspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Token);
56405/**
56406 * @internal
56407 */
56408
56409function isNode(maybeNode) {
56410  return maybeNode != null && typeof maybeNode.kind === 'string';
56411}
56412/**
56413 * The list of all possible AST node types.
56414 */
56415
56416
56417/***/ }),
56418
56419/***/ "l1+S":
56420/***/ (function(module, exports, __webpack_require__) {
56421
56422"use strict";
56423
56424
56425var implementation = __webpack_require__("HYxC");
56426
56427module.exports = function getPolyfill() {
56428	return Array.prototype.flatMap || implementation;
56429};
56430
56431
56432/***/ }),
56433
56434/***/ "lAJ0":
56435/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
56436
56437"use strict";
56438/* eslint-disable no-redeclare */
56439// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441
56440var isFinitePolyfill = Number.isFinite || function (value) {
56441  return typeof value === 'number' && isFinite(value);
56442};
56443
56444/* harmony default export */ __webpack_exports__["a"] = (isFinitePolyfill);
56445
56446
56447/***/ }),
56448
56449/***/ "lSNA":
vendor: 4,365 bytes, lines 56450-56608
56450/***/ (function(module, exports) {
56451
56452function _defineProperty(obj, key, value) {
56453  if (key in obj) {
56454    Object.defineProperty(obj, key, {
56455      value: value,
56456      enumerable: true,
56457      configurable: true,
56458      writable: true
56459    });
56460  } else {
56461    obj[key] = value;
56462  }
56463
56464  return obj;
56465}
56466
56467module.exports = _defineProperty;
56468
56469/***/ }),
56470
56471/***/ "lTCR":
56472/***/ (function(module, exports, __webpack_require__) {
56473
56474var parser = __webpack_require__("EMzn");
56475
56476var parse = parser.parse;
56477
56478// Strip insignificant whitespace
56479// Note that this could do a lot more, such as reorder fields etc.
56480function normalize(string) {
56481  return string.replace(/[\s,]+/g, ' ').trim();
56482}
56483
56484// A map docString -> graphql document
56485var docCache = {};
56486
56487// A map fragmentName -> [normalized source]
56488var fragmentSourceMap = {};
56489
56490function cacheKeyFromLoc(loc) {
56491  return normalize(loc.source.body.substring(loc.start, loc.end));
56492}
56493
56494// For testing.
56495function resetCaches() {
56496  docCache = {};
56497  fragmentSourceMap = {};
56498}
56499
56500// Take a unstripped parsed document (query/mutation or even fragment), and
56501// check all fragment definitions, checking for name->source uniqueness.
56502// We also want to make sure only unique fragments exist in the document.
56503var printFragmentWarnings = true;
56504function processFragments(ast) {
56505  var astFragmentMap = {};
56506  var definitions = [];
56507
56508  for (var i = 0; i < ast.definitions.length; i++) {
56509    var fragmentDefinition = ast.definitions[i];
56510
56511    if (fragmentDefinition.kind === 'FragmentDefinition') {
56512      var fragmentName = fragmentDefinition.name.value;
56513      var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);
56514
56515      // We know something about this fragment
56516      if (fragmentSourceMap.hasOwnProperty(fragmentName) && !fragmentSourceMap[fragmentName][sourceKey]) {
56517
56518        // this is a problem because the app developer is trying to register another fragment with
56519        // the same name as one previously registered. So, we tell them about it.
56520        if (printFragmentWarnings) {
56521          console.warn("Warning: fragment with name " + fragmentName + " already exists.\n"
56522            + "graphql-tag enforces all fragment names across your application to be unique; read more about\n"
56523            + "this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names");
56524        }
56525
56526        fragmentSourceMap[fragmentName][sourceKey] = true;
56527
56528      } else if (!fragmentSourceMap.hasOwnProperty(fragmentName)) {
56529        fragmentSourceMap[fragmentName] = {};
56530        fragmentSourceMap[fragmentName][sourceKey] = true;
56531      }
56532
56533      if (!astFragmentMap[sourceKey]) {
56534        astFragmentMap[sourceKey] = true;
56535        definitions.push(fragmentDefinition);
56536      }
56537    } else {
56538      definitions.push(fragmentDefinition);
56539    }
56540  }
56541
56542  ast.definitions = definitions;
56543  return ast;
56544}
56545
56546function disableFragmentWarnings() {
56547  printFragmentWarnings = false;
56548}
56549
56550function stripLoc(doc, removeLocAtThisLevel) {
56551  var docType = Object.prototype.toString.call(doc);
56552
56553  if (docType === '[object Array]') {
56554    return doc.map(function (d) {
56555      return stripLoc(d, removeLocAtThisLevel);
56556    });
56557  }
56558
56559  if (docType !== '[object Object]') {
56560    throw new Error('Unexpected input.');
56561  }
56562
56563  // We don't want to remove the root loc field so we can use it
56564  // for fragment substitution (see below)
56565  if (removeLocAtThisLevel && doc.loc) {
56566    delete doc.loc;
56567  }
56568
56569  // https://github.com/apollographql/graphql-tag/issues/40
56570  if (doc.loc) {
56571    delete doc.loc.startToken;
56572    delete doc.loc.endToken;
56573  }
56574
56575  var keys = Object.keys(doc);
56576  var key;
56577  var value;
56578  var valueType;
56579
56580  for (key in keys) {
56581    if (keys.hasOwnProperty(key)) {
56582      value = doc[keys[key]];
56583      valueType = Object.prototype.toString.call(value);
56584
56585      if (valueType === '[object Object]' || valueType === '[object Array]') {
56586        doc[keys[key]] = stripLoc(value, true);
56587      }
56588    }
56589  }
56590
56591  return doc;
56592}
56593
56594var experimentalFragmentVariables = false;
56595function parseDocument(doc) {
56596  var cacheKey = normalize(doc);
56597
56598  if (docCache[cacheKey]) {
56599    return docCache[cacheKey];
56600  }
56601
56602  var parsed = parse(doc, { experimentalFragmentVariables: experimentalFragmentVariables });
56603  if (!parsed || parsed.kind !== 'Document') {
56604    throw new Error('Not a valid GraphQL document.');
56605  }
56606
56607  // check that all "new" fragments inside the documents are consistent with
56608  // existing fragments of the same name
56609  parsed = processFragments(parsed);
56610  parsed = stripLoc(parsed, false);
56611  docCache[cacheKey] = parsed;
56612
56613  return parsed;
56614}
56615
56616function enableExperimentalFragmentVariables() {
56617  experimentalFragmentVariables = true;
56618}
56619
56620function disableExperimentalFragmentVariables() {
56621  experimentalFragmentVariables = false;
56622}
56623
56624// XXX This should eventually disallow arbitrary string interpolation, like Relay does
56625function gql(/* arguments */) {
56626  var args = Array.prototype.slice.call(arguments);
56627
56628  var literals = args[0];
56629
56630  // We always get literals[0] and then matching post literals for each arg given
56631  var result = (typeof(literals) === "string") ? literals : literals[0];
56632
56633  for (var i = 1; i < args.length; i++) {
56634    if (args[i] && args[i].kind && args[i].kind === 'Document') {
56635      result += args[i].loc.source.body;
56636    } else {
56637      result += args[i];
56638    }
56639
56640    result += literals[i];
56641  }
56642
56643  return parseDocument(result);
56644}
56645
56646// Support typescript, which isn't as nice as Babel about default exports
56647gql.default = gql;
56648gql.resetCaches = resetCaches;
56649gql.disableFragmentWarnings = disableFragmentWarnings;
56650gql.enableExperimentalFragmentVariables = enableExperimentalFragmentVariables;
56651gql.disableExperimentalFragmentVariables = disableExperimentalFragmentVariables;
56652
56653module.exports = gql;
56654
56655
56656/***/ }),
56657
56658/***/ "lXvH":
56659/***/ (function(module, exports, __webpack_require__) {
56660
56661"use strict";
56662
56663
56664var fnToStr = Function.prototype.toString;
56665var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
56666var badArrayLike;
56667var isCallableMarker;
56668if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
56669	try {
56670		badArrayLike = Object.defineProperty({}, 'length', {
56671			get: function () {
56672				throw isCallableMarker;
56673			}
56674		});
56675		isCallableMarker = {};
56676		// eslint-disable-next-line no-throw-literal
56677		reflectApply(function () { throw 42; }, null, badArrayLike);
56678	} catch (_) {
56679		if (_ !== isCallableMarker) {
56680			reflectApply = null;
56681		}
56682	}
56683} else {
56684	reflectApply = null;
56685}
56686
56687var constructorRegex = /^\s*class\b/;
56688var isES6ClassFn = function isES6ClassFunction(value) {
56689	try {
56690		var fnStr = fnToStr.call(value);
56691		return constructorRegex.test(fnStr);
56692	} catch (e) {
56693		return false; // not a function
56694	}
56695};
56696
56697var tryFunctionObject = function tryFunctionToStr(value) {
56698	try {
56699		if (isES6ClassFn(value)) { return false; }
56700		fnToStr.call(value);
56701		return true;
56702	} catch (e) {
56703		return false;
56704	}
56705};
56706var toStr = Object.prototype.toString;
56707var fnClass = '[object Function]';
56708var genClass = '[object GeneratorFunction]';
56709var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
56710/* globals document: false */
56711var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};
56712
56713module.exports = reflectApply
56714	? function isCallable(value) {
56715		if (value === documentDotAll) { return true; }
56716		if (!value) { return false; }
56717		if (typeof value !== 'function' && typeof value !== 'object') { return false; }
56718		if (typeof value === 'function' && !value.prototype) { return true; }
56719		try {
56720			reflectApply(value, null, badArrayLike);
56721		} catch (e) {
56722			if (e !== isCallableMarker) { return false; }
56723		}
56724		return !isES6ClassFn(value);
56725	}
56726	: function isCallable(value) {
56727		if (value === documentDotAll) { return true; }
56728		if (!value) { return false; }
56729		if (typeof value !== 'function' && typeof value !== 'object') { return false; }
56730		if (typeof value === 'function' && !value.prototype) { return true; }
56731		if (hasToStringTag) { return tryFunctionObject(value); }
56732		if (isES6ClassFn(value)) { return false; }
56733		var strClass = toStr.call(value);
56734		return strClass === fnClass || strClass === genClass;
56735	};
56736
56737
56738/***/ }),
56739
56740/***/ "lb3J":
56741/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
56742
56743"use strict";
56744/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OverlappingFieldsCanBeMergedRule; });
56745/* harmony import */ var _polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1/U3");
56746/* harmony import */ var _polyfills_objectEntries_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Y/la");
56747/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("rWdj");
56748/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("dWS+");
56749/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("/jXB");
56750/* harmony import */ var _language_printer_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("dQau");
56751/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("axIb");
56752/* harmony import */ var _utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("umOc");
56753
56754
56755
56756
56757
56758
56759
56760
56761
56762function reasonMessage(reason) {
56763  if (Array.isArray(reason)) {
56764    return reason.map(function (_ref) {
56765      var responseName = _ref[0],
56766          subReason = _ref[1];
56767      return "subfields \"".concat(responseName, "\" conflict because ") + reasonMessage(subReason);
56768    }).join(' and ');
56769  }
56770
56771  return reason;
56772}
56773/**
56774 * Overlapping fields can be merged
56775 *
56776 * A selection set is only valid if all fields (including spreading any
56777 * fragments) either correspond to distinct response names or can be merged
56778 * without ambiguity.
56779 */
56780
56781
56782function OverlappingFieldsCanBeMergedRule(context) {
56783  // A memoization for when two fragments are compared "between" each other for
56784  // conflicts. Two fragments may be compared many times, so memoizing this can
56785  // dramatically improve the performance of this validator.
56786  var comparedFragmentPairs = new PairSet(); // A cache for the "field map" and list of fragment names found in any given
56787  // selection set. Selection sets may be asked for this information multiple
56788  // times, so this improves the performance of this validator.
56789
56790  var cachedFieldsAndFragmentNames = new Map();
56791  return {
56792    SelectionSet: function SelectionSet(selectionSet) {
56793      var conflicts = findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, context.getParentType(), selectionSet);
56794
56795      for (var _i2 = 0; _i2 < conflicts.length; _i2++) {
56796        var _ref3 = conflicts[_i2];
56797        var _ref2$ = _ref3[0];
56798        var responseName = _ref2$[0];
56799        var reason = _ref2$[1];
56800        var fields1 = _ref3[1];
56801        var fields2 = _ref3[2];
56802        var reasonMsg = reasonMessage(reason);
56803        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_3__[/* GraphQLError */ "a"]("Fields \"".concat(responseName, "\" conflict because ").concat(reasonMsg, ". Use different aliases on the fields to fetch both if this was intentional."), fields1.concat(fields2)));
56804      }
56805    }
56806  };
56807}
56808
56809/**
56810 * Algorithm:
56811 *
56812 * Conflicts occur when two fields exist in a query which will produce the same
56813 * response name, but represent differing values, thus creating a conflict.
56814 * The algorithm below finds all conflicts via making a series of comparisons
56815 * between fields. In order to compare as few fields as possible, this makes
56816 * a series of comparisons "within" sets of fields and "between" sets of fields.
56817 *
56818 * Given any selection set, a collection produces both a set of fields by
56819 * also including all inline fragments, as well as a list of fragments
56820 * referenced by fragment spreads.
56821 *
56822 * A) Each selection set represented in the document first compares "within" its
56823 * collected set of fields, finding any conflicts between every pair of
56824 * overlapping fields.
56825 * Note: This is the *only time* that a the fields "within" a set are compared
56826 * to each other. After this only fields "between" sets are compared.
56827 *
56828 * B) Also, if any fragment is referenced in a selection set, then a
56829 * comparison is made "between" the original set of fields and the
56830 * referenced fragment.
56831 *
56832 * C) Also, if multiple fragments are referenced, then comparisons
56833 * are made "between" each referenced fragment.
56834 *
56835 * D) When comparing "between" a set of fields and a referenced fragment, first
56836 * a comparison is made between each field in the original set of fields and
56837 * each field in the the referenced set of fields.
56838 *
56839 * E) Also, if any fragment is referenced in the referenced selection set,
56840 * then a comparison is made "between" the original set of fields and the
56841 * referenced fragment (recursively referring to step D).
56842 *
56843 * F) When comparing "between" two fragments, first a comparison is made between
56844 * each field in the first referenced set of fields and each field in the the
56845 * second referenced set of fields.
56846 *
56847 * G) Also, any fragments referenced by the first must be compared to the
56848 * second, and any fragments referenced by the second must be compared to the
56849 * first (recursively referring to step F).
56850 *
56851 * H) When comparing two fields, if both have selection sets, then a comparison
56852 * is made "between" both selection sets, first comparing the set of fields in
56853 * the first selection set with the set of fields in the second.
56854 *
56855 * I) Also, if any fragment is referenced in either selection set, then a
56856 * comparison is made "between" the other set of fields and the
56857 * referenced fragment.
56858 *
56859 * J) Also, if two fragments are referenced in both selection sets, then a
56860 * comparison is made "between" the two fragments.
56861 *
56862 */
56863// Find all conflicts found "within" a selection set, including those found
56864// via spreading in fragments. Called when visiting each SelectionSet in the
56865// GraphQL Document.
56866function findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) {
56867  var conflicts = [];
56868
56869  var _getFieldsAndFragment = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet),
56870      fieldMap = _getFieldsAndFragment[0],
56871      fragmentNames = _getFieldsAndFragment[1]; // (A) Find find all conflicts "within" the fields of this selection set.
56872  // Note: this is the *only place* `collectConflictsWithin` is called.
56873
56874
56875  collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap);
56876
56877  if (fragmentNames.length !== 0) {
56878    // (B) Then collect conflicts between these fields and those represented by
56879    // each spread fragment name found.
56880    for (var i = 0; i < fragmentNames.length; i++) {
56881      collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fieldMap, fragmentNames[i]); // (C) Then compare this fragment with all other fragments found in this
56882      // selection set to collect conflicts between fragments spread together.
56883      // This compares each item in the list of fragment names to every other
56884      // item in that same list (except for itself).
56885
56886      for (var j = i + 1; j < fragmentNames.length; j++) {
56887        collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j]);
56888      }
56889    }
56890  }
56891
56892  return conflicts;
56893}
56893 // Collect all conflicts found between a set of fields and a fragment reference
56894// including via spreading in any nested fragments.
56895
56896
56897function collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) {
56898  var fragment = context.getFragment(fragmentName);
56899
56900  if (!fragment) {
56901    return;
56902  }
56903
56904  var _getReferencedFieldsA = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment),
56905      fieldMap2 = _getReferencedFieldsA[0],
56906      fragmentNames2 = _getReferencedFieldsA[1]; // Do not compare a fragment's fieldMap to itself.
56907
56908
56909  if (fieldMap === fieldMap2) {
56910    return;
56911  } // (D) First collect any conflicts between the provided collection of fields
56912  // and the collection of fields represented by the given fragment.
56913
56914
56915  collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2); // (E) Then collect any conflicts between the provided collection of fields
56916  // and any fragment names found in the given fragment.
56917
56918  for (var i = 0; i < fragmentNames2.length; i++) {
56919    collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentNames2[i]);
56920  }
56921} // Collect all conflicts found between two fragments, including via spreading in
56922// any nested fragments.
56923
56924
56925function collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) {
56926  // No need to compare a fragment to itself.
56927  if (fragmentName1 === fragmentName2) {
56928    return;
56929  } // Memoize so two fragments are not compared for conflicts more than once.
56930
56931
56932  if (comparedFragmentPairs.has(fragmentName1, fragmentName2, areMutuallyExclusive)) {
56933    return;
56934  }
56935
56936  comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive);
56937  var fragment1 = context.getFragment(fragmentName1);
56938  var fragment2 = context.getFragment(fragmentName2);
56939
56940  if (!fragment1 || !fragment2) {
56941    return;
56942  }
56943
56944  var _getReferencedFieldsA2 = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment1),
56945      fieldMap1 = _getReferencedFieldsA2[0],
56946      fragmentNames1 = _getReferencedFieldsA2[1];
56947
56948  var _getReferencedFieldsA3 = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment2),
56949      fieldMap2 = _getReferencedFieldsA3[0],
56950      fragmentNames2 = _getReferencedFieldsA3[1]; // (F) First, collect all conflicts between these two collections of fields
56951  // (not including any nested fragments).
56952
56953
56954  collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (G) Then collect conflicts between the first fragment and any nested
56955  // fragments spread in the second fragment.
56956
56957  for (var j = 0; j < fragmentNames2.length; j++) {
56958    collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentNames2[j]);
56959  } // (G) Then collect conflicts between the second fragment and any nested
56960  // fragments spread in the first fragment.
56961
56962
56963  for (var i = 0; i < fragmentNames1.length; i++) {
56964    collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentNames1[i], fragmentName2);
56965  }
56966} // Find all conflicts found between two selection sets, including those found
56967// via spreading in fragments. Called when determining if conflicts exist
56968// between the sub-fields of two overlapping fields.
56969
56970
56971function findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) {
56972  var conflicts = [];
56973
56974  var _getFieldsAndFragment2 = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType1, selectionSet1),
56975      fieldMap1 = _getFieldsAndFragment2[0],
56976      fragmentNames1 = _getFieldsAndFragment2[1];
56977
56978  var _getFieldsAndFragment3 = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType2, selectionSet2),
56979      fieldMap2 = _getFieldsAndFragment3[0],
56980      fragmentNames2 = _getFieldsAndFragment3[1];
56980 // (H) First, collect all conflicts between these two collections of field.
56981
56982
56983  collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (I) Then collect conflicts between the first collection of fields and
56984  // those referenced by each fragment name associated with the second.
56985
56986  if (fragmentNames2.length !== 0) {
56987    for (var j = 0; j < fragmentNames2.length; j++) {
56988      collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentNames2[j]);
56989    }
56990  } // (I) Then collect conflicts between the second collection of fields and
56991  // those referenced by each fragment name associated with the first.
56992
56993
56994  if (fragmentNames1.length !== 0) {
56995    for (var i = 0; i < fragmentNames1.length; i++) {
56996      collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentNames1[i]);
56997    }
56998  } // (J) Also collect conflicts between any fragment names by the first and
56999  // fragment names by the second. This compares each item in the first set of
57000  // names to each item in the second set of names.
57001
57002
57003  for (var _i3 = 0; _i3 < fragmentNames1.length; _i3++) {
57004    for (var _j = 0; _j < fragmentNames2.length; _j++) {
57005      collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentNames1[_i3], fragmentNames2[_j]);
57006    }
57007  }
57008
57009  return conflicts;
57010} // Collect all Conflicts "within" one collection of fields.
57011
57012
57013function collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) {
57014  // A field map is a keyed collection, where each key represents a response
57015  // name and the value at that key is a list of all fields which provide that
57016  // response name. For every response name, if there are multiple fields, they
57017  // must be compared to find a potential conflict.
57018  for (var _i5 = 0, _objectEntries2 = Object(_polyfills_objectEntries_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(fieldMap); _i5 < _objectEntries2.length; _i5++) {
57019    var _ref5 = _objectEntries2[_i5];
57020    var responseName = _ref5[0];
57021    var fields = _ref5[1];
57022
57023    // This compares every field in the list to every other field in this list
57024    // (except to itself). If the list only has one item, nothing needs to
57025    // be compared.
57026    if (fields.length > 1) {
57027      for (var i = 0; i < fields.length; i++) {
57028        for (var j = i + 1; j < fields.length; j++) {
57029          var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, // within one collection is never mutually exclusive
57030          responseName, fields[i], fields[j]);
57031
57032          if (conflict) {
57033            conflicts.push(conflict);
57034          }
57035        }
57036      }
57037    }
57038  }
57039} // Collect all Conflicts between two collections of fields. This is similar to,
57040// but different from the `collectConflictsWithin` function above. This check
57041// assumes that `collectConflictsWithin` has already been called on each
57042// provided collection of fields. This is true because this validator traverses
57043// each individual selection set.
57044
57045
57046function collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {
57047  // A field map is a keyed collection, where each key represents a response
57048  // name and the value at that key is a list of all fields which provide that
57049  // response name. For any response name which appears in both provided field
57050  // maps, each field from the first field map must be compared to every field
57051  // in the second field map to find potential conflicts.
57052  for (var _i7 = 0, _Object$keys2 = Object.keys(fieldMap1); _i7 < _Object$keys2.length; _i7++) {
57053    var responseName = _Object$keys2[_i7];
57054    var fields2 = fieldMap2[responseName];
57055
57056    if (fields2) {
57057      var fields1 = fieldMap1[responseName];
57058
57059      for (var i = 0; i < fields1.length; i++) {
57060        for (var j = 0; j < fields2.length; j++) {
57061          var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, fields1[i], fields2[j]);
57062
57063          if (conflict) {
57064            conflicts.push(conflict);
57065          }
57066        }
57067      }
57068    }
57069  }
57070} // Determines if there is a conflict between two particular fields, including
57071// comparing their sub-fields.
57072
57073
57074function findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) {
57075  var parentType1 = field1[0],
57076      node1 = field1[1],
57077      def1 = field1[2];
57078  var parentType2 = field2[0],
57079      node2 = field2[1],
57080      def2 = field2[2]; // If it is known that two fields could not possibly apply at the same
57081  // time, due to the parent types, then it is safe to permit them to diverge
57082  // in aliased field or arguments used as they will not present any ambiguity
57083  // by differing.
57084  // It is known that two parent types could never overlap if they are
57085  // different Object types. Interface or Union types might overlap - if not
57086  // in the current state of the schema, then perhaps in some future version,
57087  // thus may not safely diverge.
57088
57089  var areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isObjectType */ "N"])(parentType1) && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isObjectType */ "N"])(parentType2);
57090
57091  if (!areMutuallyExclusive) {
57092    var _node1$arguments, _node2$arguments;
57093
57094    // Two aliases must refer to the same field.
57095    var name1 = node1.name.value;
57096    var name2 = node2.name.value;
57097
57098    if (name1 !== name2) {
57099      return [[responseName, "\"".concat(name1, "\" and \"").concat(name2, "\" are different fields")], [node1], [node2]];
57100    } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
57101
57102
57103    var args1 = (_node1$arguments = node1.arguments) !== null && _node1$arguments !== void 0 ? _node1$arguments : []; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
57104
57105    var args2 = (_node2$arguments = node2.arguments) !== null && _node2$arguments !== void 0 ? _node2$arguments : []; // Two field calls must have the same arguments.
57106
57107    if (!sameArguments(args1, args2)) {
57108      return [[responseName, 'they have differing arguments'], [node1], [node2]];
57109    }
57110  } // The return type for each field.
57111
57112
57113  var type1 = def1 === null || def1 === void 0 ? void 0 : def1.type;
57114  var type2 = def2 === null || def2 === void 0 ? void 0 : def2.type;
57115
57116  if (type1 && type2 && doTypesConflict(type1, type2)) {
57117    return [[responseName, "they return conflicting types \"".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type1), "\" and \"").concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(type2), "\"")], [node1], [node2]];
57118  } // Collect and compare sub-fields. Use the same "visited fragment names" list
57119  // for both collections so fields in a fragment reference are never
57120  // compared to themselves.
57121
57122
57123  var selectionSet1 = node1.selectionSet;
57124  var selectionSet2 = node2.selectionSet;
57125
57126  if (selectionSet1 && selectionSet2) {
57127    var conflicts = findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* getNamedType */ "A"])(type1), selectionSet1, Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* getNamedType */ "A"])(type2), selectionSet2);
57128    return subfieldConflicts(conflicts, responseName, node1, node2);
57129  }
57130}
57131
57132function sameArguments(arguments1, arguments2) {
57133  if (arguments1.length !== arguments2.length) {
57134    return false;
57135  }
57136
57137  return arguments1.every(function (argument1) {
57138    var argument2 = Object(_polyfills_find_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(arguments2, function (argument) {
57139      return argument.name.value === argument1.name.value;
57140    });
57141
57142    if (!argument2) {
57143      return false;
57144    }
57145
57146    return sameValue(argument1.value, argument2.value);
57147  });
57148}
57149
57150function sameValue(value1, value2) {
57151  return Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_5__[/* print */ "a"])(value1) === Object(_language_printer_mjs__WEBPACK_IMPORTED_MODULE_5__[/* print */ "a"])(value2);
57152} // Two types conflict if both types could not apply to a value simultaneously.
57153// Composite types are ignored as their individual field types will be compared
57154// later recursively. However List and Non-Null types must match.
57155
57156
57157function doTypesConflict(type1, type2) {
57158  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isListType */ "J"])(type1)) {
57159    return Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isListType */ "J"])(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;
57160  }
57161
57162  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isListType */ "J"])(type2)) {
57163    return true;
57164  }
57165
57166  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isNonNullType */ "L"])(type1)) {
57167    return Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isNonNullType */ "L"])(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;
57168  }
57169
57170  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isNonNullType */ "L"])(type2)) {
57171    return true;
57172  }
57173
57174  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isLeafType */ "I"])(type1) || Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isLeafType */ "I"])(type2)) {
57175    return type1 !== type2;
57176  }
57177
57178  return false;
57179} // Given a selection set, return the collection of fields (a mapping of response
57180// name to field nodes and definitions) as well as a list of fragment names
57181// referenced via fragment spreads.
57182
57183
57184function getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet) {
57185  var cached = cachedFieldsAndFragmentNames.get(selectionSet);
57186
57187  if (!cached) {
57188    var nodeAndDefs = Object.create(null);
57189    var fragmentNames = Object.create(null);
57190
57191    _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames);
57192
57193    cached = [nodeAndDefs, Object.keys(fragmentNames)];
57194    cachedFieldsAndFragmentNames.set(selectionSet, cached);
57195  }
57196
57197  return cached;
57198} // Given a reference to a fragment, return the represented collection of fields
57199// as well as a list of nested fragment names referenced via fragment spreads.
57200
57201
57202function getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment) {
57203  // Short-circuit building a type from the node if possible.
57204  var cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet);
57205
57206  if (cached) {
57207    return cached;
57208  }
57209
57210  var fragmentType = Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_7__[/* typeFromAST */ "a"])(context.getSchema(), fragment.typeCondition);
57211  return getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragmentType, fragment.selectionSet);
57212}
57213
57214function _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames) {
57215  for (var _i9 = 0, _selectionSet$selecti2 = selectionSet.selections; _i9 < _selectionSet$selecti2.length; _i9++) {
57216    var selection = _selectionSet$selecti2[_i9];
57217
57218    switch (selection.kind) {
57219      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Kind */ "a"].FIELD:
57220        {
57221          var fieldName = selection.name.value;
57222          var fieldDef = void 0;
57223
57224          if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isObjectType */ "N"])(parentType) || Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_6__[/* isInterfaceType */ "H"])(parentType)) {
57225            fieldDef = parentType.getFields()[fieldName];
57226          }
57227
57228          var responseName = selection.alias ? selection.alias.value : fieldName;
57229
57230          if (!nodeAndDefs[responseName]) {
57231            nodeAndDefs[responseName] = [];
57232          }
57233
57234          nodeAndDefs[responseName].push([parentType, selection, fieldDef]);
57235          break;
57236        }
57237
57238      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Kind */ "a"].FRAGMENT_SPREAD:
57239        fragmentNames[selection.name.value] = true;
57240        break;
57241
57242      case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[/* Kind */ "a"].INLINE_FRAGMENT:
57243        {
57244          var typeCondition = selection.typeCondition;
57245          var inlineFragmentType = typeCondition ? Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_7__[/* typeFromAST */ "a"])(context.getSchema(), typeCondition) : parentType;
57246
57247          _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames);
57248
57249          break;
57250        }
57251    }
57252  }
57253} // Given a series of Conflicts which occurred between two sub-fields, generate
57254// a single Conflict.
57255
57256
57257function subfieldConflicts(conflicts, responseName, node1, node2) {
57258  if (conflicts.length > 0) {
57259    return [[responseName, conflicts.map(function (_ref6) {
57260      var reason = _ref6[0];
57261      return reason;
57262    })], conflicts.reduce(function (allFields, _ref7) {
57263      var fields1 = _ref7[1];
57264      return allFields.concat(fields1);
57265    }, [node1]), conflicts.reduce(function (allFields, _ref8) {
57266      var fields2 = _ref8[2];
57267      return allFields.concat(fields2);
57268    }, [node2])];
57269  }
57270}
57271/**
57272 * A way to keep track of pairs of things when the ordering of the pair does
57273 * not matter. We do this by maintaining a sort of double adjacency sets.
57274 */
57275
57276
57277var PairSet = /*#__PURE__*/function () {
57278  function PairSet() {
57279    this._data = Object.create(null);
57280  }
57281
57282  var _proto = PairSet.prototype;
57283
57284  _proto.has = function has(a, b, areMutuallyExclusive) {
57285    var first = this._data[a];
57286    var result = first && first[b];
57287
57288    if (result === undefined) {
57289      return false;
57290    } // areMutuallyExclusive being false is a superset of being true,
57291    // hence if we want to know if this PairSet "has" these two with no
57292    // exclusivity, we have to ensure it was added as such.
57293
57294
57295    if (areMutuallyExclusive === false) {
57296      return result === false;
57297    }
57298
57299    return true;
57300  };
57301
57302  _proto.add = function add(a, b, areMutuallyExclusive) {
57303    this._pairSetAdd(a, b, areMutuallyExclusive);
57304
57305    this._pairSetAdd(b, a, areMutuallyExclusive);
57306  };
57307
57308  _proto._pairSetAdd = function _pairSetAdd(a, b, areMutuallyExclusive) {
57309    var map = this._data[a];
57310
57311    if (!map) {
57312      map = Object.create(null);
57313      this._data[a] = map;
57314    }
57315
57316    map[b] = areMutuallyExclusive;
57317  };
57318
57319  return PairSet;
57320}();
57321
57322
57323/***/ }),
57324
57325/***/ "mZcR":
57326/***/ (function(module, exports, __webpack_require__) {
57327
57328"use strict";
57329/*!
57330 * unixify <https://github.com/jonschlinkert/unixify>
57331 *
57332 * Copyright (c) 2014, 2017, Jon Schlinkert.
57333 * Released under the MIT License.
57334 */
57335
57336
57337
57338var normalizePath = __webpack_require__("kIST");
57339
57340module.exports = function unixify(filepath, stripTrailing) {
57341  filepath = normalizePath(filepath, stripTrailing);
57342  return filepath.replace(/^([a-zA-Z]+:|\.\/)/, '');
57343};
57344
57345
57346/***/ }),
57347
57348/***/ "me4n":
57349/***/ (function(module, exports, __webpack_require__) {
57350
57351"use strict";
57352
57353
57354var GetIntrinsic = __webpack_require__("AM7I");
57355
57356var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%');
57357if ($gOPD) {
57358	try {
57359		$gOPD([], 'length');
57360	} catch (e) {
57361		// IE 8 has a broken gOPD
57362		$gOPD = null;
57363	}
57364}
57365
57366module.exports = $gOPD;
57367
57368
57369/***/ }),
57370
57371/***/ "ml7t":
57372/***/ (function(module, exports, __webpack_require__) {
57373
57374"use strict";
57375
57376
57377// https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey
57378
57379module.exports = function IsPropertyKey(argument) {
57380	return typeof argument === 'string' || typeof argument === 'symbol';
57381};
57382
57383
57384/***/ }),
57385
57386/***/ "mrSG":
57387/***/ (function(module, __webpack_exports__, __webpack_require__) {
57388
57389"use strict";
57390/* unused harmony export __extends */
57391/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __assign; });
57392/* unused harmony export __rest */
57393/* unused harmony export __decorate */
57394/* unused harmony export __param */
57395/* unused harmony export __metadata */
57396/* unused harmony export __awaiter */
57397/* unused harmony export __generator */
57398/* unused harmony export __createBinding */
57399/* unused harmony export __exportStar */
57400/* unused harmony export __values */
57401/* unused harmony export __read */
57402/* unused harmony export __spread */
57403/* unused harmony export __spreadArrays */
57404/* unused harmony export __spreadArray */
vendor: 8,189 bytes, lines 57404-57585
57404
57405/* unused harmony export __await */
57406/* unused harmony export __asyncGenerator */
57407/* unused harmony export __asyncDelegator */
57408/* unused harmony export __asyncValues */
57409/* unused harmony export __makeTemplateObject */
57410/* unused harmony export __importStar */
57411/* unused harmony export __importDefault */
57412/* unused harmony export __classPrivateFieldGet */
57413/* unused harmony export __classPrivateFieldSet */
57414/*! *****************************************************************************
57415Copyright (c) Microsoft Corporation.
57416
57417Permission to use, copy, modify, and/or distribute this software for any
57418purpose with or without fee is hereby granted.
57419
57420THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
57421REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
57422AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
57423INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
57424LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
57425OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
57426PERFORMANCE OF THIS SOFTWARE.
57427***************************************************************************** */
57428/* global Reflect, Promise */
57429
57430var extendStatics = function(d, b) {
57431    extendStatics = Object.setPrototypeOf ||
57432        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
57433        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
57434    return extendStatics(d, b);
57435};
57436
57437function __extends(d, b) {
57438    if (typeof b !== "function" && b !== null)
57439        throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57440    extendStatics(d, b);
57441    function __() { this.constructor = d; }
57442    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57443}
57444
57445var __assign = function() {
57446    __assign = Object.assign || function __assign(t) {
57447        for (var s, i = 1, n = arguments.length; i < n; i++) {
57448            s = arguments[i];
57449            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
57450        }
57451        return t;
57452    }
57453    return __assign.apply(this, arguments);
57454}
57455
57456function __rest(s, e) {
57457    var t = {};
57458    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
57459        t[p] = s[p];
57460    if (s != null && typeof Object.getOwnPropertySymbols === "function")
57461        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
57462            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
57463                t[p[i]] = s[p[i]];
57464        }
57465    return t;
57466}
57467
57468function __decorate(decorators, target, key, desc) {
57469    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
57470    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
57471    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
57472    return c > 3 && r && Object.defineProperty(target, key, r), r;
57473}
57474
57475function __param(paramIndex, decorator) {
57476    return function (target, key) { decorator(target, key, paramIndex); }
57477}
57478
57479function __metadata(metadataKey, metadataValue) {
57480    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
57481}
57482
57483function __awaiter(thisArg, _arguments, P, generator) {
57484    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
57485    return new (P || (P = Promise))(function (resolve, reject) {
57486        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
57487        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
57488        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
57489        step((generator = generator.apply(thisArg, _arguments || [])).next());
57490    });
57491}
57492
57493function __generator(thisArg, body) {
57494    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
57495    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
57496    function verb(n) { return function (v) { return step([n, v]); }; }
57497    function step(op) {
57498        if (f) throw new TypeError("Generator is already executing.");
57499        while (_) try {
57500            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
57501            if (y = 0, t) op = [op[0] & 2, t.value];
57502            switch (op[0]) {
57503                case 0: case 1: t = op; break;
57504                case 4: _.label++; return { value: op[1], done: false };
57505                case 5: _.label++; y = op[1]; op = [0]; continue;
57506                case 7: op = _.ops.pop(); _.trys.pop(); continue;
57507                default:
57508                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
57509                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
57510                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
57511                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
57512                    if (t[2]) _.ops.pop();
57513                    _.trys.pop(); continue;
57514            }
57515            op = body.call(thisArg, _);
57516        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
57517        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
57518    }
57519}
57520
57521var __createBinding = Object.create ? (function(o, m, k, k2) {
57522    if (k2 === undefined) k2 = k;
57523    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
57524}) : (function(o, m, k, k2) {
57525    if (k2 === undefined) k2 = k;
57526    o[k2] = m[k];
57527});
57528
57529function __exportStar(m, o) {
57530    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
57531}
57532
57533function __values(o) {
57534    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
57535    if (m) return m.call(o);
57536    if (o && typeof o.length === "number") return {
57537        next: function () {
57538            if (o && i >= o.length) o = void 0;
57539            return { value: o && o[i++], done: !o };
57540        }
57541    };
57542    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
57543}
57544
57545function __read(o, n) {
57546    var m = typeof Symbol === "function" && o[Symbol.iterator];
57547    if (!m) return o;
57548    var i = m.call(o), r, ar = [], e;
57549    try {
57550        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
57551    }
57552    catch (error) { e = { error: error }; }
57553    finally {
57554        try {
57555            if (r && !r.done && (m = i["return"])) m.call(i);
57556        }
57557        finally { if (e) throw e.error; }
57558    }
57559    return ar;
57560}
57561
57562/** @deprecated */
57563function __spread() {
57564    for (var ar = [], i = 0; i < arguments.length; i++)
57565        ar = ar.concat(__read(arguments[i]));
57566    return ar;
57567}
57568
57569/** @deprecated */
57570function __spreadArrays() {
57571    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
57572    for (var r = Array(s), k = 0, i = 0; i < il; i++)
57573        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
57574            r[k] = a[j];
57575    return r;
57576}
57577
57578function __spreadArray(to, from, pack) {
57579    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
57580        if (ar || !(i in from)) {
57581            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
57582            ar[i] = from[i];
57583        }
57584    }
57585    return to.concat(ar || 
vendor: 1,535 bytes, lines 57585-57612
57585from);
57586}
57587
57588function __await(v) {
57589    return this instanceof __await ? (this.v = v, this) : new __await(v);
57590}
57591
57592function __asyncGenerator(thisArg, _arguments, generator) {
57593    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
57594    var g = generator.apply(thisArg, _arguments || []), i, q = [];
57595    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
57596    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
57597    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
57598    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
57599    function fulfill(value) { resume("next", value); }
57600    function reject(value) { resume("throw", value); }
57601    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
57602}
57603
57604function __asyncDelegator(o) {
57605    var i, p;
57606    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
57607    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
57608}
57609
57610function __asyncValues(o) {
57611    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
57612    var m = o[Symbol.asyncIterator], i;
57613    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
57614    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
57615    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
57616}
57617
57618function __makeTemplateObject(cooked, raw) {
57619    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
57620    return cooked;
57621};
57622
57623var __setModuleDefault = Object.create ? (function(o, v) {
57624    Object.defineProperty(o, "default", { enumerable: true, value: v });
57625}) : function(o, v) {
57626    o["default"] = v;
57627};
57628
57629function __importStar(mod) {
57630    if (mod && mod.__esModule) return mod;
57631    var result = {};
57632    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
57633    __setModuleDefault(result, mod);
57634    return result;
57635}
57636
57637function __importDefault(mod) {
57638    return (mod && mod.__esModule) ? mod : { default: mod };
57639}
57640
57641function __classPrivateFieldGet(receiver, state, kind, f) {
57642    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
57643    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
57644    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
57645}
57646
57647function __classPrivateFieldSet(receiver, state, value, kind, f) {
57648    if (kind === "m") throw new TypeError("Private method is not writable");
57649    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
57650    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
57651    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
57652}
57653
57654
57655/***/ }),
57656
57657/***/ "nIiE":
57658/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
57659
57660"use strict";
57661/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueEnumValueNamesRule; });
57662/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
57663/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("axIb");
57664
57665
57666
57667/**
57668 * Unique enum value names
57669 *
57670 * A GraphQL enum type is only valid if all its values are uniquely named.
57671 */
57672function UniqueEnumValueNamesRule(context) {
57673  var schema = context.getSchema();
57674  var existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);
57675  var knownValueNames = Object.create(null);
57676  return {
57677    EnumTypeDefinition: checkValueUniqueness,
57678    EnumTypeExtension: checkValueUniqueness
57679  };
57680
57681  function checkValueUniqueness(node) {
57682    var _node$values;
57683
57684    var typeName = node.name.value;
57685
57686    if (!knownValueNames[typeName]) {
57687      knownValueNames[typeName] = Object.create(null);
57688    } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
57689
57690
57691    var valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];
57692    var valueNames = knownValueNames[typeName];
57693
57694    for (var _i2 = 0; _i2 < valueNodes.length; _i2++) {
57695      var valueDef = valueNodes[_i2];
57696      var valueName = valueDef.name.value;
57697      var existingType = existingTypeMap[typeName];
57698
57699      if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_1__[/* isEnumType */ "E"])(existingType) && existingType.getValue(valueName)) {
57700        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Enum value \"".concat(typeName, ".").concat(valueName, "\" already exists in the schema. It cannot also be defined in this type extension."), valueDef.name));
57701      } else if (valueNames[valueName]) {
57702        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Enum value \"".concat(typeName, ".").concat(valueName, "\" can only be defined once."), [valueNames[valueName], valueDef.name]));
57703      } else {
57704        valueNames[valueName] = valueDef.name;
57705      }
57706    }
57707
57708    return false;
57709  }
57710}
57711
57712
57713/***/ }),
57714
57715/***/ "neE4":
57716/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
57717
57718"use strict";
57719/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Source; });
57720/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isSource; });
57721/* harmony import */ var _polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2Fve");
57722/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("rWdj");
57723/* harmony import */ var _jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("t3R0");
57724/* harmony import */ var _jsutils_instanceOf_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Mw0p");
57725function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
57726
57727function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
57728
57729
57730
57731
57732
57733
57734/**
57735 * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
57736 * optional, but they are useful for clients who store GraphQL documents in source files.
57737 * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might
57738 * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`.
57739 * The `line` and `column` properties in `locationOffset` are 1-indexed.
57740 */
57741var Source = /*#__PURE__*/function () {
57742  function Source(body) {
57743    var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GraphQL request';
57744    var locationOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
57745      line: 1,
57746      column: 1
57747    };
57748    typeof body === 'string' || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(0, "Body must be a string. Received: ".concat(Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(body), "."));
57749    this.body = body;
57750    this.name = name;
57751    this.locationOffset = locationOffset;
57752    this.locationOffset.line > 0 || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(0, 'line in locationOffset is 1-indexed and must be positive.');
57753    this.locationOffset.column > 0 || Object(_jsutils_devAssert_mjs__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(0, 'column in locationOffset is 1-indexed and must be positive.');
57754  } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
57755
57756
57757  _createClass(Source, [{
57758    key: _polyfills_symbols_mjs__WEBPACK_IMPORTED_MODULE_0__[/* SYMBOL_TO_STRING_TAG */ "c"],
57759    get: function get() {
57760      return 'Source';
57761    }
57762  }]);
57763
57764  return Source;
57765}();
57766/**
57767 * Test if the given value is a Source object.
57768 *
57769 * @internal
57770 */
57771
57772// eslint-disable-next-line no-redeclare
57773function isSource(source) {
57774  return Object(_jsutils_instanceOf_mjs__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(source, Source);
57775}
57776
57777
57778/***/ }),
57779
57780/***/ "ntbh":
57781/***/ (function(module, exports) {
57782
57783/* WEBPACK VAR INJECTION */(function(__dirname) {module.exports =
57784/******/ (function() { // webpackBootstrap
57785/******/ 	var __webpack_modules__ = ({
57786
57787/***/ 149:
57788/***/ (function(module) {
57789
57790var g;
57791
57792// This works in non-strict mode
57793g = (function() {
57794	return this;
57795})();
57796
57797try {
57798	// This works if eval is allowed (see CSP)
57799	g = g || new Function("return this")();
57800} catch (e) {
57801	// This works if the window reference is available
57802	if (typeof window === "object") g = window;
57803}
57804
57805// g can still be undefined, but nothing to do about it...
57806// We return undefined, instead of nothing here, so it's
57807// easier to handle this case. if(!global) { ...}
57808
57809module.exports = g;
57810
57811
57812/***/ })
57813
57814/******/ 	});
57815/************************************************************************/
57816/******/ 	// The module cache
57817/******/ 	var __webpack_module_cache__ = {};
57818/******/ 	
57819/******/ 	// The require function
57820/******/ 	function __nccwpck_require__(moduleId) {
57821/******/ 		// Check if module is in cache
57822/******/ 		if(__webpack_module_cache__[moduleId]) {
57823/******/ 			return __webpack_module_cache__[moduleId].exports;
57824/******/ 		}
57825/******/ 		// Create a new module (and put it into the cache)
57826/******/ 		var module = __webpack_module_cache__[moduleId] = {
57827/******/ 			// no module.id needed
57828/******/ 			// no module.loaded needed
57829/******/ 			exports: {}
57830/******/ 		};
57831/******/ 	
57832/******/ 		// Execute the module function
57833/******/ 		var threw = true;
57834/******/ 		try {
57835/******/ 			__webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
57836/******/ 			threw = false;
57837/******/ 		} finally {
57838/******/ 			if(threw) delete __webpack_module_cache__[moduleId];
57839/******/ 		}
57840/******/ 	
57841/******/ 		// Return the exports of the module
57842/******/ 		return module.exports;
57843/******/ 	}
57844/******/ 	
57845/************************************************************************/
57846/******/ 	/* webpack/runtime/compat */
57847/******/ 	
57848/******/ 	__nccwpck_require__.ab = __dirname + "/";/************************************************************************/
57849/******/ 	// module exports must be returned from runtime so entry inlining is disabled
57850/******/ 	// startup
57851/******/ 	// Load entry module and return exports
57852/******/ 	return __nccwpck_require__(149);
57853/******/ })()
57854;
57855/* WEBPACK VAR INJECTION */}.call(this, "/"))
57856
57857/***/ }),
57858
57859/***/ "oCqT":
57860/***/ (function(module, exports, __webpack_require__) {
57861
57862"use strict";
57863
57864
57865module.exports = __webpack_require__("3SWA");
57866
57867
57868/***/ }),
57869
57870/***/ "oNNP":
57871/***/ (function(module, exports, __webpack_require__) {
57872
57873"use strict";
57874
57875
57876var bind = __webpack_require__("D3zA");
57877
57878module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
57879
57880
57881/***/ }),
57882
57883/***/ "oycr":
57884/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
57885
57886"use strict";
57887/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return syntaxError; });
57888/* harmony import */ var _GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
57889
57890/**
57891 * Produces a GraphQLError representing a syntax error, containing useful
57892 * descriptive information about the syntax error's position in the source.
57893 */
57894
57895function syntaxError(source, position, description) {
57896  return new _GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Syntax Error: ".concat(description), undefined, source, [position]);
57897}
57898
57899
57900/***/ }),
57901
57902/***/ "pRhh":
57903/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
57904
57905"use strict";
57906/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return KnownFragmentNamesRule; });
57907/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
57908
57909
57910/**
57911 * Known fragment names
57912 *
57913 * A GraphQL document is only valid if all `...Fragment` fragment spreads refer
57914 * to fragments defined in the same document.
57915 */
57916function KnownFragmentNamesRule(context) {
57917  return {
57918    FragmentSpread: function FragmentSpread(node) {
57919      var fragmentName = node.name.value;
57920      var fragment = context.getFragment(fragmentName);
57921
57922      if (!fragment) {
57923        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Unknown fragment \"".concat(fragmentName, "\"."), node.name));
57924      }
57925    }
57926  };
57927}
57928
57929
57930/***/ }),
57931
57932/***/ "plxK":
57933/***/ (function(module, exports, __webpack_require__) {
57934
57935"use strict";
57936
57937
57938var GetIntrinsic = __webpack_require__("AM7I");
57939
57940var $Array = GetIntrinsic('%Array%');
57941
57942// eslint-disable-next-line global-require
57943var toStr = !$Array.isArray && __webpack_require__("VF6F")('Object.prototype.toString');
57944
57945// https://ecma-international.org/ecma-262/6.0/#sec-isarray
57946
57947module.exports = $Array.isArray || function IsArray(argument) {
57948	return toStr(argument) === '[object Array]';
57949};
57950
57951
57952/***/ }),
57953
57954/***/ "pv/G":
57955/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
57956
57957"use strict";
57958/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return didYouMean; });
57959var MAX_SUGGESTIONS = 5;
57960/**
57961 * Given [ A, B, C ] return ' Did you mean A, B, or C?'.
57962 */
57963
57964// eslint-disable-next-line no-redeclare
57965function didYouMean(firstArg, secondArg) {
57966  var _ref = typeof firstArg === 'string' ? [firstArg, secondArg] : [undefined, firstArg],
57967      subMessage = _ref[0],
57968      suggestionsArg = _ref[1];
57969
57970  var message = ' Did you mean ';
57971
57972  if (subMessage) {
57973    message += subMessage + ' ';
57974  }
57975
57976  var suggestions = suggestionsArg.map(function (x) {
57977    return "\"".concat(x, "\"");
57978  });
57979
57980  switch (suggestions.length) {
57981    case 0:
57982      return '';
57983
57984    case 1:
57985      return message + suggestions[0] + '?';
57986
57987    case 2:
57988      return message + suggestions[0] + ' or ' + suggestions[1] + '?';
57989  }
57990
57991  var selected = suggestions.slice(0, MAX_SUGGESTIONS);
57992  var lastItem = selected.pop();
57993  return message + selected.join(', ') + ', or ' + lastItem + '?';
57994}
57995
57996
57997/***/ }),
57998
57999/***/ "py+6":
58000/***/ (function(module, __webpack_exports__, __webpack_require__) {
58001
58002"use strict";
58003
58004// CONCATENATED MODULE: ./node_modules/@ardatan/aggregate-error/node_modules/tslib/tslib.es6.js
58005/*! *****************************************************************************
58006Copyright (c) Microsoft Corporation.
58007
58008Permission to use, copy, modify, and/or distribute this software for any
58009purpose with or without fee is hereby granted.
58010
58011THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
58012REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
58013AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
58014INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
58015LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
58016OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
58017PERFORMANCE OF THIS SOFTWARE.
58018***************************************************************************** */
58019/* global Reflect, Promise */
58020
58021var extendStatics = function(d, b) {
58022    extendStatics = Object.setPrototypeOf ||
58023        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
58024        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, 
vendor: 4,309 bytes, lines 58024-58106
58024p)) d[p] = b[p]; };
58025    return extendStatics(d, b);
58026};
58027
58028function __extends(d, b) {
58029    extendStatics(d, b);
58030    function __() { this.constructor = d; }
58031    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
58032}
58033
58034var __assign = function() {
58035    __assign = Object.assign || function __assign(t) {
58036        for (var s, i = 1, n = arguments.length; i < n; i++) {
58037            s = arguments[i];
58038            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
58039        }
58040        return t;
58041    }
58042    return __assign.apply(this, arguments);
58043}
58044
58045function __rest(s, e) {
58046    var t = {};
58047    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
58048        t[p] = s[p];
58049    if (s != null && typeof Object.getOwnPropertySymbols === "function")
58050        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
58051            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
58052                t[p[i]] = s[p[i]];
58053        }
58054    return t;
58055}
58056
58057function __decorate(decorators, target, key, desc) {
58058    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
58059    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
58060    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
58061    return c > 3 && r && Object.defineProperty(target, key, r), r;
58062}
58063
58064function __param(paramIndex, decorator) {
58065    return function (target, key) { decorator(target, key, paramIndex); }
58066}
58067
58068function __metadata(metadataKey, metadataValue) {
58069    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
58070}
58071
58072function __awaiter(thisArg, _arguments, P, generator) {
58073    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
58074    return new (P || (P = Promise))(function (resolve, reject) {
58075        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
58076        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
58077        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
58078        step((generator = generator.apply(thisArg, _arguments || [])).next());
58079    });
58080}
58081
58082function __generator(thisArg, body) {
58083    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
58084    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
58085    function verb(n) { return function (v) { return step([n, v]); }; }
58086    function step(op) {
58087        if (f) throw new TypeError("Generator is already executing.");
58088        while (_) try {
58089            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58090            if (y = 0, t) op = [op[0] & 2, t.value];
58091            switch (op[0]) {
58092                case 0: case 1: t = op; break;
58093                case 4: _.label++; return { value: op[1], done: false };
58094                case 5: _.label++; y = op[1]; op = [0]; continue;
58095                case 7: op = _.ops.pop(); _.trys.pop(); continue;
58096                default:
58097                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
58098                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
58099                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
58100                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
58101                    if (t[2]) _.ops.pop();
58102                    _.trys.pop(); continue;
58103            }
58104            op = body.call(thisArg, _);
58105        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58106        if (op[0] & 5) throw op[1];
vendor: 5,152 bytes, lines 58106-58232
58106 return { value: op[0] ? op[1] : void 0, done: true };
58107    }
58108}
58109
58110var __createBinding = Object.create ? (function(o, m, k, k2) {
58111    if (k2 === undefined) k2 = k;
58112    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
58113}) : (function(o, m, k, k2) {
58114    if (k2 === undefined) k2 = k;
58115    o[k2] = m[k];
58116});
58117
58118function __exportStar(m, o) {
58119    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
58120}
58121
58122function __values(o) {
58123    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
58124    if (m) return m.call(o);
58125    if (o && typeof o.length === "number") return {
58126        next: function () {
58127            if (o && i >= o.length) o = void 0;
58128            return { value: o && o[i++], done: !o };
58129        }
58130    };
58131    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
58132}
58133
58134function __read(o, n) {
58135    var m = typeof Symbol === "function" && o[Symbol.iterator];
58136    if (!m) return o;
58137    var i = m.call(o), r, ar = [], e;
58138    try {
58139        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
58140    }
58141    catch (error) { e = { error: error }; }
58142    finally {
58143        try {
58144            if (r && !r.done && (m = i["return"])) m.call(i);
58145        }
58146        finally { if (e) throw e.error; }
58147    }
58148    return ar;
58149}
58150
58151function __spread() {
58152    for (var ar = [], i = 0; i < arguments.length; i++)
58153        ar = ar.concat(__read(arguments[i]));
58154    return ar;
58155}
58156
58157function __spreadArrays() {
58158    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
58159    for (var r = Array(s), k = 0, i = 0; i < il; i++)
58160        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
58161            r[k] = a[j];
58162    return r;
58163};
58164
58165function __await(v) {
58166    return this instanceof __await ? (this.v = v, this) : new __await(v);
58167}
58168
58169function __asyncGenerator(thisArg, _arguments, generator) {
58170    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
58171    var g = generator.apply(thisArg, _arguments || []), i, q = [];
58172    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
58173    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
58174    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
58175    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
58176    function fulfill(value) { resume("next", value); }
58177    function reject(value) { resume("throw", value); }
58178    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
58179}
58180
58181function __asyncDelegator(o) {
58182    var i, p;
58183    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
58184    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
58185}
58186
58187function __asyncValues(o) {
58188    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
58189    var m = o[Symbol.asyncIterator], i;
58190    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
58191    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
58192    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
58193}
58194
58195function __makeTemplateObject(cooked, raw) {
58196    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
58197    return cooked;
58198};
58199
58200var __setModuleDefault = Object.create ? (function(o, v) {
58201    Object.defineProperty(o, "default", { enumerable: true, value: v });
58202}) : function(o, v) {
58203    o["default"] = v;
58204};
58205
58206function __importStar(mod) {
58207    if (mod && mod.__esModule) return mod;
58208    var result = {};
58209    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
58210    __setModuleDefault(result, mod);
58211    return result;
58212}
58213
58214function __importDefault(mod) {
58215    return (mod && mod.__esModule) ? mod : { default: mod };
58216}
58217
58218function __classPrivateFieldGet(receiver, privateMap) {
58219    if (!privateMap.has(receiver)) {
58220        throw new TypeError("attempted to get private field on non-instance");
58221    }
58222    return privateMap.get(receiver);
58223}
58224
58225function __classPrivateFieldSet(receiver, privateMap, value) {
58226    if (!privateMap.has(receiver)) {
58227        throw new TypeError("attempted to set private field on non-instance");
58228    }
58229    privateMap.set(receiver, value);
58230    return value;
58231}
58232
58233// CONCATENATED MODULE: ./node_modules/@ardatan/aggregate-error/index.esm.js
58234
58235
58236var cleanInternalStack = function (stack) { return stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); };
58237
58238/**
58239Escape RegExp special characters.
58240You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
58241@example
58242```
58243import escapeStringRegexp = require('escape-string-regexp');
58244const escapedString = escapeStringRegexp('How much $ for a 🦄?');
58245//=> 'How much \\$ for a 🦄\\?'
58246new RegExp(escapedString);
58247```
58248*/
58249var escapeStringRegexp = function (string) {
58250    if (typeof string !== 'string') {
58251        throw new TypeError('Expected a string');
58252    }
58253    // Escape characters with special meaning either inside or outside character sets.
58254    // Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
58255    return string
58256        .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
58257        .replace(/-/g, '\\x2d');
58258};
58259
58260var extractPathRegex = /\s+at.*[(\s](.*)\)?/;
58261var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
58262/**
58263Clean up error stack traces. Removes the mostly unhelpful internal Node.js entries.
58264@param stack - The `stack` property of an `Error`.
58265@example
58266```
58267import cleanStack = require('clean-stack');
58268const error = new Error('Missing unicorn');
58269console.log(error.stack);
58270// Error: Missing unicorn
58271//     at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)
58272//     at Module._compile (module.js:409:26)
58273//     at Object.Module._extensions..js (module.js:416:10)
58274//     at Module.load (module.js:343:32)
58275//     at Function.Module._load (module.js:300:12)
58276//     at Function.Module.runMain (module.js:441:10)
58277//     at startup (node.js:139:18)
58278console.log(cleanStack(error.stack));
58279// Error: Missing unicorn
58280//     at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)
58281```
58282*/
58283var cleanStack = function (stack, basePath) {
58284    var basePathRegex = basePath && new RegExp("(at | \\()" + escapeStringRegexp(basePath), 'g');
58285    return stack.replace(/\\/g, '/')
58286        .split('\n')
58287        .filter(function (line) {
58288        var pathMatches = line.match(extractPathRegex);
58289        if (pathMatches === null || !pathMatches[1]) {
58290            return true;
58291        }
58292        var match = pathMatches[1];
58293        // Electron
58294        if (match.includes('.app/Contents/Resources/electron.asar') ||
58295            match.includes('.app/Contents/Resources/default_app.asar')) {
58296            return false;
58297        }
58298        return !pathRegex.test(match);
58299    })
58300        .filter(function (line) { return line.trim() !== ''; })
58301        .map(function (line) {
58302        if (basePathRegex) {
58303            line = line.replace(basePathRegex, '$1');
58304        }
58305        return line;
58306    })
58307        .join('\n');
58308};
58309
58310/**
58311Indent each line in a string.
58312@param string - The string to indent.
58313@param count - How many times you want `options.indent` repeated. Default: `1`.
58314@example
58315```
58316import indentString = require('indent-string');
58317indentString('Unicorns\nRainbows', 4);
58318//=> '    Unicorns\n    Rainbows'
58319indentString('Unicorns\nRainbows', 4, {indent: '♥'});
58320//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'
58321```
58322*/
58323var indentString = function (string, count, options) {
58324    if (count === void 0) { count = 1; }
58325    options = Object.assign({
58326        indent: ' ',
58327        includeEmptyLines: false,
58328    }, options);
58329    if (typeof string !== 'string') {
58330        throw new TypeError("Expected `input` to be a `string`, got `" + typeof string + "`");
58331    }
58332    if (typeof count !== 'number') {
58333        throw new TypeError("Expected `count` to be a `number`, got `" + typeof count + "`");
58334    }
58335    if (count < 0) {
58336        throw new RangeError("Expected `count` to be at least 0, got `" + count + "`");
58337    }
58338    if (typeof options.indent !== 'string') {
58339        throw new TypeError("Expected `options.indent` to be a `string`, got `" + typeof options.indent + "`");
58340    }
58341    if (count === 0) {
58342        return string;
58343    }
58344    var regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
58345    return string.replace(regex, options.indent.repeat(count));
58346};
58347
58348var index_esm_AggregateError = /** @class */ (function (_super) {
58349    __extends(AggregateError, _super);
58350    function AggregateError(errors) {
58351        var _this = this;
58352        if (!Array.isArray(errors)) {
58353            throw new TypeError("Expected input to be an Array, got " + typeof errors);
58354        }
58355        var normalizedErrors = errors.map(function (error) {
58356            if (error instanceof Error) {
58357                return error;
58358            }
58359            if (error !== null && typeof error === 'object') {
58360                // Handle plain error objects with message property and/or possibly other metadata
58361                return Object.assign(new Error(error.message), error);
58362            }
58363            return new Error(error);
58364        });
58365        var message = normalizedErrors
58366            .map(function (error) {
58367            // The `stack` property is not standardized, so we can't assume it exists
58368            return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error);
58369        })
58370            .join('\n');
58371        message = '\n' + indentString(message, 4);
58372        _this = _super.call(this, message) || this;
58373        _this.name = 'AggregateError';
58374        Object.defineProperty(_this, Symbol.iterator, {
58375            get: function () { return function () { return normalizedErrors[Symbol.iterator](); }; },
58376        });
58377        return _this;
58378    }
58379    return AggregateError;
58380}(Error));
58381
58382/* harmony default export */ var index_esm = __webpack_exports__["a"] = (index_esm_AggregateError);
58383//# sourceMappingURL=index.esm.js.map
58384
58385
58386/***/ }),
58387
58388/***/ "q34w":
58389/***/ (function(module, exports, __webpack_require__) {
58390
58391"use strict";
58392
58393
58394var regex = __webpack_require__("7alT")();
58395
58396module.exports = function(filepath) {
58397  if (typeof filepath !== 'string') {
58398    throw new TypeError('expected a string');
58399  }
58400  return regex.test(filepath);
58401};
58402
58403
58404/***/ }),
58405
58406/***/ "q5gm":
58407/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
58408
58409"use strict";
58410/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueOperationNamesRule; });
58411/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
58412
58413
58414/**
58415 * Unique operation names
58416 *
58417 * A GraphQL document is only valid if all defined operations have unique names.
58418 */
58419function UniqueOperationNamesRule(context) {
58420  var knownOperationNames = Object.create(null);
58421  return {
58422    OperationDefinition: function OperationDefinition(node) {
58423      var operationName = node.name;
58424
58425      if (operationName) {
58426        if (knownOperationNames[operationName.value]) {
58427          context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("There can be only one operation named \"".concat(operationName.value, "\"."), [knownOperationNames[operationName.value], operationName]));
58428        } else {
58429          knownOperationNames[operationName.value] = operationName;
58430        }
58431      }
58432
58433      return false;
58434    },
58435    FragmentDefinition: function FragmentDefinition() {
58436      return false;
58437    }
58438  };
58439}
58440
58441
58442/***/ }),
58443
58444/***/ "r+Cj":
58445/***/ (function(module, exports, __webpack_require__) {
58446
58447"use strict";
58448/**
58449 * Copyright (c) Facebook, Inc. and its affiliates.
58450 *
58451 * This source code is licensed under the MIT license found in the
58452 * LICENSE file in the root directory of this source tree.
58453 *
58454 * 
58455 * @format
58456 */
58457// flowlint ambiguous-object-type:error
58458
58459
58460var _interopRequireDefault = __webpack_require__("TqRt");
58461
58462var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA"));
58463
58464var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("RIqP"));
58465
58466function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
58467
58468function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
58469
58470function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
58471
58472function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
58473
58474function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
58475
58476var Profiler = __webpack_require__("tNbq");
58477
58478var orList = __webpack_require__("fzwd");
58479
58480var partitionArray = __webpack_require__("E690");
58481
58482var _require = __webpack_require__("sriv"),
58483    DEFAULT_HANDLE_KEY = _require.DEFAULT_HANDLE_KEY;
58484
58485var _require2 = __webpack_require__("VrDQ"),
58486    createCompilerError = _require2.createCompilerError,
58487    createUserError = _require2.createUserError,
58488    eachWithCombinedError = _require2.eachWithCombinedError;
58489
58490var _require3 = __webpack_require__("FFNC"),
58491    isExecutableDefinitionAST = _require3.isExecutableDefinitionAST;
58492
58493var _require4 = __webpack_require__("TYx5"),
58494    getFieldDefinitionLegacy = _require4.getFieldDefinitionLegacy;
58495
58496var _require5 = __webpack_require__("Tzvz"),
58497    parseGraphQL = _require5.parse,
58498    parseType = _require5.parseType,
58499    print = _require5.print,
58500    Source = _require5.Source;
58501
58502var ARGUMENT_DEFINITIONS = 'argumentDefinitions';
58503var ARGUMENTS = 'arguments';
58504var DEPRECATED_UNCHECKED_ARGUMENTS = 'uncheckedArguments_DEPRECATED';
58505var DIRECTIVE_WHITELIST = new Set([ARGUMENT_DEFINITIONS, DEPRECATED_UNCHECKED_ARGUMENTS, ARGUMENTS]);
58506/**
58507 * @internal
58508 *
58509 * This directive is not intended for use by developers directly. To set a field
58510 * handle in product code use a compiler plugin.
58511 */
58512
58513var CLIENT_FIELD = '__clientField';
58514var CLIENT_FIELD_HANDLE = 'handle';
58515var CLIENT_FIELD_KEY = 'key';
58516var CLIENT_FIELD_FILTERS = 'filters';
58517var INCLUDE = 'include';
58518var SKIP = 'skip';
58519var IF = 'if';
58520/**
58521 * Transforms GraphQL text into Relay Compiler's internal, strongly-typed
58522 * intermediate representation (IR).
58523 */
58524
58525function parse(schema, text, filename) {
58526  var ast = parseGraphQL(new Source(text, filename));
58527  var parser = new RelayParser(schema.extend(ast), ast.definitions);
58528  return parser.transform();
58529}
58530/**
58531 * Transforms untyped GraphQL parse trees (ASTs) into Relay Compiler's
58532 * internal, strongly-typed intermediate representation (IR).
58533 */
58534
58535
58536function transform(schema, definitions) {
58537  return Profiler.run('RelayParser.transform', function () {
58538    var parser = new RelayParser(schema, definitions);
58539    return parser.transform();
58540  });
58541}
58542/**
58543 * @private
58544 */
58545
58546
58547var RelayParser = /*#__PURE__*/function () {
58548  function RelayParser(schema, definitions) {
58549    var _this = this;
58550
58551    this._definitions = new Map(); // leaving this configurable to make it easy to experiment w changing later
58552
58553    this._getFieldDefinition = getFieldDefinitionLegacy;
58554    this._schema = schema;
58555    var duplicated = new Set();
58556    definitions.forEach(function (def) {
58557      if (isExecutableDefinitionAST(def)) {
58558        var name = getName(def);
58559
58560        if (_this._definitions.has(name)) {
58561          duplicated.add(name);
58562          return;
58563        }
58564
58565        _this._definitions.set(name, def);
58566      }
58567    });
58568
58569    if (duplicated.size) {
58570      throw createUserError('RelayParser: Encountered duplicate definitions for one or more ' + 'documents: each document must have a unique name. Duplicated documents:\n' + Array.from(duplicated, function (name) {
58571        return "- ".concat(name);
58572      }).join('\n'));
58573    }
58574  }
58575
58576  var _proto = RelayParser.prototype;
58577
58578  _proto.transform = function transform() {
58579    var _this2 = this;
58580
58581    var nodes = [];
58582    var entries = new Map(); // Construct a mapping of name to definition ast + variable definitions.
58583    // This allows the subsequent AST -> IR tranformation to reference the
58584    // defined arguments of referenced fragments.
58585
58586    eachWithCombinedError(this._definitions, function (_ref) {
58587      var name = _ref[0],
58588          definition = _ref[1];
58589
58590      var variableDefinitions = _this2._buildArgumentDefinitions(definition);
58591
58592      entries.set(name, {
58593        definition: definition,
58594        variableDefinitions: variableDefinitions
58595      });
58596    }); // Convert the ASTs to IR.
58597
58598    eachWithCombinedError(entries.values(), function (_ref2) {
58599      var definition = _ref2.definition,
58600          variableDefinitions = _ref2.variableDefinitions;
58601      var node = parseDefinition(_this2._schema, _this2._getFieldDefinition, entries, definition, variableDefinitions);
58602      nodes.push(node);
58603    });
58604    return nodes;
58605  }
58606  /**
58607   * Constructs a mapping of variable names to definitions for the given
58608   * operation/fragment definition.
58609   */
58610  ;
58611
58612  _proto._buildArgumentDefinitions = function _buildArgumentDefinitions(definition) {
58613    switch (definition.kind) {
58614      case 'OperationDefinition':
58615        return this._buildOperationArgumentDefinitions(definition);
58616
58617      case 'FragmentDefinition':
58618        return this._buildFragmentArgumentDefinitions(definition);
58619
58620      default:
58621        definition;
58622        throw createCompilerError("Unexpected ast kind '".concat(definition.kind, "'."), [definition]);
58623    }
58624  }
58625  /**
58626   * Constructs a mapping of variable names to definitions using the
58627   * variables defined in `@argumentDefinitions`.
58628   */
58629  ;
58630
58631  _proto._buildFragmentArgumentDefinitions = function _buildFragmentArgumentDefinitions(fragment) {
58632    var _this3 = this;
58633
58634    var variableDirectives = (fragment.directives || []).filter(function (directive) {
58635      return getName(directive) === ARGUMENT_DEFINITIONS;
58636    });
58637
58638    if (!variableDirectives.length) {
58639      return new Map();
58640    }
58641
58642    if (variableDirectives.length !== 1) {
58643      throw createUserError("Directive @".concat(ARGUMENT_DEFINITIONS, " may be defined at most once per ") + 'fragment.', null, variableDirectives);
58644    }
58645
58646    var variableDirective = variableDirectives[0]; // work, below accesses all report arguments could still be null/undefined.
58647
58648    var args = variableDirective.arguments;
58649
58650    if (variableDirective == null || !Array.isArray(args)) {
58651      return new Map();
58652    }
58653
58654    if (!args.length) {
58655      throw createUserError("Directive @".concat(ARGUMENT_DEFINITIONS, " requires arguments: remove the ") + 'directive to skip defining local variables for this fragment.', null, [variableDirective]);
58656    }
58657
58658    var variables = new Map();
58659    args.forEach(function (arg) {
58660      var _defaultValue$value;
58661
58662      var argName = getName(arg);
58663      var previousVariable = variables.get(argName);
58664
58665      if (previousVariable != null) {
58666        throw createUserError("Duplicate definition for variable '$".concat(argName, "'."), null, [previousVariable.ast, arg]);
58667      }
58668
58669      if (arg.value.kind !== 'ObjectValue') {
58670        throw createUserError("Expected definition for variable '$".concat(argName, "' to be an object ") + "with the shape: '{type: string, defaultValue?: mixed}.", null, [arg.value]);
58671      }
58672
58673      var defaultValueNode;
58674      var typeString;
58675      arg.value.fields.forEach(function (field) {
58676        var name = getName(field);
58677
58678        if (name === 'type') {
58679          typeString = transformLiteralValue(field.value, field);
58680        } else if (name === 'defaultValue') {
58681          defaultValueNode = field.value;
58682        } else {
58683          throw createUserError("Expected definition for variable '$".concat(argName, "' to be an object ") + "with the shape: '{type: string, defaultValue?: mixed}.", null, [arg.value]);
58684        }
58685      });
58686
58687      if (typeof typeString !== 'string') {
58688        throw createUserError("Expected definition for variable '$".concat(argName, "' to be an object ") + "with the shape: '{type: string, defaultValue?: mixed}.", null, [arg.value]);
58689      }
58690
58691      var typeFromAST = _this3._schema.getTypeFromAST(parseType(typeString));
58692
58693      if (typeFromAST == null) {
58694        throw createUserError("Unknown type \"".concat(typeString, "\" referenced in the argument definitions."), null, [arg]);
58695      }
58696
58697      var type = _this3._schema.asInputType(typeFromAST);
58698
58699      if (type == null) {
58700        throw createUserError("Expected type \"".concat(typeString, "\" to be an input type in the \"").concat(arg.name.value, "\" argument definitions."), null, [arg.value]);
58701      }
58702
58703      var defaultValue = defaultValueNode != null ? transformValue(_this3._schema, defaultValueNode, type, function (variableAst) {
58704        throw createUserError("Expected 'defaultValue' to be a literal, got a variable.", null, [variableAst]);
58705      }) : null;
58706
58707      if (defaultValue != null && defaultValue.kind !== 'Literal') {
58708        throw createUserError("Expected 'defaultValue' to be a literal, got a variable.", [defaultValue.loc]);
58709      }
58710
58711      variables.set(argName, {
58712        ast: arg,
58713        defaultValue: (_defaultValue$value = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value) !== null && _defaultValue$value !== void 0 ? _defaultValue$value : null,
58714        defined: true,
58715        name: argName,
58716        type: type
58717      });
58718    });
58719    return variables;
58720  }
58721  /**
58722   * Constructs a mapping of variable names to definitions using the
58723   * standard GraphQL syntax for variable definitions.
58724   */
58725  ;
58726
58727  _proto._buildOperationArgumentDefinitions = function _buildOperationArgumentDefinitions(operation) {
58728    var schema = this._schema;
58729    var variableDefinitions = new Map();
58730    (operation.variableDefinitions || []).forEach(function (def) {
58731      var name = getName(def.variable);
58732      var typeFromAST = schema.getTypeFromAST(def.type);
58733
58734      if (typeFromAST == null) {
58735        throw createUserError("Unknown type: '".concat(getTypeName(def.type), "'."), null, [def.type]);
58736      }
58737
58738      var type = schema.asInputType(typeFromAST);
58739
58740      if (type == null) {
58741        throw createUserError("Expected type \"".concat(getTypeName(def.type), "\" to be an input type."), null, [def.type]);
58742      }
58743
58744      var defaultValue = def.defaultValue ? transformLiteralValue(def.defaultValue, def) : null;
58745      var previousDefinition = variableDefinitions.get(name);
58746
58747      if (previousDefinition != null) {
58748        throw createUserError("Duplicate definition for variable '$".concat(name, "'."), null, [previousDefinition.ast, def]);
58749      }
58750
58751      variableDefinitions.set(name, {
58752        ast: def,
58753        defaultValue: defaultValue,
58754        defined: true,
58755        name: name,
58756        type: type
58757      });
58758    });
58759    return variableDefinitions;
58760  };
58761
58762  return RelayParser;
58763}();
58764/**
58765 * @private
58766 */
58767
58768
58769function parseDefinition(schema, getFieldDefinition, entries, definition, variableDefinitions) {
58770  var parser = new GraphQLDefinitionParser(schema, getFieldDefinition, entries, definition, variableDefinitions);
58771  return parser.transform();
58772}
58773/**
58774 * @private
58775 */
58776
58777
58778var GraphQLDefinitionParser = /*#__PURE__*/function () {
58779  function GraphQLDefinitionParser(schema, getFieldDefinition, entries, definition, variableDefinitions) {
58780    this._definition = definition;
58781    this._entries = entries;
58782    this._getFieldDefinition = getFieldDefinition;
58783    this._schema = schema;
58784    this._variableDefinitions = variableDefinitions;
58785    this._unknownVariables = new Map();
58786  }
58787
58788  var _proto2 = GraphQLDefinitionParser.prototype;
58789
58790  _proto2.transform = function transform() {
58791    var definition = this._definition;
58792
58793    switch (definition.kind) {
58794      case 'OperationDefinition':
58795        return this._transformOperation(definition);
58796
58797      case 'FragmentDefinition':
58798        return this._transformFragment(definition);
58799
58800      default:
58801        definition;
58802        throw createCompilerError("Unsupported definition type ".concat(definition.kind), [definition]);
58803    }
58804  };
58805
58806  _proto2._recordAndVerifyVariableReference = function _recordAndVerifyVariableReference(variable, name, usedAsType) {
58807    // Special case for variables used in @arguments where we currently
58808    // aren't guaranteed to be able to resolve the type.
58809    if (usedAsType == null) {
58810      if (!this._variableDefinitions.has(name) && !this._unknownVariables.has(name)) {
58811        this._unknownVariables.set(name, {
58812          ast: variable,
58813          type: null
58814        });
58815      }
58816
58817      return;
58818    }
58819
58820    var variableDefinition = this._variableDefinitions.get(name);
58821
58822    if (variableDefinition != null) {
58823      // If the variable is defined, all usages must be compatible
58824      var effectiveType = variableDefinition.type;
58825
58826      if (variableDefinition.defaultValue != null) {
58827        // If a default value is defined then it is guaranteed to be used
58828        // at runtime such that the effective type of the variable is non-null
58829        effectiveType = this._schema.getNonNullType(this._schema.getNullableType(effectiveType));
58830      }
58831
58832      if (!this._schema.isTypeSubTypeOf(effectiveType, usedAsType)) {
58833        throw createUserError("Variable '$".concat(name, "' was defined as type '").concat(String(variableDefinition.type), "' but used in a location expecting the type '").concat(String(usedAsType), "'"), null, [variableDefinition.ast, variable]);
58834      }
58835    } else {
58836      var previous = this._unknownVariables.get(name);
58837
58838      if (!previous || !previous.type) {
58839        // No previous usage, current type is strongest
58840        this._unknownVariables.set(name, {
58841          ast: variable,
58842          type: usedAsType
58843        });
58844      } else {
58845        var previousVariable = previous.ast,
58846            previousType = previous.type;
58847
58848        if (!(this._schema.isTypeSubTypeOf(usedAsType, previousType) || this._schema.isTypeSubTypeOf(previousType, usedAsType))) {
58849          throw createUserError("Variable '$".concat(name, "' was used in locations expecting the conflicting types '").concat(String(previousType), "' and '").concat(String(usedAsType), "'."), null, [previousVariable, variable]);
58850        } // If the new used type has stronger requirements, use that type as reference,
58851        // otherwise keep referencing the previous type
58852
58853
58854        if (this._schema.isTypeSubTypeOf(usedAsType, previousType)) {
58855          this._unknownVariables.set(name, {
58856            ast: variable,
58857            type: usedAsType
58858          });
58859        }
58860      }
58861    }
58862  };
58863
58864  _proto2._getDirectiveLocations = function _getDirectiveLocations() {
58865    if (!this._directiveLocations) {
58866      var directiveDefs = this._schema.getDirectives();
58867
58868      this._directiveLocations = new Map();
58869
58870      var _iterator = _createForOfIteratorHelper(directiveDefs),
58871          _step;
58872
58873      try {
58874        for (_iterator.s(); !(_step = _iterator.n()).done;) {
58875          var def = _step.value;
58876
58877          this._directiveLocations.set(def.name, def.locations);
58878        }
58879      } catch (err) {
58880        _iterator.e(err);
58881      } finally {
58882        _iterator.f();
58883      }
58884    }
58885
58886    return this._directiveLocations;
58887  };
58888
58889  _proto2._validateDirectivesLocation = function _validateDirectivesLocation(directives, allowedLocaction) {
58890    if (!directives || !directives.length) {
58891      return;
58892    }
58893
58894    var directiveLocs = this._getDirectiveLocations();
58895
58896    var mismatches = directives.filter(function (directive) {
58897      var name = getName(directive);
58898
58899      if (DIRECTIVE_WHITELIST.has(name)) {
58900        return false;
58901      }
58902
58903      var locs = directiveLocs.get(name);
58904
58905      if (locs == null) {
58906        throw createUserError("Unknown directive '".concat(name, "'."), null, [directive]);
58907      }
58908
58909      return !locs.some(function (loc) {
58910        return loc === allowedLocaction;
58911      });
58912    });
58913
58914    if (mismatches.length) {
58915      var invalidDirectives = mismatches.map(function (directive) {
58916        return '@' + getName(directive);
58917      }).join(', ');
58918      throw createUserError("Invalid directives ".concat(invalidDirectives, " found on ").concat(allowedLocaction, "."), null, mismatches);
58919    }
58920  };
58921
58922  _proto2._transformFragment = function _transformFragment(fragment) {
58923    var directives = this._transformDirectives((fragment.directives || []).filter(function (directive) {
58924      return getName(directive) !== ARGUMENT_DEFINITIONS;
58925    }), 'FRAGMENT_DEFINITION');
58926
58927    var typeFromAST = this._schema.getTypeFromAST(fragment.typeCondition);
58928
58929    if (typeFromAST == null) {
58930      throw createUserError("Fragment \"".concat(fragment.name.value, "\" cannot condition on unknown ") + "type \"".concat(String(fragment.typeCondition.name.value), "\"."), null, [fragment.typeCondition]);
58931    }
58932
58933    var type = this._schema.asCompositeType(typeFromAST);
58934
58935    if (type == null) {
58936      throw createUserError("Fragment \"".concat(fragment.name.value, "\" cannot condition on non composite ") + "type \"".concat(String(type), "\"."), null, [fragment.typeCondition]);
58937    }
58938
58939    var selections = this._transformSelections(fragment.selectionSet, type, fragment.typeCondition);
58940
58941    var argumentDefinitions = (0, _toConsumableArray2["default"])(buildArgumentDefinitions(this._variableDefinitions));
58942
58943    var _iterator2 = _createForOfIteratorHelper(this._unknownVariables),
58944        _step2;
58945
58946    try {
58947      for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
58948        var _step2$value = _step2.value,
58949            name = _step2$value[0],
58950            variableReference = _step2$value[1];
58951        argumentDefinitions.push({
58952          kind: 'RootArgumentDefinition',
58953          loc: buildLocation(variableReference.ast.loc),
58954          name: name,
58955          type: variableReference.type
58956        });
58957      }
58958    } catch (err) {
58959      _iterator2.e(err);
58960    } finally {
58961      _iterator2.f();
58962    }
58963
58964    return {
58965      kind: 'Fragment',
58966      directives: directives,
58967      loc: buildLocation(fragment.loc),
58968      metadata: null,
58969      name: getName(fragment),
58970      selections: selections,
58971      type: type,
58972      // $FlowFixMe[incompatible-return] - could be null
58973      argumentDefinitions: argumentDefinitions
58974    };
58975  };
58976
58977  _proto2._getLocationFromOperation = function _getLocationFromOperation(definition) {
58978    switch (definition.operation) {
58979      case 'query':
58980        return 'QUERY';
58981
58982      case 'mutation':
58983        return 'MUTATION';
58984
58985      case 'subscription':
58986        return 'SUBSCRIPTION';
58987
58988      default:
58989        definition.operation;
58990        throw createCompilerError("Unknown operation type '".concat(definition.operation, "'."), null, [definition]);
58991    }
58992  };
58993
58994  _proto2._transformOperation = function _transformOperation(definition) {
58995    var name = getName(definition);
58996
58997    var directives = this._transformDirectives(definition.directives || [], this._getLocationFromOperation(definition));
58998
58999    var type;
59000    var operation;
59001    var schema = this._schema;
59002
59003    switch (definition.operation) {
59004      case 'query':
59005        operation = 'query';
59006        type = schema.expectQueryType();
59007        break;
59008
59009      case 'mutation':
59010        operation = 'mutation';
59011        type = schema.expectMutationType();
59012        break;
59013
59014      case 'subscription':
59015        operation = 'subscription';
59016        type = schema.expectSubscriptionType();
59017        break;
59018
59019      default:
59020        definition.operation;
59021        throw createCompilerError("Unknown operation type '".concat(definition.operation, "'."), null, [definition]);
59022    }
59023
59024    if (!definition.selectionSet) {
59025      throw createUserError('Expected operation to have selections.', null, [definition]);
59026    }
59027
59028    var selections = this._transformSelections(definition.selectionSet, type);
59029
59030    var argumentDefinitions = buildArgumentDefinitions(this._variableDefinitions);
59031
59032    if (this._unknownVariables.size !== 0) {
59033      throw createUserError("Query '".concat(name, "' references undefined variables."), null, Array.from(this._unknownVariables.values(), function (variableReference) {
59034        return variableReference.ast;
59035      }));
59036    }
59037
59038    return {
59039      kind: 'Root',
59040      operation: operation,
59041      loc: buildLocation(definition.loc),
59042      metadata: null,
59043      name: name,
59044      argumentDefinitions: argumentDefinitions,
59045      directives: directives,
59046      selections: selections,
59047      type: type
59048    };
59049  };
59050
59051  _proto2._transformSelections = function _transformSelections(selectionSet, parentType, parentTypeAST) {
59052    var _this4 = this;
59053
59054    return selectionSet.selections.map(function (selection) {
59055      var node;
59056
59057      if (selection.kind === 'Field') {
59058        node = _this4._transformField(selection, parentType);
59059      } else if (selection.kind === 'FragmentSpread') {
59060        node = _this4._transformFragmentSpread(selection, parentType, parentTypeAST);
59061      } else if (selection.kind === 'InlineFragment') {
59062        node = _this4._transformInlineFragment(selection, parentType, parentTypeAST);
59063      } else {
59064        selection.kind;
59065        throw createCompilerError("Unknown ast kind '".concat(selection.kind, "'."), [selection]);
59066      }
59067
59068      var _this4$_splitConditio = _this4._splitConditions(node.directives),
59069          conditions = _this4$_splitConditio[0],
59070          directives = _this4$_splitConditio[1];
59071
59072      var conditionalNodes = applyConditions(conditions, // $FlowFixMe[incompatible-call]
59073      [_objectSpread(_objectSpread({}, node), {}, {
59074        directives: directives
59075      })]);
59076
59077      if (conditionalNodes.length !== 1) {
59078        throw createCompilerError('Expected exactly one condition node.', null, selection.directives);
59079      }
59080
59081      return conditionalNodes[0];
59082    });
59083  };
59084
59085  _proto2._transformInlineFragment = function _transformInlineFragment(fragment, parentType, parentTypeAST) {
59086    var schema = this._schema;
59087    var typeCondition = fragment.typeCondition != null ? schema.getTypeFromAST(fragment.typeCondition) : parentType;
59088
59089    if (typeCondition == null) {
59090      var _fragment$typeConditi;
59091
59092      throw createUserError('Inline fragments can only be on object, interface or union types' + ", got unknown type '".concat(getTypeName(fragment.typeCondition), "'."), null, [(_fragment$typeConditi = fragment.typeCondition) !== null && _fragment$typeConditi !== void 0 ? _fragment$typeConditi : fragment]);
59093    }
59094
59095    var typeConditionName = schema.getTypeString(typeCondition);
59096    typeCondition = schema.asCompositeType(typeCondition);
59097
59098    if (typeCondition == null) {
59099      var _fragment$typeConditi2;
59100
59101      throw createUserError('Inline fragments can only be on object, interface or union types' + ", got '".concat(typeConditionName, "'."), null, [(_fragment$typeConditi2 = fragment.typeCondition) !== null && _fragment$typeConditi2 !== void 0 ? _fragment$typeConditi2 : fragment]);
59102    }
59103
59104    var rawParentType = this._schema.assertCompositeType(this._schema.getRawType(parentType));
59105
59106    checkFragmentSpreadTypeCompatibility(this._schema, typeCondition, rawParentType, null, fragment.typeCondition, parentTypeAST);
59107
59108    var directives = this._transformDirectives(fragment.directives || [], 'INLINE_FRAGMENT');
59109
59110    var selections = this._transformSelections(fragment.selectionSet, typeCondition, fragment.typeCondition);
59111
59112    return {
59113      kind: 'InlineFragment',
59114      directives: directives,
59115      loc: buildLocation(fragment.loc),
59116      metadata: null,
59117      selections: selections,
59118      typeCondition: typeCondition
59119    };
59120  };
59121
59122  _proto2._transformFragmentSpread = function _transformFragmentSpread(fragmentSpread, parentType, parentTypeAST) {
59123    var _this5 = this;
59124
59125    var fragmentName = getName(fragmentSpread);
59126
59127    var _partitionArray = partitionArray(fragmentSpread.directives || [], function (directive) {
59128      var name = getName(directive);
59129      return name === ARGUMENTS || name === DEPRECATED_UNCHECKED_ARGUMENTS;
59130    }),
59131        argumentDirectives = _partitionArray[0],
59132        otherDirectives = _partitionArray[1];
59133
59134    if (argumentDirectives.length > 1) {
59135      throw createUserError("Directive @".concat(ARGUMENTS, " may be used at most once per a fragment spread."), null, argumentDirectives);
59136    }
59137
59138    var fragmentDefinition = this._entries.get(fragmentName);
59139
59140    if (fragmentDefinition == null) {
59141      throw createUserError("Unknown fragment '".concat(fragmentName, "'."), null, [fragmentSpread.name]);
59142    }
59143
59144    var fragmentTypeNode = getFragmentType(fragmentDefinition.definition);
59145
59146    var fragmentType = this._schema.assertCompositeType(this._schema.expectTypeFromAST(fragmentTypeNode));
59147
59148    var rawParentType = this._schema.assertCompositeType(this._schema.getRawType(parentType));
59149
59150    checkFragmentSpreadTypeCompatibility(this._schema, fragmentType, rawParentType, fragmentSpread.name.value, fragmentSpread, parentTypeAST);
59151    var fragmentArgumentDefinitions = fragmentDefinition.variableDefinitions;
59152    var argumentsDirective = argumentDirectives[0];
59153    var args;
59154
59155    if (argumentsDirective != null) {
59156      var isDeprecatedUncheckedArguments = getName(argumentsDirective) === DEPRECATED_UNCHECKED_ARGUMENTS;
59157      var hasInvalidArgument = false;
59158      args = (argumentsDirective.arguments || []).map(function (arg) {
59159        var _argumentDefinition$t;
59160
59161        var argName = getName(arg);
59162        var argValue = arg.value;
59163        var argumentDefinition = fragmentArgumentDefinitions.get(argName);
59164        var argumentType = (_argumentDefinition$t = argumentDefinition === null || argumentDefinition === void 0 ? void 0 : argumentDefinition.type) !== null && _argumentDefinition$t !== void 0 ? _argumentDefinition$t : null;
59165
59166        if (argValue.kind === 'Variable') {
59167          if (argumentDefinition == null && !isDeprecatedUncheckedArguments) {
59168            throw createUserError("Variable @".concat(ARGUMENTS, " values are only supported when the ") + "argument is defined with @".concat(ARGUMENT_DEFINITIONS, ". Check ") + "the definition of fragment '".concat(fragmentName, "'."), null, [arg.value, fragmentDefinition.definition]);
59169          }
59170
59171          hasInvalidArgument = hasInvalidArgument || argumentDefinition == null; // TODO: check the type of the variable and use the type
59172
59173          return {
59174            kind: 'Argument',
59175            loc: buildLocation(arg.loc),
59176            name: argName,
59177            value: _this5._transformVariable(argValue, null),
59178            type: null
59179          };
59180        } else {
59181          if (argumentType == null) {
59182            throw createUserError("Literal @".concat(ARGUMENTS, " values are only supported when the ") + "argument is defined with @".concat(ARGUMENT_DEFINITIONS, ". Check ") + "the definition of fragment '".concat(fragmentName, "'."), null, [arg.value, fragmentDefinition.definition]);
59183          }
59184
59185          var value = _this5._transformValue(argValue, argumentType);
59186
59187          return {
59188            kind: 'Argument',
59189            loc: buildLocation(arg.loc),
59190            name: argName,
59191            value: value,
59192            type: argumentType
59193          };
59194        }
59195      });
59196
59197      if (isDeprecatedUncheckedArguments && !hasInvalidArgument) {
59198        throw createUserError("Invalid use of @".concat(DEPRECATED_UNCHECKED_ARGUMENTS, ": all arguments ") + "are defined, use @".concat(ARGUMENTS, " instead."), null, [argumentsDirective]);
59199      }
59200    }
59201
59202    var directives = this._transformDirectives(otherDirectives, 'FRAGMENT_SPREAD');
59203
59204    return {
59205      kind: 'FragmentSpread',
59206      args: args || [],
59207      metadata: null,
59208      loc: buildLocation(fragmentSpread.loc),
59209      name: fragmentName,
59210      directives: directives
59211    };
59212  };
59213
59214  _proto2._transformField = function _transformField(field, parentType) {
59215    var _field$alias$value, _field$alias;
59216
59217    var schema = this._schema;
59218    var name = getName(field);
59219
59220    var fieldDef = this._getFieldDefinition(schema, parentType, name, field);
59221
59222    if (fieldDef == null) {
59223      throw createUserError("Unknown field '".concat(name, "' on type '").concat(schema.getTypeString(parentType), "'."), null, [field]);
59224    }
59225
59226    var alias = (_field$alias$value = (_field$alias = field.alias) === null || _field$alias === void 0 ? void 0 : _field$alias.value) !== null && _field$alias$value !== void 0 ? _field$alias$value : name;
59227
59228    var args = this._transformArguments(field.arguments || [], schema.getFieldArgs(fieldDef), fieldDef);
59229
59230    var _partitionArray2 = partitionArray(field.directives || [], function (directive) {
59231      return getName(directive) !== CLIENT_FIELD;
59232    }),
59233        otherDirectives = _partitionArray2[0],
59234        clientFieldDirectives = _partitionArray2[1];
59235
59236    var directives = this._transformDirectives(otherDirectives, 'FIELD');
59237
59238    var type = schema.getFieldType(fieldDef);
59239
59240    var handles = this._transformHandle(name, args, clientFieldDirectives);
59241
59242    if (schema.isLeafType(schema.getRawType(type))) {
59243      if (field.selectionSet && field.selectionSet.selections && field.selectionSet.selections.length) {
59244        throw createUserError("Expected no selections for scalar field '".concat(name, "'."), null, [field]);
59245      }
59246
59247      return {
59248        kind: 'ScalarField',
59249        alias: alias,
59250        args: args,
59251        directives: directives,
59252        handles: handles,
59253        loc: buildLocation(field.loc),
59254        metadata: null,
59255        name: name,
59256        type: schema.assertScalarFieldType(type)
59257      };
59258    } else {
59259      var selections = field.selectionSet ? this._transformSelections(field.selectionSet, type) : null;
59260
59261      if (selections == null || selections.length === 0) {
59262        throw createUserError("Expected at least one selection for non-scalar field '".concat(name, "' on type '").concat(schema.getTypeString(type), "'."), null, [field]);
59263      }
59264
59265      return {
59266        kind: 'LinkedField',
59267        alias: alias,
59268        args: args,
59269        connection: false,
59270        directives: directives,
59271        handles: handles,
59272        loc: buildLocation(field.loc),
59273        metadata: null,
59274        name: name,
59275        selections: selections,
59276        type: schema.assertLinkedFieldType(type)
59277      };
59278    }
59279  };
59280
59281  _proto2._transformHandle = function _transformHandle(fieldName, fieldArgs, clientFieldDirectives) {
59282    var handles = null;
59283    clientFieldDirectives.forEach(function (clientFieldDirective) {
59284      var handleArgument = (clientFieldDirective.arguments || []).find(function (arg) {
59285        return getName(arg) === CLIENT_FIELD_HANDLE;
59286      });
59287
59288      if (handleArgument) {
59289        var name = null;
59290        var key = DEFAULT_HANDLE_KEY;
59291        var filters = null;
59292        var maybeHandle = transformLiteralValue(handleArgument.value, handleArgument);
59293
59294        if (typeof maybeHandle !== 'string') {
59295          throw createUserError("Expected a string literal argument for the @".concat(CLIENT_FIELD, " directive."), null, [handleArgument.value]);
59296        }
59297
59298        name = maybeHandle;
59299        var keyArgument = (clientFieldDirective.arguments || []).find(function (arg) {
59300          return getName(arg) === CLIENT_FIELD_KEY;
59301        });
59302
59303        if (keyArgument) {
59304          var maybeKey = transformLiteralValue(keyArgument.value, keyArgument);
59305
59306          if (typeof maybeKey !== 'string') {
59307            throw createUserError("Expected a string literal argument for the @".concat(CLIENT_FIELD, " directive."), null, [keyArgument.value]);
59308          }
59309
59310          key = maybeKey;
59311        }
59312
59313        var filtersArgument = (clientFieldDirective.arguments || []).find(function (arg) {
59314          return getName(arg) === CLIENT_FIELD_FILTERS;
59315        });
59316
59317        if (filtersArgument) {
59318          var maybeFilters = transformLiteralValue(filtersArgument.value, filtersArgument);
59319
59320          if (!(Array.isArray(maybeFilters) && maybeFilters.every(function (filter) {
59321            return typeof filter === 'string' && fieldArgs.some(function (fieldArg) {
59322              return fieldArg.name === filter;
59323            });
59324          }))) {
59325            throw createUserError("Expected an array of argument names on field '".concat(fieldName, "'."), null, [filtersArgument.value]);
59326          } // $FlowFixMe[incompatible-cast]
59327
59328
59329          filters = maybeFilters;
59330        }
59331
59332        var dynamicKeyArgument = (clientFieldDirective.arguments || []).find(function (arg) {
59333          return getName(arg) === 'dynamicKey_UNSTABLE';
59334        });
59335
59336        if (dynamicKeyArgument != null) {
59337          throw createUserError('Dynamic keys are only supported with @connection.', null, [dynamicKeyArgument.value]);
59338        }
59339
59340        handles = handles || [];
59341        handles.push({
59342          name: name,
59343          key: key,
59344          filters: filters,
59345          dynamicKey: null
59346        });
59347      }
59348    });
59349    return handles;
59350  };
59351
59352  _proto2._transformDirectives = function _transformDirectives(directives, location) {
59353    var _this6 = this;
59354
59355    this._validateDirectivesLocation(directives, location);
59356
59357    return directives.map(function (directive) {
59358      var name = getName(directive);
59359
59360      var directiveDef = _this6._schema.getDirective(name);
59361
59362      if (directiveDef == null) {
59363        throw createUserError("Unknown directive '".concat(name, "'."), null, [directive]);
59364      }
59365
59366      var args = _this6._transformArguments(directive.arguments || [], directiveDef.args.map(function (item) {
59367        return {
59368          name: item.name,
59369          type: item.type,
59370          defaultValue: item.defaultValue
59371        };
59372      }), null, name);
59373
59374      return {
59375        kind: 'Directive',
59376        loc: buildLocation(directive.loc),
59377        name: name,
59378        args: args
59379      };
59380    });
59381  };
59382
59383  _proto2._transformArguments = function _transformArguments(args, argumentDefinitions, field, directiveName) {
59384    var _this7 = this;
59385
59386    return args.map(function (arg) {
59387      var argName = getName(arg);
59388      var argDef = argumentDefinitions.find(function (def) {
59389        return def.name === argName;
59390      });
59391
59392      if (argDef == null) {
59393        var message = "Unknown argument '".concat(argName, "'") + (field ? " on field '".concat(_this7._schema.getFieldName(field), "'") + " of type '".concat(_this7._schema.getTypeString(_this7._schema.getFieldParentType(field)), "'.") : directiveName != null ? " on directive '@".concat(directiveName, "'.") : '.');
59394        throw createUserError(message, null, [arg]);
59395      }
59396
59397      var value = _this7._transformValue(arg.value, argDef.type);
59398
59399      return {
59400        kind: 'Argument',
59401        loc: buildLocation(arg.loc),
59402        name: argName,
59403        value: value,
59404        type: argDef.type
59405      };
59406    });
59407  };
59408
59409  _proto2._splitConditions = function _splitConditions(mixedDirectives) {
59410    var _partitionArray3 = partitionArray(mixedDirectives, function (directive) {
59411      return directive.name === INCLUDE || directive.name === SKIP;
59412    }),
59413        conditionDirectives = _partitionArray3[0],
59414        otherDirectives = _partitionArray3[1];
59415
59416    var conditions = conditionDirectives.map(function (directive) {
59417      var passingValue = directive.name === INCLUDE;
59418      var arg = directive.args[0];
59419
59420      if (arg == null || arg.name !== IF) {
59421        throw createUserError("Expected an 'if' argument to @".concat(directive.name, "."), [directive.loc]);
59422      }
59423
59424      if (!(arg.value.kind === 'Variable' || arg.value.kind === 'Literal')) {
59425        throw createUserError("Expected the 'if' argument to @".concat(directive.name, " to be a variable or literal."), [directive.loc]);
59426      }
59427
59428      return {
59429        kind: 'Condition',
59430        condition: arg.value,
59431        loc: directive.loc,
59432        passingValue: passingValue,
59433        selections: []
59434      };
59435    });
59436    var sortedConditions = conditions.sort(function (a, b) {
59437      if (a.condition.kind === 'Variable' && b.condition.kind === 'Variable') {
59438        return a.condition.variableName < b.condition.variableName ? -1 : a.condition.variableName > b.condition.variableName ? 1 : 0;
59439      } else {
59440        // sort literals earlier, variables later
59441        return a.condition.kind === 'Variable' ? 1 : b.condition.kind === 'Variable' ? -1 : 0;
59442      }
59443    });
59444    return [sortedConditions, otherDirectives];
59445  };
59446
59447  _proto2._transformVariable = function _transformVariable(ast, usedAsType) {
59448    var variableName = getName(ast);
59449
59450    this._recordAndVerifyVariableReference(ast, variableName, usedAsType);
59451
59452    return {
59453      kind: 'Variable',
59454      loc: buildLocation(ast.loc),
59455      variableName: variableName,
59456      type: usedAsType
59457    };
59458  };
59459
59460  _proto2._transformValue = function _transformValue(ast, type) {
59461    var _this8 = this;
59462
59463    return transformValue(this._schema, ast, type, function (variableAst, variableType) {
59464      return _this8._transformVariable(variableAst, variableType);
59465    });
59466  };
59467
59468  return GraphQLDefinitionParser;
59469}();
59470/**
59471 * Transforms and validates argument values according to the expected
59472 * type.
59473 */
59474
59475
59476function transformValue(schema, ast, type, transformVariable) {
59477  if (ast.kind === 'Variable') {
59478    // Special case variables since there is no value to parse
59479    return transformVariable(ast, type);
59480  } else if (ast.kind === 'NullValue') {
59481    // Special case null literals since there is no value to parse
59482    if (schema.isNonNull(type)) {
59483      throw createUserError("Expected a value matching type '".concat(String(type), "'."), null, [ast]);
59484    }
59485
59486    return {
59487      kind: 'Literal',
59488      loc: buildLocation(ast.loc),
59489      value: null
59490    };
59491  } else {
59492    return transformNonNullLiteral(schema, ast, type, transformVariable);
59493  }
59494}
59495/**
59496 * Transforms and validates non-null literal (non-variable) values
59497 * according to the expected type.
59498 */
59499
59500
59501function transformNonNullLiteral(schema, ast, type, transformVariable) {
59502  // Transform the value based on the type without a non-null wrapper.
59503  // Note that error messages should still use the original `type`
59504  // since that accurately describes to the user what the expected
59505  // type is (using nullableType would suggest that `null` is legal
59506  // even when it may not be, for example).
59507  var nullableType = schema.getNullableType(type);
59508
59509  if (schema.isList(nullableType)) {
59510    if (ast.kind !== 'ListValue') {
59511      // Parse singular (non-list) values flowing into a list type
59512      // as scalars, ie without wrapping them in an array.
59513      if (!schema.isInputType(schema.getListItemType(nullableType))) {
59514        throw createUserError("Expected type ".concat(schema.getTypeString(nullableType), " to be an input type."), null, [ast]);
59515      }
59516
59517      return transformValue(schema, ast, schema.assertInputType(schema.getListItemType(nullableType)), transformVariable);
59518    }
59519
59520    var itemType = schema.assertInputType(schema.getListItemType(nullableType));
59521    var literalList = [];
59522    var items = [];
59523    var areAllItemsScalar = true;
59524    ast.values.forEach(function (item) {
59525      var itemValue = transformValue(schema, item, itemType, transformVariable);
59526
59527      if (itemValue.kind === 'Literal') {
59528        literalList.push(itemValue.value);
59529      }
59530
59531      items.push(itemValue);
59532      areAllItemsScalar = areAllItemsScalar && itemValue.kind === 'Literal';
59533    });
59534
59535    if (areAllItemsScalar) {
59536      return {
59537        kind: 'Literal',
59538        loc: buildLocation(ast.loc),
59539        value: literalList
59540      };
59541    } else {
59542      return {
59543        kind: 'ListValue',
59544        loc: buildLocation(ast.loc),
59545        items: items
59546      };
59547    }
59548  } else if (schema.isInputObject(nullableType)) {
59549    if (ast.kind !== 'ObjectValue') {
59550      throw createUserError("Expected a value matching type '".concat(schema.getTypeString(type), "'."), null, [ast]);
59551    }
59552
59553    var literalObject = {};
59554    var fields = [];
59555    var areAllFieldsScalar = true;
59556    var inputType = schema.assertInputObjectType(nullableType);
59557    var requiredFieldNames = new Set(schema.getFields(inputType).filter(function (field) {
59558      return schema.isNonNull(schema.getFieldType(field));
59559    }).map(function (field) {
59560      return schema.getFieldName(field);
59561    }));
59562    var seenFields = new Map();
59563    ast.fields.forEach(function (field) {
59564      var fieldName = getName(field);
59565      var seenField = seenFields.get(fieldName);
59566
59567      if (seenField) {
59568        throw createUserError("Duplicated field name '".concat(fieldName, "' in the input object."), null, [field, seenField]);
59569      }
59570
59571      var fieldID = schema.getFieldByName(inputType, fieldName);
59572
59573      if (!fieldID) {
59574        throw createUserError("Unknown field '".concat(fieldName, "' on type '").concat(schema.getTypeString(inputType), "'."), null, [field]);
59575      }
59576
59577      var fieldConfig = schema.getFieldConfig(fieldID);
59578      var fieldType = schema.assertInputType(fieldConfig.type);
59579      var fieldValue = transformValue(schema, field.value, fieldType, transformVariable);
59580
59581      if (fieldValue.kind === 'Literal') {
59582        literalObject[field.name.value] = fieldValue.value;
59583      }
59584
59585      fields.push({
59586        kind: 'ObjectFieldValue',
59587        loc: buildLocation(field.loc),
59588        name: fieldName,
59589        value: fieldValue
59590      });
59591      seenFields.set(fieldName, field);
59592      requiredFieldNames["delete"](fieldName);
59593      areAllFieldsScalar = areAllFieldsScalar && fieldValue.kind === 'Literal';
59594    });
59595
59596    if (requiredFieldNames.size > 0) {
59597      var requiredFieldStr = Array.from(requiredFieldNames).map(function (item) {
59598        return "'".concat(item, "'");
59599      }).join(', ');
59600      throw createUserError("Missing non-optional field".concat(requiredFieldNames.size > 1 ? 's:' : '', " ").concat(requiredFieldStr, " for input type '").concat(schema.getTypeString(inputType), "'."), null, [ast]);
59601    }
59602
59603    if (areAllFieldsScalar) {
59604      return {
59605        kind: 'Literal',
59606        loc: buildLocation(ast.loc),
59607        value: literalObject
59608      };
59609    } else {
59610      return {
59611        kind: 'ObjectValue',
59612        loc: buildLocation(ast.loc),
59613        fields: fields
59614      };
59615    }
59616  } else if (schema.isId(nullableType)) {
59617    // GraphQLID's parseLiteral() always returns the string value. However
59618    // the int/string distinction may be important at runtime, so this
59619    // transform parses int/string literals into the corresponding JS types.
59620    if (ast.kind === 'IntValue') {
59621      return {
59622        kind: 'Literal',
59623        loc: buildLocation(ast.loc),
59624        value: parseInt(ast.value, 10)
59625      };
59626    } else if (ast.kind === 'StringValue') {
59627      return {
59628        kind: 'Literal',
59629        loc: buildLocation(ast.loc),
59630        value: ast.value
59631      };
59632    } else {
59633      throw createUserError("Invalid value, expected a value matching type '".concat(schema.getTypeString(type), "'."), null, [ast]);
59634    }
59635  } else if (schema.isEnum(nullableType)) {
59636    var enumType = schema.assertEnumType(nullableType);
59637    var value = schema.parseLiteral(enumType, ast);
59638
59639    if (value == null) {
59640      var suggestions = schema.getEnumValues(enumType); // parseLiteral() should return a non-null JavaScript value
59641      // if the ast value is valid for the type.
59642
59643      throw createUserError("Expected a value matching type '".concat(schema.getTypeString(type), "'. Possible values: ").concat(orList(suggestions), "?'"), null, [ast]);
59644    }
59645
59646    return {
59647      kind: 'Literal',
59648      loc: buildLocation(ast.loc),
59649      value: value
59650    };
59651  } else if (schema.isScalar(nullableType)) {
59652    var _value = schema.parseLiteral(schema.assertScalarType(nullableType), ast);
59653
59654    if (_value == null) {
59655      // parseLiteral() should return a non-null JavaScript value
59656      // if the ast value is valid for the type.
59657      throw createUserError("Expected a value matching type '".concat(schema.getTypeString(type), "'."), null, [ast]);
59658    }
59659
59660    return {
59661      kind: 'Literal',
59662      loc: buildLocation(ast.loc),
59663      value: _value
59664    };
59665  } else {
59666    throw createCompilerError("Unsupported type '".concat(schema.getTypeString(type), "' for input value, expected a GraphQLList, ") + 'GraphQLInputObjectType, GraphQLEnumType, or GraphQLScalarType.', null, [ast]);
59667  }
59668}
59669/**
59670 * @private
59671 */
59672
59673
59674function transformLiteralValue(ast, context) {
59675  switch (ast.kind) {
59676    case 'IntValue':
59677      return parseInt(ast.value, 10);
59678
59679    case 'FloatValue':
59680      return parseFloat(ast.value);
59681
59682    case 'StringValue':
59683      return ast.value;
59684
59685    case 'BooleanValue':
59686      // Note: duplicated because Flow does not understand fall-through cases
59687      return ast.value;
59688
59689    case 'EnumValue':
59690      // Note: duplicated because Flow does not understand fall-through cases
59691      return ast.value;
59692
59693    case 'ListValue':
59694      return ast.values.map(function (item) {
59695        return transformLiteralValue(item, context);
59696      });
59697
59698    case 'NullValue':
59699      return null;
59700
59701    case 'ObjectValue':
59702      {
59703        var objectValue = {};
59704        ast.fields.forEach(function (field) {
59705          var fieldName = getName(field);
59706          var value = transformLiteralValue(field.value, context);
59707          objectValue[fieldName] = value;
59708        });
59709        return objectValue;
59710      }
59711
59712    case 'Variable':
59713      throw createUserError('Unexpected variable where a literal (static) value is required.', null, [ast, context]);
59714
59715    default:
59716      ast.kind;
59717      throw createCompilerError("Unknown ast kind '".concat(ast.kind, "'."), [ast]);
59718  }
59719}
59720/**
59721 * @private
59722 */
59723
59724
59725function buildArgumentDefinitions(variables) {
59726  return Array.from(variables.values(), function (_ref3) {
59727    var ast = _ref3.ast,
59728        name = _ref3.name,
59729        defaultValue = _ref3.defaultValue,
59730        type = _ref3.type;
59731    return {
59732      kind: 'LocalArgumentDefinition',
59733      loc: buildLocation(ast.loc),
59734      name: name,
59735      type: type,
59736      defaultValue: defaultValue
59737    };
59738  });
59739}
59740/**
59741 * @private
59742 */
59743
59744
59745function buildLocation(loc) {
59746  if (loc == null) {
59747    return {
59748      kind: 'Unknown'
59749    };
59750  }
59751
59752  return {
59753    kind: 'Source',
59754    start: loc.start,
59755    end: loc.end,
59756    source: loc.source
59757  };
59758}
59759/**
59760 * @private
59761 */
59762
59763
59764function applyConditions(conditions, selections) {
59765  var nextSelections = selections;
59766  conditions.forEach(function (condition) {
59767    nextSelections = [_objectSpread(_objectSpread({}, condition), {}, {
59768      selections: nextSelections
59769    })];
59770  });
59771  return nextSelections;
59772}
59773/**
59774 * @private
59775 */
59776
59777
59778function getName(ast) {
59779  var _ast$name;
59780
59781  var name = (_ast$name = ast.name) === null || _ast$name === void 0 ? void 0 : _ast$name.value;
59782
59783  if (typeof name !== 'string') {
59784    throw createCompilerError("Expected ast node to have a 'name'.", null, [ast]);
59785  }
59786
59787  return name;
59788}
59789
59790function getTypeName(ast) {
59791  return ast ? print(ast) : 'Undefined Type Name';
59792}
59793/**
59794 * @private
59795 */
59796
59797
59798function getFragmentType(ast) {
59799  if (ast.kind === 'FragmentDefinition') {
59800    return ast.typeCondition;
59801  }
59802
59803  throw createCompilerError('Expected ast node to be a FragmentDefinition node.', null, [ast]);
59804}
59805
59806function checkFragmentSpreadTypeCompatibility(schema, fragmentType, parentType, fragmentName, fragmentTypeAST, parentTypeAST) {
59807  if (!schema.doTypesOverlap(fragmentType, schema.assertCompositeType(parentType))) {
59808    var nodes = [];
59809
59810    if (parentTypeAST) {
59811      nodes.push(parentTypeAST);
59812    }
59813
59814    if (fragmentTypeAST) {
59815      nodes.push(fragmentTypeAST);
59816    }
59817
59818    var possibleConcreteTypes = schema.isAbstractType(parentType) ? Array.from(schema.getPossibleTypes(schema.assertAbstractType(parentType))) : [];
59819    var suggestedTypesMessage = '';
59820
59821    if (possibleConcreteTypes.length !== 0) {
59822      suggestedTypesMessage = " Possible concrete types include ".concat(possibleConcreteTypes.sort().slice(0, 3).map(function (type) {
59823        return "'".concat(schema.getTypeString(type), "'");
59824      }).join(', '), ", etc.");
59825    }
59826
59827    throw createUserError((fragmentName != null ? "Fragment '".concat(fragmentName, "' cannot be spread here as objects of ") : 'Fragment cannot be spread here as objects of ') + "type '".concat(schema.getTypeString(parentType), "' ") + "can never be of type '".concat(schema.getTypeString(fragmentType), "'.") + suggestedTypesMessage, null, nodes);
59828  }
59829}
59830
59831module.exports = {
59832  parse: parse,
59833  transform: transform
59834};
59835
59836/***/ }),
59837
59838/***/ "r4ky":
59839/***/ (function(module, exports, __webpack_require__) {
59840
59841/**
59842 *  Copyright (c) 2014-2015, Facebook, Inc.
59843 *  All rights reserved.
59844 *
59845 *  This source code is licensed under the BSD-style license found in the
59846 *  LICENSE file in the root directory of this source tree. An additional grant
59847 *  of patent rights can be found in the PATENTS file in the same directory.
59848 */
59849
59850(function (global, factory) {
59851   true ? module.exports = factory() :
59852  undefined;
59853}(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice;
59854
59855  function createClass(ctor, superClass) {
59856    if (superClass) {
59857      ctor.prototype = Object.create(superClass.prototype);
59858    }
59859    ctor.prototype.constructor = ctor;
59860  }
59861
59862  function Iterable(value) {
59863      return isIterable(value) ? value : Seq(value);
59864    }
59865
59866
59867  createClass(KeyedIterable, Iterable);
59868    function KeyedIterable(value) {
59869      return isKeyed(value) ? value : KeyedSeq(value);
59870    }
59871
59872
59873  createClass(IndexedIterable, Iterable);
59874    function IndexedIterable(value) {
59875      return isIndexed(value) ? value : IndexedSeq(value);
59876    }
59877
59878
59879  createClass(SetIterable, Iterable);
59880    function SetIterable(value) {
59881      return isIterable(value) && !isAssociative(value) ? value : SetSeq(value);
59882    }
59883
59884
59885
59886  function isIterable(maybeIterable) {
59887    return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]);
59888  }
59889
59890  function isKeyed(maybeKeyed) {
59891    return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]);
59892  }
59893
59894  function isIndexed(maybeIndexed) {
59895    return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]);
59896  }
59897
59898  function isAssociative(maybeAssociative) {
59899    return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);
59900  }
59901
59902  function isOrdered(maybeOrdered) {
59903    return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]);
59904  }
59905
59906  Iterable.isIterable = isIterable;
59907  Iterable.isKeyed = isKeyed;
59908  Iterable.isIndexed = isIndexed;
59909  Iterable.isAssociative = isAssociative;
59910  Iterable.isOrdered = isOrdered;
59911
59912  Iterable.Keyed = KeyedIterable;
59913  Iterable.Indexed = IndexedIterable;
59914  Iterable.Set = SetIterable;
59915
59916
59917  var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
59918  var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
59919  var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';
59920  var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
59921
59922  // Used for setting prototype methods that IE8 chokes on.
59923  var DELETE = 'delete';
59924
59925  // Constants describing the size of trie nodes.
59926  var SHIFT = 5; // Resulted in best performance after ______?
59927  var SIZE = 1 << SHIFT;
59928  var MASK = SIZE - 1;
59929
59930  // A consistent shared value representing "not set" which equals nothing other
59931  // than itself, and nothing that could be provided externally.
59932  var NOT_SET = {};
59933
59934  // Boolean references, Rough equivalent of `bool &`.
59935  var CHANGE_LENGTH = { value: false };
59936  var DID_ALTER = { value: false };
59937
59938  function MakeRef(ref) {
59939    ref.value = false;
59940    return ref;
59941  }
59942
59943  function SetRef(ref) {
59944    ref && (ref.value = true);
59945  }
59946
59947  // A function which returns a value representing an "owner" for transient writes
59948  // to tries. The return value will only ever equal itself, and will not equal
59949  // the return of any subsequent call of this function.
59950  function OwnerID() {}
59951
59952  // http://jsperf.com/copy-array-inline
59953  function arrCopy(arr, offset) {
59954    offset = offset || 0;
59955    var len = Math.max(0, arr.length - offset);
59956    var newArr = new Array(len);
59957    for (var ii = 0; ii < len; ii++) {
59958      newArr[ii] = arr[ii + offset];
59959    }
59960    return newArr;
59961  }
59962
59963  function ensureSize(iter) {
59964    if (iter.size === undefined) {
59965      iter.size = iter.__iterate(returnTrue);
59966    }
59967    return iter.size;
59968  }
59969
59970  function wrapIndex(iter, index) {
59971    // This implements "is array index" which the ECMAString spec defines as:
59972    //
59973    //     A String property name P is an array index if and only if
59974    //     ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal
59975    //     to 2^32−1.
59976    //
59977    // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects
59978    if (typeof index !== 'number') {
59979      var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32
59980      if ('' + uint32Index !== index || uint32Index === 4294967295) {
59981        return NaN;
59982      }
59983      index = uint32Index;
59984    }
59985    return index < 0 ? ensureSize(iter) + index : index;
59986  }
59987
59988  function returnTrue() {
59989    return true;
59990  }
59991
59992  function wholeSlice(begin, end, size) {
59993    return (begin === 0 || (size !== undefined && begin <= -size)) &&
59994      (end === undefined || (size !== undefined && end >= size));
59995  }
59996
59997  function resolveBegin(begin, size) {
59998    return resolveIndex(begin, size, 0);
59999  }
60000
60001  function resolveEnd(end, size) {
60002    return resolveIndex(end, size, size);
60003  }
60004
60005  function resolveIndex(index, size, defaultIndex) {
60006    return index === undefined ?
60007      defaultIndex :
60008      index < 0 ?
60009        Math.max(0, size + index) :
60010        size === undefined ?
60011          index :
60012          Math.min(size, index);
60013  }
60014
60015  /* global Symbol */
60016
60017  var ITERATE_KEYS = 0;
60018  var ITERATE_VALUES = 1;
60019  var ITERATE_ENTRIES = 2;
60020
60021  var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
60022  var FAUX_ITERATOR_SYMBOL = '@@iterator';
60023
60024  var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;
60025
60026
60027  function Iterator(next) {
60028      this.next = next;
60029    }
60030
60031    Iterator.prototype.toString = function() {
60032      return '[Iterator]';
60033    };
60034
60035
60036  Iterator.KEYS = ITERATE_KEYS;
60037  Iterator.VALUES = ITERATE_VALUES;
60038  Iterator.ENTRIES = ITERATE_ENTRIES;
60039
60040  Iterator.prototype.inspect =
60041  Iterator.prototype.toSource = function () { return this.toString(); }
60042  Iterator.prototype[ITERATOR_SYMBOL] = function () {
60043    return this;
60044  };
60045
60046
60047  function iteratorValue(type, k, v, iteratorResult) {
60048    var value = type === 0 ? k : type === 1 ? v : [k, v];
60049    iteratorResult ? (iteratorResult.value = value) : (iteratorResult = {
60050      value: value, done: false
60051    });
60052    return iteratorResult;
60053  }
60054
60055  function iteratorDone() {
60056    return { value: undefined, done: true };
60057  }
60058
60059  function hasIterator(maybeIterable) {
60060    return !!getIteratorFn(maybeIterable);
60061  }
60062
60063  function isIterator(maybeIterator) {
60064    return maybeIterator && typeof maybeIterator.next === 'function';
60065  }
60066
60067  function getIterator(iterable) {
60068    var iteratorFn = getIteratorFn(iterable);
60069    return iteratorFn && iteratorFn.call(iterable);
60070  }
60071
60072  function getIteratorFn(iterable) {
60073    var iteratorFn = iterable && (
60074      (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||
60075      iterable[FAUX_ITERATOR_SYMBOL]
60076    );
60077    if (typeof iteratorFn === 'function') {
60078      return iteratorFn;
60079    }
60080  }
60081
60082  function isArrayLike(value) {
60083    return value && typeof value.length === 'number';
60084  }
60085
60086  createClass(Seq, Iterable);
60087    function Seq(value) {
60088      return value === null || value === undefined ? emptySequence() :
60089        isIterable(value) ? value.toSeq() : seqFromValue(value);
60090    }
60091
60092    Seq.of = function(/*...values*/) {
60093      return Seq(arguments);
60094    };
60095
60096    Seq.prototype.toSeq = function() {
60097      return this;
60098    };
60099
60100    Seq.prototype.toString = function() {
60101      return this.__toString('Seq {', '}');
60102    };
60103
60104    Seq.prototype.cacheResult = function() {
60105      if (!this._cache && this.__iterateUncached) {
60106        this._cache = this.entrySeq().toArray();
60107        this.size = this._cache.length;
60108      }
60109      return this;
60110    };
60111
60112    // abstract __iterateUncached(fn, reverse)
60113
60114    Seq.prototype.__iterate = function(fn, reverse) {
60115      return seqIterate(this, fn, reverse, true);
60116    };
60117
60118    // abstract __iteratorUncached(type, reverse)
60119
60120    Seq.prototype.__iterator = function(type, reverse) {
60121      return seqIterator(this, type, reverse, true);
60122    };
60123
60124
60125
60126  createClass(KeyedSeq, Seq);
60127    function KeyedSeq(value) {
60128      return value === null || value === undefined ?
60129        emptySequence().toKeyedSeq() :
60130        isIterable(value) ?
60131          (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) :
60132          keyedSeqFromValue(value);
60133    }
60134
60135    KeyedSeq.prototype.toKeyedSeq = function() {
60136      return this;
60137    };
60138
60139
60140
60141  createClass(IndexedSeq, Seq);
60142    function IndexedSeq(value) {
60143      return value === null || value === undefined ? emptySequence() :
60144        !isIterable(value) ? indexedSeqFromValue(value) :
60145        isKeyed(value) ? value.entrySeq() : value.toIndexedSeq();
60146    }
60147
60148    IndexedSeq.of = function(/*...values*/) {
60149      return IndexedSeq(arguments);
60150    };
60151
60152    IndexedSeq.prototype.toIndexedSeq = function() {
60153      return this;
60154    };
60155
60156    IndexedSeq.prototype.toString = function() {
60157      return this.__toString('Seq [', ']');
60158    };
60159
60160    IndexedSeq.prototype.__iterate = function(fn, reverse) {
60161      return seqIterate(this, fn, reverse, false);
60162    };
60163
60164    IndexedSeq.prototype.__iterator = function(type, reverse) {
60165      return seqIterator(this, type, reverse, false);
60166    };
60167
60168
60169
60170  createClass(SetSeq, Seq);
60171    function SetSeq(value) {
60172      return (
60173        value === null || value === undefined ? emptySequence() :
60174        !isIterable(value) ? indexedSeqFromValue(value) :
60175        isKeyed(value) ? value.entrySeq() : value
60176      ).toSetSeq();
60177    }
60178
60179    SetSeq.of = function(/*...values*/) {
60180      return SetSeq(arguments);
60181    };
60182
60183    SetSeq.prototype.toSetSeq = function() {
60184      return this;
60185    };
60186
60187
60188
60189  Seq.isSeq = isSeq;
60190  Seq.Keyed = KeyedSeq;
60191  Seq.Set = SetSeq;
60192  Seq.Indexed = IndexedSeq;
60193
60194  var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';
60195
60196  Seq.prototype[IS_SEQ_SENTINEL] = true;
60197
60198
60199
60200  createClass(ArraySeq, IndexedSeq);
60201    function ArraySeq(array) {
60202      this._array = array;
60203      this.size = array.length;
60204    }
60205
60206    ArraySeq.prototype.get = function(index, notSetValue) {
60207      return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;
60208    };
60209
60210    ArraySeq.prototype.__iterate = function(fn, reverse) {
60211      var array = this._array;
60212      var maxIndex = array.length - 1;
60213      for (var ii = 0; ii <= maxIndex; ii++) {
60214        if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) {
60215          return ii + 1;
60216        }
60217      }
60218      return ii;
60219    };
60220
60221    ArraySeq.prototype.__iterator = function(type, reverse) {
60222      var array = this._array;
60223      var maxIndex = array.length - 1;
60224      var ii = 0;
60225      return new Iterator(function() 
60226        {return ii > maxIndex ?
60227          iteratorDone() :
60228          iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])}
60229      );
60230    };
60231
60232
60233
60234  createClass(ObjectSeq, KeyedSeq);
60235    function ObjectSeq(object) {
60236      var keys = Object.keys(object);
60237      this._object = object;
60238      this._keys = keys;
60239      this.size = keys.length;
60240    }
60241
60242    ObjectSeq.prototype.get = function(key, notSetValue) {
60243      if (notSetValue !== undefined && !this.has(key)) {
60244        return notSetValue;
60245      }
60246      return this._object[key];
60247    };
60248
60249    ObjectSeq.prototype.has = function(key) {
60250      return this._object.hasOwnProperty(key);
60251    };
60252
60253    ObjectSeq.prototype.__iterate = function(fn, reverse) {
60254      var object = this._object;
60255      var keys = this._keys;
60256      var maxIndex = keys.length - 1;
60257      for (var ii = 0; ii <= maxIndex; ii++) {
60258        var key = keys[reverse ? maxIndex - ii : ii];
60259        if (fn(object[key], key, this) === false) {
60260          return ii + 1;
60261        }
60262      }
60263      return ii;
60264    };
60265
60266    ObjectSeq.prototype.__iterator = function(type, reverse) {
60267      var object = this._object;
60268      var keys = this._keys;
60269      var maxIndex = keys.length - 1;
60270      var ii = 0;
60271      return new Iterator(function()  {
60272        var key = keys[reverse ? maxIndex - ii : ii];
60273        return ii++ > maxIndex ?
60274          iteratorDone() :
60275          iteratorValue(type, key, object[key]);
60276      });
60277    };
60278
60279  ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true;
60280
60281
60282  createClass(IterableSeq, IndexedSeq);
60283    function IterableSeq(iterable) {
60284      this._iterable = iterable;
60285      this.size = iterable.length || iterable.size;
60286    }
60287
60288    IterableSeq.prototype.__iterateUncached = function(fn, reverse) {
60289      if (reverse) {
60290        return this.cacheResult().__iterate(fn, reverse);
60291      }
60292      var iterable = this._iterable;
60293      var iterator = getIterator(iterable);
60294      var iterations = 0;
60295      if (isIterator(iterator)) {
60296        var step;
60297        while (!(step = iterator.next()).done) {
60298          if (fn(step.value, iterations++, this) === false) {
60299            break;
60300          }
60301        }
60302      }
60303      return iterations;
60304    };
60305
60306    IterableSeq.prototype.__iteratorUncached = function(type, reverse) {
60307      if (reverse) {
60308        return this.cacheResult().__iterator(type, reverse);
60309      }
60310      var iterable = this._iterable;
60311      var iterator = getIterator(iterable);
60312      if (!isIterator(iterator)) {
60313        return new Iterator(iteratorDone);
60314      }
60315      var iterations = 0;
60316      return new Iterator(function()  {
60317        var step = iterator.next();
60318        return step.done ? step : iteratorValue(type, iterations++, step.value);
60319      });
60320    };
60321
60322
60323
60324  createClass(IteratorSeq, IndexedSeq);
60325    function IteratorSeq(iterator) {
60326      this._iterator = iterator;
60327      this._iteratorCache = [];
60328    }
60329
60330    IteratorSeq.prototype.__iterateUncached = function(fn, reverse) {
60331      if (reverse) {
60332        return this.cacheResult().__iterate(fn, reverse);
60333      }
60334      var iterator = this._iterator;
60335      var cache = this._iteratorCache;
60336      var iterations = 0;
60337      while (iterations < cache.length) {
60338        if (fn(cache[iterations], iterations++, this) === false) {
60339          return iterations;
60340        }
60341      }
60342      var step;
60343      while (!(step = iterator.next()).done) {
60344        var val = step.value;
60345        cache[iterations] = val;
60346        if (fn(val, iterations++, this) === false) {
60347          break;
60348        }
60349      }
60350      return iterations;
60351    };
60352
60353    IteratorSeq.prototype.__iteratorUncached = function(type, reverse) {
60354      if (reverse) {
60355        return this.cacheResult().__iterator(type, reverse);
60356      }
60357      var iterator = this._iterator;
60358      var cache = this._iteratorCache;
60359      var iterations = 0;
60360      return new Iterator(function()  {
60361        if (iterations >= cache.length) {
60362          var step = iterator.next();
60363          if (step.done) {
60364            return step;
60365          }
60366          cache[iterations] = step.value;
60367        }
60368        return iteratorValue(type, iterations, cache[iterations++]);
60369      });
60370    };
60371
60372
60373
60374
60375  // # pragma Helper functions
60376
60377  function isSeq(maybeSeq) {
60378    return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]);
60379  }
60380
60381  var EMPTY_SEQ;
60382
60383  function emptySequence() {
60384    return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));
60385  }
60386
60387  function keyedSeqFromValue(value) {
60388    var seq =
60389      Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() :
60390      isIterator(value) ? new IteratorSeq(value).fromEntrySeq() :
60391      hasIterator(value) ? new IterableSeq(value).fromEntrySeq() :
60392      typeof value === 'object' ? new ObjectSeq(value) :
60393      undefined;
60394    if (!seq) {
60395      throw new TypeError(
60396        'Expected Array or iterable object of [k, v] entries, '+
60397        'or keyed object: ' + value
60398      );
60399    }
60400    return seq;
60401  }
60402
60403  function indexedSeqFromValue(value) {
60404    var seq = maybeIndexedSeqFromValue(value);
60405    if (!seq) {
60406      throw new TypeError(
60407        'Expected Array or iterable object of values: ' + value
60408      );
60409    }
60410    return seq;
60411  }
60412
60413  function seqFromValue(value) {
60414    var seq = maybeIndexedSeqFromValue(value) ||
60415      (typeof value === 'object' && new ObjectSeq(value));
60416    if (!seq) {
60417      throw new TypeError(
60418        'Expected Array or iterable object of values, or keyed object: ' + value
60419      );
60420    }
60421    return seq;
60422  }
60423
60424  function maybeIndexedSeqFromValue(value) {
60425    return (
60426      isArrayLike(value) ? new ArraySeq(value) :
60427      isIterator(value) ? new IteratorSeq(value) :
60428      hasIterator(value) ? new IterableSeq(value) :
60429      undefined
60430    );
60431  }
60432
60433  function seqIterate(seq, fn, reverse, useKeys) {
60434    var cache = seq._cache;
60435    if (cache) {
60436      var maxIndex = cache.length - 1;
60437      for (var ii = 0; ii <= maxIndex; ii++) {
60438        var entry = cache[reverse ? maxIndex - ii : ii];
60439        if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) {
60440          return ii + 1;
60441        }
60442      }
60443      return ii;
60444    }
60445    return seq.__iterateUncached(fn, reverse);
60446  }
60447
60448  function seqIterator(seq, type, reverse, useKeys) {
60449    var cache = seq._cache;
60450    if (cache) {
60451      var maxIndex = cache.length - 1;
60452      var ii = 0;
60453      return new Iterator(function()  {
60454        var entry = cache[reverse ? maxIndex - ii : ii];
60455        return ii++ > maxIndex ?
60456          iteratorDone() :
60457          iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]);
60458      });
60459    }
60460    return seq.__iteratorUncached(type, reverse);
60461  }
60462
60463  function fromJS(json, converter) {
60464    return converter ?
60465      fromJSWith(converter, json, '', {'': json}) :
60466      fromJSDefault(json);
60467  }
60468
60469  function fromJSWith(converter, json, key, parentJSON) {
60470    if (Array.isArray(json)) {
60471      return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k)  {return fromJSWith(converter, v, k, json)}));
60472    }
60473    if (isPlainObj(json)) {
60474      return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k)  {return fromJSWith(converter, v, k, json)}));
60475    }
60476    return json;
60477  }
60478
60479  function fromJSDefault(json) {
60480    if (Array.isArray(json)) {
60481      return IndexedSeq(json).map(fromJSDefault).toList();
60482    }
60483    if (isPlainObj(json)) {
60484      return KeyedSeq(json).map(fromJSDefault).toMap();
60485    }
60486    return json;
60487  }
60488
60489  function isPlainObj(value) {
60490    return value && (value.constructor === Object || value.constructor === undefined);
60491  }
60492
60493  /**
60494   * An extension of the "same-value" algorithm as [described for use by ES6 Map
60495   * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)
60496   *
60497   * NaN is considered the same as NaN, however -0 and 0 are considered the same
60498   * value, which is different from the algorithm described by
60499   * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
60500   *
60501   * This is extended further to allow Objects to describe the values they
60502   * represent, by way of `valueOf` or `equals` (and `hashCode`).
60503   *
60504   * Note: because of this extension, the key equality of Immutable.Map and the
60505   * value equality of Immutable.Set will differ from ES6 Map and Set.
60506   *
60507   * ### Defining custom values
60508   *
60509   * The easiest way to describe the value an object represents is by implementing
60510   * `valueOf`. For example, `Date` represents a value by returning a unix
60511   * timestamp for `valueOf`:
60512   *
60513   *     var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...
60514   *     var date2 = new Date(1234567890000);
60515   *     date1.valueOf(); // 1234567890000
60516   *     assert( date1 !== date2 );
60517   *     assert( Immutable.is( date1, date2 ) );
60518   *
60519   * Note: overriding `valueOf` may have other implications if you use this object
60520   * where JavaScript expects a primitive, such as implicit string coercion.
60521   *
60522   * For more complex types, especially collections, implementing `valueOf` may
60523   * not be performant. An alternative is to implement `equals` and `hashCode`.
60524   *
60525   * `equals` takes another object, presumably of similar type, and returns true
60526   * if the it is equal. Equality is symmetrical, so the same result should be
60527   * returned if this and the argument are flipped.
60528   *
60529   *     assert( a.equals(b) === b.equals(a) );
60530   *
60531   * `hashCode` returns a 32bit integer number representing the object which will
60532   * be used to determine how to store the value object in a Map or Set. You must
60533   * provide both or neither methods, one must not exist without the other.
60534   *
60535   * Also, an important relationship between these methods must be upheld: if two
60536   * values are equal, they *must* return the same hashCode. If the values are not
60537   * equal, they might have the same hashCode; this is called a hash collision,
60538   * and while undesirable for performance reasons, it is acceptable.
60539   *
60540   *     if (a.equals(b)) {
60541   *       assert( a.hashCode() === b.hashCode() );
60542   *     }
60543   *
60544   * All Immutable collections implement `equals` and `hashCode`.
60545   *
60546   */
60547  function is(valueA, valueB) {
60548    if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
60549      return true;
60550    }
60551    if (!valueA || !valueB) {
60552      return false;
60553    }
60554    if (typeof valueA.valueOf === 'function' &&
60555        typeof valueB.valueOf === 'function') {
60556      valueA = valueA.valueOf();
60557      valueB = valueB.valueOf();
60558      if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {
60559        return true;
60560      }
60561      if (!valueA || !valueB) {
60562        return false;
60563      }
60564    }
60565    if (typeof valueA.equals === 'function' &&
60566        typeof valueB.equals === 'function' &&
60567        valueA.equals(valueB)) {
60568      return true;
60569    }
60570    return false;
60571  }
60572
60573  function deepEqual(a, b) {
60574    if (a === b) {
60575      return true;
60576    }
60577
60578    if (
60579      !isIterable(b) ||
60580      a.size !== undefined && b.size !== undefined && a.size !== b.size ||
60581      a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash ||
60582      isKeyed(a) !== isKeyed(b) ||
60583      isIndexed(a) !== isIndexed(b) ||
60584      isOrdered(a) !== isOrdered(b)
60585    ) {
60586      return false;
60587    }
60588
60589    if (a.size === 0 && b.size === 0) {
60590      return true;
60591    }
60592
60593    var notAssociative = !isAssociative(a);
60594
60595    if (isOrdered(a)) {
60596      var entries = a.entries();
60597      return b.every(function(v, k)  {
60598        var entry = entries.next().value;
60599        return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));
60600      }) && entries.next().done;
60601    }
60602
60603    var flipped = false;
60604
60605    if (a.size === undefined) {
60606      if (b.size === undefined) {
60607        if (typeof a.cacheResult === 'function') {
60608          a.cacheResult();
60609        }
60610      } else {
60611        flipped = true;
60612        var _ = a;
60613        a = b;
60614        b = _;
60615      }
60616    }
60617
60618    var allEqual = true;
60619    var bSize = b.__iterate(function(v, k)  {
60620      if (notAssociative ? !a.has(v) :
60621          flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) {
60622        allEqual = false;
60623        return false;
60624      }
60625    });
60626
60627    return allEqual && a.size === bSize;
60628  }
60629
60630  createClass(Repeat, IndexedSeq);
60631
60632    function Repeat(value, times) {
60633      if (!(this instanceof Repeat)) {
60634        return new Repeat(value, times);
60635      }
60636      this._value = value;
60637      this.size = times === undefined ? Infinity : Math.max(0, times);
60638      if (this.size === 0) {
60639        if (EMPTY_REPEAT) {
60640          return EMPTY_REPEAT;
60641        }
60642        EMPTY_REPEAT = this;
60643      }
60644    }
60645
60646    Repeat.prototype.toString = function() {
60647      if (this.size === 0) {
60648        return 'Repeat []';
60649      }
60650      return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';
60651    };
60652
60653    Repeat.prototype.get = function(index, notSetValue) {
60654      return this.has(index) ? this._value : notSetValue;
60655    };
60656
60657    Repeat.prototype.includes = function(searchValue) {
60658      return is(this._value, searchValue);
60659    };
60660
60661    Repeat.prototype.slice = function(begin, end) {
60662      var size = this.size;
60663      return wholeSlice(begin, end, size) ? this :
60664        new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size));
60665    };
60666
60667    Repeat.prototype.reverse = function() {
60668      return this;
60669    };
60670
60671    Repeat.prototype.indexOf = function(searchValue) {
60672      if (is(this._value, searchValue)) {
60673        return 0;
60674      }
60675      return -1;
60676    };
60677
60678    Repeat.prototype.lastIndexOf = function(searchValue) {
60679      if (is(this._value, searchValue)) {
60680        return this.size;
60681      }
60682      return -1;
60683    };
60684
60685    Repeat.prototype.__iterate = function(fn, reverse) {
60686      for (var ii = 0; ii < this.size; ii++) {
60687        if (fn(this._value, ii, this) === false) {
60688          return ii + 1;
60689        }
60690      }
60691      return ii;
60692    };
60693
60694    Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this;
60695      var ii = 0;
60696      return new Iterator(function() 
60697        {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()}
60698      );
60699    };
60700
60701    Repeat.prototype.equals = function(other) {
60702      return other instanceof Repeat ?
60703        is(this._value, other._value) :
60704        deepEqual(other);
60705    };
60706
60707
60708  var EMPTY_REPEAT;
60709
60710  function invariant(condition, error) {
60711    if (!condition) throw new Error(error);
60712  }
60713
60714  createClass(Range, IndexedSeq);
60715
60716    function Range(start, end, step) {
60717      if (!(this instanceof Range)) {
60718        return new Range(start, end, step);
60719      }
60720      invariant(step !== 0, 'Cannot step a Range by 0');
60721      start = start || 0;
60722      if (end === undefined) {
60723        end = Infinity;
60724      }
60725      step = step === undefined ? 1 : Math.abs(step);
60726      if (end < start) {
60727        step = -step;
60728      }
60729      this._start = start;
60730      this._end = end;
60731      this._step = step;
60732      this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);
60733      if (this.size === 0) {
60734        if (EMPTY_RANGE) {
60735          return EMPTY_RANGE;
60736        }
60737        EMPTY_RANGE = this;
60738      }
60739    }
60740
60741    Range.prototype.toString = function() {
60742      if (this.size === 0) {
60743        return 'Range []';
60744      }
60745      return 'Range [ ' +
60746        this._start + '...' + this._end +
60747        (this._step > 1 ? ' by ' + this._step : '') +
60748      ' ]';
60749    };
60750
60751    Range.prototype.get = function(index, notSetValue) {
60752      return this.has(index) ?
60753        this._start + wrapIndex(this, index) * this._step :
60754        notSetValue;
60755    };
60756
60757    Range.prototype.includes = function(searchValue) {
60758      var possibleIndex = (searchValue - this._start) / this._step;
60759      return possibleIndex >= 0 &&
60760        possibleIndex < this.size &&
60761        possibleIndex === Math.floor(possibleIndex);
60762    };
60763
60764    Range.prototype.slice = function(begin, end) {
60765      if (wholeSlice(begin, end, this.size)) {
60766        return this;
60767      }
60768      begin = resolveBegin(begin, this.size);
60769      end = resolveEnd(end, this.size);
60770      if (end <= begin) {
60771        return new Range(0, 0);
60772      }
60773      return new Range(this.get(begin, this._end), this.get(end, this._end), this._step);
60774    };
60775
60776    Range.prototype.indexOf = function(searchValue) {
60777      var offsetValue = searchValue - this._start;
60778      if (offsetValue % this._step === 0) {
60779        var index = offsetValue / this._step;
60780        if (index >= 0 && index < this.size) {
60781          return index
60782        }
60783      }
60784      return -1;
60785    };
60786
60787    Range.prototype.lastIndexOf = function(searchValue) {
60788      return this.indexOf(searchValue);
60789    };
60790
60791    Range.prototype.__iterate = function(fn, reverse) {
60792      var maxIndex = this.size - 1;
60793      var step = this._step;
60794      var value = reverse ? this._start + maxIndex * step : this._start;
60795      for (var ii = 0; ii <= maxIndex; ii++) {
60796        if (fn(value, ii, this) === false) {
60797          return ii + 1;
60798        }
60799        value += reverse ? -step : step;
60800      }
60801      return ii;
60802    };
60803
60804    Range.prototype.__iterator = function(type, reverse) {
60805      var maxIndex = this.size - 1;
60806      var step = this._step;
60807      var value = reverse ? this._start + maxIndex * step : this._start;
60808      var ii = 0;
60809      return new Iterator(function()  {
60810        var v = value;
60811        value += reverse ? -step : step;
60812        return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v);
60813      });
60814    };
60815
60816    Range.prototype.equals = function(other) {
60817      return other instanceof Range ?
60818        this._start === other._start &&
60819        this._end === other._end &&
60820        this._step === other._step :
60821        deepEqual(this, other);
60822    };
60823
60824
60825  var EMPTY_RANGE;
60826
60827  createClass(Collection, Iterable);
60828    function Collection() {
60829      throw TypeError('Abstract');
60830    }
60831
60832
60833  createClass(KeyedCollection, Collection);function KeyedCollection() {}
60834
60835  createClass(IndexedCollection, Collection);function IndexedCollection() {}
60836
60837  createClass(SetCollection, Collection);function SetCollection() {}
60838
60839
60840  Collection.Keyed = KeyedCollection;
60841  Collection.Indexed = IndexedCollection;
60842  Collection.Set = SetCollection;
60843
60844  var imul =
60845    typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ?
60846    Math.imul :
60847    function imul(a, b) {
60848      a = a | 0; // int
60849      b = b | 0; // int
60850      var c = a & 0xffff;
60851      var d = b & 0xffff;
60852      // Shift by 0 fixes the sign on the high part.
60853      return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int
60854    };
60855
60856  // v8 has an optimization for storing 31-bit signed numbers.
60857  // Values which have either 00 or 11 as the high order bits qualify.
60858  // This function drops the highest order bit in a signed number, maintaining
60859  // the sign bit.
60860  function smi(i32) {
60861    return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF);
60862  }
60863
60864  function hash(o) {
60865    if (o === false || o === null || o === undefined) {
60866      return 0;
60867    }
60868    if (typeof o.valueOf === 'function') {
60869      o = o.valueOf();
60870      if (o === false || o === null || o === undefined) {
60871        return 0;
60872      }
60873    }
60874    if (o === true) {
60875      return 1;
60876    }
60877    var type = typeof o;
60878    if (type === 'number') {
60879      var h = o | 0;
60880      if (h !== o) {
60881        h ^= o * 0xFFFFFFFF;
60882      }
60883      while (o > 0xFFFFFFFF) {
60884        o /= 0xFFFFFFFF;
60885        h ^= o;
60886      }
60887      return smi(h);
60888    }
60889    if (type === 'string') {
60890      return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o);
60891    }
60892    if (typeof o.hashCode === 'function') {
60893      return o.hashCode();
60894    }
60895    if (type === 'object') {
60896      return hashJSObj(o);
60897    }
60898    if (typeof o.toString === 'function') {
60899      return hashString(o.toString());
60900    }
60901    throw new Error('Value type ' + type + ' cannot be hashed.');
60902  }
60903
60904  function cachedHashString(string) {
60905    var hash = stringHashCache[string];
60906    if (hash === undefined) {
60907      hash = hashString(string);
60908      if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {
60909        STRING_HASH_CACHE_SIZE = 0;
60910        stringHashCache = {};
60911      }
60912      STRING_HASH_CACHE_SIZE++;
60913      stringHashCache[string] = hash;
60914    }
60915    return hash;
60916  }
60917
60918  // http://jsperf.com/hashing-strings
60919  function hashString(string) {
60920    // This is the hash from JVM
60921    // The hash code for a string is computed as
60922    // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],
60923    // where s[i] is the ith character of the string and n is the length of
60924    // the string. We "mod" the result to make it between 0 (inclusive) and 2^31
60925    // (exclusive) by dropping high bits.
60926    var hash = 0;
60927    for (var ii = 0; ii < string.length; ii++) {
60928      hash = 31 * hash + string.charCodeAt(ii) | 0;
60929    }
60930    return smi(hash);
60931  }
60932
60933  function hashJSObj(obj) {
60934    var hash;
60935    if (usingWeakMap) {
60936      hash = weakMap.get(obj);
60937      if (hash !== undefined) {
60938        return hash;
60939      }
60940    }
60941
60942    hash = obj[UID_HASH_KEY];
60943    if (hash !== undefined) {
60944      return hash;
60945    }
60946
60947    if (!canDefineProperty) {
60948      hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];
60949      if (hash !== undefined) {
60950        return hash;
60951      }
60952
60953      hash = getIENodeHash(obj);
60954      if (hash !== undefined) {
60955        return hash;
60956      }
60957    }
60958
60959    hash = ++objHashUID;
60960    if (objHashUID & 0x40000000) {
60961      objHashUID = 0;
60962    }
60963
60964    if (usingWeakMap) {
60965      weakMap.set(obj, hash);
60966    } else if (isExtensible !== undefined && isExtensible(obj) === false) {
60967      throw new Error('Non-extensible objects are not allowed as keys.');
60968    } else if (canDefineProperty) {
60969      Object.defineProperty(obj, UID_HASH_KEY, {
60970        'enumerable': false,
60971        'configurable': false,
60972        'writable': false,
60973        'value': hash
60974      });
60975    } else if (obj.propertyIsEnumerable !== undefined &&
60976               obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) {
60977      // Since we can't define a non-enumerable property on the object
60978      // we'll hijack one of the less-used non-enumerable properties to
60979      // save our hash on it. Since this is a function it will not show up in
60980      // `JSON.stringify` which is what we want.
60981      obj.propertyIsEnumerable = function() {
60982        return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments);
60983      };
60984      obj.propertyIsEnumerable[UID_HASH_KEY] = hash;
60985    } else if (obj.nodeType !== undefined) {
60986      // At this point we couldn't get the IE `uniqueID` to use as a hash
60987      // and we couldn't use a non-enumerable property to exploit the
60988      // dontEnum bug so we simply add the `UID_HASH_KEY` on the node
60989      // itself.
60990      obj[UID_HASH_KEY] = hash;
60991    } else {
60992      throw new Error('Unable to set a non-enumerable property on object.');
60993    }
60994
60995    return hash;
60996  }
60997
60998  // Get references to ES5 object methods.
60999  var isExtensible = Object.isExtensible;
61000
61001  // True if Object.defineProperty works as expected. IE8 fails this test.
61002  var canDefineProperty = (function() {
61003    try {
61004      Object.defineProperty({}, '@', {});
61005      return true;
61006    } catch (e) {
61007      return false;
61008    }
61009  }());
61010
61011  // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it
61012  // and avoid memory leaks from the IE cloneNode bug.
61013  function getIENodeHash(node) {
61014    if (node && node.nodeType > 0) {
61015      switch (node.nodeType) {
61016        case 1: // Element
61017          return node.uniqueID;
61018        case 9: // Document
61019          return node.documentElement && node.documentElement.uniqueID;
61020      }
61021    }
61022  }
61023
61024  // If possible, use a WeakMap.
61025  var usingWeakMap = typeof WeakMap === 'function';
61026  var weakMap;
61027  if (usingWeakMap) {
61028    weakMap = new WeakMap();
61029  }
61030
61031  var objHashUID = 0;
61032
61033  var UID_HASH_KEY = '__immutablehash__';
61034  if (typeof Symbol === 'function') {
61035    UID_HASH_KEY = Symbol(UID_HASH_KEY);
61036  }
61037
61038  var STRING_HASH_CACHE_MIN_STRLEN = 16;
61039  var STRING_HASH_CACHE_MAX_SIZE = 255;
61040  var STRING_HASH_CACHE_SIZE = 0;
61041  var stringHashCache = {};
61042
61043  function assertNotInfinite(size) {
61044    invariant(
61045      size !== Infinity,
61046      'Cannot perform this action with an infinite size.'
61047    );
61048  }
61049
61050  createClass(Map, KeyedCollection);
61051
61052    // @pragma Construction
61053
61054    function Map(value) {
61055      return value === null || value === undefined ? emptyMap() :
61056        isMap(value) && !isOrdered(value) ? value :
61057        emptyMap().withMutations(function(map ) {
61058          var iter = KeyedIterable(value);
61059          assertNotInfinite(iter.size);
61060          iter.forEach(function(v, k)  {return map.set(k, v)});
61061        });
61062    }
61063
61064    Map.prototype.toString = function() {
61065      return this.__toString('Map {', '}');
61066    };
61067
61068    // @pragma Access
61069
61070    Map.prototype.get = function(k, notSetValue) {
61071      return this._root ?
61072        this._root.get(0, undefined, k, notSetValue) :
61073        notSetValue;
61074    };
61075
61076    // @pragma Modification
61077
61078    Map.prototype.set = function(k, v) {
61079      return updateMap(this, k, v);
61080    };
61081
61082    Map.prototype.setIn = function(keyPath, v) {
61083      return this.updateIn(keyPath, NOT_SET, function()  {return v});
61084    };
61085
61086    Map.prototype.remove = function(k) {
61087      return updateMap(this, k, NOT_SET);
61088    };
61089
61090    Map.prototype.deleteIn = function(keyPath) {
61091      return this.updateIn(keyPath, function()  {return NOT_SET});
61092    };
61093
61094    Map.prototype.update = function(k, notSetValue, updater) {
61095      return arguments.length === 1 ?
61096        k(this) :
61097        this.updateIn([k], notSetValue, updater);
61098    };
61099
61100    Map.prototype.updateIn = function(keyPath, notSetValue, updater) {
61101      if (!updater) {
61102        updater = notSetValue;
61103        notSetValue = undefined;
61104      }
61105      var updatedValue = updateInDeepMap(
61106        this,
61107        forceIterator(keyPath),
61108        notSetValue,
61109        updater
61110      );
61111      return updatedValue === NOT_SET ? undefined : updatedValue;
61112    };
61113
61114    Map.prototype.clear = function() {
61115      if (this.size === 0) {
61116        return this;
61117      }
61118      if (this.__ownerID) {
61119        this.size = 0;
61120        this._root = null;
61121        this.__hash = undefined;
61122        this.__altered = true;
61123        return this;
61124      }
61125      return emptyMap();
61126    };
61127
61128    // @pragma Composition
61129
61130    Map.prototype.merge = function(/*...iters*/) {
61131      return mergeIntoMapWith(this, undefined, arguments);
61132    };
61133
61134    Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
61135      return mergeIntoMapWith(this, merger, iters);
61136    };
61137
61138    Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);
61139      return this.updateIn(
61140        keyPath,
61141        emptyMap(),
61142        function(m ) {return typeof m.merge === 'function' ?
61143          m.merge.apply(m, iters) :
61144          iters[iters.length - 1]}
61145      );
61146    };
61147
61148    Map.prototype.mergeDeep = function(/*...iters*/) {
61149      return mergeIntoMapWith(this, deepMerger, arguments);
61150    };
61151
61152    Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
61153      return mergeIntoMapWith(this, deepMergerWith(merger), iters);
61154    };
61155
61156    Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1);
61157      return this.updateIn(
61158        keyPath,
61159        emptyMap(),
61160        function(m ) {return typeof m.mergeDeep === 'function' ?
61161          m.mergeDeep.apply(m, iters) :
61162          iters[iters.length - 1]}
61163      );
61164    };
61165
61166    Map.prototype.sort = function(comparator) {
61167      // Late binding
61168      return OrderedMap(sortFactory(this, comparator));
61169    };
61170
61171    Map.prototype.sortBy = function(mapper, comparator) {
61172      // Late binding
61173      return OrderedMap(sortFactory(this, comparator, mapper));
61174    };
61175
61176    // @pragma Mutability
61177
61178    Map.prototype.withMutations = function(fn) {
61179      var mutable = this.asMutable();
61180      fn(mutable);
61181      return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;
61182    };
61183
61184    Map.prototype.asMutable = function() {
61185      return this.__ownerID ? this : this.__ensureOwner(new OwnerID());
61186    };
61187
61188    Map.prototype.asImmutable = function() {
61189      return this.__ensureOwner();
61190    };
61191
61192    Map.prototype.wasAltered = function() {
61193      return this.__altered;
61194    };
61195
61196    Map.prototype.__iterator = function(type, reverse) {
61197      return new MapIterator(this, type, reverse);
61198    };
61199
61200    Map.prototype.__iterate = function(fn, reverse) {var this$0 = this;
61201      var iterations = 0;
61202      this._root && this._root.iterate(function(entry ) {
61203        iterations++;
61204        return fn(entry[1], entry[0], this$0);
61205      }, reverse);
61206      return iterations;
61207    };
61208
61209    Map.prototype.__ensureOwner = function(ownerID) {
61210      if (ownerID === this.__ownerID) {
61211        return this;
61212      }
61213      if (!ownerID) {
61214        this.__ownerID = ownerID;
61215        this.__altered = false;
61216        return this;
61217      }
61218      return makeMap(this.size, this._root, ownerID, this.__hash);
61219    };
61220
61221
61222  function isMap(maybeMap) {
61223    return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]);
61224  }
61225
61226  Map.isMap = isMap;
61227
61228  var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';
61229
61230  var MapPrototype = Map.prototype;
61231  MapPrototype[IS_MAP_SENTINEL] = true;
61232  MapPrototype[DELETE] = MapPrototype.remove;
61233  MapPrototype.removeIn = MapPrototype.deleteIn;
61234
61235
61236  // #pragma Trie Nodes
61237
61238
61239
61240    function ArrayMapNode(ownerID, entries) {
61241      this.ownerID = ownerID;
61242      this.entries = entries;
61243    }
61244
61245    ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
61246      var entries = this.entries;
61247      for (var ii = 0, len = entries.length; ii < len; ii++) {
61248        if (is(key, entries[ii][0])) {
61249          return entries[ii][1];
61250        }
61251      }
61252      return notSetValue;
61253    };
61254
61255    ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
61256      var removed = value === NOT_SET;
61257
61258      var entries = this.entries;
61259      var idx = 0;
61260      for (var len = entries.length; idx < len; idx++) {
61261        if (is(key, entries[idx][0])) {
61262          break;
61263        }
61264      }
61265      var exists = idx < len;
61266
61267      if (exists ? entries[idx][1] === value : removed) {
61268        return this;
61269      }
61270
61271      SetRef(didAlter);
61272      (removed || !exists) && SetRef(didChangeSize);
61273
61274      if (removed && entries.length === 1) {
61275        return; // undefined
61276      }
61277
61278      if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {
61279        return createNodes(ownerID, entries, key, value);
61280      }
61281
61282      var isEditable = ownerID && ownerID === this.ownerID;
vendor: 11,899 bytes, lines 61283-61703
61283      var newEntries = isEditable ? entries : arrCopy(entries);
61284
61285      if (exists) {
61286        if (removed) {
61287          idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());
61288        } else {
61289          newEntries[idx] = [key, value];
61290        }
61291      } else {
61292        newEntries.push([key, value]);
61293      }
61294
61295      if (isEditable) {
61296        this.entries = newEntries;
61297        return this;
61298      }
61299
61300      return new ArrayMapNode(ownerID, newEntries);
61301    };
61302
61303
61304
61305
61306    function BitmapIndexedNode(ownerID, bitmap, nodes) {
61307      this.ownerID = ownerID;
61308      this.bitmap = bitmap;
61309      this.nodes = nodes;
61310    }
61311
61312    BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) {
61313      if (keyHash === undefined) {
61314        keyHash = hash(key);
61315      }
61316      var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK));
61317      var bitmap = this.bitmap;
61318      return (bitmap & bit) === 0 ? notSetValue :
61319        this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue);
61320    };
61321
61322    BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
61323      if (keyHash === undefined) {
61324        keyHash = hash(key);
61325      }
61326      var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
61327      var bit = 1 << keyHashFrag;
61328      var bitmap = this.bitmap;
61329      var exists = (bitmap & bit) !== 0;
61330
61331      if (!exists && value === NOT_SET) {
61332        return this;
61333      }
61334
61335      var idx = popCount(bitmap & (bit - 1));
61336      var nodes = this.nodes;
61337      var node = exists ? nodes[idx] : undefined;
61338      var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
61339
61340      if (newNode === node) {
61341        return this;
61342      }
61343
61344      if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {
61345        return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);
61346      }
61347
61348      if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) {
61349        return nodes[idx ^ 1];
61350      }
61351
61352      if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {
61353        return newNode;
61354      }
61355
61356      var isEditable = ownerID && ownerID === this.ownerID;
61357      var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit;
61358      var newNodes = exists ? newNode ?
61359        setIn(nodes, idx, newNode, isEditable) :
61360        spliceOut(nodes, idx, isEditable) :
61361        spliceIn(nodes, idx, newNode, isEditable);
61362
61363      if (isEditable) {
61364        this.bitmap = newBitmap;
61365        this.nodes = newNodes;
61366        return this;
61367      }
61368
61369      return new BitmapIndexedNode(ownerID, newBitmap, newNodes);
61370    };
61371
61372
61373
61374
61375    function HashArrayMapNode(ownerID, count, nodes) {
61376      this.ownerID = ownerID;
61377      this.count = count;
61378      this.nodes = nodes;
61379    }
61380
61381    HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) {
61382      if (keyHash === undefined) {
61383        keyHash = hash(key);
61384      }
61385      var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
61386      var node = this.nodes[idx];
61387      return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue;
61388    };
61389
61390    HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
61391      if (keyHash === undefined) {
61392        keyHash = hash(key);
61393      }
61394      var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
61395      var removed = value === NOT_SET;
61396      var nodes = this.nodes;
61397      var node = nodes[idx];
61398
61399      if (removed && !node) {
61400        return this;
61401      }
61402
61403      var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter);
61404      if (newNode === node) {
61405        return this;
61406      }
61407
61408      var newCount = this.count;
61409      if (!node) {
61410        newCount++;
61411      } else if (!newNode) {
61412        newCount--;
61413        if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {
61414          return packNodes(ownerID, nodes, newCount, idx);
61415        }
61416      }
61417
61418      var isEditable = ownerID && ownerID === this.ownerID;
61419      var newNodes = setIn(nodes, idx, newNode, isEditable);
61420
61421      if (isEditable) {
61422        this.count = newCount;
61423        this.nodes = newNodes;
61424        return this;
61425      }
61426
61427      return new HashArrayMapNode(ownerID, newCount, newNodes);
61428    };
61429
61430
61431
61432
61433    function HashCollisionNode(ownerID, keyHash, entries) {
61434      this.ownerID = ownerID;
61435      this.keyHash = keyHash;
61436      this.entries = entries;
61437    }
61438
61439    HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) {
61440      var entries = this.entries;
61441      for (var ii = 0, len = entries.length; ii < len; ii++) {
61442        if (is(key, entries[ii][0])) {
61443          return entries[ii][1];
61444        }
61445      }
61446      return notSetValue;
61447    };
61448
61449    HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
61450      if (keyHash === undefined) {
61451        keyHash = hash(key);
61452      }
61453
61454      var removed = value === NOT_SET;
61455
61456      if (keyHash !== this.keyHash) {
61457        if (removed) {
61458          return this;
61459        }
61460        SetRef(didAlter);
61461        SetRef(didChangeSize);
61462        return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);
61463      }
61464
61465      var entries = this.entries;
61466      var idx = 0;
61467      for (var len = entries.length; idx < len; idx++) {
61468        if (is(key, entries[idx][0])) {
61469          break;
61470        }
61471      }
61472      var exists = idx < len;
61473
61474      if (exists ? entries[idx][1] === value : removed) {
61475        return this;
61476      }
61477
61478      SetRef(didAlter);
61479      (removed || !exists) && SetRef(didChangeSize);
61480
61481      if (removed && len === 2) {
61482        return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);
61483      }
61484
61485      var isEditable = ownerID && ownerID === this.ownerID;
61486      var newEntries = isEditable ? entries : arrCopy(entries);
61487
61488      if (exists) {
61489        if (removed) {
61490          idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop());
61491        } else {
61492          newEntries[idx] = [key, value];
61493        }
61494      } else {
61495        newEntries.push([key, value]);
61496      }
61497
61498      if (isEditable) {
61499        this.entries = newEntries;
61500        return this;
61501      }
61502
61503      return new HashCollisionNode(ownerID, this.keyHash, newEntries);
61504    };
61505
61506
61507
61508
61509    function ValueNode(ownerID, keyHash, entry) {
61510      this.ownerID = ownerID;
61511      this.keyHash = keyHash;
61512      this.entry = entry;
61513    }
61514
61515    ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) {
61516      return is(key, this.entry[0]) ? this.entry[1] : notSetValue;
61517    };
61518
61519    ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
61520      var removed = value === NOT_SET;
61521      var keyMatch = is(key, this.entry[0]);
61522      if (keyMatch ? value === this.entry[1] : removed) {
61523        return this;
61524      }
61525
61526      SetRef(didAlter);
61527
61528      if (removed) {
61529        SetRef(didChangeSize);
61530        return; // undefined
61531      }
61532
61533      if (keyMatch) {
61534        if (ownerID && ownerID === this.ownerID) {
61535          this.entry[1] = value;
61536          return this;
61537        }
61538        return new ValueNode(ownerID, this.keyHash, [key, value]);
61539      }
61540
61541      SetRef(didChangeSize);
61542      return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);
61543    };
61544
61545
61546
61547  // #pragma Iterators
61548
61549  ArrayMapNode.prototype.iterate =
61550  HashCollisionNode.prototype.iterate = function (fn, reverse) {
61551    var entries = this.entries;
61552    for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {
61553      if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {
61554        return false;
61555      }
61556    }
61557  }
61558
61559  BitmapIndexedNode.prototype.iterate =
61560  HashArrayMapNode.prototype.iterate = function (fn, reverse) {
61561    var nodes = this.nodes;
61562    for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {
61563      var node = nodes[reverse ? maxIndex - ii : ii];
61564      if (node && node.iterate(fn, reverse) === false) {
61565        return false;
61566      }
61567    }
61568  }
61569
61570  ValueNode.prototype.iterate = function (fn, reverse) {
61571    return fn(this.entry);
61572  }
61573
61574  createClass(MapIterator, Iterator);
61575
61576    function MapIterator(map, type, reverse) {
61577      this._type = type;
61578      this._reverse = reverse;
61579      this._stack = map._root && mapIteratorFrame(map._root);
61580    }
61581
61582    MapIterator.prototype.next = function() {
61583      var type = this._type;
61584      var stack = this._stack;
61585      while (stack) {
61586        var node = stack.node;
61587        var index = stack.index++;
61588        var maxIndex;
61589        if (node.entry) {
61590          if (index === 0) {
61591            return mapIteratorValue(type, node.entry);
61592          }
61593        } else if (node.entries) {
61594          maxIndex = node.entries.length - 1;
61595          if (index <= maxIndex) {
61596            return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]);
61597          }
61598        } else {
61599          maxIndex = node.nodes.length - 1;
61600          if (index <= maxIndex) {
61601            var subNode = node.nodes[this._reverse ? maxIndex - index : index];
61602            if (subNode) {
61603              if (subNode.entry) {
61604                return mapIteratorValue(type, subNode.entry);
61605              }
61606              stack = this._stack = mapIteratorFrame(subNode, stack);
61607            }
61608            continue;
61609          }
61610        }
61611        stack = this._stack = this._stack.__prev;
61612      }
61613      return iteratorDone();
61614    };
61615
61616
61617  function mapIteratorValue(type, entry) {
61618    return iteratorValue(type, entry[0], entry[1]);
61619  }
61620
61621  function mapIteratorFrame(node, prev) {
61622    return {
61623      node: node,
61624      index: 0,
61625      __prev: prev
61626    };
61627  }
61628
61629  function makeMap(size, root, ownerID, hash) {
61630    var map = Object.create(MapPrototype);
61631    map.size = size;
61632    map._root = root;
61633    map.__ownerID = ownerID;
61634    map.__hash = hash;
61635    map.__altered = false;
61636    return map;
61637  }
61638
61639  var EMPTY_MAP;
61640  function emptyMap() {
61641    return EMPTY_MAP || (EMPTY_MAP = makeMap(0));
61642  }
61643
61644  function updateMap(map, k, v) {
61645    var newRoot;
61646    var newSize;
61647    if (!map._root) {
61648      if (v === NOT_SET) {
61649        return map;
61650      }
61651      newSize = 1;
61652      newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);
61653    } else {
61654      var didChangeSize = MakeRef(CHANGE_LENGTH);
61655      var didAlter = MakeRef(DID_ALTER);
61656      newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter);
61657      if (!didAlter.value) {
61658        return map;
61659      }
61660      newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0);
61661    }
61662    if (map.__ownerID) {
61663      map.size = newSize;
61664      map._root = newRoot;
61665      map.__hash = undefined;
61666      map.__altered = true;
61667      return map;
61668    }
61669    return newRoot ? makeMap(newSize, newRoot) : emptyMap();
61670  }
61671
61672  function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
61673    if (!node) {
61674      if (value === NOT_SET) {
61675        return node;
61676      }
61677      SetRef(didAlter);
61678      SetRef(didChangeSize);
61679      return new ValueNode(ownerID, keyHash, [key, value]);
61680    }
61681    return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter);
61682  }
61683
61684  function isLeafNode(node) {
61685    return node.constructor === ValueNode || node.constructor === HashCollisionNode;
61686  }
61687
61688  function mergeIntoNode(node, ownerID, shift, keyHash, entry) {
61689    if (node.keyHash === keyHash) {
61690      return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);
61691    }
61692
61693    var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;
61694    var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;
61695
61696    var newNode;
61697    var nodes = idx1 === idx2 ?
61698      [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] :
61699      ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]);
61700
61701    return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);
61702  }
61703
61704  function createNodes(ownerID, entries, key, value) {
61705    if (!ownerID) {
61706      ownerID = new OwnerID();
61707    }
61708    var node = new ValueNode(ownerID, hash(key), [key, value]);
61709    for (var ii = 0; ii < entries.length; ii++) {
61710      var entry = entries[ii];
61711      node = node.update(ownerID, 0, undefined, entry[0], entry[1]);
61712    }
61713    return node;
61714  }
61715
61716  function packNodes(ownerID, nodes, count, excluding) {
61717    var bitmap = 0;
61718    var packedII = 0;
61719    var packedNodes = new Array(count);
61720    for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {
61721      var node = nodes[ii];
61722      if (node !== undefined && ii !== excluding) {
61723        bitmap |= bit;
61724        packedNodes[packedII++] = node;
61725      }
61726    }
61727    return new BitmapIndexedNode(ownerID, bitmap, packedNodes);
61728  }
61729
61730  function expandNodes(ownerID, nodes, bitmap, including, node) {
61731    var count = 0;
61732    var expandedNodes = new Array(SIZE);
61733    for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {
61734      expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;
61735    }
61736    expandedNodes[including] = node;
61737    return new HashArrayMapNode(ownerID, count + 1, expandedNodes);
61738  }
61739
61740  function mergeIntoMapWith(map, merger, iterables) {
61741    var iters = [];
61742    for (var ii = 0; ii < iterables.length; ii++) {
61743      var value = iterables[ii];
61744      var iter = KeyedIterable(value);
61745      if (!isIterable(value)) {
61746        iter = iter.map(function(v ) {return fromJS(v)});
61747      }
61748      iters.push(iter);
61749    }
61750    return mergeIntoCollectionWith(map, merger, iters);
61751  }
61752
61753  function deepMerger(existing, value, key) {
61754    return existing && existing.mergeDeep && isIterable(value) ?
61755      existing.mergeDeep(value) :
61756      is(existing, value) ? existing : value;
61757  }
61758
61759  function deepMergerWith(merger) {
61760    return function(existing, value, key)  {
61761      if (existing && existing.mergeDeepWith && isIterable(value)) {
61762        return existing.mergeDeepWith(merger, value);
61763      }
61764      var nextValue = merger(existing, value, key);
61765      return is(existing, nextValue) ? existing : nextValue;
61766    };
61767  }
61768
61769  function mergeIntoCollectionWith(collection, merger, iters) {
61770    iters = iters.filter(function(x ) {return x.size !== 0});
61771    if (iters.length === 0) {
61772      return collection;
61773    }
61774    if (collection.size === 0 && !collection.__ownerID && iters.length === 1) {
61775      return collection.constructor(iters[0]);
61776    }
61777    return collection.withMutations(function(collection ) {
61778      var mergeIntoMap = merger ?
61779        function(value, key)  {
61780          collection.update(key, NOT_SET, function(existing )
61781            {return existing === NOT_SET ? value : merger(existing, value, key)}
61782          );
61783        } :
61784        function(value, key)  {
61785          collection.set(key, value);
61786        }
61787      for (var ii = 0; ii < iters.length; ii++) {
61788        iters[ii].forEach(mergeIntoMap);
61789      }
61790    });
61791  }
61792
61793  function updateInDeepMap(existing, keyPathIter, notSetValue, updater) {
61794    var isNotSet = existing === NOT_SET;
61795    var step = keyPathIter.next();
61796    if (step.done) {
61797      var existingValue = isNotSet ? notSetValue : existing;
61798      var newValue = updater(existingValue);
61799      return newValue === existingValue ? existing : newValue;
61800    }
61801    invariant(
61802      isNotSet || (existing && existing.set),
61803      'invalid keyPath'
61804    );
61805    var key = step.value;
61806    var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET);
61807    var nextUpdated = updateInDeepMap(
61808      nextExisting,
61809      keyPathIter,
61810      notSetValue,
61811      updater
61812    );
61813    return nextUpdated === nextExisting ? existing :
61814      nextUpdated === NOT_SET ? existing.remove(key) :
61815      (isNotSet ? emptyMap() : existing).set(key, nextUpdated);
61816  }
61817
61818  function popCount(x) {
61819    x = x - ((x >> 1) & 0x55555555);
61820    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
61821    x = (x + (x >> 4)) & 0x0f0f0f0f;
61822    x = x + (x >> 8);
61823    x = x + (x >> 16);
61824    return x & 0x7f;
61825  }
61826
61827  function setIn(array, idx, val, canEdit) {
61828    var newArray = canEdit ? array : arrCopy(array);
61829    newArray[idx] = val;
61830    return newArray;
61831  }
61832
61833  function spliceIn(array, idx, val, canEdit) {
61834    var newLen = array.length + 1;
61835    if (canEdit && idx + 1 === newLen) {
61836      array[idx] = val;
61837      return array;
61838    }
61839    var newArray = new Array(newLen);
61840    var after = 0;
61841    for (var ii = 0; ii < newLen; ii++) {
61842      if (ii === idx) {
61843        newArray[ii] = val;
61844        after = -1;
61845      } else {
61846        newArray[ii] = array[ii + after];
61847      }
61848    }
61849    return newArray;
61850  }
61851
61852  function spliceOut(array, idx, canEdit) {
61853    var newLen = array.length - 1;
61854    if (canEdit && idx === newLen) {
61855      array.pop();
61856      return array;
61857    }
61858    var newArray = new Array(newLen);
61859    var after = 0;
61860    for (var ii = 0; ii < newLen; ii++) {
61861      if (ii === idx) {
61862        after = 1;
61863      }
61864      newArray[ii] = array[ii + after];
61865    }
61866    return newArray;
61867  }
61868
61869  var MAX_ARRAY_MAP_SIZE = SIZE / 4;
61870  var MAX_BITMAP_INDEXED_SIZE = SIZE / 2;
61871  var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;
61872
61873  createClass(List, IndexedCollection);
61874
61875    // @pragma Construction
61876
61877    function List(value) {
61878      var empty = emptyList();
61879      if (value === null || value === undefined) {
61880        return empty;
61881      }
61882      if (isList(value)) {
61883        return value;
61884      }
61885      var iter = IndexedIterable(value);
61886      var size = iter.size;
61887      if (size === 0) {
61888        return empty;
61889      }
61890      assertNotInfinite(size);
61891      if (size > 0 && size < SIZE) {
61892        return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));
61893      }
61894      return empty.withMutations(function(list ) {
61895        list.setSize(size);
61896        iter.forEach(function(v, i)  {return list.set(i, v)});
61897      });
61898    }
61899
61900    List.of = function(/*...values*/) {
61901      return this(arguments);
61902    };
61903
61904    List.prototype.toString = function() {
61905      return this.__toString('List [', ']');
61906    };
61907
61908    // @pragma Access
61909
61910    List.prototype.get = function(index, notSetValue) {
61911      index = wrapIndex(this, index);
61912      if (index >= 0 && index < this.size) {
61913        index += this._origin;
61914        var node = listNodeFor(this, index);
61915        return node && node.array[index & MASK];
61916      }
61917      return notSetValue;
61918    };
61919
61920    // @pragma Modification
61921
61922    List.prototype.set = function(index, value) {
61923      return updateList(this, index, value);
61924    };
61925
61926    List.prototype.remove = function(index) {
61927      return !this.has(index) ? this :
61928        index === 0 ? this.shift() :
61929        index === this.size - 1 ? this.pop() :
61930        this.splice(index, 1);
61931    };
61932
61933    List.prototype.insert = function(index, value) {
61934      return this.splice(index, 0, value);
61935    };
61936
61937    List.prototype.clear = function() {
61938      if (this.size === 0) {
61939        return this;
61940      }
61941      if (this.__ownerID) {
61942        this.size = this._origin = this._capacity = 0;
61943        this._level = SHIFT;
61944        this._root = this._tail = null;
61945        this.__hash = undefined;
61946        this.__altered = true;
61947        return this;
61948      }
61949      return emptyList();
61950    };
61951
61952    List.prototype.push = function(/*...values*/) {
61953      var values = arguments;
61954      var oldSize = this.size;
61955      return this.withMutations(function(list ) {
61956        setListBounds(list, 0, oldSize + values.length);
61957        for (var ii = 0; ii < values.length; ii++) {
61958          list.set(oldSize + ii, values[ii]);
61959        }
61960      });
61961    };
61962
61963    List.prototype.pop = function() {
61964      return setListBounds(this, 0, -1);
61965    };
61966
61967    List.prototype.unshift = function(/*...values*/) {
61968      var values = arguments;
61969      return this.withMutations(function(list ) {
61970        setListBounds(list, -values.length);
61971        for (var ii = 0; ii < values.length; ii++) {
61972          list.set(ii, values[ii]);
61973        }
61974      });
61975    };
61976
61977    List.prototype.shift = function() {
61978      return setListBounds(this, 1);
61979    };
61980
61981    // @pragma Composition
61982
61983    List.prototype.merge = function(/*...iters*/) {
61984      return mergeIntoListWith(this, undefined, arguments);
61985    };
61986
61987    List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
61988      return mergeIntoListWith(this, merger, iters);
61989    };
61990
61991    List.prototype.mergeDeep = function(/*...iters*/) {
61992      return mergeIntoListWith(this, deepMerger, arguments);
61993    };
61994
61995    List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
61996      return mergeIntoListWith(this, deepMergerWith(merger), iters);
61997    };
61998
61999    List.prototype.setSize = function(size) {
62000      return setListBounds(this, 0, size);
62001    };
62002
62003    // @pragma Iteration
62004
62005    List.prototype.slice = function(begin, end) {
62006      var size = this.size;
62007      if (wholeSlice(begin, end, size)) {
62008        return this;
62009      }
62010      return setListBounds(
62011        this,
62012        resolveBegin(begin, size),
62013        resolveEnd(end, size)
62014      );
62015    };
62016
62017    List.prototype.__iterator = function(type, reverse) {
62018      var index = 0;
62019      var values = iterateList(this, reverse);
62020      return new Iterator(function()  {
62021        var value = values();
62022        return value === DONE ?
62023          iteratorDone() :
62024          iteratorValue(type, index++, value);
62025      });
62026    };
62027
62028    List.prototype.__iterate = function(fn, reverse) {
62029      var index = 0;
62030      var values = iterateList(this, reverse);
62031      var value;
62032      while ((value = values()) !== DONE) {
62033        if (fn(value, index++, this) === false) {
62034          break;
62035        }
62036      }
62037      return index;
62038    };
62039
62040    List.prototype.__ensureOwner = function(ownerID) {
62041      if (ownerID === this.__ownerID) {
62042        return this;
62043      }
62044      if (!ownerID) {
62045        this.__ownerID = ownerID;
62046        return this;
62047      }
62048      return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash);
62049    };
62050
62051
62052  function isList(maybeList) {
62053    return !!(maybeList && maybeList[IS_LIST_SENTINEL]);
62054  }
62055
62056  List.isList = isList;
62057
vendor: 9,767 bytes, lines 62058-62388
62058  var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';
62059
62060  var ListPrototype = List.prototype;
62061  ListPrototype[IS_LIST_SENTINEL] = true;
62062  ListPrototype[DELETE] = ListPrototype.remove;
62063  ListPrototype.setIn = MapPrototype.setIn;
62064  ListPrototype.deleteIn =
62065  ListPrototype.removeIn = MapPrototype.removeIn;
62066  ListPrototype.update = MapPrototype.update;
62067  ListPrototype.updateIn = MapPrototype.updateIn;
62068  ListPrototype.mergeIn = MapPrototype.mergeIn;
62069  ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
62070  ListPrototype.withMutations = MapPrototype.withMutations;
62071  ListPrototype.asMutable = MapPrototype.asMutable;
62072  ListPrototype.asImmutable = MapPrototype.asImmutable;
62073  ListPrototype.wasAltered = MapPrototype.wasAltered;
62074
62075
62076
62077    function VNode(array, ownerID) {
62078      this.array = array;
62079      this.ownerID = ownerID;
62080    }
62081
62082    // TODO: seems like these methods are very similar
62083
62084    VNode.prototype.removeBefore = function(ownerID, level, index) {
62085      if (index === level ? 1 << level :  false || this.array.length === 0) {
62086        return this;
62087      }
62088      var originIndex = (index >>> level) & MASK;
62089      if (originIndex >= this.array.length) {
62090        return new VNode([], ownerID);
62091      }
62092      var removingFirst = originIndex === 0;
62093      var newChild;
62094      if (level > 0) {
62095        var oldChild = this.array[originIndex];
62096        newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);
62097        if (newChild === oldChild && removingFirst) {
62098          return this;
62099        }
62100      }
62101      if (removingFirst && !newChild) {
62102        return this;
62103      }
62104      var editable = editableVNode(this, ownerID);
62105      if (!removingFirst) {
62106        for (var ii = 0; ii < originIndex; ii++) {
62107          editable.array[ii] = undefined;
62108        }
62109      }
62110      if (newChild) {
62111        editable.array[originIndex] = newChild;
62112      }
62113      return editable;
62114    };
62115
62116    VNode.prototype.removeAfter = function(ownerID, level, index) {
62117      if (index === (level ? 1 << level : 0) || this.array.length === 0) {
62118        return this;
62119      }
62120      var sizeIndex = ((index - 1) >>> level) & MASK;
62121      if (sizeIndex >= this.array.length) {
62122        return this;
62123      }
62124
62125      var newChild;
62126      if (level > 0) {
62127        var oldChild = this.array[sizeIndex];
62128        newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);
62129        if (newChild === oldChild && sizeIndex === this.array.length - 1) {
62130          return this;
62131        }
62132      }
62133
62134      var editable = editableVNode(this, ownerID);
62135      editable.array.splice(sizeIndex + 1);
62136      if (newChild) {
62137        editable.array[sizeIndex] = newChild;
62138      }
62139      return editable;
62140    };
62141
62142
62143
62144  var DONE = {};
62145
62146  function iterateList(list, reverse) {
62147    var left = list._origin;
62148    var right = list._capacity;
62149    var tailPos = getTailOffset(right);
62150    var tail = list._tail;
62151
62152    return iterateNodeOrLeaf(list._root, list._level, 0);
62153
62154    function iterateNodeOrLeaf(node, level, offset) {
62155      return level === 0 ?
62156        iterateLeaf(node, offset) :
62157        iterateNode(node, level, offset);
62158    }
62159
62160    function iterateLeaf(node, offset) {
62161      var array = offset === tailPos ? tail && tail.array : node && node.array;
62162      var from = offset > left ? 0 : left - offset;
62163      var to = right - offset;
62164      if (to > SIZE) {
62165        to = SIZE;
62166      }
62167      return function()  {
62168        if (from === to) {
62169          return DONE;
62170        }
62171        var idx = reverse ? --to : from++;
62172        return array && array[idx];
62173      };
62174    }
62175
62176    function iterateNode(node, level, offset) {
62177      var values;
62178      var array = node && node.array;
62179      var from = offset > left ? 0 : (left - offset) >> level;
62180      var to = ((right - offset) >> level) + 1;
62181      if (to > SIZE) {
62182        to = SIZE;
62183      }
62184      return function()  {
62185        do {
62186          if (values) {
62187            var value = values();
62188            if (value !== DONE) {
62189              return value;
62190            }
62191            values = null;
62192          }
62193          if (from === to) {
62194            return DONE;
62195          }
62196          var idx = reverse ? --to : from++;
62197          values = iterateNodeOrLeaf(
62198            array && array[idx], level - SHIFT, offset + (idx << level)
62199          );
62200        } while (true);
62201      };
62202    }
62203  }
62204
62205  function makeList(origin, capacity, level, root, tail, ownerID, hash) {
62206    var list = Object.create(ListPrototype);
62207    list.size = capacity - origin;
62208    list._origin = origin;
62209    list._capacity = capacity;
62210    list._level = level;
62211    list._root = root;
62212    list._tail = tail;
62213    list.__ownerID = ownerID;
62214    list.__hash = hash;
62215    list.__altered = false;
62216    return list;
62217  }
62218
62219  var EMPTY_LIST;
62220  function emptyList() {
62221    return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));
62222  }
62223
62224  function updateList(list, index, value) {
62225    index = wrapIndex(list, index);
62226
62227    if (index !== index) {
62228      return list;
62229    }
62230
62231    if (index >= list.size || index < 0) {
62232      return list.withMutations(function(list ) {
62233        index < 0 ?
62234          setListBounds(list, index).set(0, value) :
62235          setListBounds(list, 0, index + 1).set(index, value)
62236      });
62237    }
62238
62239    index += list._origin;
62240
62241    var newTail = list._tail;
62242    var newRoot = list._root;
62243    var didAlter = MakeRef(DID_ALTER);
62244    if (index >= getTailOffset(list._capacity)) {
62245      newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);
62246    } else {
62247      newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter);
62248    }
62249
62250    if (!didAlter.value) {
62251      return list;
62252    }
62253
62254    if (list.__ownerID) {
62255      list._root = newRoot;
62256      list._tail = newTail;
62257      list.__hash = undefined;
62258      list.__altered = true;
62259      return list;
62260    }
62261    return makeList(list._origin, list._capacity, list._level, newRoot, newTail);
62262  }
62263
62264  function updateVNode(node, ownerID, level, index, value, didAlter) {
62265    var idx = (index >>> level) & MASK;
62266    var nodeHas = node && idx < node.array.length;
62267    if (!nodeHas && value === undefined) {
62268      return node;
62269    }
62270
62271    var newNode;
62272
62273    if (level > 0) {
62274      var lowerNode = node && node.array[idx];
62275      var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter);
62276      if (newLowerNode === lowerNode) {
62277        return node;
62278      }
62279      newNode = editableVNode(node, ownerID);
62280      newNode.array[idx] = newLowerNode;
62281      return newNode;
62282    }
62283
62284    if (nodeHas && node.array[idx] === value) {
62285      return node;
62286    }
62287
62288    SetRef(didAlter);
62289
62290    newNode = editableVNode(node, ownerID);
62291    if (value === undefined && idx === newNode.array.length - 1) {
62292      newNode.array.pop();
62293    } else {
62294      newNode.array[idx] = value;
62295    }
62296    return newNode;
62297  }
62298
62299  function editableVNode(node, ownerID) {
62300    if (ownerID && node && ownerID === node.ownerID) {
62301      return node;
62302    }
62303    return new VNode(node ? node.array.slice() : [], ownerID);
62304  }
62305
62306  function listNodeFor(list, rawIndex) {
62307    if (rawIndex >= getTailOffset(list._capacity)) {
62308      return list._tail;
62309    }
62310    if (rawIndex < 1 << (list._level + SHIFT)) {
62311      var node = list._root;
62312      var level = list._level;
62313      while (node && level > 0) {
62314        node = node.array[(rawIndex >>> level) & MASK];
62315        level -= SHIFT;
62316      }
62317      return node;
62318    }
62319  }
62320
62321  function setListBounds(list, begin, end) {
62322    // Sanitize begin & end using this shorthand for ToInt32(argument)
62323    // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
62324    if (begin !== undefined) {
62325      begin = begin | 0;
62326    }
62327    if (end !== undefined) {
62328      end = end | 0;
62329    }
62330    var owner = list.__ownerID || new OwnerID();
62331    var oldOrigin = list._origin;
62332    var oldCapacity = list._capacity;
62333    var newOrigin = oldOrigin + begin;
62334    var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end;
62335    if (newOrigin === oldOrigin && newCapacity === oldCapacity) {
62336      return list;
62337    }
62338
62339    // If it's going to end after it starts, it's empty.
62340    if (newOrigin >= newCapacity) {
62341      return list.clear();
62342    }
62343
62344    var newLevel = list._level;
62345    var newRoot = list._root;
62346
62347    // New origin might need creating a higher root.
62348    var offsetShift = 0;
62349    while (newOrigin + offsetShift < 0) {
62350      newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner);
62351      newLevel += SHIFT;
62352      offsetShift += 1 << newLevel;
62353    }
62354    if (offsetShift) {
62355      newOrigin += offsetShift;
62356      oldOrigin += offsetShift;
62357      newCapacity += offsetShift;
62358      oldCapacity += offsetShift;
62359    }
62360
62361    var oldTailOffset = getTailOffset(oldCapacity);
62362    var newTailOffset = getTailOffset(newCapacity);
62363
62364    // New size might need creating a higher root.
62365    while (newTailOffset >= 1 << (newLevel + SHIFT)) {
62366      newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner);
62367      newLevel += SHIFT;
62368    }
62369
62370    // Locate or create the new tail.
62371    var oldTail = list._tail;
62372    var newTail = newTailOffset < oldTailOffset ?
62373      listNodeFor(list, newCapacity - 1) :
62374      newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail;
62375
62376    // Merge Tail into tree.
62377    if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) {
62378      newRoot = editableVNode(newRoot, owner);
62379      var node = newRoot;
62380      for (var level = newLevel; level > SHIFT; level -= SHIFT) {
62381        var idx = (oldTailOffset >>> level) & MASK;
62382        node = node.array[idx] = editableVNode(node.array[idx], owner);
62383      }
62384      node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;
62385    }
62386
62387    // If the size has been reduced, there's a chance the tail needs to be trimmed.
62388    if (newCapacity < oldCapacity) {
62389      newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);
62390    }
62391
62392    // If the new origin is within the tail, then we do not need a root.
62393    if (newOrigin >= newTailOffset) {
62394      newOrigin -= newTailOffset;
62395      newCapacity -= newTailOffset;
62396      newLevel = SHIFT;
62397      newRoot = null;
62398      newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);
62399
62400    // Otherwise, if the root has been trimmed, garbage collect.
62401    } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {
62402      offsetShift = 0;
62403
62404      // Identify the new top root node of the subtree of the old root.
62405      while (newRoot) {
62406        var beginIndex = (newOrigin >>> newLevel) & MASK;
62407        if (beginIndex !== (newTailOffset >>> newLevel) & MASK) {
62408          break;
62409        }
62410        if (beginIndex) {
62411          offsetShift += (1 << newLevel) * beginIndex;
62412        }
62413        newLevel -= SHIFT;
62414        newRoot = newRoot.array[beginIndex];
62415      }
62416
62417      // Trim the new sides of the new root.
62418      if (newRoot && newOrigin > oldOrigin) {
62419        newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);
62420      }
62421      if (newRoot && newTailOffset < oldTailOffset) {
62422        newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift);
62423      }
62424      if (offsetShift) {
62425        newOrigin -= offsetShift;
62426        newCapacity -= offsetShift;
62427      }
62428    }
62429
62430    if (list.__ownerID) {
62431      list.size = newCapacity - newOrigin;
62432      list._origin = newOrigin;
62433      list._capacity = newCapacity;
62434      list._level = newLevel;
62435      list._root = newRoot;
62436      list._tail = newTail;
62437      list.__hash = undefined;
62438      list.__altered = true;
62439      return list;
62440    }
62441    return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);
62442  }
62443
62444  function mergeIntoListWith(list, merger, iterables) {
62445    var iters = [];
62446    var maxSize = 0;
62447    for (var ii = 0; ii < iterables.length; ii++) {
62448      var value = iterables[ii];
62449      var iter = IndexedIterable(value);
62450      if (iter.size > maxSize) {
62451        maxSize = iter.size;
62452      }
62453      if (!isIterable(value)) {
62454        iter = iter.map(function(v ) {return fromJS(v)});
62455      }
62456      iters.push(iter);
62457    }
62458    if (maxSize > list.size) {
62459      list = list.setSize(maxSize);
62460    }
62461    return mergeIntoCollectionWith(list, merger, iters);
62462  }
62463
62464  function getTailOffset(size) {
62465    return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT);
62466  }
62467
62468  createClass(OrderedMap, Map);
62469
62470    // @pragma Construction
62471
62472    function OrderedMap(value) {
62473      return value === null || value === undefined ? emptyOrderedMap() :
62474        isOrderedMap(value) ? value :
62475        emptyOrderedMap().withMutations(function(map ) {
62476          var iter = KeyedIterable(value);
62477          assertNotInfinite(iter.size);
62478          iter.forEach(function(v, k)  {return map.set(k, v)});
62479        });
62480    }
62481
62482    OrderedMap.of = function(/*...values*/) {
62483      return this(arguments);
62484    };
62485
62486    OrderedMap.prototype.toString = function() {
62487      return this.__toString('OrderedMap {', '}');
62488    };
62489
62490    // @pragma Access
62491
62492    OrderedMap.prototype.get = function(k, notSetValue) {
62493      var index = this._map.get(k);
62494      return index !== undefined ? this._list.get(index)[1] : notSetValue;
62495    };
62496
62497    // @pragma Modification
62498
62499    OrderedMap.prototype.clear = function() {
62500      if (this.size === 0) {
62501        return this;
62502      }
62503      if (this.__ownerID) {
62504        this.size = 0;
62505        this._map.clear();
62506        this._list.clear();
62507        return this;
62508      }
62509      return emptyOrderedMap();
62510    };
62511
62512    OrderedMap.prototype.set = function(k, v) {
62513      return updateOrderedMap(this, k, v);
62514    };
62515
62516    OrderedMap.prototype.remove = function(k) {
62517      return updateOrderedMap(this, k, NOT_SET);
62518    };
62519
62520    OrderedMap.prototype.wasAltered = function() {
62521      return this._map.wasAltered() || this._list.wasAltered();
62522    };
62523
62524    OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this;
62525      return this._list.__iterate(
62526        function(entry ) {return entry && fn(entry[1], entry[0], this$0)},
62527        reverse
62528      );
62529    };
62530
62531    OrderedMap.prototype.__iterator = function(type, reverse) {
62532      return this._list.fromEntrySeq().__iterator(type, reverse);
62533    };
62534
62535    OrderedMap.prototype.__ensureOwner = function(ownerID) {
62536      if (ownerID === this.__ownerID) {
62537        return this;
62538      }
62539      var newMap = this._map.__ensureOwner(ownerID);
62540      var newList = this._list.__ensureOwner(ownerID);
62541      if (!ownerID) {
62542        this.__ownerID = ownerID;
62543        this._map = newMap;
62544        this._list = newList;
62545        return this;
62546      }
62547      return makeOrderedMap(newMap, newList, ownerID, this.__hash);
62548    };
62549
62550
62551  function isOrderedMap(maybeOrderedMap) {
62552    return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);
62553  }
62554
62555  OrderedMap.isOrderedMap = isOrderedMap;
62556
62557  OrderedMap.prototype[IS_ORDERED_SENTINEL] = true;
62558  OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;
62559
62560
62561
62562  function makeOrderedMap(map, list, ownerID, hash) {
62563    var omap = Object.create(OrderedMap.prototype);
62564    omap.size = map ? map.size : 0;
62565    omap._map = map;
62566    omap._list = list;
62567    omap.__ownerID = ownerID;
62568    omap.__hash = hash;
62569    return omap;
62570  }
62571
62572  var EMPTY_ORDERED_MAP;
62573  function emptyOrderedMap() {
62574    return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()));
62575  }
62576
62577  function updateOrderedMap(omap, k, v) {
62578    var map = omap._map;
62579    var list = omap._list;
62580    var i = map.get(k);
62581    var has = i !== undefined;
62582    var newMap;
62583    var newList;
62584    if (v === NOT_SET) { // removed
62585      if (!has) {
62586        return omap;
62587      }
62588      if (list.size >= SIZE && list.size >= map.size * 2) {
62589        newList = list.filter(function(entry, idx)  {return entry !== undefined && i !== idx});
62590        newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap();
62591        if (omap.__ownerID) {
62592          newMap.__ownerID = newList.__ownerID = omap.__ownerID;
62593        }
62594      } else {
62595        newMap = map.remove(k);
62596        newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);
62597      }
62598    } else {
62599      if (has) {
62600        if (v === list.get(i)[1]) {
62601          return omap;
62602        }
62603        newMap = map;
62604        newList = list.set(i, [k, v]);
62605      } else {
62606        newMap = map.set(k, list.size);
62607        newList = list.set(list.size, [k, v]);
62608      }
62609    }
62610    if (omap.__ownerID) {
62611      omap.size = newMap.size;
62612      omap._map = newMap;
62613      omap._list = newList;
62614      omap.__hash = undefined;
62615      return omap;
62616    }
62617    return makeOrderedMap(newMap, newList);
62618  }
62619
62620  createClass(ToKeyedSequence, KeyedSeq);
62621    function ToKeyedSequence(indexed, useKeys) {
62622      this._iter = indexed;
62623      this._useKeys = useKeys;
62624      this.size = indexed.size;
62625    }
62626
62627    ToKeyedSequence.prototype.get = function(key, notSetValue) {
62628      return this._iter.get(key, notSetValue);
62629    };
62630
62631    ToKeyedSequence.prototype.has = function(key) {
62632      return this._iter.has(key);
62633    };
62634
62635    ToKeyedSequence.prototype.valueSeq = function() {
62636      return this._iter.valueSeq();
62637    };
62638
62639    ToKeyedSequence.prototype.reverse = function() {var this$0 = this;
62640      var reversedSequence = reverseFactory(this, true);
62641      if (!this._useKeys) {
62642        reversedSequence.valueSeq = function()  {return this$0._iter.toSeq().reverse()};
62643      }
62644      return reversedSequence;
62645    };
62646
62647    ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this;
62648      var mappedSequence = mapFactory(this, mapper, context);
62649      if (!this._useKeys) {
62650        mappedSequence.valueSeq = function()  {return this$0._iter.toSeq().map(mapper, context)};
62651      }
62652      return mappedSequence;
62653    };
62654
62655    ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
62656      var ii;
62657      return this._iter.__iterate(
62658        this._useKeys ?
62659          function(v, k)  {return fn(v, k, this$0)} :
62660          ((ii = reverse ? resolveSize(this) : 0),
62661            function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}),
62662        reverse
62663      );
62664    };
62665
62666    ToKeyedSequence.prototype.__iterator = function(type, reverse) {
62667      if (this._useKeys) {
62668        return this._iter.__iterator(type, reverse);
62669      }
62670      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
62671      var ii = reverse ? resolveSize(this) : 0;
62672      return new Iterator(function()  {
62673        var step = iterator.next();
62674        return step.done ? step :
62675          iteratorValue(type, reverse ? --ii : ii++, step.value, step);
62676      });
62677    };
62678
62679  ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true;
62680
62681
62682  createClass(ToIndexedSequence, IndexedSeq);
62683    function ToIndexedSequence(iter) {
62684      this._iter = iter;
62685      this.size = iter.size;
62686    }
62687
62688    ToIndexedSequence.prototype.includes = function(value) {
62689      return this._iter.includes(value);
62690    };
62691
62692    ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
62693      var iterations = 0;
62694      return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse);
62695    };
62696
62697    ToIndexedSequence.prototype.__iterator = function(type, reverse) {
62698      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
62699      var iterations = 0;
62700      return new Iterator(function()  {
62701        var step = iterator.next();
62702        return step.done ? step :
62703          iteratorValue(type, iterations++, step.value, step)
62704      });
62705    };
62706
62707
62708
62709  createClass(ToSetSequence, SetSeq);
62710    function ToSetSequence(iter) {
62711      this._iter = iter;
62712      this.size = iter.size;
62713    }
62714
62715    ToSetSequence.prototype.has = function(key) {
62716      return this._iter.includes(key);
62717    };
62718
62719    ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
62720      return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse);
62721    };
62722
62723    ToSetSequence.prototype.__iterator = function(type, reverse) {
62724      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
62725      return new Iterator(function()  {
62726        var step = iterator.next();
62727        return step.done ? step :
62728          iteratorValue(type, step.value, step.value, step);
62729      });
62730    };
62731
62732
62733
62734  createClass(FromEntriesSequence, KeyedSeq);
62735    function FromEntriesSequence(entries) {
62736      this._iter = entries;
62737      this.size = entries.size;
62738    }
62739
62740    FromEntriesSequence.prototype.entrySeq = function() {
62741      return this._iter.toSeq();
62742    };
62743
62744    FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this;
62745      return this._iter.__iterate(function(entry ) {
62746        // Check if entry exists first so array access doesn't throw for holes
62747        // in the parent iteration.
62748        if (entry) {
62749          validateEntry(entry);
62750          var indexedIterable = isIterable(entry);
62751          return fn(
62752            indexedIterable ? entry.get(1) : entry[1],
62753            indexedIterable ? entry.get(0) : entry[0],
62754            this$0
62755          );
62756        }
62757      }, reverse);
62758    };
62759
62760    FromEntriesSequence.prototype.__iterator = function(type, reverse) {
62761      var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);
62762      return new Iterator(function()  {
62763        while (true) {
62764          var step = iterator.next();
62765          if (step.done) {
62766            return step;
62767          }
62768          var entry = step.value;
62769          // Check if entry exists first so array access doesn't throw for holes
62770          // in the parent iteration.
62771          if (entry) {
62772            validateEntry(entry);
62773            var indexedIterable = isIterable(entry);
62774            return iteratorValue(
62775              type,
62776              indexedIterable ? entry.get(0) : entry[0],
62777              indexedIterable ? entry.get(1) : entry[1],
62778              step
62779            );
62780          }
62781        }
62782      });
62783    };
62784
62785
62786  ToIndexedSequence.prototype.cacheResult =
62787  ToKeyedSequence.prototype.cacheResult =
62788  ToSetSequence.prototype.cacheResult =
62789  FromEntriesSequence.prototype.cacheResult =
62790    cacheResultThrough;
62791
62792
62793  function flipFactory(iterable) {
62794    var flipSequence = makeSequence(iterable);
62795    flipSequence._iter = iterable;
62796    flipSequence.size = iterable.size;
62797    flipSequence.flip = function()  {return iterable};
62798    flipSequence.reverse = function () {
62799      var reversedSequence = iterable.reverse.apply(this); // super.reverse()
62800      reversedSequence.flip = function()  {return iterable.reverse()};
62801      return reversedSequence;
62802    };
62803    flipSequence.has = function(key ) {return iterable.includes(key)};
62804    flipSequence.includes = function(key ) {return iterable.has(key)};
62805    flipSequence.cacheResult = cacheResultThrough;
62806    flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
62807      return iterable.__iterate(function(v, k)  {return fn(k, v, this$0) !== false}, reverse);
62808    }
62809    flipSequence.__iteratorUncached = function(type, reverse) {
62810      if (type === ITERATE_ENTRIES) {
62811        var iterator = iterable.__iterator(type, reverse);
62812        return new Iterator(function()  {
62813          var step = iterator.next();
62814          if (!step.done) {
62815            var k = step.value[0];
62816            step.value[0] = step.value[1];
62817            step.value[1] = k;
62818          }
62819          return step;
62820        });
62821      }
62822      return iterable.__iterator(
62823        type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,
62824        reverse
62825      );
62826    }
62827    return flipSequence;
62828  }
62829
62830
62831  function mapFactory(iterable, mapper, context) {
62832    var mappedSequence = makeSequence(iterable);
62833    mappedSequence.size = iterable.size;
62834    mappedSequence.has = function(key ) {return iterable.has(key)};
62835    mappedSequence.get = function(key, notSetValue)  {
62836      var v = iterable.get(key, NOT_SET);
62837      return v === NOT_SET ?
62838        notSetValue :
62839        mapper.call(context, v, key, iterable);
62840    };
62841    mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
62842      return iterable.__iterate(
62843        function(v, k, c)  {return fn(mapper.call(context, v, k, c), k, this$0) !== false},
62844        reverse
62845      );
62846    }
62847    mappedSequence.__iteratorUncached = function (type, reverse) {
62848      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
62849      return new Iterator(function()  {
62850        var step = iterator.next();
62851        if (step.done) {
62852          return step;
62853        }
62854        var entry = step.value;
62855        var key = entry[0];
62856        return iteratorValue(
62857          type,
62858          key,
62859          mapper.call(context, entry[1], key, iterable),
62860          step
62861        );
62862      });
62863    }
62864    return mappedSequence;
62865  }
62866
62867
62868  function reverseFactory(iterable, useKeys) {
62869    var reversedSequence = makeSequence(iterable);
62870    reversedSequence._iter = iterable;
62871    reversedSequence.size = iterable.size;
62872    reversedSequence.reverse = function()  {return iterable};
62873    if (iterable.flip) {
62874      reversedSequence.flip = function () {
62875        var flipSequence = flipFactory(iterable);
62876        flipSequence.reverse = function()  {return iterable.flip()};
62877        return flipSequence;
62878      };
62879    }
62880    reversedSequence.get = function(key, notSetValue) 
62881      {return iterable.get(useKeys ? key : -1 - key, notSetValue)};
62882    reversedSequence.has = function(key )
62883      {return iterable.has(useKeys ? key : -1 - key)};
62884    reversedSequence.includes = function(value ) {return iterable.includes(value)};
62885    reversedSequence.cacheResult = cacheResultThrough;
62886    reversedSequence.__iterate = function (fn, reverse) {var this$0 = this;
62887      return iterable.__iterate(function(v, k)  {return fn(v, k, this$0)}, !reverse);
62888    };
62889    reversedSequence.__iterator =
62890      function(type, reverse)  {return iterable.__iterator(type, !reverse)};
62891    return reversedSequence;
62892  }
62893
62894
62895  function filterFactory(iterable, predicate, context, useKeys) {
62896    var filterSequence = makeSequence(iterable);
62897    if (useKeys) {
62898      filterSequence.has = function(key ) {
62899        var v = iterable.get(key, NOT_SET);
62900        return v !== NOT_SET && !!predicate.call(context, v, key, iterable);
62901      };
62902      filterSequence.get = function(key, notSetValue)  {
62903        var v = iterable.get(key, NOT_SET);
62904        return v !== NOT_SET && predicate.call(context, v, key, iterable) ?
62905          v : notSetValue;
62906      };
62907    }
62908    filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
62909      var iterations = 0;
62910      iterable.__iterate(function(v, k, c)  {
62911        if (predicate.call(context, v, k, c)) {
62912          iterations++;
62913          return fn(v, useKeys ? k : iterations - 1, this$0);
62914        }
62915      }, reverse);
62916      return iterations;
62917    };
62918    filterSequence.__iteratorUncached = function (type, reverse) {
62919      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
62920      var iterations = 0;
62921      return new Iterator(function()  {
62922        while (true) {
62923          var step = iterator.next();
62924          if (step.done) {
62925            return step;
62926          }
62927          var entry = step.value;
62928          var key = entry[0];
62929          var value = entry[1];
62930          if (predicate.call(context, value, key, iterable)) {
62931            return iteratorValue(type, useKeys ? key : iterations++, value, step);
62932          }
62933        }
62934      });
62935    }
62936    return filterSequence;
62937  }
62938
62939
62940  function countByFactory(iterable, grouper, context) {
62941    var groups = Map().asMutable();
62942    iterable.__iterate(function(v, k)  {
62943      groups.update(
62944        grouper.call(context, v, k, iterable),
62945        0,
62946        function(a ) {return a + 1}
62947      );
62948    });
62949    return groups.asImmutable();
62950  }
62951
62952
62953  function groupByFactory(iterable, grouper, context) {
62954    var isKeyedIter = isKeyed(iterable);
62955    var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable();
62956    iterable.__iterate(function(v, k)  {
62957      groups.update(
62958        grouper.call(context, v, k, iterable),
62959        function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] 
62959: v), a)}
62960      );
62961    });
62962    var coerce = iterableClass(iterable);
62963    return groups.map(function(arr ) {return reify(iterable, coerce(arr))});
62964  }
62965
62966
62967  function sliceFactory(iterable, begin, end, useKeys) {
62968    var originalSize = iterable.size;
62969
62970    // Sanitize begin & end using this shorthand for ToInt32(argument)
62971    // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32
62972    if (begin !== undefined) {
62973      begin = begin | 0;
62974    }
62975    if (end !== undefined) {
62976      end = end | 0;
62977    }
62978
62979    if (wholeSlice(begin, end, originalSize)) {
62980      return iterable;
62981    }
62982
62983    var resolvedBegin = resolveBegin(begin, originalSize);
62984    var resolvedEnd = resolveEnd(end, originalSize);
62985
62986    // begin or end will be NaN if they were provided as negative numbers and
62987    // this iterable's size is unknown. In that case, cache first so there is
62988    // a known size and these do not resolve to NaN.
62989    if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {
62990      return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys);
62991    }
62992
62993    // Note: resolvedEnd is undefined when the original sequence's length is
62994    // unknown and this slice did not supply an end and should contain all
62995    // elements after resolvedBegin.
62996    // In that case, resolvedSize will be NaN and sliceSize will remain undefined.
62997    var resolvedSize = resolvedEnd - resolvedBegin;
62998    var sliceSize;
62999    if (resolvedSize === resolvedSize) {
63000      sliceSize = resolvedSize < 0 ? 0 : resolvedSize;
63001    }
63002
63003    var sliceSeq = makeSequence(iterable);
63004
63005    // If iterable.size is undefined, the size of the realized sliceSeq is
63006    // unknown at this point unless the number of items to slice is 0
63007    sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined;
63008
63009    if (!useKeys && isSeq(iterable) && sliceSize >= 0) {
63010      sliceSeq.get = function (index, notSetValue) {
63011        index = wrapIndex(this, index);
63012        return index >= 0 && index < sliceSize ?
63013          iterable.get(index + resolvedBegin, notSetValue) :
63014          notSetValue;
63015      }
63016    }
63017
63018    sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this;
63019      if (sliceSize === 0) {
63020        return 0;
63021      }
63022      if (reverse) {
63023        return this.cacheResult().__iterate(fn, reverse);
63024      }
63025      var skipped = 0;
63026      var isSkipping = true;
63027      var iterations = 0;
63028      iterable.__iterate(function(v, k)  {
63029        if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {
63030          iterations++;
63031          return fn(v, useKeys ? k : iterations - 1, this$0) !== false &&
63032                 iterations !== sliceSize;
63033        }
63034      });
63035      return iterations;
63036    };
63037
63038    sliceSeq.__iteratorUncached = function(type, reverse) {
63039      if (sliceSize !== 0 && reverse) {
63040        return this.cacheResult().__iterator(type, reverse);
63041      }
63042      // Don't bother instantiating parent iterator if taking 0.
63043      var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse);
63044      var skipped = 0;
63045      var iterations = 0;
63046      return new Iterator(function()  {
63047        while (skipped++ < resolvedBegin) {
63048          iterator.next();
63049        }
63050        if (++iterations > sliceSize) {
63051          return iteratorDone();
63052        }
63053        var step = iterator.next();
63054        if (useKeys || type === ITERATE_VALUES) {
63055          return step;
63056        } else if (type === ITERATE_KEYS) {
63057          return iteratorValue(type, iterations - 1, undefined, step);
63058        } else {
63059          return iteratorValue(type, iterations - 1, step.value[1], step);
63060        }
63061      });
63062    }
63063
63064    return sliceSeq;
63065  }
63066
63067
63068  function takeWhileFactory(iterable, predicate, context) {
63069    var takeSequence = makeSequence(iterable);
63070    takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
63071      if (reverse) {
63072        return this.cacheResult().__iterate(fn, reverse);
63073      }
63074      var iterations = 0;
63075      iterable.__iterate(function(v, k, c) 
63076        {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)}
63077      );
63078      return iterations;
63079    };
63080    takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;
63081      if (reverse) {
63082        return this.cacheResult().__iterator(type, reverse);
63083      }
63084      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
63085      var iterating = true;
63086      return new Iterator(function()  {
63087        if (!iterating) {
63088          return iteratorDone();
63089        }
63090        var step = iterator.next();
63091        if (step.done) {
63092          return step;
63093        }
63094        var entry = step.value;
63095        var k = entry[0];
63096        var v = entry[1];
63097        if (!predicate.call(context, v, k, this$0)) {
63098          iterating = false;
63099          return iteratorDone();
63100        }
63101        return type === ITERATE_ENTRIES ? step :
63102          iteratorValue(type, k, v, step);
63103      });
63104    };
63105    return takeSequence;
63106  }
63107
63108
63109  function skipWhileFactory(iterable, predicate, context, useKeys) {
63110    var skipSequence = makeSequence(iterable);
63111    skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this;
63112      if (reverse) {
63113        return this.cacheResult().__iterate(fn, reverse);
63114      }
63115      var isSkipping = true;
63116      var iterations = 0;
63117      iterable.__iterate(function(v, k, c)  {
63118        if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {
63119          iterations++;
63120          return fn(v, useKeys ? k : iterations - 1, this$0);
63121        }
63122      });
63123      return iterations;
63124    };
63125    skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this;
63126      if (reverse) {
63127        return this.cacheResult().__iterator(type, reverse);
63128      }
63129      var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse);
63130      var skipping = true;
63131      var iterations = 0;
63132      return new Iterator(function()  {
63133        var step, k, v;
63134        do {
63135          step = iterator.next();
63136          if (step.done) {
63137            if (useKeys || type === ITERATE_VALUES) {
63138              return step;
63139            } else if (type === ITERATE_KEYS) {
63140              return iteratorValue(type, iterations++, undefined, step);
63141            } else {
63142              return iteratorValue(type, iterations++, step.value[1], step);
63143            }
63144          }
63145          var entry = step.value;
63146          k = entry[0];
63147          v = entry[1];
63148          skipping && (skipping = predicate.call(context, v, k, this$0));
63149        } while (skipping);
63150        return type === ITERATE_ENTRIES ? step :
63151          iteratorValue(type, k, v, step);
63152      });
63153    };
63154    return skipSequence;
63155  }
63156
63157
63158  function concatFactory(iterable, values) {
63159    var isKeyedIterable = isKeyed(iterable);
63160    var iters = [iterable].concat(values).map(function(v ) {
63161      if (!isIterable(v)) {
63162        v = isKeyedIterable ?
63163          keyedSeqFromValue(v) :
63164          indexedSeqFromValue(Array.isArray(v) ? v : [v]);
63165      } else if (isKeyedIterable) {
63166        v = KeyedIterable(v);
63167      }
63168      return v;
63169    }).filter(function(v ) {return v.size !== 0});
63170
63171    if (iters.length === 0) {
63172      return iterable;
63173    }
63174
63175    if (iters.length === 1) {
63176      var singleton = iters[0];
63177      if (singleton === iterable ||
63178          isKeyedIterable && isKeyed(singleton) ||
63179          isIndexed(iterable) && isIndexed(singleton)) {
63180        return singleton;
63181      }
63182    }
63183
63184    var concatSeq = new ArraySeq(iters);
63185    if (isKeyedIterable) {
63186      concatSeq = concatSeq.toKeyedSeq();
63187    } else if (!isIndexed(iterable)) {
63188      concatSeq = concatSeq.toSetSeq();
63189    }
63190    concatSeq = concatSeq.flatten(true);
63191    concatSeq.size = iters.reduce(
63192      function(sum, seq)  {
63193        if (sum !== undefined) {
63194          var size = seq.size;
63195          if (size !== undefined) {
63196            return sum + size;
63197          }
63198        }
63199      },
63200      0
63201    );
63202    return concatSeq;
63203  }
63204
63205
63206  function flattenFactory(iterable, depth, useKeys) {
63207    var flatSequence = makeSequence(iterable);
63208    flatSequence.__iterateUncached = function(fn, reverse) {
63209      var iterations = 0;
63210      var stopped = false;
63211      function flatDeep(iter, currentDepth) {var this$0 = this;
63212        iter.__iterate(function(v, k)  {
63213          if ((!depth || currentDepth < depth) && isIterable(v)) {
63214            flatDeep(v, currentDepth + 1);
63215          } else if (fn(v, useKeys ? k : iterations++, this$0) === false) {
63216            stopped = true;
63217          }
63218          return !stopped;
63219        }, reverse);
63220      }
63221      flatDeep(iterable, 0);
63222      return iterations;
63223    }
63224    flatSequence.__iteratorUncached = function(type, reverse) {
63225      var iterator = iterable.__iterator(type, reverse);
63226      var stack = [];
63227      var iterations = 0;
63228      return new Iterator(function()  {
63229        while (iterator) {
63230          var step = iterator.next();
63231          if (step.done !== false) {
63232            iterator = stack.pop();
63233            continue;
63234          }
63235          var v = step.value;
63236          if (type === ITERATE_ENTRIES) {
63237            v = v[1];
63238          }
63239          if ((!depth || stack.length < depth) && isIterable(v)) {
63240            stack.push(iterator);
63241            iterator = v.__iterator(type, reverse);
63242          } else {
63243            return useKeys ? step : iteratorValue(type, iterations++, v, step);
63244          }
63245        }
63246        return iteratorDone();
63247      });
63248    }
63249    return flatSequence;
63250  }
63251
63252
63253  function flatMapFactory(iterable, mapper, context) {
63254    var coerce = iterableClass(iterable);
63255    return iterable.toSeq().map(
63256      function(v, k)  {return coerce(mapper.call(context, v, k, iterable))}
63257    ).flatten(true);
63258  }
63259
63260
63261  function interposeFactory(iterable, separator) {
63262    var interposedSequence = makeSequence(iterable);
63263    interposedSequence.size = iterable.size && iterable.size * 2 -1;
63264    interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this;
63265      var iterations = 0;
63266      iterable.__iterate(function(v, k) 
63267        {return (!iterations || fn(separator, iterations++, this$0) !== false) &&
63268        fn(v, iterations++, this$0) !== false},
63269        reverse
63270      );
63271      return iterations;
63272    };
63273    interposedSequence.__iteratorUncached = function(type, reverse) {
63274      var iterator = iterable.__iterator(ITERATE_VALUES, reverse);
63275      var iterations = 0;
63276      var step;
63277      return new Iterator(function()  {
63278        if (!step || iterations % 2) {
63279          step = iterator.next();
63280          if (step.done) {
63281            return step;
63282          }
63283        }
63284        return iterations % 2 ?
63285          iteratorValue(type, iterations++, separator) :
63286          iteratorValue(type, iterations++, step.value, step);
63287      });
63288    };
63289    return interposedSequence;
63290  }
63291
63292
63293  function sortFactory(iterable, comparator, mapper) {
63294    if (!comparator) {
63295      comparator = defaultComparator;
63296    }
63297    var isKeyedIterable = isKeyed(iterable);
63298    var index = 0;
63299    var entries = iterable.toSeq().map(
63300      function(v, k)  {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]}
63301    ).toArray();
63302    entries.sort(function(a, b)  {return comparator(a[3], b[3]) || a[2] - b[2]}
63302).forEach(
63303      isKeyedIterable ?
63304      function(v, i)  { entries[i].length = 2; } :
63305      function(v, i)  { entries[i] = v[1]; }
63306    );
63307    return isKeyedIterable ? KeyedSeq(entries) :
63308      isIndexed(iterable) ? IndexedSeq(entries) :
63309      SetSeq(entries);
63310  }
63311
63312
63313  function maxFactory(iterable, comparator, mapper) {
63314    if (!comparator) {
63315      comparator = defaultComparator;
63316    }
63317    if (mapper) {
63318      var entry = iterable.toSeq()
63319        .map(function(v, k)  {return [v, mapper(v, k, iterable)]})
63320        .reduce(function(a, b)  {return maxCompare(comparator, a[1], b[1]) ? b : a});
63321      return entry && entry[0];
63322    } else {
63323      return iterable.reduce(function(a, b)  {return maxCompare(comparator, a, b) ? b : a});
63324    }
63325  }
63326
63327  function maxCompare(comparator, a, b) {
63328    var comp = comparator(b, a);
63329    // b is considered the new max if the comparator declares them equal, but
63330    // they are not equal and b is in fact a nullish value.
63331    return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0;
63332  }
63333
63334
63335  function zipWithFactory(keyIter, zipper, iters) {
63336    var zipSequence = makeSequence(keyIter);
63337    zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min();
63338    // Note: this a generic base implementation of __iterate in terms of
63339    // __iterator which may be more generically useful in the future.
63340    zipSequence.__iterate = function(fn, reverse) {
63341      /* generic:
63342      var iterator = this.__iterator(ITERATE_ENTRIES, reverse);
63343      var step;
63344      var iterations = 0;
63345      while (!(step = iterator.next()).done) {
63346        iterations++;
63347        if (fn(step.value[1], step.value[0], this) === false) {
63348          break;
63349        }
63350      }
63351      return iterations;
63352      */
63353      // indexed:
63354      var iterator = this.__iterator(ITERATE_VALUES, reverse);
63355      var step;
63356      var iterations = 0;
63357      while (!(step = iterator.next()).done) {
63358        if (fn(step.value, iterations++, this) === false) {
63359          break;
63360        }
63361      }
63362      return iterations;
63363    };
63364    zipSequence.__iteratorUncached = function(type, reverse) {
63365      var iterators = iters.map(function(i )
63366        {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))}
63367      );
63368      var iterations = 0;
63369      var isDone = false;
63370      return new Iterator(function()  {
63371        var steps;
63372        if (!isDone) {
63373          steps = iterators.map(function(i ) {return i.next()});
63374          isDone = steps.some(function(s ) {return s.done});
63375        }
63376        if (isDone) {
63377          return iteratorDone();
63378        }
63379        return iteratorValue(
63380          type,
63381          iterations++,
63382          zipper.apply(null, steps.map(function(s ) {return s.value}))
63383        );
63384      });
63385    };
63386    return zipSequence
63387  }
63388
63389
63390  // #pragma Helper Functions
63391
63392  function reify(iter, seq) {
63393    return isSeq(iter) ? seq : iter.constructor(seq);
63394  }
63395
63396  function validateEntry(entry) {
63397    if (entry !== Object(entry)) {
63398      throw new TypeError('Expected [K, V] tuple: ' + entry);
63399    }
63400  }
63401
63402  function resolveSize(iter) {
63403    assertNotInfinite(iter.size);
63404    return ensureSize(iter);
63405  }
63406
63407  function iterableClass(iterable) {
63408    return isKeyed(iterable) ? KeyedIterable :
63409      isIndexed(iterable) ? IndexedIterable :
63410      SetIterable;
63411  }
63412
63413  function makeSequence(iterable) {
63414    return Object.create(
63415      (
63416        isKeyed(iterable) ? KeyedSeq :
63417        isIndexed(iterable) ? IndexedSeq :
63418        SetSeq
63419      ).prototype
63420    );
63421  }
63422
63423  function cacheResultThrough() {
63424    if (this._iter.cacheResult) {
63425      this._iter.cacheResult();
63426      this.size = this._iter.size;
63427      return this;
63428    } else {
63429      return Seq.prototype.cacheResult.call(this);
63430    }
63431  }
63432
63433  function defaultComparator(a, b) {
63434    return a > b ? 1 : a < b ? -1 : 0;
63435  }
63436
63437  function forceIterator(keyPath) {
63438    var iter = getIterator(keyPath);
63439    if (!iter) {
63440      // Array might not be iterable in this environment, so we need a fallback
63441      // to our wrapped type.
63442      if (!isArrayLike(keyPath)) {
63443        throw new TypeError('Expected iterable or array-like: ' + keyPath);
63444      }
63445      iter = getIterator(Iterable(keyPath));
63446    }
63447    return iter;
63448  }
63449
63450  createClass(Record, KeyedCollection);
63451
63452    function Record(defaultValues, name) {
63453      var hasInitialized;
63454
63455      var RecordType = function Record(values) {
63456        if (values instanceof RecordType) {
63457          return values;
63458        }
63459        if (!(this instanceof RecordType)) {
63460          return new RecordType(values);
63461        }
63462        if (!hasInitialized) {
63463          hasInitialized = true;
63464          var keys = Object.keys(defaultValues);
63465          setProps(RecordTypePrototype, keys);
63466          RecordTypePrototype.size = keys.length;
63467          RecordTypePrototype._name = name;
63468          RecordTypePrototype._keys = keys;
63469          RecordTypePrototype._defaultValues = defaultValues;
63470        }
63471        this._map = Map(values);
63472      };
63473
63474      var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype);
63475      RecordTypePrototype.constructor = RecordType;
63476
63477      return RecordType;
63478    }
63479
63480    Record.prototype.toString = function() {
63481      return this.__toString(recordName(this) + ' {', '}');
63482    };
63483
63484    // @pragma Access
63485
63486    Record.prototype.has = function(k) {
63487      return this._defaultValues.hasOwnProperty(k);
63488    };
63489
63490    Record.prototype.get = function(k, notSetValue) {
63491      if (!this.has(k)) {
63492        return notSetValue;
63493      }
63494      var defaultVal = this._defaultValues[k];
63495      return this._map ? this._map.get(k, defaultVal) : defaultVal;
63496    };
63497
63498    // @pragma Modification
63499
63500    Record.prototype.clear = function() {
63501      if (this.__ownerID) {
63502        this._map && this._map.clear();
63503        return this;
63504      }
63505      var RecordType = this.constructor;
63506      return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap()));
63507    };
63508
63509    Record.prototype.set = function(k, v) {
63510      if (!this.has(k)) {
63511        throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this));
63512      }
63513      var newMap = this._map && this._map.set(k, v);
63514      if (this.__ownerID || newMap === this._map) {
63515        return this;
63516      }
63517      return makeRecord(this, newMap);
63518    };
63519
63520    Record.prototype.remove = function(k) {
63521      if (!this.has(k)) {
63522        return this;
63523      }
63524      var newMap = this._map && this._map.remove(k);
63525      if (this.__ownerID || newMap === this._map) {
63526        return this;
63527      }
63528      return makeRecord(this, newMap);
63529    };
63530
63531    Record.prototype.wasAltered = function() {
63532      return this._map.wasAltered();
63533    };
63534
63535    Record.prototype.__iterator = function(type, reverse) {var this$0 = this;
63536      return KeyedIterable(this._defaultValues).map(function(_, k)  {return this$0.get(k)}).__iterator(type, reverse);
63537    };
63538
63539    Record.prototype.__iterate = function(fn, reverse) {var this$0 = this;
63540      return KeyedIterable(this._defaultValues).map(function(_, k)  {return this$0.get(k)}).__iterate(fn, reverse);
63541    };
63542
63543    Record.prototype.__ensureOwner = function(ownerID) {
63544      if (ownerID === this.__ownerID) {
63545        return this;
63546      }
63547      var newMap = this._map && this._map.__ensureOwner(ownerID);
63548      if (!ownerID) {
63549        this.__ownerID = ownerID;
63550        this._map = newMap;
63551        return this;
63552      }
63553      return makeRecord(this, newMap, ownerID);
63554    };
63555
63556
63557  var RecordPrototype = Record.prototype;
63558  RecordPrototype[DELETE] = RecordPrototype.remove;
63559  RecordPrototype.deleteIn =
63560  RecordPrototype.removeIn = MapPrototype.removeIn;
63561  RecordPrototype.merge = MapPrototype.merge;
63562  RecordPrototype.mergeWith = MapPrototype.mergeWith;
63563  RecordPrototype.mergeIn = MapPrototype.mergeIn;
63564  RecordPrototype.mergeDeep = MapPrototype.mergeDeep;
63565  RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith;
63566  RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn;
63567  RecordPrototype.setIn = MapPrototype.setIn;
63568  RecordPrototype.update = MapPrototype.update;
63569  RecordPrototype.updateIn = MapPrototype.updateIn;
63570  RecordPrototype.withMutations = MapPrototype.withMutations;
63571  RecordPrototype.asMutable = MapPrototype.asMutable;
63572  RecordPrototype.asImmutable = MapPrototype.asImmutable;
63573
63574
63575  function makeRecord(likeRecord, map, ownerID) {
63576    var record = Object.create(Object.getPrototypeOf(likeRecord));
63577    record._map = map;
63578    record.__ownerID = ownerID;
63579    return record;
63580  }
63581
63582  function recordName(record) {
63583    return record._name || record.constructor.name || 'Record';
63584  }
63585
63586  function setProps(prototype, names) {
63587    try {
63588      names.forEach(setProp.bind(undefined, prototype));
63589    } catch (error) {
63590      // Object.defineProperty failed. Probably IE8.
63591    }
63592  }
63593
63594  function setProp(prototype, name) {
63595    Object.defineProperty(prototype, name, {
63596      get: function() {
63597        return this.get(name);
63598      },
63599      set: function(value) {
63600        invariant(this.__ownerID, 'Cannot set on an immutable record.');
63601        this.set(name, value);
63602      }
63603    });
63604  }
63605
63606  createClass(Set, SetCollection);
63607
63608    // @pragma Construction
63609
63610    function Set(value) {
63611      return value === null || value === undefined ? emptySet() :
63612        isSet(value) && !isOrdered(value) ? value :
63613        emptySet().withMutations(function(set ) {
63614          var iter = SetIterable(value);
63615          assertNotInfinite(iter.size);
63616          iter.forEach(function(v ) {return set.add(v)});
63617        });
63618    }
63619
63620    Set.of = function(/*...values*/) {
63621      return this(arguments);
63622    };
63623
63624    Set.fromKeys = function(value) {
63625      return this(KeyedIterable(value).keySeq());
63626    };
63627
63628    Set.prototype.toString = function() {
63629      return this.__toString('Set {', '}');
63630    };
63631
63632    // @pragma Access
63633
63634    Set.prototype.has = function(value) {
63635      return this._map.has(value);
63636    };
63637
63638    // @pragma Modification
63639
63640    Set.prototype.add = function(value) {
63641      return updateSet(this, this._map.set(value, true));
63642    };
63643
63644    Set.prototype.remove = function(value) {
63645      return updateSet(this, this._map.remove(value));
63646    };
63647
63648    Set.prototype.clear = function() {
63649      return updateSet(this, this._map.clear());
63650    };
63651
63652    // @pragma Composition
63653
63654    Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0);
63655      iters = iters.filter(function(x ) {return x.size !== 0});
63656      if (iters.length === 0) {
63657        return this;
63658      }
63659      if (this.size === 0 && !this.__ownerID && iters.length === 1) {
63660        return this.constructor(iters[0]);
63661      }
63662      return this.withMutations(function(set ) {
63663        for (var ii = 0; ii < iters.length; ii++) {
63664          SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)});
63665        }
63666      });
63667    };
63668
63669    Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0);
63670      if (iters.length === 0) {
63671        return this;
63672      }
63673      iters = iters.map(function(iter ) {return SetIterable(iter)});
63674      var originalSet = this;
63675      return this.withMutations(function(set ) {
63676        originalSet.forEach(function(value ) {
63677          if (!iters.every(function(iter ) {return iter.includes(value)})) {
63678            set.remove(value);
63679          }
63680        });
63681      });
63682    };
63683
63684    Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0);
63685      if (iters.length === 0) {
63686        return this;
63687      }
63688      iters = iters.map(function(iter ) {return SetIterable(iter)});
63689      var originalSet = this;
63690      return this.withMutations(function(set ) {
63691        originalSet.forEach(function(value ) {
63692          if (iters.some(function(iter ) {return iter.includes(value)})) {
63693            set.remove(value);
63694          }
63695        });
63696      });
63697    };
63698
63699    Set.prototype.merge = function() {
63700      return this.union.apply(this, arguments);
63701    };
63702
63703    Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1);
63704      return this.union.apply(this, iters);
63705    };
63706
63707    Set.prototype.sort = function(comparator) {
63708      // Late binding
63709      return OrderedSet(sortFactory(this, comparator));
63710    };
63711
63712    Set.prototype.sortBy = function(mapper, comparator) {
63713      // Late binding
63714      return OrderedSet(sortFactory(this, comparator, mapper));
63715    };
63716
63717    Set.prototype.wasAltered = function() {
63718      return this._map.wasAltered();
63719    };
63720
63721    Set.prototype.__iterate = function(fn, reverse) {var this$0 = this;
63722      return this._map.__iterate(function(_, k)  {return fn(k, k, this$0)}, reverse);
63723    };
63724
63725    Set.prototype.__iterator = function(type, reverse) {
63726      return this._map.map(function(_, k)  {return k}).__iterator(type, reverse);
63727    };
63728
63729    Set.prototype.__ensureOwner = function(ownerID) {
63730      if (ownerID === this.__ownerID) {
63731        return this;
63732      }
63733      var newMap = this._map.__ensureOwner(ownerID);
63734      if (!ownerID) {
63735        this.__ownerID = ownerID;
63736        this._map = newMap;
63737        return this;
63738      }
63739      return this.__make(newMap, ownerID);
63740    };
63741
63742
63743  function isSet(maybeSet) {
63744    return !!(maybeSet && maybeSet[IS_SET_SENTINEL]);
63745  }
63746
63747  Set.isSet = isSet;
63748
63749  var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';
63750
63751  var SetPrototype = Set.prototype;
63752  SetPrototype[IS_SET_SENTINEL] = true;
63753  SetPrototype[DELETE] = SetPrototype.remove;
63754  SetPrototype.mergeDeep = SetPrototype.merge;
63755  SetPrototype.mergeDeepWith = SetPrototype.mergeWith;
63756  SetPrototype.withMutations = MapPrototype.withMutations;
63757  SetPrototype.asMutable = MapPrototype.asMutable;
63758  SetPrototype.asImmutable = MapPrototype.asImmutable;
63759
63760  SetPrototype.__empty = emptySet;
63761  SetPrototype.__make = makeSet;
63762
63763  function updateSet(set, newMap) {
63764    if (set.__ownerID) {
63765      set.size = newMap.size;
63766      set._map = newMap;
63767      return set;
63768    }
63769    return newMap === set._map ? set :
63770      newMap.size === 0 ? set.__empty() :
63771      set.__make(newMap);
63772  }
63773
63774  function makeSet(map, ownerID) {
63775    var set = Object.create(SetPrototype);
63776    set.size = map ? map.size : 0;
63777    set._map = map;
63778    set.__ownerID = ownerID;
63779    return set;
63780  }
63781
63782  var EMPTY_SET;
63783  function emptySet() {
63784    return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));
63785  }
63786
63787  createClass(OrderedSet, Set);
63788
63789    // @pragma Construction
63790
63791    function OrderedSet(value) {
63792      return value === null || value === undefined ? emptyOrderedSet() :
63793        isOrderedSet(value) ? value :
63794        emptyOrderedSet().withMutations(function(set ) {
63795          var iter = SetIterable(value);
63796          assertNotInfinite(iter.size);
63797          iter.forEach(function(v ) {return set.add(v)});
63798        });
63799    }
63800
63801    OrderedSet.of = function(/*...values*/) {
63802      return this(arguments);
63803    };
63804
63805    OrderedSet.fromKeys = function(value) {
63806      return this(KeyedIterable(value).keySeq());
63807    };
63808
63809    OrderedSet.prototype.toString = function() {
63810      return this.__toString('OrderedSet {', '}');
63811    };
63812
63813
63814  function isOrderedSet(maybeOrderedSet) {
63815    return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);
63816  }
63817
63818  OrderedSet.isOrderedSet = isOrderedSet;
63819
63820  var OrderedSetPrototype = OrderedSet.prototype;
63821  OrderedSetPrototype[IS_ORDERED_SENTINEL] = true;
63822
63823  OrderedSetPrototype.__empty = emptyOrderedSet;
63824  OrderedSetPrototype.__make = makeOrderedSet;
63825
63826  function makeOrderedSet(map, ownerID) {
63827    var set = Object.create(OrderedSetPrototype);
63828    set.size = map ? map.size : 0;
63829    set._map = map;
63830    set.__ownerID = ownerID;
63831    return set;
63832  }
63833
63834  var EMPTY_ORDERED_SET;
63835  function emptyOrderedSet() {
63836    return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()));
63837  }
63838
63839  createClass(Stack, IndexedCollection);
63840
63841    // @pragma Construction
63842
63843    function Stack(value) {
63844      return value === null || value === undefined ? emptyStack() :
63845        isStack(value) ? value :
63846        emptyStack().unshiftAll(value);
63847    }
63848
63849    Stack.of = function(/*...values*/) {
63850      return this(arguments);
63851    };
63852
63853    Stack.prototype.toString = function() {
63854      return this.__toString('Stack [', ']');
63855    };
63856
63857    // @pragma Access
63858
63859    Stack.prototype.get = function(index, notSetValue) {
63860      var head = this._head;
63861      index = wrapIndex(this, index);
63862      while (head && index--) {
63863        head = head.next;
63864      }
63865      return head ? head.value : notSetValue;
63866    };
63867
63868    Stack.prototype.peek = function() {
63869      return this._head && this._head.value;
63870    };
63871
63872    // @pragma Modification
63873
63874    Stack.prototype.push = function(/*...values*/) {
63875      if (arguments.length === 0) {
63876        return this;
63877      }
63878      var newSize = this.size + arguments.length;
63879      var head = this._head;
63880      for (var ii = arguments.length - 1; ii >= 0; ii--) {
63881        head = {
63882          value: arguments[ii],
63883          next: head
63884        };
63885      }
63886      if (this.__ownerID) {
63887        this.size = newSize;
63888        this._head = head;
63889        this.__hash = undefined;
63890        this.__altered = true;
63891        return this;
63892      }
63893      return makeStack(newSize, head);
63894    };
63895
63896    Stack.prototype.pushAll = function(iter) {
63897      iter = IndexedIterable(iter);
63898      if (iter.size === 0) {
63899        return this;
63900      }
63901      assertNotInfinite(iter.size);
63902      var newSize = this.size;
63903      var head = this._head;
63904      iter.reverse().forEach(function(value ) {
63905        newSize++;
63906        head = {
63907          value: value,
63908          next: head
63909        };
63910      });
63911      if (this.__ownerID) {
63912        this.size = newSize;
63913        this._head = head;
63914        this.__hash = undefined;
63915        this.__altered = true;
63916        return this;
63917      }
63918      return makeStack(newSize, head);
63919    };
63920
63921    Stack.prototype.pop = function() {
63922      return this.slice(1);
63923    };
63924
63925    Stack.prototype.unshift = function(/*...values*/) {
63926      return this.push.apply(this, arguments);
63927    };
63928
63929    Stack.prototype.unshiftAll = function(iter) {
63930      return this.pushAll(iter);
63931    };
63932
63933    Stack.prototype.shift = function() {
63934      return this.pop.apply(this, arguments);
63935    };
63936
63937    Stack.prototype.clear = function() {
63938      if (this.size === 0) {
63939        return this;
63940      }
63941      if (this.__ownerID) {
63942        this.size = 0;
63943        this._head = undefined;
63944        this.__hash = undefined;
63945        this.__altered = true;
63946        return this;
63947      }
63948      return emptyStack();
63949    };
63950
63951    Stack.prototype.slice = function(begin, end) {
63952      if (wholeSlice(begin, end, this.size)) {
63953        return this;
63954      }
63955      var resolvedBegin = resolveBegin(begin, this.size);
63956      var resolvedEnd = resolveEnd(end, this.size);
63957      if (resolvedEnd !== this.size) {
63958        // super.slice(begin, end);
63959        return IndexedCollection.prototype.slice.call(this, begin, end);
63960      }
63961      var newSize = this.size - resolvedBegin;
63962      var head = this._head;
63963      while (resolvedBegin--) {
63964        head = head.next;
63965      }
63966      if (this.__ownerID) {
63967        this.size = newSize;
63968        this._head = head;
63969        this.__hash = undefined;
63970        this.__altered = true;
63971        return this;
63972      }
63973      return makeStack(newSize, head);
63974    };
63975
63976    // @pragma Mutability
63977
63978    Stack.prototype.__ensureOwner = function(ownerID) {
63979      if (ownerID === this.__ownerID) {
63980        return this;
63981      }
63982      if (!ownerID) {
63983        this.__ownerID = ownerID;
63984        this.__altered = false;
63985        return this;
63986      }
63987      return makeStack(this.size, this._head, ownerID, this.__hash);
63988    };
63989
63990    // @pragma Iteration
63991
63992    Stack.prototype.__iterate = function(fn, reverse) {
63993      if (reverse) {
63994        return this.reverse().__iterate(fn);
63995      }
63996      var iterations = 0;
63997      var node = this._head;
63998      while (node) {
63999        if (fn(node.value, iterations++, this) === false) {
64000          break;
64001        }
64002        node = node.next;
64003      }
64004      return iterations;
64005    };
64006
64007    Stack.prototype.__iterator = function(type, reverse) {
64008      if (reverse) {
64009        return this.reverse().__iterator(type);
64010      }
64011      var iterations = 0;
64012      var node = this._head;
64013      return new Iterator(function()  {
64014        if (node) {
64015          var value = node.value;
64016          node = node.next;
64017          return iteratorValue(type, iterations++, value);
64018        }
64019        return iteratorDone();
64020      });
64021    };
64022
64023
64024  function isStack(maybeStack) {
64025    return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]);
64026  }
64027
64028  Stack.isStack = isStack;
64029
64030  var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';
64031
64032  var StackPrototype = Stack.prototype;
64033  StackPrototype[IS_STACK_SENTINEL] = true;
64034  StackPrototype.withMutations = MapPrototype.withMutations;
64035  StackPrototype.asMutable = MapPrototype.asMutable;
64036  StackPrototype.asImmutable = MapPrototype.asImmutable;
64037  StackPrototype.wasAltered = MapPrototype.wasAltered;
64038
64039
64040  function makeStack(size, head, ownerID, hash) {
64041    var map = Object.create(StackPrototype);
64042    map.size = size;
64043    map._head = head;
64044    map.__ownerID = ownerID;
64045    map.__hash = hash;
64046    map.__altered = false;
64047    return map;
64048  }
64049
64050  var EMPTY_STACK;
64051  function emptyStack() {
64052    return EMPTY_STACK || (EMPTY_STACK = makeStack(0));
64053  }
64054
64055  /**
64056   * Contributes additional methods to a constructor
64057   */
64058  function mixin(ctor, methods) {
64059    var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; };
64060    Object.keys(methods).forEach(keyCopier);
64061    Object.getOwnPropertySymbols &&
64062      Object.getOwnPropertySymbols(methods).forEach(keyCopier);
64063    return ctor;
64064  }
64065
64066  Iterable.Iterator = Iterator;
64067
64068  mixin(Iterable, {
64069
64070    // ### Conversion to other types
64071
64072    toArray: function() {
64073      assertNotInfinite(this.size);
64074      var array = new Array(this.size || 0);
64075      this.valueSeq().__iterate(function(v, i)  { array[i] = v; });
64076      return array;
64077    },
64078
64079    toIndexedSeq: function() {
64080      return new ToIndexedSequence(this);
64081    },
64082
64083    toJS: function() {
64084      return this.toSeq().map(
64085        function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value}
64086      ).__toJS();
64087    },
64088
64089    toJSON: function() {
64090      return this.toSeq().map(
64091        function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value}
64092      ).__toJS();
64093    },
64094
64095    toKeyedSeq: function() {
64096      return new ToKeyedSequence(this, true);
64097    },
64098
64099    toMap: function() {
64100      // Use Late Binding here to solve the circular dependency.
64101      return Map(this.toKeyedSeq());
64102    },
64103
64104    toObject: function() {
64105      assertNotInfinite(this.size);
64106      var object = {};
64107      this.__iterate(function(v, k)  { object[k] = v; });
64108      return object;
64109    },
64110
64111    toOrderedMap: function() {
64112      // Use Late Binding here to solve the circular dependency.
64113      return OrderedMap(this.toKeyedSeq());
64114    },
64115
64116    toOrderedSet: function() {
64117      // Use Late Binding here to solve the circular dependency.
64118      return OrderedSet(isKeyed(this) ? this.valueSeq() : this);
64119    },
64120
64121    toSet: function() {
64122      // Use Late Binding here to solve the circular dependency.
64123      return Set(isKeyed(this) ? this.valueSeq() : this);
64124    },
64125
64126    toSetSeq: function() {
64127      return new ToSetSequence(this);
64128    },
64129
64130    toSeq: function() {
64131      return isIndexed(this) ? this.toIndexedSeq() :
64132        isKeyed(this) ? this.toKeyedSeq() :
64133        this.toSetSeq();
64134    },
64135
64136    toStack: function() {
64137      // Use Late Binding here to solve the circular dependency.
64138      return Stack(isKeyed(this) ? this.valueSeq() : this);
64139    },
64140
64141    toList: function() {
64142      // Use Late Binding here to solve the circular dependency.
64143      return List(isKeyed(this) ? this.valueSeq() : this);
64144    },
64145
64146
64147    // ### Common JavaScript methods and properties
64148
64149    toString: function() {
64150      return '[Iterable]';
64151    },
64152
64153    __toString: function(head, tail) {
64154      if (this.size === 0) {
64155        return head + tail;
64156      }
64157      return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail;
64158    },
64159
64160
64161    // ### ES6 Collection methods (ES6 Array and Map)
64162
64163    concat: function() {var values = SLICE$0.call(arguments, 0);
64164      return reify(this, concatFactory(this, values));
64165    },
64166
64167    includes: function(searchValue) {
64168      return this.some(function(value ) {return is(value, searchValue)});
64169    },
64170
64171    entries: function() {
64172      return this.__iterator(ITERATE_ENTRIES);
64173    },
64174
64175    every: function(predicate, context) {
64176      assertNotInfinite(this.size);
64177      var returnValue = true;
64178      this.__iterate(function(v, k, c)  {
64179        if (!predicate.call(context, v, k, c)) {
64180          returnValue = false;
64181          return false;
64182        }
64183      });
64184      return returnValue;
64185    },
64186
64187    filter: function(predicate, context) {
64188      return reify(this, filterFactory(this, predicate, context, true));
64189    },
64190
64191    find: function(predicate, context, notSetValue) {
64192      var entry = this.findEntry(predicate, context);
64193      return entry ? entry[1] : notSetValue;
64194    },
64195
64196    findEntry: function(predicate, context) {
64197      var found;
64198      this.__iterate(function(v, k, c)  {
64199        if (predicate.call(context, v, k, c)) {
64200          found = [k, v];
64201          return false;
64202        }
64203      });
64204      return found;
64205    },
64206
64207    findLastEntry: function(predicate, context) {
64208      return this.toSeq().reverse().findEntry(predicate, context);
64209    },
64210
64211    forEach: function(sideEffect, context) {
64212      assertNotInfinite(this.size);
64213      return this.__iterate(context ? sideEffect.bind(context) : sideEffect);
64214    },
64215
64216    join: function(separator) {
64217      assertNotInfinite(this.size);
64218      separator = separator !== undefined ? '' + separator : ',';
64219      var joined = '';
64220      var isFirst = true;
64221      this.__iterate(function(v ) {
64222        isFirst ? (isFirst = false) : (joined += separator);
64223        joined += v !== null && v !== undefined ? v.toString() : '';
64224      });
64225      return joined;
64226    },
64227
64228    keys: function() {
64229      return this.__iterator(ITERATE_KEYS);
64230    },
64231
64232    map: function(mapper, context) {
64233      return reify(this, mapFactory(this, mapper, context));
64234    },
64235
64236    reduce: function(reducer, initialReduction, context) {
64237      assertNotInfinite(this.size);
64238      var reduction;
64239      var useFirst;
64240      if (arguments.length < 2) {
64241        useFirst = true;
64242      } else {
64243        reduction = initialReduction;
64244      }
64245      this.__iterate(function(v, k, c)  {
64246        if (useFirst) {
64247          useFirst = false;
64248          reduction = v;
64249        } else {
64250          reduction = reducer.call(context, reduction, v, k, c);
64251        }
64252      });
64253      return reduction;
64254    },
64255
64256    reduceRight: function(reducer, initialReduction, context) {
64257      var reversed = this.toKeyedSeq().reverse();
64258      return reversed.reduce.apply(reversed, arguments);
64259    },
64260
64261    reverse: function() {
64262      return reify(this, reverseFactory(this, true));
64263    },
64264
64265    slice: function(begin, end) {
64266      return reify(this, sliceFactory(this, begin, end, true));
64267    },
64268
64269    some: function(predicate, context) {
64270      return !this.every(not(predicate), context);
64271    },
64272
64273    sort: function(comparator) {
64274      return reify(this, sortFactory(this, comparator));
64275    },
64276
64277    values: function() {
64278      return this.__iterator(ITERATE_VALUES);
64279    },
64280
64281
64282    // ### More sequential methods
64283
64284    butLast: function() {
64285      return this.slice(0, -1);
64286    },
64287
64288    isEmpty: function() {
64289      return this.size !== undefined ? this.size === 0 : !this.some(function()  {return true});
64290    },
64291
64292    count: function(predicate, context) {
64293      return ensureSize(
64294        predicate ? this.toSeq().filter(predicate, context) : this
64295      );
64296    },
64297
64298    countBy: function(grouper, context) {
64299      return countByFactory(this, grouper, context);
64300    },
64301
64302    equals: function(other) {
64303      return deepEqual(this, other);
64304    },
64305
64306    entrySeq: function() {
64307      var iterable = this;
64308      if (iterable._cache) {
64309        // We cache as an entries array, so we can just return the cache!
64310        return new ArraySeq(iterable._cache);
64311      }
64312      var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq();
64313      entriesSequence.fromEntrySeq = function()  {return iterable.toSeq()};
64314      return entriesSequence;
64315    },
64316
64317    filterNot: function(predicate, context) {
64318      return this.filter(not(predicate), context);
64319    },
64320
64321    findLast: function(predicate, context, notSetValue) {
64322      return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);
64323    },
64324
64325    first: function() {
64326      return this.find(returnTrue);
64327    },
64328
64329    flatMap: function(mapper, context) {
64330      return reify(this, flatMapFactory(this, mapper, context));
64331    },
64332
64333    flatten: function(depth) {
64334      return reify(this, flattenFactory(this, depth, true));
64335    },
64336
64337    fromEntrySeq: function() {
64338      return new FromEntriesSequence(this);
64339    },
64340
64341    get: function(searchKey, notSetValue) {
64342      return this.find(function(_, key)  {return is(key, searchKey)}, undefined, notSetValue);
64343    },
64344
64345    getIn: function(searchKeyPath, notSetValue) {
64346      var nested = this;
64347      // Note: in an ES6 environment, we would prefer:
64348      // for (var key of searchKeyPath) {
64349      var iter = forceIterator(searchKeyPath);
64350      var step;
64351      while (!(step = iter.next()).done) {
64352        var key = step.value;
64353        nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET;
64354        if (nested === NOT_SET) {
64355          return notSetValue;
64356        }
64357      }
64358      return nested;
64359    },
64360
64361    groupBy: function(grouper, context) {
64362      return groupByFactory(this, grouper, context);
64363    },
64364
64365    has: function(searchKey) {
64366      return this.get(searchKey, NOT_SET) !== NOT_SET;
64367    },
64368
64369    hasIn: function(searchKeyPath) {
64370      return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET;
64371    },
64372
64373    isSubset: function(iter) {
64374      iter = typeof iter.includes === 'function' ? iter : Iterable(iter);
64375      return this.every(function(value ) {return iter.includes(value)});
64376    },
64377
64378    isSuperset: function(iter) {
64379      iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter);
64380      return iter.isSubset(this);
64381    },
64382
64383    keySeq: function() {
64384      return this.toSeq().map(keyMapper).toIndexedSeq();
64385    },
64386
64387    last: function() {
64388      return this.toSeq().reverse().first();
64389    },
64390
64391    max: function(comparator) {
64392      return maxFactory(this, comparator);
64393    },
64394
64395    maxBy: function(mapper, comparator) {
64396      return maxFactory(this, comparator, mapper);
64397    },
64398
64399    min: function(comparator) {
64400      return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator);
64401    },
64402
64403    minBy: function(mapper, comparator) {
64404      return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper);
64405    },
64406
64407    rest: function() {
64408      return this.slice(1);
64409    },
64410
64411    skip: function(amount) {
64412      return this.slice(Math.max(0, amount));
64413    },
64414
64415    skipLast: function(amount) {
64416      return reify(this, this.toSeq().reverse().skip(amount).reverse());
64417    },
64418
64419    skipWhile: function(predicate, context) {
64420      return reify(this, skipWhileFactory(this, predicate, context, true));
64421    },
64422
64423    skipUntil: function(predicate, context) {
64424      return this.skipWhile(not(predicate), context);
64425    },
64426
64427    sortBy: function(mapper, comparator) {
64428      return reify(this, sortFactory(this, comparator, mapper));
64429    },
64430
64431    take: function(amount) {
64432      return this.slice(0, Math.max(0, amount));
64433    },
64434
64435    takeLast: function(amount) {
64436      return reify(this, this.toSeq().reverse().take(amount).reverse());
64437    },
64438
64439    takeWhile: function(predicate, context) {
64440      return reify(this, takeWhileFactory(this, predicate, context));
64441    },
64442
64443    takeUntil: function(predicate, context) {
64444      return this.takeWhile(not(predicate), context);
64445    },
64446
64447    valueSeq: function() {
64448      return this.toIndexedSeq();
64449    },
64450
64451
64452    // ### Hashable Object
64453
64454    hashCode: function() {
64455      return this.__hash || (this.__hash = hashIterable(this));
64456    }
64457
64458
64459    // ### Internal
64460
64461    // abstract __iterate(fn, reverse)
64462
64463    // abstract __iterator(type, reverse)
64464  });
64465
64466  // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
64467  // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
64468  // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@';
64469  // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
64470
64471  var IterablePrototype = Iterable.prototype;
64472  IterablePrototype[IS_ITERABLE_SENTINEL] = true;
64473  IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values;
64474  IterablePrototype.__toJS = IterablePrototype.toArray;
64475  IterablePrototype.__toStringMapper = quoteString;
64476  IterablePrototype.inspect =
64477  IterablePrototype.toSource = function() { return this.toString(); };
64478  IterablePrototype.chain = IterablePrototype.flatMap;
64479  IterablePrototype.contains = IterablePrototype.includes;
64480
64481  // Temporary warning about using length
64482  (function () {
64483    try {
64484      Object.defineProperty(IterablePrototype, 'length', {
64485        get: function () {
64486          if (!Iterable.noLengthWarning) {
64487            var stack;
64488            try {
64489              throw new Error();
64490            } catch (error) {
64491              stack = error.stack;
64492            }
64493            if (stack.indexOf('_wrapObject') === -1) {
64494              console && console.warn && console.warn(
64495                'iterable.length has been deprecated, '+
64496                'use iterable.size or iterable.count(). '+
64497                'This warning will become a silent error in a future version. ' +
64498                stack
64499              );
64500              return this.size;
64501            }
64502          }
64503        }
64504      });
64505    } catch (e) {}
64506  })();
64507
64508
64509
64510  mixin(KeyedIterable, {
64511
64512    // ### More sequential methods
64513
64514    flip: function() {
64515      return reify(this, flipFactory(this));
64516    },
64517
64518    findKey: function(predicate, context) {
64519      var entry = this.findEntry(predicate, context);
64520      return entry && entry[0];
64521    },
64522
64523    findLastKey: function(predicate, context) {
64524      return this.toSeq().reverse().findKey(predicate, context);
64525    },
64526
64527    keyOf: function(searchValue) {
64528      return this.findKey(function(value ) {return is(value, searchValue)});
64529    },
64530
64531    lastKeyOf: function(searchValue) {
64532      return this.findLastKey(function(value ) {return is(value, searchValue)});
64533    },
64534
64535    mapEntries: function(mapper, context) {var this$0 = this;
64536      var iterations = 0;
64537      return reify(this,
64538        this.toSeq().map(
64539          function(v, k)  {return mapper.call(context, [k, v], iterations++, this$0)}
64540        ).fromEntrySeq()
64541      );
64542    },
64543
64544    mapKeys: function(mapper, context) {var this$0 = this;
64545      return reify(this,
64546        this.toSeq().flip().map(
64547          function(k, v)  {return mapper.call(context, k, v, this$0)}
64548        ).flip()
64549      );
64550    }
64551
64552  });
64553
64554  var KeyedIterablePrototype = KeyedIterable.prototype;
64555  KeyedIterablePrototype[IS_KEYED_SENTINEL] = true;
64556  KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries;
64557  KeyedIterablePrototype.__toJS = IterablePrototype.toObject;
64558  KeyedIterablePrototype.__toStringMapper = function(v, k)  {return JSON.stringify(k) + ': ' + quoteString(v)};
64559
64560
64561
64562  mixin(IndexedIterable, {
64563
64564    // ### Conversion to other types
64565
64566    toKeyedSeq: function() {
64567      return new ToKeyedSequence(this, false);
64568    },
64569
64570
64571    // ### ES6 Collection methods (ES6 Array and Map)
64572
64573    filter: function(predicate, context) {
64574      return reify(this, filterFactory(this, predicate, context, false));
64575    },
64576
64577    findIndex: function(predicate, context) {
64578      var entry = this.findEntry(predicate, context);
64579      return entry ? entry[0] : -1;
64580    },
64581
64582    indexOf: function(searchValue) {
64583      var key = this.toKeyedSeq().keyOf(searchValue);
64584      return key === undefined ? -1 : key;
64585    },
64586
64587    lastIndexOf: function(searchValue) {
64588      var key = this.toKeyedSeq().reverse().keyOf(searchValue);
64589      return key === undefined ? -1 : key;
64590
64591      // var index =
64592      // return this.toSeq().reverse().indexOf(searchValue);
64593    },
64594
64595    reverse: function() {
64596      return reify(this, reverseFactory(this, false));
64597    },
64598
64599    slice: function(begin, end) {
64600      return reify(this, sliceFactory(this, begin, end, false));
64601    },
64602
64603    splice: function(index, removeNum /*, ...values*/) {
64604      var numArgs = arguments.length;
64605      removeNum = Math.max(removeNum | 0, 0);
64606      if (numArgs === 0 || (numArgs === 2 && !removeNum)) {
64607        return this;
64608      }
64609      // If index is negative, it should resolve relative to the size of the
64610      // collection. However size may be expensive to compute if not cached, so
64611      // only call count() if the number is in fact negative.
64612      index = resolveBegin(index, index < 0 ? this.count() : this.size);
64613      var spliced = this.slice(0, index);
64614      return reify(
64615        this,
64616        numArgs === 1 ?
64617          spliced :
64618          spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))
64619      );
64620    },
64621
64622
64623    // ### More collection methods
64624
64625    findLastIndex: function(predicate, context) {
64626      var key = this.toKeyedSeq().findLastKey(predicate, context);
64627      return key === undefined ? -1 : key;
64628    },
64629
64630    first: function() {
64631      return this.get(0);
64632    },
64633
64634    flatten: function(depth) {
64635      return reify(this, flattenFactory(this, depth, false));
64636    },
64637
64638    get: function(index, notSetValue) {
64639      index = wrapIndex(this, index);
64640      return (index < 0 || (this.size === Infinity ||
64641          (this.size !== undefined && index > this.size))) ?
64642        notSetValue :
64643        this.find(function(_, key)  {return key === index}, undefined, notSetValue);
64644    },
64645
64646    has: function(index) {
64647      index = wrapIndex(this, index);
64648      return index >= 0 && (this.size !== undefined ?
64649        this.size === Infinity || index < this.size :
64650        this.indexOf(index) !== -1
64651      );
64652    },
64653
64654    interpose: function(separator) {
64655      return reify(this, interposeFactory(this, separator));
64656    },
64657
64658    interleave: function(/*...iterables*/) {
64659      var iterables = [this].concat(arrCopy(arguments));
64660      var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables);
64661      var interleaved = zipped.flatten(true);
64662      if (zipped.size) {
64663        interleaved.size = zipped.size * iterables.length;
64664      }
64665      return reify(this, interleaved);
64666    },
64667
64668    last: function() {
64669      return this.get(-1);
64670    },
64671
64672    skipWhile: function(predicate, context) {
64673      return reify(this, skipWhileFactory(this, predicate, context, false));
64674    },
64675
64676    zip: function(/*, ...iterables */) {
64677      var iterables = [this].concat(arrCopy(arguments));
64678      return reify(this, zipWithFactory(this, defaultZipper, iterables));
64679    },
64680
64681    zipWith: function(zipper/*, ...iterables */) {
64682      var iterables = arrCopy(arguments);
64683      iterables[0] = this;
64684      return reify(this, zipWithFactory(this, zipper, iterables));
64685    }
64686
64687  });
64688
64689  IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true;
64690  IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true;
64691
64692
64693
64694  mixin(SetIterable, {
64695
64696    // ### ES6 Collection methods (ES6 Array and Map)
64697
64698    get: function(value, notSetValue) {
64699      return this.has(value) ? value : notSetValue;
64700    },
64701
64702    includes: function(value) {
64703      return this.has(value);
64704    },
64705
64706
64707    // ### More sequential methods
64708
64709    keySeq: function() {
64710      return this.valueSeq();
64711    }
64712
64713  });
64714
64715  SetIterable.prototype.has = IterablePrototype.includes;
64716
64717
64718  // Mixin subclasses
64719
64720  mixin(KeyedSeq, KeyedIterable.prototype);
64721  mixin(IndexedSeq, IndexedIterable.prototype);
64722  mixin(SetSeq, SetIterable.prototype);
64723
64724  mixin(KeyedCollection, KeyedIterable.prototype);
64725  mixin(IndexedCollection, IndexedIterable.prototype);
64726  mixin(SetCollection, SetIterable.prototype);
64727
64728
64729  // #pragma Helper functions
64730
64731  function keyMapper(v, k) {
64732    return k;
64733  }
64734
64735  function entryMapper(v, k) {
64736    return [k, v];
64737  }
64738
64739  function not(predicate) {
64740    return function() {
64741      return !predicate.apply(this, arguments);
64742    }
64743  }
64744
64745  function neg(predicate) {
64746    return function() {
64747      return -predicate.apply(this, arguments);
64748    }
64749  }
64750
64751  function quoteString(value) {
64752    return typeof value === 'string' ? JSON.stringify(value) : value;
64753  }
64754
64755  function defaultZipper() {
64756    return arrCopy(arguments);
64757  }
64758
64759  function defaultNegComparator(a, b) {
64760    return a < b ? 1 : a > b ? -1 : 0;
64761  }
64762
64763  function hashIterable(iterable) {
64764    if (iterable.size === Infinity) {
64765      return 0;
64766    }
64767    var ordered = isOrdered(iterable);
64768    var keyed = isKeyed(iterable);
64769    var h = ordered ? 1 : 0;
64770    var size = iterable.__iterate(
64771      keyed ?
64772        ordered ?
64773          function(v, k)  { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } :
64774          function(v, k)  { h = h + hashMerge(hash(v), hash(k)) | 0; } :
64775        ordered ?
64776          function(v ) { h = 31 * h + hash(v) | 0; } :
64777          function(v ) { h = h + hash(v) | 0; }
64778    );
64779    return murmurHashOfSize(size, h);
64780  }
64781
64782  function murmurHashOfSize(size, h) {
64783    h = imul(h, 0xCC9E2D51);
64784    h = imul(h << 15 | h >>> -15, 0x1B873593);
64785    h = imul(h << 13 | h >>> -13, 5);
64786    h = (h + 0xE6546B64 | 0) ^ size;
64787    h = imul(h ^ h >>> 16, 0x85EBCA6B);
64788    h = imul(h ^ h >>> 13, 0xC2B2AE35);
64789    h = smi(h ^ h >>> 16);
64790    return h;
64791  }
64792
64793  function hashMerge(a, b) {
64794    return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int
64795  }
64796
64797  var Immutable = {
64798
64799    Iterable: Iterable,
64800
64801    Seq: Seq,
64802    Collection: Collection,
64803    Map: Map,
64804    OrderedMap: OrderedMap,
64805    List: List,
64806    Stack: Stack,
64807    Set: Set,
64808    OrderedSet: OrderedSet,
64809
64810    Record: Record,
64811    Range: Range,
64812    Repeat: Repeat,
64813
64814    is: is,
64815    fromJS: fromJS
64816
64817  };
64818
64819  return Immutable;
64820
64821}));
64822
64823/***/ }),
64824
64825/***/ "rWdj":
64826/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
64827
64828"use strict";
64829/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return inspect; });
64830/* harmony import */ var _nodejsCustomInspectSymbol_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("RKIb");
64831function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
64832
64833/* eslint-disable flowtype/no-weak-types */
64834
64835var MAX_ARRAY_LENGTH = 10;
64836var MAX_RECURSIVE_DEPTH = 2;
64837/**
64838 * Used to print values in error messages.
64839 */
64840
64841function inspect(value) {
64842  return formatValue(value, []);
64843}
64844
64845function formatValue(value, seenValues) {
64846  switch (_typeof(value)) {
64847    case 'string':
64848      return JSON.stringify(value);
64849
64850    case 'function':
64851      return value.name ? "[function ".concat(value.name, "]") : '[function]';
64852
64853    case 'object':
64854      if (value === null) {
64855        return 'null';
64856      }
64857
64858      return formatObjectValue(value, seenValues);
64859
64860    default:
64861      return String(value);
64862  }
64863}
64864
64865function formatObjectValue(value, previouslySeenValues) {
64866  if (previouslySeenValues.indexOf(value) !== -1) {
64867    return '[Circular]';
64868  }
64869
64870  var seenValues = [].concat(previouslySeenValues, [value]);
64871  var customInspectFn = getCustomFn(value);
64872
64873  if (customInspectFn !== undefined) {
64874    var customValue = customInspectFn.call(value); // check for infinite recursion
64875
64876    if (customValue !== value) {
64877      return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues);
64878    }
64879  } else if (Array.isArray(value)) {
64880    return formatArray(value, seenValues);
64881  }
64882
64883  return formatObject(value, seenValues);
64884}
64885
64886function formatObject(object, seenValues) {
64887  var keys = Object.keys(object);
64888
64889  if (keys.length === 0) {
64890    return '{}';
64891  }
64892
64893  if (seenValues.length > MAX_RECURSIVE_DEPTH) {
64894    return '[' + getObjectTag(object) + ']';
64895  }
64896
64897  var properties = keys.map(function (key) {
64898    var value = formatValue(object[key], seenValues);
64899    return key + ': ' + value;
64900  });
64901  return '{ ' + properties.join(', ') + ' }';
64902}
64903
64904function formatArray(array, seenValues) {
64905  if (array.length === 0) {
64906    return '[]';
64907  }
64908
64909  if (seenValues.length > MAX_RECURSIVE_DEPTH) {
64910    return '[Array]';
64911  }
64912
64913  var len = Math.min(MAX_ARRAY_LENGTH, array.length);
64914  var remaining = array.length - len;
64915  var items = [];
64916
64917  for (var i = 0; i < len; ++i) {
64918    items.push(formatValue(array[i], seenValues));
64919  }
64920
64921  if (remaining === 1) {
64922    items.push('... 1 more item');
64923  } else if (remaining > 1) {
64924    items.push("... ".concat(remaining, " more items"));
64925  }
64926
64927  return '[' + items.join(', ') + ']';
64928}
64929
64930function getCustomFn(object) {
64931  var customInspectFn = object[String(_nodejsCustomInspectSymbol_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])];
64932
64933  if (typeof customInspectFn === 'function') {
64934    return customInspectFn;
64935  }
64936
64937  if (typeof object.inspect === 'function') {
64938    return object.inspect;
64939  }
64940}
64941
64942function getObjectTag(object) {
64943  var tag = Object.prototype.toString.call(object).replace(/^\[object /, '').replace(/]$/, '');
64944
64945  if (tag === 'Object' && typeof object.constructor === 'function') {
64946    var name = object.constructor.name;
64947
64948    if (typeof name === 'string' && name !== '') {
64949      return name;
64950    }
64951  }
64952
64953  return tag;
64954}
64955
64956
64957/***/ }),
64958
64959/***/ "sJV+":
64960/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
64961
64962"use strict";
64963/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isEqualType; });
64964/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isTypeSubTypeOf; });
64965/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return doTypesOverlap; });
64966/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("axIb");
64967
64968/**
64969 * Provided two types, return true if the types are equal (invariant).
64970 */
64971
64972function isEqualType(typeA, typeB) {
64973  // Equivalent types are equal.
64974  if (typeA === typeB) {
64975    return true;
64976  } // If either type is non-null, the other must also be non-null.
64977
64978
64979  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isNonNullType */ "L"])(typeA) && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isNonNullType */ "L"])(typeB)) {
64980    return isEqualType(typeA.ofType, typeB.ofType);
64981  } // If either type is a list, the other must also be a list.
64982
64983
64984  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isListType */ "J"])(typeA) && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isListType */ "J"])(typeB)) {
64985    return isEqualType(typeA.ofType, typeB.ofType);
64986  } // Otherwise the types are not equal.
64987
64988
64989  return false;
64990}
64991/**
64992 * Provided a type and a super type, return true if the first type is either
64993 * equal or a subset of the second super type (covariant).
64994 */
64995
64996function isTypeSubTypeOf(schema, maybeSubType, superType) {
64997  // Equivalent type is a valid subtype
64998  if (maybeSubType === superType) {
64999    return true;
65000  } // If superType is non-null, maybeSubType must also be non-null.
65001
65002
65003  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isNonNullType */ "L"])(superType)) {
65004    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isNonNullType */ "L"])(maybeSubType)) {
65005      return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);
65006    }
65007
65008    return false;
65009  }
65010
65011  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isNonNullType */ "L"])(maybeSubType)) {
65012    // If superType is nullable, maybeSubType may be non-null or nullable.
65013    return isTypeSubTypeOf(schema, maybeSubType.ofType, superType);
65014  } // If superType type is a list, maybeSubType type must also be a list.
65015
65016
65017  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isListType */ "J"])(superType)) {
65018    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isListType */ "J"])(maybeSubType)) {
65019      return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);
65020    }
65021
65022    return false;
65023  }
65024
65025  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isListType */ "J"])(maybeSubType)) {
65026    // If superType is not a list, maybeSubType must also be not a list.
65027    return false;
65028  } // If superType type is an abstract type, check if it is super type of maybeSubType.
65029  // Otherwise, the child type is not a valid subtype of the parent type.
65030
65031
65032  return Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isAbstractType */ "C"])(superType) && (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isInterfaceType */ "H"])(maybeSubType) || Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isObjectType */ "N"])(maybeSubType)) && schema.isSubType(superType, maybeSubType);
65033}
65034/**
65035 * Provided two composite types, determine if they "overlap". Two composite
65036 * types overlap when the Sets of possible concrete types for each intersect.
65037 *
65038 * This is often used to determine if a fragment of a given type could possibly
65039 * be visited in a context of another type.
65040 *
65041 * This function is commutative.
65042 */
65043
65044function doTypesOverlap(schema, typeA, typeB) {
65045  // Equivalent types overlap
65046  if (typeA === typeB) {
65047    return true;
65048  }
65049
65050  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isAbstractType */ "C"])(typeA)) {
65051    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isAbstractType */ "C"])(typeB)) {
65052      // If both types are abstract, then determine if there is any intersection
65053      // between possible concrete types of each.
65054      return schema.getPossibleTypes(typeA).some(function (type) {
65055        return schema.isSubType(typeB, type);
65056      });
65057    } // Determine if the latter type is a possible concrete type of the former.
65058
65059
65060    return schema.isSubType(typeA, typeB);
65061  }
65062
65063  if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_0__[/* isAbstractType */ "C"])(typeB)) {
65064    // Determine if the former type is a possible concrete type of the latter.
65065    return schema.isSubType(typeB, typeA);
65066  } // Otherwise the types do not overlap.
65067
65068
65069  return false;
65070}
65071
65072
65073/***/ }),
65074
65075/***/ "sQdO":
65076/***/ (function(module, exports, __webpack_require__) {
65077
65078"use strict";
65079
65080module.exports = string => {
65081	const match = string.match(/^[ \t]*(?=\S)/gm);
65082
65083	if (!match) {
65084		return 0;
65085	}
65086
65087	return match.reduce((r, a) => Math.min(r, a.length), Infinity);
65088};
65089
65090
65091/***/ }),
65092
65093/***/ "sYn3":
65094/***/ (function(module, exports, __webpack_require__) {
65095
65096"use strict";
65097
65098
65099var keysShim;
65100if (!Object.keys) {
65101	// modified from https://github.com/es-shims/es5-shim
65102	var has = Object.prototype.hasOwnProperty;
65103	var toStr = Object.prototype.toString;
65104	var isArgs = __webpack_require__("1KsK"); // eslint-disable-line global-require
65105	var isEnumerable = Object.prototype.propertyIsEnumerable;
65106	var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
65107	var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
65108	var dontEnums = [
65109		'toString',
65110		'toLocaleString',
65111		'valueOf',
65112		'hasOwnProperty',
65113		'isPrototypeOf',
65114		'propertyIsEnumerable',
65115		'constructor'
65116	];
65117	var equalsConstructorPrototype = function (o) {
65118		var ctor = o.constructor;
65119		return ctor && ctor.prototype === o;
65120	};
65121	var excludedKeys = {
65122		$applicationCache: true,
65123		$console: true,
65124		$external: true,
65125		$frame: true,
65126		$frameElement: true,
65127		$frames: true,
65128		$innerHeight: true,
65129		$innerWidth: true,
65130		$onmozfullscreenchange: true,
65131		$onmozfullscreenerror: true,
65132		$outerHeight: true,
65133		$outerWidth: true,
65134		$pageXOffset: true,
65135		$pageYOffset: true,
65136		$parent: true,
65137		$scrollLeft: true,
65138		$scrollTop: true,
65139		$scrollX: true,
65140		$scrollY: true,
65141		$self: true,
65142		$webkitIndexedDB: true,
65143		$webkitStorageInfo: true,
65144		$window: true
65145	};
65146	var hasAutomationEqualityBug = (function () {
65147		/* global window */
65148		if (typeof window === 'undefined') { return false; }
65149		for (var k in window) {
65150			try {
65151				if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
65152					try {
65153						equalsConstructorPrototype(window[k]);
65154					} catch (e) {
65155						return true;
65156					}
65157				}
65158			} catch (e) {
65159				return true;
65160			}
65161		}
65162		return false;
65163	}());
65164	var equalsConstructorPrototypeIfNotBuggy = function (o) {
65165		/* global window */
65166		if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
65167			return equalsConstructorPrototype(o);
65168		}
65169		try {
65170			return equalsConstructorPrototype(o);
65171		} catch (e) {
65172			return false;
65173		}
65174	};
65175
65176	keysShim = function keys(object) {
65177		var isObject = object !== null && typeof object === 'object';
65178		var isFunction = toStr.call(object) === '[object Function]';
65179		var isArguments = isArgs(object);
65180		var isString = isObject && toStr.call(object) === '[object String]';
65181		var theKeys = [];
65182
65183		if (!isObject && !isFunction && !isArguments) {
65184			throw new TypeError('Object.keys called on a non-object');
65185		}
65186
65187		var skipProto = hasProtoEnumBug && isFunction;
65188		if (isString && object.length > 0 && !has.call(object, 0)) {
65189			for (var i = 0; i < object.length; ++i) {
65190				theKeys.push(String(i));
65191			}
65192		}
65193
65194		if (isArguments && object.length > 0) {
65195			for (var j = 0; j < object.length; ++j) {
65196				theKeys.push(String(j));
65197			}
65198		} else {
65199			for (var name in object) {
65200				if (!(skipProto && name === 'prototype') && has.call(object, name)) {
65201					theKeys.push(String(name));
65202				}
65203			}
65204		}
65205
65206		if (hasDontEnumBug) {
65207			var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
65208
65209			for (var k = 0; k < dontEnums.length; ++k) {
65210				if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
65211					theKeys.push(dontEnums[k]);
65212				}
65213			}
65214		}
65215		return theKeys;
65216	};
65217}
65218module.exports = keysShim;
65219
65220
65221/***/ }),
65222
65223/***/ "sriv":
65224/***/ (function(module, exports, __webpack_require__) {
65225
65226"use strict";
65227/**
65228 * Copyright (c) Facebook, Inc. and its affiliates.
65229 *
65230 * This source code is licensed under the MIT license found in the
65231 * LICENSE file in the root directory of this source tree.
65232 *
65233 * 
65234 * @format
65235 */
65236// flowlint ambiguous-object-type:error
65237
65238
65239module.exports = {
65240  DEFAULT_HANDLE_KEY: ''
65241};
65242
65243/***/ }),
65244
65245/***/ "t3R0":
65246/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
65247
65248"use strict";
65249/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return devAssert; });
65250function devAssert(condition, message) {
65251  var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
65252
65253  if (!booleanCondition) {
65254    throw new Error(message);
65255  }
65256}
65257
65258
65259/***/ }),
65260
65261/***/ "tFdq":
65262/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
65263
65264"use strict";
65265/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NoUndefinedVariablesRule; });
65266/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
65267
65268
65269/**
65270 * No undefined variables
65271 *
65272 * A GraphQL operation is only valid if all variables encountered, both directly
65273 * and via fragment spreads, are defined by that operation.
65274 */
65275function NoUndefinedVariablesRule(context) {
65276  var variableNameDefined = Object.create(null);
65277  return {
65278    OperationDefinition: {
65279      enter: function enter() {
65280        variableNameDefined = Object.create(null);
65281      },
65282      leave: function leave(operation) {
65283        var usages = context.getRecursiveVariableUsages(operation);
65284
65285        for (var _i2 = 0; _i2 < usages.length; _i2++) {
65286          var _ref2 = usages[_i2];
65287          var node = _ref2.node;
65288          var varName = node.name.value;
65289
65290          if (variableNameDefined[varName] !== true) {
65291            context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"](operation.name ? "Variable \"$".concat(varName, "\" is not defined by operation \"").concat(operation.name.value, "\".") : "Variable \"$".concat(varName, "\" is not defined."), [node, operation]));
65292          }
65293        }
65294      }
65295    },
65296    VariableDefinition: function VariableDefinition(node) {
65297      variableNameDefined[node.variable.name.value] = true;
65298    }
65299  };
65300}
65301
65302
65303/***/ }),
65304
65305/***/ "tNbq":
65306/***/ (function(module, exports, __webpack_require__) {
65307
65308"use strict";
65309/* WEBPACK VAR INJECTION */(function(process) {/**
65310 * Copyright (c) Facebook, Inc. and its affiliates.
65311 *
65312 * This source code is licensed under the MIT license found in the
65313 * LICENSE file in the root directory of this source tree.
65314 *
65315 * 
65316 * @format
65317 */
65318// flowlint ambiguous-object-type:error
65319
65320
65321var _asyncToGenerator = __webpack_require__("yXPU");
65322
65323var invariant = __webpack_require__("OUqe");
65324/**
65325 * The compiler profiler builds a "call graph" of high level operations as a
65326 * means of tracking time spent over the course of running the compiler.
65327 */
65328
65329
65330var enabled = false;
65331var traces = [{
65332  ph: 'M',
65333  pid: 0,
65334  tid: 0,
65335  name: 'process_name',
65336  args: {
65337    name: 'relay-compiler'
65338  }
65339}, {
65340  ph: 'M',
65341  pid: 0,
65342  tid: 0,
65343  name: 'thread_name',
65344  args: {
65345    name: 'relay-compiler'
65346  }
65347}];
65348var stack = [];
65349
65350function enable() {
65351  enabled = true;
65352}
65353
65354function getTraces() {
65355  return traces;
65356}
65357/**
65358 * Run the provided function as part of a stack profile.
65359 */
65360
65361
65362function run(name, fn) {
65363  return instrument(fn, name)();
65364}
65365/**
65366 * Run the provided async function as part context in a stack profile.
65367 * See instrumentAsyncContext() for limitations and usage notes.
65368 */
65369
65370
65371function asyncContext(name, fn) {
65372  return instrumentAsyncContext(fn, name)();
65373}
65374/**
65375 * Wait for the provided async operation as an async profile.
65376 */
65377
65378
65379function waitFor(name, fn) {
65380  return instrumentWait(fn, name)();
65381}
65382/**
65383 * Return a new instrumented sync function to be part of a stack profile.
65384 *
65385 * This instruments synchronous functions to be displayed in a stack
65386 * visualization. To instrument async functions, see instrumentAsyncContext()
65387 * and instrumentWait().
65388 */
65389
65390
65391function instrument(fn, name) {
65392  var _ref;
65393
65394  if (!enabled) {
65395    return fn;
65396  }
65397
65398  var profileName = (_ref = name !== null && name !== void 0 ? name : // $FlowFixMe[prop-missing] - Flow no longer considers statics of functions as any
65399  fn.displayName) !== null && _ref !== void 0 ? _ref : fn.name;
65400
65401  var instrumented = function instrumented() {
65402    var traceId = start(profileName);
65403
65404    try {
65405      return fn.apply(this, arguments);
65406    } finally {
65407      end(traceId);
65408    }
65409  };
65410
65411  instrumented.displayName = profileName;
65412  return instrumented;
65413}
65414/**
65415 * Return a new instrumented async function which provides context for a stack.
65416 *
65417 * Because the resulting profiling information will be incorporated into a
65418 * stack visualization, the instrumented function must represent a distinct
65419 * region of time which does not overlap with any other async context.
65420 *
65421 * In other words, functions instrumented with instrumentAsyncContext must not
65422 * run in parallel via Promise.all().
65423 *
65424 * To instrument functions which will run in parallel, use instrumentWait().
65425 */
65426
65427
65428function instrumentAsyncContext(fn, name) {
65429  var _ref2;
65430
65431  if (!enabled) {
65432    return fn;
65433  }
65434
65435  var profileName = (_ref2 = name !== null && name !== void 0 ? name : // $FlowFixMe[prop-missing] - Flow no longer considers statics of functions as any
65436  fn.displayName) !== null && _ref2 !== void 0 ? _ref2 : fn.name;
65437
65438  var instrumented = /*#__PURE__*/function () {
65439    var _instrumented = _asyncToGenerator(function* () {
65440      var traceId = start(profileName);
65441
65442      try {
65443        return yield fn.apply(this, arguments);
65444      } finally {
65445        end(traceId);
65446      }
65447    });
65448
65449    function instrumented() {
65450      return _instrumented.apply(this, arguments);
65451    }
65452
65453    return instrumented;
65454  }();
65455
65456  instrumented.displayName = profileName;
65457  return instrumented;
65458}
65459/**
65460 * Return a new instrumented function which performs an awaited async operation.
65461 *
65462 * The instrumented function is not included in the overall run time of the
65463 * compiler, instead it captures the time waiting on some asynchronous external
65464 * resource such as network or filesystem which are often run in parallel.
65465 */
65466
65467
65468function instrumentWait(fn, name) {
65469  var _ref3;
65470
65471  if (!enabled) {
65472    return fn;
65473  }
65474
65475  var profileName = (_ref3 = name !== null && name !== void 0 ? name : // $FlowFixMe[prop-missing] - Flow no longer considers statics of functions as any
65476  fn.displayName) !== null && _ref3 !== void 0 ? _ref3 : fn.name;
65477
65478  var instrumented = /*#__PURE__*/function () {
65479    var _instrumented2 = _asyncToGenerator(function* () {
65480      var traceId = startWait(profileName);
65481
65482      try {
65483        return yield fn.apply(this, arguments);
65484      } finally {
65485        end(traceId);
65486      }
65487    });
65488
65489    function instrumented() {
65490      return _instrumented2.apply(this, arguments);
65491    }
65492
65493    return instrumented;
65494  }();
65495
65496  instrumented.displayName = profileName;
65497  return instrumented;
65498}
65499
65500process.hrtime = () => null
65501
65502var T_ZERO = process.hrtime(); // Return a Uint32 of microtime duration since program start.
65503
65504function microtime() {
65505  var hrtime = process.hrtime(T_ZERO); // eslint-disable-next-line no-bitwise
65506
65507  return 0 | hrtime[0] * 1e6 + Math.round(hrtime[1] / 1e3);
65508}
65509/**
65510 * Start a stack profile with a particular name, returns an ID to pass to end().
65511 *
65512 * Other profiles may start before this one ends, which will be represented as
65513 * nested operations, however all nested operations must end before this ends.
65514 *
65515 * In particular, be careful to end after errors.
65516 */
65517
65518
65519function start(name) {
65520  var beginTrace = {
65521    ph: 'B',
65522    name: name,
65523    pid: 0,
65524    tid: 0,
65525    ts: microtime()
65526  };
65527  traces.push(beginTrace);
65528  stack.push(beginTrace);
65529  return traces.length - 1;
65530}
65531
65532var asyncID = 0;
65533/**
65534 * Start an async wait profile with a particular name, returns an ID to pass
65535 * to end().
65536 *
65537 * Other profiles may start before this one ends, which will be represented as
65538 * nested operations, however all nested operations must end before this ends.
65539 *
65540 * In particular, be careful to end after errors.
65541 */
65542
65543function startWait(name) {
65544  traces.push({
65545    ph: 'b',
65546    name: name,
65547    cat: 'wait',
65548    id: asyncID++,
65549    pid: 0,
65550    tid: 0,
65551    ts: microtime()
65552  });
65553  return traces.length - 1;
65554}
65555
65556function end(traceIdx) {
65557  var trace = traces[traceIdx];
65558
65559  if (trace.ph === 'b') {
65560    traces.push({
65561      ph: 'e',
65562      cat: trace.cat,
65563      name: trace.name,
65564      id: trace.id,
65565      pid: trace.pid,
65566      tid: trace.tid,
65567      ts: microtime()
65568    });
65569    return;
65570  }
65571
65572  !(trace.ph === 'B') ?  false ? undefined : invariant(false) : void 0;
65573  !(stack.pop() === trace) ?  false ? undefined : invariant(false) : void 0;
65574  var prevTrace = traces[traces.length - 1];
65575
65576  if (trace === prevTrace) {
65577    traces[traceIdx] = {
65578      ph: 'X',
65579      name: trace.name,
65580      pid: trace.pid,
65581      tid: trace.tid,
65582      ts: trace.ts,
65583      dur: microtime() - trace.ts
65584    };
65585    return;
65586  }
65587
65588  traces.push({
65589    ph: 'E',
65590    name: trace.name,
65591    pid: trace.pid,
65592    tid: trace.tid,
65593    ts: microtime()
65594  });
65595}
65596
65597module.exports = {
65598  enable: enable,
65599  getTraces: getTraces,
65600  run: run,
65601  asyncContext: asyncContext,
65602  waitFor: waitFor,
65603  instrument: instrument,
65604  instrumentAsyncContext: instrumentAsyncContext,
65605  instrumentWait: instrumentWait,
65606  start: start,
65607  startWait: startWait,
65608  end: end
65609};
65610/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("8oxB")))
65611
65612/***/ }),
65613
65614/***/ "tS0h":
65615/***/ (function(module, exports, __webpack_require__) {
65616
65617"use strict";
65618
65619
65620var $isNaN = __webpack_require__("7qPd");
65621
65622// http://262.ecma-international.org/5.1/#sec-9.12
65623
65624module.exports = function SameValue(x, y) {
65625	if (x === y) { // 0 === -0, but they are not identical.
65626		if (x === 0) { return 1 / x === 1 / y; }
65627		return true;
65628	}
65629	return $isNaN(x) && $isNaN(y);
65630};
65631
65632
65633/***/ }),
65634
65635/***/ "tXcb":
65636/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
65637
65638"use strict";
65639/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ExecutableDefinitionsRule; });
65640/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
65641/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("/jXB");
65642/* harmony import */ var _language_predicates_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("Xizt");
65643
65644
65645
65646
65647/**
65648 * Executable definitions
65649 *
65650 * A GraphQL document is only valid for execution if all definitions are either
65651 * operation or fragment definitions.
65652 */
65653function ExecutableDefinitionsRule(context) {
65654  return {
65655    Document: function Document(node) {
65656      for (var _i2 = 0, _node$definitions2 = node.definitions; _i2 < _node$definitions2.length; _i2++) {
65657        var definition = _node$definitions2[_i2];
65658
65659        if (!Object(_language_predicates_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isExecutableDefinitionNode */ "b"])(definition)) {
65660          var defName = definition.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SCHEMA_DEFINITION || definition.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_1__[/* Kind */ "a"].SCHEMA_EXTENSION ? 'schema' : '"' + definition.name.value + '"';
65661          context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("The ".concat(defName, " definition is not executable."), definition));
65662        }
65663      }
65664
65665      return false;
65666    }
65667  };
65668}
65669
65670
65671/***/ }),
65672
65673/***/ "tjI6":
65674/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
65675
65676"use strict";
65677/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UniqueOperationTypesRule; });
65678/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
65679
65680
65681/**
65682 * Unique operation types
65683 *
65684 * A GraphQL document is only valid if it has only one type per operation.
65685 */
65686function UniqueOperationTypesRule(context) {
65687  var schema = context.getSchema();
65688  var definedOperationTypes = Object.create(null);
65689  var existingOperationTypes = schema ? {
65690    query: schema.getQueryType(),
65691    mutation: schema.getMutationType(),
65692    subscription: schema.getSubscriptionType()
65693  } : {};
65694  return {
65695    SchemaDefinition: checkOperationTypes,
65696    SchemaExtension: checkOperationTypes
65697  };
65698
65699  function checkOperationTypes(node) {
65700    var _node$operationTypes;
65701
65702    // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
65703    var operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];
65704
65705    for (var _i2 = 0; _i2 < operationTypesNodes.length; _i2++) {
65706      var operationType = operationTypesNodes[_i2];
65707      var operation = operationType.operation;
65708      var alreadyDefinedOperationType = definedOperationTypes[operation];
65709
65710      if (existingOperationTypes[operation]) {
65711        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("Type for ".concat(operation, " already defined in the schema. It cannot be redefined."), operationType));
65712      } else if (alreadyDefinedOperationType) {
65713        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]("There can be only one ".concat(operation, " type in schema."), [alreadyDefinedOperationType, operationType]));
65714      } else {
65715        definedOperationTypes[operation] = operationType;
65716      }
65717    }
65718
65719    return false;
vendor: 4,449 bytes, lines 65720-65869
65720  }
65721}
65722
65723
65724/***/ }),
65725
65726/***/ "tpqs":
65727/***/ (function(module, exports, __webpack_require__) {
65728
65729/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
65730// backported and transplited with Babel, with backwards-compat fixes
65731
65732// Copyright Joyent, Inc. and other Node contributors.
65733//
65734// Permission is hereby granted, free of charge, to any person obtaining a
65735// copy of this software and associated documentation files (the
65736// "Software"), to deal in the Software without restriction, including
65737// without limitation the rights to use, copy, modify, merge, publish,
65738// distribute, sublicense, and/or sell copies of the Software, and to permit
65739// persons to whom the Software is furnished to do so, subject to the
65740// following conditions:
65741//
65742// The above copyright notice and this permission notice shall be included
65743// in all copies or substantial portions of the Software.
65744//
65745// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
65746// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
65747// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
65748// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
65749// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
65750// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
65751// USE OR OTHER DEALINGS IN THE SOFTWARE.
65752
65753// resolves . and .. elements in a path array with directory names there
65754// must be no slashes, empty elements, or device names (c:\) in the array
65755// (so also no leading and trailing slashes - it does not distinguish
65756// relative and absolute paths)
65757function normalizeArray(parts, allowAboveRoot) {
65758  // if the path tries to go above the root, `up` ends up > 0
65759  var up = 0;
65760  for (var i = parts.length - 1; i >= 0; i--) {
65761    var last = parts[i];
65762    if (last === '.') {
65763      parts.splice(i, 1);
65764    } else if (last === '..') {
65765      parts.splice(i, 1);
65766      up++;
65767    } else if (up) {
65768      parts.splice(i, 1);
65769      up--;
65770    }
65771  }
65772
65773  // if the path is allowed to go above the root, restore leading ..s
65774  if (allowAboveRoot) {
65775    for (; up--; up) {
65776      parts.unshift('..');
65777    }
65778  }
65779
65780  return parts;
65781}
65782
65783// path.resolve([from ...], to)
65784// posix version
65785exports.resolve = function() {
65786  var resolvedPath = '',
65787      resolvedAbsolute = false;
65788
65789  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
65790    var path = (i >= 0) ? arguments[i] : process.cwd();
65791
65792    // Skip empty and invalid entries
65793    if (typeof path !== 'string') {
65794      throw new TypeError('Arguments to path.resolve must be strings');
65795    } else if (!path) {
65796      continue;
65797    }
65798
65799    resolvedPath = path + '/' + resolvedPath;
65800    resolvedAbsolute = path.charAt(0) === '/';
65801  }
65802
65803  // At this point the path should be resolved to a full absolute path, but
65804  // handle relative paths to be safe (might happen when process.cwd() fails)
65805
65806  // Normalize the path
65807  resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
65808    return !!p;
65809  }), !resolvedAbsolute).join('/');
65810
65811  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
65812};
65813
65814// path.normalize(path)
65815// posix version
65816exports.normalize = function(path) {
65817  var isAbsolute = exports.isAbsolute(path),
65818      trailingSlash = substr(path, -1) === '/';
65819
65820  // Normalize the path
65821  path = normalizeArray(filter(path.split('/'), function(p) {
65822    return !!p;
65823  }), !isAbsolute).join('/');
65824
65825  if (!path && !isAbsolute) {
65826    path = '.';
65827  }
65828  if (path && trailingSlash) {
65829    path += '/';
65830  }
65831
65832  return (isAbsolute ? '/' : '') + path;
65833};
65834
65835// posix version
65836exports.isAbsolute = function(path) {
65837  return path.charAt(0) === '/';
65838};
65839
65840// posix version
65841exports.join = function() {
65842  var paths = Array.prototype.slice.call(arguments, 0);
65843  return exports.normalize(filter(paths, function(p, index) {
65844    if (typeof p !== 'string') {
65845      throw new TypeError('Arguments to path.join must be strings');
65846    }
65847    return p;
65848  }).join('/'));
65849};
65850
65851
65852// path.relative(from, to)
65853// posix version
65854exports.relative = function(from, to) {
65855  from = exports.resolve(from).substr(1);
65856  to = exports.resolve(to).substr(1);
65857
65858  function trim(arr) {
65859    var start = 0;
65860    for (; start < arr.length; start++) {
65861      if (arr[start] !== '') break;
65862    }
65863
65864    var end = arr.length - 1;
65865    for (; end >= 0; end--) {
65866      if (arr[end] !== '') break;
65867    }
65868
65869    if (start > end) return [];
vendor: 4,745 bytes, lines 65870-66041
65870    return arr.slice(start, end - start + 1);
65871  }
65872
65873  var fromParts = trim(from.split('/'));
65874  var toParts = trim(to.split('/'));
65875
65876  var length = Math.min(fromParts.length, toParts.length);
65877  var samePartsLength = length;
65878  for (var i = 0; i < length; i++) {
65879    if (fromParts[i] !== toParts[i]) {
65880      samePartsLength = i;
65881      break;
65882    }
65883  }
65884
65885  var outputParts = [];
65886  for (var i = samePartsLength; i < fromParts.length; i++) {
65887    outputParts.push('..');
65888  }
65889
65890  outputParts = outputParts.concat(toParts.slice(samePartsLength));
65891
65892  return outputParts.join('/');
65893};
65894
65895exports.sep = '/';
65896exports.delimiter = ':';
65897
65898exports.dirname = function (path) {
65899  if (typeof path !== 'string') path = path + '';
65900  if (path.length === 0) return '.';
65901  var code = path.charCodeAt(0);
65902  var hasRoot = code === 47 /*/*/;
65903  var end = -1;
65904  var matchedSlash = true;
65905  for (var i = path.length - 1; i >= 1; --i) {
65906    code = path.charCodeAt(i);
65907    if (code === 47 /*/*/) {
65908        if (!matchedSlash) {
65909          end = i;
65910          break;
65911        }
65912      } else {
65913      // We saw the first non-path separator
65914      matchedSlash = false;
65915    }
65916  }
65917
65918  if (end === -1) return hasRoot ? '/' : '.';
65919  if (hasRoot && end === 1) {
65920    // return '//';
65921    // Backwards-compat fix:
65922    return '/';
65923  }
65924  return path.slice(0, end);
65925};
65926
65927function basename(path) {
65928  if (typeof path !== 'string') path = path + '';
65929
65930  var start = 0;
65931  var end = -1;
65932  var matchedSlash = true;
65933  var i;
65934
65935  for (i = path.length - 1; i >= 0; --i) {
65936    if (path.charCodeAt(i) === 47 /*/*/) {
65937        // If we reached a path separator that was not part of a set of path
65938        // separators at the end of the string, stop now
65939        if (!matchedSlash) {
65940          start = i + 1;
65941          break;
65942        }
65943      } else if (end === -1) {
65944      // We saw the first non-path separator, mark this as the end of our
65945      // path component
65946      matchedSlash = false;
65947      end = i + 1;
65948    }
65949  }
65950
65951  if (end === -1) return '';
65952  return path.slice(start, end);
65953}
65954
65955// Uses a mixed approach for backwards-compatibility, as ext behavior changed
65956// in new Node.js versions, so only basename() above is backported here
65957exports.basename = function (path, ext) {
65958  var f = basename(path);
65959  if (ext && f.substr(-1 * ext.length) === ext) {
65960    f = f.substr(0, f.length - ext.length);
65961  }
65962  return f;
65963};
65964
65965exports.extname = function (path) {
65966  if (typeof path !== 'string') path = path + '';
65967  var startDot = -1;
65968  var startPart = 0;
65969  var end = -1;
65970  var matchedSlash = true;
65971  // Track the state of characters (if any) we see before our first dot and
65972  // after any path separator we find
65973  var preDotState = 0;
65974  for (var i = path.length - 1; i >= 0; --i) {
65975    var code = path.charCodeAt(i);
65976    if (code === 47 /*/*/) {
65977        // If we reached a path separator that was not part of a set of path
65978        // separators at the end of the string, stop now
65979        if (!matchedSlash) {
65980          startPart = i + 1;
65981          break;
65982        }
65983        continue;
65984      }
65985    if (end === -1) {
65986      // We saw the first non-path separator, mark this as the end of our
65987      // extension
65988      matchedSlash = false;
65989      end = i + 1;
65990    }
65991    if (code === 46 /*.*/) {
65992        // If this is our first dot, mark it as the start of our extension
65993        if (startDot === -1)
65994          startDot = i;
65995        else if (preDotState !== 1)
65996          preDotState = 1;
65997    } else if (startDot !== -1) {
65998      // We saw a non-dot and non-path separator before our dot, so we should
65999      // have a good chance at having a non-empty extension
66000      preDotState = -1;
66001    }
66002  }
66003
66004  if (startDot === -1 || end === -1 ||
66005      // We saw a non-dot character immediately before the dot
66006      preDotState === 0 ||
66007      // The (right-most) trimmed path component is exactly '..'
66008      preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
66009    return '';
66010  }
66011  return path.slice(startDot, end);
66012};
66013
66014function filter (xs, f) {
66015    if (xs.filter) return xs.filter(f);
66016    var res = [];
66017    for (var i = 0; i < xs.length; i++) {
66018        if (f(xs[i], i, xs)) res.push(xs[i]);
66019    }
66020    return res;
66021}
66022
66023// String.prototype.substr - negative index don't work in IE8
66024var substr = 'ab'.substr(-1) === 'b'
66025    ? function (str, start, len) { return str.substr(start, len) }
66026    : function (str, start, len) {
66027        if (start < 0) start = str.length + start;
66028        return str.substr(start, len);
66029    }
66030;
66031
66032/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("8oxB")))
66033
66034/***/ }),
66035
66036/***/ "tzQD":
66037/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
66038
66039"use strict";
66040/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return printPathArray; });
66041/**
66042 * Build a string describing the path.
66043 */
66044function printPathArray(path) {
66045  return path.map(function (key) {
66046    return typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key;
66047  }).join('');
66048}
66049
66050
66051/***/ }),
66052
66053/***/ "uam5":
66054/***/ (function(module, exports, __webpack_require__) {
66055
66056"use strict";
66057
66058
66059var GetIntrinsic = __webpack_require__("AM7I");
66060
66061var has = __webpack_require__("oNNP");
66062var $TypeError = GetIntrinsic('%TypeError%');
66063
66064module.exports = function IsPropertyDescriptor(ES, Desc) {
66065	if (ES.Type(Desc) !== 'Object') {
66066		return false;
66067	}
66068	var allowed = {
66069		'[[Configurable]]': true,
66070		'[[Enumerable]]': true,
66071		'[[Get]]': true,
66072		'[[Set]]': true,
66073		'[[Value]]': true,
66074		'[[Writable]]': true
66075	};
66076
66077	for (var key in Desc) { // eslint-disable-line no-restricted-syntax
66078		if (has(Desc, key) && !allowed[key]) {
66079			return false;
66080		}
66081	}
66082
66083	if (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {
66084		throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');
66085	}
66086	return true;
66087};
66088
66089
66090/***/ }),
66091
66092/***/ "ugY3":
66093/***/ (function(module, exports, __webpack_require__) {
66094
66095"use strict";
66096
66097
66098var GetIntrinsic = __webpack_require__("5CxI");
66099
66100var $construct = GetIntrinsic('%Reflect.construct%', true);
66101
66102var DefinePropertyOrThrow = __webpack_require__("zkip");
66103try {
66104	DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
66105} catch (e) {
66106	// Accessor properties aren't supported
66107	DefinePropertyOrThrow = null;
66108}
66109
66110// https://ecma-international.org/ecma-262/6.0/#sec-isconstructor
66111
66112if (DefinePropertyOrThrow && $construct) {
66113	var isConstructorMarker = {};
66114	var badArrayLike = {};
66115	DefinePropertyOrThrow(badArrayLike, 'length', {
66116		'[[Get]]': function () {
66117			throw isConstructorMarker;
66118		},
66119		'[[Enumerable]]': true
66120	});
66121
66122	module.exports = function IsConstructor(argument) {
66123		try {
66124			// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
66125			$construct(argument, badArrayLike);
66126		} catch (err) {
66127			return err === isConstructorMarker;
66128		}
66129	};
66130} else {
66131	module.exports = function IsConstructor(argument) {
66132		// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
66133		return typeof argument === 'function' && !!argument.prototype;
66134	};
66135}
66136
66137
66138/***/ }),
66139
66140/***/ "umOc":
66141/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
66142
66143"use strict";
66144/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return typeFromAST; });
66145/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
66146/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2C6G");
66147/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("/jXB");
66148/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("axIb");
66149
66150
66151
66152
66153/**
66154 * Given a Schema and an AST node describing a type, return a GraphQLType
66155 * definition which applies to that type. For example, if provided the parsed
66156 * AST node for `[User]`, a GraphQLList instance will be returned, containing
66157 * the type called "User" found in the schema. If a type called "User" is not
66158 * found in the schema, then undefined will be returned.
66159 */
66160
66161/* eslint-disable no-redeclare */
66162
66163function typeFromAST(schema, typeNode) {
66164  /* eslint-enable no-redeclare */
66165  var innerType;
66166
66167  if (typeNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].LIST_TYPE) {
66168    innerType = typeFromAST(schema, typeNode.type);
66169    return innerType && new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_3__[/* GraphQLList */ "d"](innerType);
66170  }
66171
66172  if (typeNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].NON_NULL_TYPE) {
66173    innerType = typeFromAST(schema, typeNode.type);
66174    return innerType && new _type_definition_mjs__WEBPACK_IMPORTED_MODULE_3__[/* GraphQLNonNull */ "e"](innerType);
66175  } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
66176
66177
66178  if (typeNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_2__[/* Kind */ "a"].NAMED_TYPE) {
66179    return schema.getType(typeNode.name.value);
66180  } // istanbul ignore next (Not reachable. All possible type nodes have been considered)
66181
66182
66183   false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(0, 'Unexpected type node: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(typeNode));
66184}
66185
66186
66187/***/ }),
66188
66189/***/ "vJKn":
66190/***/ (function(module, exports, __webpack_require__) {
66191
66192module.exports = __webpack_require__("cuPQ");
66193
66194
66195/***/ }),
66196
66197/***/ "vSWR":
66198/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
66199
66200"use strict";
66201/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return KnownDirectivesRule; });
66202/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
66203/* harmony import */ var _jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2C6G");
66204/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("dWS+");
66205/* harmony import */ var _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("/jXB");
66206/* harmony import */ var _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("F8X2");
66207/* harmony import */ var _type_directives_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("4suF");
66208
66209
66210
66211
66212
66213
66214
66215/**
66216 * Known directives
66217 *
66218 * A GraphQL document is only valid if all `@directives` are known by the
66219 * schema and legally positioned.
66220 */
66221function KnownDirectivesRule(context) {
66222  var locationsMap = Object.create(null);
66223  var schema = context.getSchema();
66224  var definedDirectives = schema ? schema.getDirectives() : _type_directives_mjs__WEBPACK_IMPORTED_MODULE_5__[/* specifiedDirectives */ "j"];
66225
66226  for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {
66227    var directive = definedDirectives[_i2];
66228    locationsMap[directive.name] = directive.locations;
66229  }
66230
66231  var astDefinitions = context.getDocument().definitions;
66232
66233  for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {
66234    var def = astDefinitions[_i4];
66235
66236    if (def.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].DIRECTIVE_DEFINITION) {
66237      locationsMap[def.name.value] = def.locations.map(function (name) {
66238        return name.value;
66239      });
66240    }
66241  }
66242
66243  return {
66244    Directive: function Directive(node, _key, _parent, _path, ancestors) {
66245      var name = node.name.value;
66246      var locations = locationsMap[name];
66247
66248      if (!locations) {
66249        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"]("Unknown directive \"@".concat(name, "\"."), node));
66250        return;
66251      }
66252
66253      var candidateLocation = getDirectiveLocationForASTPath(ancestors);
66254
66255      if (candidateLocation && locations.indexOf(candidateLocation) === -1) {
66256        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_2__[/* GraphQLError */ "a"]("Directive \"@".concat(name, "\" may not be used on ").concat(candidateLocation, "."), node));
66257      }
66258    }
66259  };
66260}
66261
66262function getDirectiveLocationForASTPath(ancestors) {
66263  var appliedTo = ancestors[ancestors.length - 1];
66264  !Array.isArray(appliedTo) || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(0);
66265
66266  switch (appliedTo.kind) {
66267    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OPERATION_DEFINITION:
66268      return getDirectiveLocationForOperation(appliedTo.operation);
66269
66270    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FIELD:
66271      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].FIELD;
66272
66273    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FRAGMENT_SPREAD:
66274      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].FRAGMENT_SPREAD;
66275
66276    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INLINE_FRAGMENT:
66277      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].INLINE_FRAGMENT;
66278
66279    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FRAGMENT_DEFINITION:
66280      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].FRAGMENT_DEFINITION;
66281
66282    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].VARIABLE_DEFINITION:
66283      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].VARIABLE_DEFINITION;
66284
66285    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SCHEMA_DEFINITION:
66286    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SCHEMA_EXTENSION:
66287      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].SCHEMA;
66288
66289    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SCALAR_TYPE_DEFINITION:
66290    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].SCALAR_TYPE_EXTENSION:
66291      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].SCALAR;
66292
66293    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OBJECT_TYPE_DEFINITION:
66294    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].OBJECT_TYPE_EXTENSION:
66295      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].OBJECT;
66296
66297    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].FIELD_DEFINITION:
66298      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].FIELD_DEFINITION;
66299
66300    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INTERFACE_TYPE_DEFINITION:
66301    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INTERFACE_TYPE_EXTENSION:
66302      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].INTERFACE;
66303
66304    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].UNION_TYPE_DEFINITION:
66305    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].UNION_TYPE_EXTENSION:
66306      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].UNION;
66307
66308    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ENUM_TYPE_DEFINITION:
66309    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ENUM_TYPE_EXTENSION:
66310      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].ENUM;
66311
66312    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].ENUM_VALUE_DEFINITION:
66313      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].ENUM_VALUE;
66314
66315    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_OBJECT_TYPE_DEFINITION:
66316    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_OBJECT_TYPE_EXTENSION:
66317      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].INPUT_OBJECT;
66318
66319    case _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_VALUE_DEFINITION:
66320      {
66321        var parentNode = ancestors[ancestors.length - 3];
66322        return parentNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_3__[/* Kind */ "a"].INPUT_OBJECT_TYPE_DEFINITION ? _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].INPUT_FIELD_DEFINITION : _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].ARGUMENT_DEFINITION;
66323      }
66324  }
66325}
66326
66327function getDirectiveLocationForOperation(operation) {
66328  switch (operation) {
66329    case 'query':
66330      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].QUERY;
66331
66332    case 'mutation':
66333      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].MUTATION;
66334
66335    case 'subscription':
66336      return _language_directiveLocation_mjs__WEBPACK_IMPORTED_MODULE_4__[/* DirectiveLocation */ "a"].SUBSCRIPTION;
66337  } // istanbul ignore next (Not reachable. All possible types have been considered)
66338
66339
66340   false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(0, 'Unexpected operation: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(operation));
66341}
66342
66343
66344/***/ }),
66345
66346/***/ "w6G1":
66347/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
66348
66349"use strict";
66350/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoneSchemaDefinitionRule; });
66351/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dWS+");
66352
66353
66354/**
66355 * Lone Schema definition
66356 *
66357 * A GraphQL document is only valid if it contains only one schema definition.
66358 */
66359function LoneSchemaDefinitionRule(context) {
66360  var _ref, _ref2, _oldSchema$astNode;
66361
66362  var oldSchema = context.getSchema();
66363  var alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType();
66364  var schemaDefinitionsCount = 0;
66365  return {
66366    SchemaDefinition: function SchemaDefinition(node) {
66367      if (alreadyDefined) {
66368        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]('Cannot define a new schema within a schema extension.', node));
66369        return;
66370      }
66371
66372      if (schemaDefinitionsCount > 0) {
66373        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_0__[/* GraphQLError */ "a"]('Must provide only one schema definition.', node));
66374      }
66375
66376      ++schemaDefinitionsCount;
66377    }
66378  };
66379}
66380
66381
66382/***/ }),
66383
66384/***/ "wIKA":
66385/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
66386
66387"use strict";
66388/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PossibleFragmentSpreadsRule; });
66389/* harmony import */ var _jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("rWdj");
66390/* harmony import */ var _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dWS+");
66391/* harmony import */ var _type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("axIb");
66392/* harmony import */ var _utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("umOc");
66393/* harmony import */ var _utilities_typeComparators_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("sJV+");
66394
66395
66396
66397
66398
66399
66400/**
66401 * Possible fragment spread
66402 *
66403 * A fragment spread is only valid if the type condition could ever possibly
66404 * be true: if there is a non-empty intersection of the possible parent types,
66405 * and possible types which pass the type condition.
66406 */
66407function PossibleFragmentSpreadsRule(context) {
66408  return {
66409    InlineFragment: function InlineFragment(node) {
66410      var fragType = context.getType();
66411      var parentType = context.getParentType();
66412
66413      if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isCompositeType */ "D"])(fragType) && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isCompositeType */ "D"])(parentType) && !Object(_utilities_typeComparators_mjs__WEBPACK_IMPORTED_MODULE_4__[/* doTypesOverlap */ "a"])(context.getSchema(), fragType, parentType)) {
66414        var parentTypeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(parentType);
66415        var fragTypeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(fragType);
66416        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLError */ "a"]("Fragment cannot be spread here as objects of type \"".concat(parentTypeStr, "\" can never be of type \"").
66416concat(fragTypeStr, "\"."), node));
66417      }
66418    },
66419    FragmentSpread: function FragmentSpread(node) {
66420      var fragName = node.name.value;
66421      var fragType = getFragmentType(context, fragName);
66422      var parentType = context.getParentType();
66423
66424      if (fragType && parentType && !Object(_utilities_typeComparators_mjs__WEBPACK_IMPORTED_MODULE_4__[/* doTypesOverlap */ "a"])(context.getSchema(), fragType, parentType)) {
66425        var parentTypeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(parentType);
66426        var fragTypeStr = Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(fragType);
66427        context.reportError(new _error_GraphQLError_mjs__WEBPACK_IMPORTED_MODULE_1__[/* GraphQLError */ "a"]("Fragment \"".concat(fragName, "\" cannot be spread here as objects of type \"").concat(parentTypeStr, "\" can never be of type \"").concat(fragTypeStr, "\"."), node));
66428      }
66429    }
66430  };
66431}
66432
66433function getFragmentType(context, name) {
66434  var frag = context.getFragment(name);
66435
66436  if (frag) {
66437    var type = Object(_utilities_typeFromAST_mjs__WEBPACK_IMPORTED_MODULE_3__[/* typeFromAST */ "a"])(context.getSchema(), frag.typeCondition);
66438
66439    if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_2__[/* isCompositeType */ "D"])(type)) {
66440      return type;
66441    }
66442  }
66443}
66444
66445
66446/***/ }),
66447
66448/***/ "x3m3":
66449/***/ (function(module, __webpack_exports__, __webpack_require__) {
66450
66451"use strict";
66452__webpack_require__.r(__webpack_exports__);
66453/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "upperCaseFirst", function() { return upperCaseFirst; });
66454/**
66455 * Upper case the first character of an input string.
66456 */
66457function upperCaseFirst(input) {
66458    return input.charAt(0).toUpperCase() + input.substr(1);
66459}
66460//# sourceMappingURL=index.js.map
66461
66462/***/ }),
66463
66464/***/ "y4cC":
66465/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
66466
66467"use strict";
66468/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getLocation; });
66469/**
66470 * Represents a location in a Source.
66471 */
66472
66473/**
66474 * Takes a Source and a UTF-8 character offset, and returns the corresponding
66475 * line and column as a SourceLocation.
66476 */
66477function getLocation(source, position) {
66478  var lineRegexp = /\r\n|[\n\r]/g;
66479  var line = 1;
66480  var column = position + 1;
66481  var match;
66482
66483  while ((match = lineRegexp.exec(source.body)) && match.index < position) {
66484    line += 1;
66485    column = position + 1 - (match.index + match[0].length);
66486  }
66487
66488  return {
66489    line: line,
66490    column: column
66491  };
66492}
66493
66494
66495/***/ }),
66496
66497/***/ "yCJC":
66498/***/ (function(module, exports, __webpack_require__) {
66499
66500"use strict";
66501
66502
66503var define = __webpack_require__("82c2");
66504var getPolyfill = __webpack_require__("l1+S");
66505
66506module.exports = function shimFlatMap() {
66507	var polyfill = getPolyfill();
66508	define(
66509		Array.prototype,
66510		{ flatMap: polyfill },
66511		{ flatMap: function () { return Array.prototype.flatMap !== polyfill; } }
66512	);
66513	return polyfill;
66514};
66515
66516
66517/***/ }),
66518
66519/***/ "yRpE":
66520/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
66521
66522"use strict";
66523
66524// EXPORTS
66525__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ execute; });
66526__webpack_require__.d(__webpack_exports__, "h", function() { return /* binding */ executeSync; });
66527__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ assertValidExecutionArguments; });
66528__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ buildExecutionContext; });
66529__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ collectFields; });
66530__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ buildResolveInfo; });
66531__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ execute_defaultTypeResolver; });
66532__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ execute_defaultFieldResolver; });
66533__webpack_require__.d(__webpack_exports__, "i", function() { return /* binding */ getFieldDef; });
66534
66535// EXTERNAL MODULE: ./node_modules/graphql/jsutils/inspect.mjs
66536var inspect = __webpack_require__("rWdj");
66537
66538// CONCATENATED MODULE: ./node_modules/graphql/jsutils/memoize3.mjs
66539/**
66540 * Memoizes the provided three-argument function.
66541 */
66542function memoize3(fn) {
66543  var cache0;
66544  return function memoized(a1, a2, a3) {
66545    if (!cache0) {
66546      cache0 = new WeakMap();
66547    }
66548
66549    var cache1 = cache0.get(a1);
66550    var cache2;
66551
66552    if (cache1) {
66553      cache2 = cache1.get(a2);
66554
66555      if (cache2) {
66556        var cachedValue = cache2.get(a3);
66557
66558        if (cachedValue !== undefined) {
66559          return cachedValue;
66560        }
66561      }
66562    } else {
66563      cache1 = new WeakMap();
66564      cache0.set(a1, cache1);
66565    }
66566
66567    if (!cache2) {
66568      cache2 = new WeakMap();
66569      cache1.set(a2, cache2);
66570    }
66571
66572    var newValue = fn(a1, a2, a3);
66573    cache2.set(a3, newValue);
66574    return newValue;
66575  };
66576}
66577
66578// EXTERNAL MODULE: ./node_modules/graphql/jsutils/invariant.mjs
66579var invariant = __webpack_require__("2C6G");
66580
66581// EXTERNAL MODULE: ./node_modules/graphql/jsutils/devAssert.mjs
66582var devAssert = __webpack_require__("t3R0");
66583
66584// EXTERNAL MODULE: ./node_modules/graphql/jsutils/isPromise.mjs
66585var isPromise = __webpack_require__("z/Nw");
66586
66587// EXTERNAL MODULE: ./node_modules/graphql/jsutils/isObjectLike.mjs
66588var isObjectLike = __webpack_require__("zpYP");
66589
66590// EXTERNAL MODULE: ./node_modules/graphql/jsutils/safeArrayFrom.mjs
66591var safeArrayFrom = __webpack_require__("k9pe");
66592
66593// CONCATENATED MODULE: ./node_modules/graphql/jsutils/promiseReduce.mjs
66594
66595/**
66596 * Similar to Array.prototype.reduce(), however the reducing callback may return
66597 * a Promise, in which case reduction will continue after each promise resolves.
66598 *
66599 * If the callback does not return a Promise, then this function will also not
66600 * return a Promise.
66601 */
66602
66603function promiseReduce(values, callback, initialValue) {
66604  return values.reduce(function (previous, value) {
66605    return Object(isPromise["a" /* default */])(previous) ? previous.then(function (resolved) {
66606      return callback(resolved, value);
66607    }) : callback(previous, value);
66608  }, initialValue);
66609}
66610
66611// CONCATENATED MODULE: ./node_modules/graphql/jsutils/promiseForObject.mjs
66612/**
66613 * This function transforms a JS object `ObjMap<Promise<T>>` into
66614 * a `Promise<ObjMap<T>>`
66615 *
66616 * This is akin to bluebird's `Promise.props`, but implemented only using
66617 * `Promise.all` so it will work with any implementation of ES6 promises.
66618 */
66619function promiseForObject(object) {
66620  var keys = Object.keys(object);
66621  var valuesAndPromises = keys.map(function (name) {
66622    return object[name];
66623  });
66624  return Promise.all(valuesAndPromises).then(function (values) {
66625    return values.reduce(function (resolvedObject, value, i) {
66626      resolvedObject[keys[i]] = value;
66627      return resolvedObject;
66628    }, Object.create(null));
66629  });
66630}
66631
66632// EXTERNAL MODULE: ./node_modules/graphql/jsutils/Path.mjs
66633var Path = __webpack_require__("fExb");
66634
66635// EXTERNAL MODULE: ./node_modules/graphql/error/GraphQLError.mjs
66636var GraphQLError = __webpack_require__("dWS+");
66637
66638// EXTERNAL MODULE: ./node_modules/graphql/error/locatedError.mjs
66639var locatedError = __webpack_require__("jI7m");
66640
66641// EXTERNAL MODULE: ./node_modules/graphql/language/kinds.mjs
66642var kinds = __webpack_require__("/jXB");
66643
66644// EXTERNAL MODULE: ./node_modules/graphql/type/validate.mjs
66645var validate = __webpack_require__("93gR");
66646
66647// EXTERNAL MODULE: ./node_modules/graphql/type/introspection.mjs
66648var introspection = __webpack_require__("LViu");
66649
66650// EXTERNAL MODULE: ./node_modules/graphql/type/directives.mjs
66651var directives = __webpack_require__("4suF");
66652
66653// EXTERNAL MODULE: ./node_modules/graphql/type/definition.mjs + 1 modules
66654var type_definition = __webpack_require__("axIb");
66655
66656// EXTERNAL MODULE: ./node_modules/graphql/utilities/typeFromAST.mjs
66657var typeFromAST = __webpack_require__("umOc");
66658
66659// EXTERNAL MODULE: ./node_modules/graphql/utilities/getOperationRootType.mjs
66660var getOperationRootType = __webpack_require__("gXYT");
66661
66662// EXTERNAL MODULE: ./node_modules/graphql/execution/values.mjs
66663var execution_values = __webpack_require__("5XwX");
66664
66665// CONCATENATED MODULE: ./node_modules/graphql/execution/execute.mjs
66666
66667
66668
66669
66670
66671
66672
66673
66674
66675
66676
66677
66678
66679
66680
66681
66682
66683
66684
66685
66686/**
66687 * Terminology
66688 *
66689 * "Definitions" are the generic name for top-level statements in the document.
66690 * Examples of this include:
66691 * 1) Operations (such as a query)
66692 * 2) Fragments
66693 *
66694 * "Operations" are a generic name for requests in the document.
66695 * Examples of this include:
66696 * 1) query,
66697 * 2) mutation
66698 *
66699 * "Selections" are the definitions that can appear legally and at
66700 * single level of the query. These include:
66701 * 1) field references e.g "a"
66702 * 2) fragment "spreads" e.g. "...c"
66703 * 3) inline fragment "spreads" e.g. "...on Type { a }"
66704 */
66705
66706/**
66707 * Data that must be available at all points during query execution.
66708 *
66709 * Namely, schema of the type system that is currently executing,
66710 * and the fragments defined in the query document
66711 */
66712
66713function execute(argsOrSchema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {
66714  /* eslint-enable no-redeclare */
66715  // Extract arguments from object args if provided.
66716  return arguments.length === 1 ? executeImpl(argsOrSchema) : executeImpl({
66717    schema: argsOrSchema,
66718    document: document,
66719    rootValue: rootValue,
66720    contextValue: contextValue,
66721    variableValues: variableValues,
66722    operationName: operationName,
66723    fieldResolver: fieldResolver,
66724    typeResolver: typeResolver
66725  });
66726}
66727/**
66728 * Also implements the "Evaluating requests" section of the GraphQL specification.
66729 * However, it guarantees to complete synchronously (or throw an error) assuming
66730 * that all field resolvers are also synchronous.
66731 */
66732
66733function executeSync(args) {
66734  var result = executeImpl(args); // Assert that the execution was synchronous.
66735
66736  if (Object(isPromise["a" /* default */])(result)) {
66737    throw new Error('GraphQL execution failed to complete synchronously.');
66738  }
66739
66740  return result;
66741}
66742
66743function executeImpl(args) {
66744  var schema = args.schema,
66745      document = args.document,
66746      rootValue = args.rootValue,
66747      contextValue = args.contextValue,
66748      variableValues = args.variableValues,
66749      operationName = args.operationName,
66750      fieldResolver = args.fieldResolver,
66751      typeResolver = args.typeResolver; // If arguments are missing or incorrect, throw an error.
66752
66753  assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,
66754  // a "Response" with only errors is returned.
66755
66756  var exeContext = buildExecutionContext(schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver); // Return early errors if execution context failed.
66757
66758  if (Array.isArray(exeContext)) {
66759    return {
66760      errors: exeContext
66761    };
66762  } // Return a Promise that will eventually resolve to the data described by
66763  // The "Response" section of the GraphQL specification.
66764  //
66765  // If errors are encountered while executing a GraphQL field, only that
66766  // field and its descendants will be omitted, and sibling fields will still
66767  // be executed. An execution which encounters errors will still result in a
66768  // resolved Promise.
66769
66770
66771  var data = executeOperation(exeContext, exeContext.operation, rootValue);
66772  return buildResponse(exeContext, data);
66773}
66774/**
66775 * Given a completed execution context and data, build the { errors, data }
66776 * response defined by the "Response" section of the GraphQL specification.
66777 */
66778
66779
66780function buildResponse(exeContext, data) {
66781  if (Object(isPromise["a" /* default */])(data)) {
66782    return data.then(function (resolved) {
66783      return buildResponse(exeContext, resolved);
66784    });
66785  }
66786
66787  return exeContext.errors.length === 0 ? {
66788    data: data
66789  } : {
66790    errors: exeContext.errors,
66791    data: data
66792  };
66793}
66794/**
66795 * Essential assertions before executing to provide developer feedback for
66796 * improper use of the GraphQL library.
66797 *
66798 * @internal
66799 */
66800
66801
66802function assertValidExecutionArguments(schema, document, rawVariableValues) {
66803  document || Object(devAssert["a" /* default */])(0, 'Must provide document.'); // If the schema used for execution is invalid, throw an error.
66804
66805  Object(validate["a" /* assertValidSchema */])(schema); // Variables, if provided, must be an object.
66806
66807  rawVariableValues == null || Object(isObjectLike["a" /* default */])(rawVariableValues) || Object(devAssert["a" /* default */])(0, 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.');
66808}
66809/**
66810 * Constructs a ExecutionContext object from the arguments passed to
66811 * execute, which we will pass throughout the other execution methods.
66812 *
66813 * Throws a GraphQLError if a valid execution context cannot be created.
66814 *
66815 * @internal
66816 */
66817
66818function buildExecutionContext(schema, document, rootValue, contextValue, rawVariableValues, operationName, fieldResolver, typeResolver) {
66819  var _definition$name, _operation$variableDe;
66820
66821  var operation;
66822  var fragments = Object.create(null);
66823
66824  for (var _i2 = 0, _document$definitions2 = document.definitions; _i2 < _document$definitions2.length; _i2++) {
66825    var definition = _document$definitions2[_i2];
66826
66827    switch (definition.kind) {
66828      case kinds["a" /* Kind */].OPERATION_DEFINITION:
66829        if (operationName == null) {
66830          if (operation !== undefined) {
66831            return [new GraphQLError["a" /* GraphQLError */]('Must provide operation name if query contains multiple operations.')];
66832          }
66833
66834          operation = definition;
66835        } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {
66836          operation = definition;
66837        }
66838
66839        break;
66840
66841      case kinds["a" /* Kind */].FRAGMENT_DEFINITION:
66842        fragments[definition.name.value] = definition;
66843        break;
66844    }
66845  }
66846
66847  if (!operation) {
66848    if (operationName != null) {
66849      return [new GraphQLError["a" /* GraphQLError */]("Unknown operation named \"".concat(operationName, "\"."))];
66850    }
66851
66852    return [new GraphQLError["a" /* GraphQLError */]('Must provide an operation.')];
66853  } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')
66854
66855
66856  var variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== void 0 ? _operation$variableDe : [];
66857  var coercedVariableValues = Object(execution_values["c" /* getVariableValues */])(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== void 0 ? rawVariableValues : {}, {
66858    maxErrors: 50
66859  });
66860
66861  if (coercedVariableValues.errors) {
66862    return coercedVariableValues.errors;
66863  }
66864
66865  return {
66866    schema: schema,
66867    fragments: fragments,
66868    rootValue: rootValue,
66869    contextValue: contextValue,
66870    operation: operation,
66871    variableValues: coercedVariableValues.coerced,
66872    fieldResolver: fieldResolver !== null && fieldResolver !== void 0 ? fieldResolver : execute_defaultFieldResolver,
66873    typeResolver: typeResolver !== null && typeResolver !== void 0 ? typeResolver : execute_defaultTypeResolver,
66874    errors: []
66875  };
66876}
66877/**
66878 * Implements the "Evaluating operations" section of the spec.
66879 */
66880
66881function executeOperation(exeContext, operation, rootValue) {
66882  var type = Object(getOperationRootType["a" /* getOperationRootType */])(exeContext.schema, operation);
66883  var fields = collectFields(exeContext, type, operation.selectionSet, Object.create(null), Object.create(null));
66884  var path = undefined; // Errors from sub-fields of a NonNull type may propagate to the top level,
66885  // at which point we still log the error and null the parent field, which
66886  // in this case is the entire response.
66887
66888  try {
66889    var result = operation.operation === 'mutation' ? executeFieldsSerially(exeContext, type, root
66889Value, path, fields) : executeFields(exeContext, type, rootValue, path, fields);
66890
66891    if (Object(isPromise["a" /* default */])(result)) {
66892      return result.then(undefined, function (error) {
66893        exeContext.errors.push(error);
66894        return Promise.resolve(null);
66895      });
66896    }
66897
66898    return result;
66899  } catch (error) {
66900    exeContext.errors.push(error);
66901    return null;
66902  }
66903}
66904/**
66905 * Implements the "Evaluating selection sets" section of the spec
66906 * for "write" mode.
66907 */
66908
66909
66910function executeFieldsSerially(exeContext, parentType, sourceValue, path, fields) {
66911  return promiseReduce(Object.keys(fields), function (results, responseName) {
66912    var fieldNodes = fields[responseName];
66913    var fieldPath = Object(Path["a" /* addPath */])(path, responseName, parentType.name);
66914    var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);
66915
66916    if (result === undefined) {
66917      return results;
66918    }
66919
66920    if (Object(isPromise["a" /* default */])(result)) {
66921      return result.then(function (resolvedResult) {
66922        results[responseName] = resolvedResult;
66923        return results;
66924      });
66925    }
66926
66927    results[responseName] = result;
66928    return results;
66929  }, Object.create(null));
66930}
66931/**
66932 * Implements the "Evaluating selection sets" section of the spec
66933 * for "read" mode.
66934 */
66935
66936
66937function executeFields(exeContext, parentType, sourceValue, path, fields) {
66938  var results = Object.create(null);
66939  var containsPromise = false;
66940
66941  for (var _i4 = 0, _Object$keys2 = Object.keys(fields); _i4 < _Object$keys2.length; _i4++) {
66942    var responseName = _Object$keys2[_i4];
66943    var fieldNodes = fields[responseName];
66944    var fieldPath = Object(Path["a" /* addPath */])(path, responseName, parentType.name);
66945    var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);
66946
66947    if (result !== undefined) {
66948      results[responseName] = result;
66949
66950      if (Object(isPromise["a" /* default */])(result)) {
66951        containsPromise = true;
66952      }
66953    }
66954  } // If there are no promises, we can just return the object
66955
66956
66957  if (!containsPromise) {
66958    return results;
66959  } // Otherwise, results is a map from field name to the result of resolving that
66960  // field, which is possibly a promise. Return a promise that will return this
66961  // same map, but with any promises replaced with the values they resolved to.
66962
66963
66964  return promiseForObject(results);
66965}
66966/**
66967 * Given a selectionSet, adds all of the fields in that selection to
66968 * the passed in map of fields, and returns it at the end.
66969 *
66970 * CollectFields requires the "runtime type" of an object. For a field which
66971 * returns an Interface or Union type, the "runtime type" will be the actual
66972 * Object type returned by that field.
66973 *
66974 * @internal
66975 */
66976
66977
66978function collectFields(exeContext, runtimeType, selectionSet, fields, visitedFragmentNames) {
66979  for (var _i6 = 0, _selectionSet$selecti2 = selectionSet.selections; _i6 < _selectionSet$selecti2.length; _i6++) {
66980    var selection = _selectionSet$selecti2[_i6];
66981
66982    switch (selection.kind) {
66983      case kinds["a" /* Kind */].FIELD:
66984        {
66985          if (!shouldIncludeNode(exeContext, selection)) {
66986            continue;
66987          }
66988
66989          var name = getFieldEntryKey(selection);
66990
66991          if (!fields[name]) {
66992            fields[name] = [];
66993          }
66994
66995          fields[name].push(selection);
66996          break;
66997        }
66998
66999      case kinds["a" /* Kind */].INLINE_FRAGMENT:
67000        {
67001          if (!shouldIncludeNode(exeContext, selection) || !doesFragmentConditionMatch(exeContext, selection, runtimeType)) {
67002            continue;
67003          }
67004
67005          collectFields(exeContext, runtimeType, selection.selectionSet, fields, visitedFragmentNames);
67006          break;
67007        }
67008
67009      case kinds["a" /* Kind */].FRAGMENT_SPREAD:
67010        {
67011          var fragName = selection.name.value;
67012
67013          if (visitedFragmentNames[fragName] || !shouldIncludeNode(exeContext, selection)) {
67014            continue;
67015          }
67016
67017          visitedFragmentNames[fragName] = true;
67018          var fragment = exeContext.fragments[fragName];
67019
67020          if (!fragment || !doesFragmentConditionMatch(exeContext, fragment, runtimeType)) {
67021            continue;
67022          }
67023
67024          collectFields(exeContext, runtimeType, fragment.selectionSet, fields, visitedFragmentNames);
67025          break;
67026        }
67027    }
67028  }
67029
67030  return fields;
67031}
67032/**
67033 * Determines if a field should be included based on the @include and @skip
67034 * directives, where @skip has higher precedence than @include.
67035 */
67036
67037function shouldIncludeNode(exeContext, node) {
67038  var skip = Object(execution_values["b" /* getDirectiveValues */])(directives["e" /* GraphQLSkipDirective */], node, exeContext.variableValues);
67039
67040  if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) {
67041    return false;
67042  }
67043
67044  var include = Object(execution_values["b" /* getDirectiveValues */])(directives["d" /* GraphQLIncludeDirective */], node, exeContext.variableValues);
67045
67046  if ((include === null || include === void 0 ? void 0 : include.if) === false) {
67047    return false;
67048  }
67049
67050  return true;
67051}
67052/**
67053 * Determines if a fragment is applicable to the given type.
67054 */
67055
67056
67057function doesFragmentConditionMatch(exeContext, fragment, type) {
67058  var typeConditionNode = fragment.typeCondition;
67059
67060  if (!typeConditionNode) {
67061    return true;
67062  }
67063
67064  var conditionalType = Object(typeFromAST["a" /* typeFromAST */])(exeContext.schema, typeConditionNode);
67065
67066  if (conditionalType === type) {
67067    return true;
67068  }
67069
67070  if (Object(type_definition["C" /* isAbstractType */])(conditionalType)) {
67071    return exeContext.schema.isSubType(conditionalType, type);
67072  }
67073
67074  return false;
67075}
67076/**
67077 * Implements the logic to compute the key of a given field's entry
67078 */
67079
67080
67081function getFieldEntryKey(node) {
67082  return node.alias ? node.alias.value : node.name.value;
67083}
67084/**
67085 * Resolves the field on the given source object. In particular, this
67086 * figures out the value that the field returns by calling its resolve function,
67087 * then calls completeValue to complete promises, serialize scalars, or execute
67088 * the sub-selection-set for objects.
67089 */
67090
67091
67092function resolveField(exeContext, parentType, source, fieldNodes, path) {
67093  var _fieldDef$resolve;
67094
67095  var fieldNode = fieldNodes[0];
67096  var fieldName = fieldNode.name.value;
67097  var fieldDef = getFieldDef(exeContext.schema, parentType, fieldName);
67098
67099  if (!fieldDef) {
67100    return;
67101  }
67102
67103  var returnType = fieldDef.type;
67104  var resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _fieldDef$resolve : exeContext.fieldResolver;
67105  var info = buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path); // Get the resolve function, regardless of if its result is normal or abrupt (error).
67106
67107  try {
67108    // Build a JS object of arguments from the field.arguments AST, using the
67109    // variables scope to fulfill any variable references.
67110    // TODO: find a way to memoize, in case this field is within a List type.
67111    var args = Object(execution_values["a" /* getArgumentValues */])(fieldDef, fieldNodes[0], exeContext.variableValues); // The resolve function's optional third argument is a context value that
67112    // is provided to every resolve function within an execution. It is commonly
67113    // used to represent an authenticated user, or request-specific caches.
67114
67115    var _contextValue = exeContext.contextValue;
67116    var result = resolveFn(source, args, _contextValue, info);
67117    var completed;
67118
67119    if (Object(isPromise["a" /* default */])(result)) {
67120      completed = result.then(function (resolved) {
67121        return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);
67122      });
67123    } else {
67124      completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);
67125    }
67126
67127    if (Object(isPromise["a" /* default */])(completed)) {
67128      // Note: we don't rely on a `catch` method, but we do expect "thenable"
67129      // to take a second callback for the error case.
67130      return completed.then(undefined, function (rawError) {
67131        var error = Object(locatedError["a" /* locatedError */])(rawError, fieldNodes, Object(Path["b" /* pathToArray */])(path));
67132        return handleFieldError(error, returnType, exeContext);
67133      });
67134    }
67135
67136    return completed;
67137  } catch (rawError) {
67138    var error = Object(locatedError["a" /* locatedError */])(rawError, fieldNodes, Object(Path["b" /* pathToArray */])(path));
67139    return handleFieldError(error, returnType, exeContext);
67140  }
67141}
67142/**
67143 * @internal
67144 */
67145
67146
67147function buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path) {
67148  // The resolve function's optional fourth argument is a collection of
67149  // information about the current execution state.
67150  return {
67151    fieldName: fieldDef.name,
67152    fieldNodes: fieldNodes,
67153    returnType: fieldDef.type,
67154    parentType: parentType,
67155    path: path,
67156    schema: exeContext.schema,
67157    fragments: exeContext.fragments,
67158    rootValue: exeContext.rootValue,
67159    operation: exeContext.operation,
67160    variableValues: exeContext.variableValues
67161  };
67162}
67163
67164function handleFieldError(error, returnType, exeContext) {
67165  // If the field type is non-nullable, then it is resolved without any
67166  // protection from errors, however it still properly locates the error.
67167  if (Object(type_definition["L" /* isNonNullType */])(returnType)) {
67168    throw error;
67169  } // Otherwise, error protection is applied, logging the error and resolving
67170  // a null value for this field if one is encountered.
67171
67172
67173  exeContext.errors.push(error);
67174  return null;
67175}
67176/**
67177 * Implements the instructions for completeValue as defined in the
67178 * "Field entries" section of the spec.
67179 *
67180 * If the field type is Non-Null, then this recursively completes the value
67181 * for the inner type. It throws a field error if that completion returns null,
67182 * as per the "Nullability" section of the spec.
67183 *
67184 * If the field type is a List, then this recursively completes the value
67185 * for the inner type on each item in the list.
67186 *
67187 * If the field type is a Scalar or Enum, ensures the completed value is a legal
67188 * value of the type by calling the `serialize` method of GraphQL type
67189 * definition.
67190 *
67191 * If the field is an abstract type, determine the runtime type of the value
67192 * and then complete based on that type
67193 *
67194 * Otherwise, the field type expects a sub-selection set, and will complete the
67195 * value by evaluating all sub-selections.
67196 */
67197
67198
67199function completeValue(exeContext, returnType, fieldNodes, info, path, result) {
67200  // If result is an Error, throw a located error.
67201  if (result instanceof Error) {
67202    throw result;
67203  } // If field type is NonNull, complete for inner type, and throw field error
67204  // if result is null.
67205
67206
67207  if (Object(type_definition["L" /* isNonNullType */])(returnType)) {
67208    var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);
67209
67210    if (completed === null) {
67211      throw new Error("Cannot return null for non-nullable field ".concat(info.parentType.name, ".").concat(info.fieldName, "."));
67212    }
67213
67214    return completed;
67215  } // If result value is null or undefined then return null.
67216
67217
67218  if (result == null) {
67219    return null;
67220  } // If field type is List, complete each item in the list with the inner type
67221
67222
67223  if (Object(type_definition["J" /* isListType */])(returnType)) {
67224    return completeListValue(exeContext, returnType, fieldNodes, info, path, result);
67225  } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,
67226  // returning null if serialization is not possible.
67227
67228
67229  if (Object(type_definition["I" /* isLeafType */])(returnType)) {
67230    return completeLeafValue(returnType, result);
67231  } // If field type is an abstract type, Interface or Union, determine the
67232  // runtime Object type and complete for that type.
67233
67234
67235  if (Object(type_definition["C" /* isAbstractType */])(returnType)) {
67236    return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);
67237  } // If field type is Object, execute and complete all sub-selections.
67238  // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')
67239
67240
67241  if (Object(type_definition["N" /* isObjectType */])(returnType)) {
67242    return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);
67243  } // istanbul ignore next (Not reachable. All possible output types have been considered)
67244
67245
67246   false || Object(invariant["a" /* default */])(0, 'Cannot complete value of unexpected output type: ' + Object(inspect["a" /* default */])(returnType));
67247}
67248/**
67249 * Complete a list value by completing each item in the list with the
67250 * inner type
67251 */
67252
67253
67254function completeListValue(exeContext, returnType, fieldNodes, info, path, result) {
67255  // This is specified as a simple map, however we're optimizing the path
67256  // where the list contains no Promises by avoiding creating another Promise.
67257  var itemType = returnType.ofType;
67258  var containsPromise = false;
67259  var completedResults = Object(safeArrayFrom["a" /* default */])(result, function (item, index) {
67260    // No need to modify the info object containing the path,
67261    // since from here on it is not ever accessed by resolver functions.
67262    var itemPath = Object(Path["a" /* addPath */])(path, index, undefined);
67263
67264    try {
67265      var completedItem;
67266
67267      if (Object(isPromise["a" /* default */])(item)) {
67268        completedItem = item.then(function (resolved) {
67269          return completeValue(exeContext, itemType, fieldNodes, info, itemPath, resolved);
67270        });
67271      } else {
67272        completedItem = completeValue(exeContext, itemType, fieldNodes, info, itemPath, item);
67273      }
67274
67275      if (Object(isPromise["a" /* default */])(completedItem)) {
67276        containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect "thenable"
67277        // to take a second callback for the error case.
67278
67279        return completedItem.then(undefined, function (rawError) {
67280          var error = Object(locatedError["a" /* locatedError */])(rawError, fieldNodes, Object(Path["b" /* pathToArray */])(itemPath));
67281          return handleFieldError(error, itemType, exeContext);
67282        });
67283      }
67284
67285      return completedItem;
67286    } catch (rawError) {
67287      var error = Object(locatedError["a" /* locatedError */])(rawError, fieldNodes, Object(Path["b" /* pathToArray */])(itemPath));
67288      return handleFieldError(error, itemType, exeContext);
67289    }
67290  });
67291
67292  if (completedResults == null) {
67293    throw new GraphQLError["a" /* GraphQLError */]("Expected Iterable, but did not find one for field \"".concat(info.parentType.name, ".").concat(info.fieldName, "\"."));
67294  }
67295
67296  return containsPromise ? Promise.all(completedResults) : completedResults;
67297}
67298/**
67299 * Complete a Scalar or Enum by serializing to a valid value, returning
67300 * null if serialization is not possible.
67301 */
67302
67303
67304function completeLeafValue(returnType, result) {
67305  var serializedResult = returnType.serialize(result);
67306
67307  if (serializedResult === undefined) {
67308    throw new Error("Expected a value of type \"".concat(Object(inspect["a" /* default */])(returnType), "\" but ") + "received: ".concat(Object(inspect["a" /* default */])(result)));
67309  }
67310
67311  return serializedResult;
67312}
67313/**
67314 * Complete a value of an abstract type by determining the runtime object type
67315 * of that value, then complete the value for that type.
67316 */
67317
67318
67319function completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {
67320  var _returnType$resolveTy;
67321
67322  var resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver;
67323  var contextValue = exeContext.contextValue;
67324  var runtimeType = resolveTypeFn(result, contextValue, info, returnType);
67325
67326  if (Object(isPromise["a" /* default */])(runtimeType)) {
67327    return runtimeType.then(function (resolvedRuntimeType) {
67328      return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);
67329    });
67330  }
67331
67332  return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);
67333}
67334
67335function ensureValidRuntimeType(runtimeTypeOrName, exeContext, returnType, fieldNodes, info, result) {
67336  if (runtimeTypeOrName == null) {
67337    throw new GraphQLError["a" /* GraphQLError */]("Abstract type \"".concat(returnType.name, "\" must resolve to an Object type at runtime for field \"").concat(info.parentType.name, ".").concat(info.fieldName, "\". Either the \"").concat(returnType.name, "\" type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function."), fieldNodes);
67338  } // FIXME: temporary workaround until support for passing object types would be removed in v16.0.0
67339
67340
67341  var runtimeTypeName = Object(type_definition["K" /* isNamedType */])(runtimeTypeOrName) ? runtimeTypeOrName.name : runtimeTypeOrName;
67342
67343  if (typeof runtimeTypeName !== 'string') {
67344    throw new GraphQLError["a" /* GraphQLError */]("Abstract type \"".concat(returnType.name, "\" must resolve to an Object type at runtime for field \"").concat(info.parentType.name, ".").concat(info.fieldName, "\" with ") + "value ".concat(Object(inspect["a" /* default */])(result), ", received \"").concat(Object(inspect["a" /* default */])(runtimeTypeOrName), "\"."));
67345  }
67346
67347  var runtimeType = exeContext.schema.getType(runtimeTypeName);
67348
67349  if (runtimeType == null) {
67350    throw new GraphQLError["a" /* GraphQLError */]("Abstract type \"".concat(returnType.name, "\" was resolve to a type \"").concat(runtimeTypeName, "\" that does not exist inside schema."), fieldNodes
67350);
67351  }
67352
67353  if (!Object(type_definition["N" /* isObjectType */])(runtimeType)) {
67354    throw new GraphQLError["a" /* GraphQLError */]("Abstract type \"".concat(returnType.name, "\" was resolve to a non-object type \"").concat(runtimeTypeName, "\"."), fieldNodes);
67355  }
67356
67357  if (!exeContext.schema.isSubType(returnType, runtimeType)) {
67358    throw new GraphQLError["a" /* GraphQLError */]("Runtime Object type \"".concat(runtimeType.name, "\" is not a possible type for \"").concat(returnType.name, "\"."), fieldNodes);
67359  }
67360
67361  return runtimeType;
67362}
67363/**
67364 * Complete an Object value by executing all sub-selections.
67365 */
67366
67367
67368function completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {
67369  // If there is an isTypeOf predicate function, call it with the
67370  // current result. If isTypeOf returns false, then raise an error rather
67371  // than continuing execution.
67372  if (returnType.isTypeOf) {
67373    var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);
67374
67375    if (Object(isPromise["a" /* default */])(isTypeOf)) {
67376      return isTypeOf.then(function (resolvedIsTypeOf) {
67377        if (!resolvedIsTypeOf) {
67378          throw invalidReturnTypeError(returnType, result, fieldNodes);
67379        }
67380
67381        return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);
67382      });
67383    }
67384
67385    if (!isTypeOf) {
67386      throw invalidReturnTypeError(returnType, result, fieldNodes);
67387    }
67388  }
67389
67390  return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);
67391}
67392
67393function invalidReturnTypeError(returnType, result, fieldNodes) {
67394  return new GraphQLError["a" /* GraphQLError */]("Expected value of type \"".concat(returnType.name, "\" but got: ").concat(Object(inspect["a" /* default */])(result), "."), fieldNodes);
67395}
67396
67397function collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result) {
67398  // Collect sub-fields to execute to complete this value.
67399  var subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes);
67400  return executeFields(exeContext, returnType, result, path, subFieldNodes);
67401}
67402/**
67403 * A memoized collection of relevant subfields with regard to the return
67404 * type. Memoizing ensures the subfields are not repeatedly calculated, which
67405 * saves overhead when resolving lists of values.
67406 */
67407
67408
67409var collectSubfields = memoize3(_collectSubfields);
67410
67411function _collectSubfields(exeContext, returnType, fieldNodes) {
67412  var subFieldNodes = Object.create(null);
67413  var visitedFragmentNames = Object.create(null);
67414
67415  for (var _i8 = 0; _i8 < fieldNodes.length; _i8++) {
67416    var node = fieldNodes[_i8];
67417
67418    if (node.selectionSet) {
67419      subFieldNodes = collectFields(exeContext, returnType, node.selectionSet, subFieldNodes, visitedFragmentNames);
67420    }
67421  }
67422
67423  return subFieldNodes;
67424}
67425/**
67426 * If a resolveType function is not given, then a default resolve behavior is
67427 * used which attempts two strategies:
67428 *
67429 * First, See if the provided value has a `__typename` field defined, if so, use
67430 * that value as name of the resolved type.
67431 *
67432 * Otherwise, test each possible type for the abstract type by calling
67433 * isTypeOf for the object being coerced, returning the first type that matches.
67434 */
67435
67436
67437var execute_defaultTypeResolver = function defaultTypeResolver(value, contextValue, info, abstractType) {
67438  // First, look for `__typename`.
67439  if (Object(isObjectLike["a" /* default */])(value) && typeof value.__typename === 'string') {
67440    return value.__typename;
67441  } // Otherwise, test each possible type.
67442
67443
67444  var possibleTypes = info.schema.getPossibleTypes(abstractType);
67445  var promisedIsTypeOfResults = [];
67446
67447  for (var i = 0; i < possibleTypes.length; i++) {
67448    var type = possibleTypes[i];
67449
67450    if (type.isTypeOf) {
67451      var isTypeOfResult = type.isTypeOf(value, contextValue, info);
67452
67453      if (Object(isPromise["a" /* default */])(isTypeOfResult)) {
67454        promisedIsTypeOfResults[i] = isTypeOfResult;
67455      } else if (isTypeOfResult) {
67456        return type.name;
67457      }
67458    }
67459  }
67460
67461  if (promisedIsTypeOfResults.length) {
67462    return Promise.all(promisedIsTypeOfResults).then(function (isTypeOfResults) {
67463      for (var _i9 = 0; _i9 < isTypeOfResults.length; _i9++) {
67464        if (isTypeOfResults[_i9]) {
67465          return possibleTypes[_i9].name;
67466        }
67467      }
67468    });
67469  }
67470};
67471/**
67472 * If a resolve function is not given, then a default resolve behavior is used
67473 * which takes the property of the source object of the same name as the field
67474 * and returns it as the result, or if it's a function, returns the result
67475 * of calling that function while passing along args and context value.
67476 */
67477
67478var execute_defaultFieldResolver = function defaultFieldResolver(source, args, contextValue, info) {
67479  // ensure source is a value for which property access is acceptable.
67480  if (Object(isObjectLike["a" /* default */])(source) || typeof source === 'function') {
67481    var property = source[info.fieldName];
67482
67483    if (typeof property === 'function') {
67484      return source[info.fieldName](args, contextValue, info);
67485    }
67486
67487    return property;
67488  }
67489};
67490/**
67491 * This method looks up the field on the given type definition.
67492 * It has special casing for the three introspection fields,
67493 * __schema, __type and __typename. __typename is special because
67494 * it can always be queried as a field, even in situations where no
67495 * other fields are allowed, like on a Union. __schema and __type
67496 * could get automatically added to the query type, but that would
67497 * require mutating type definitions, which would cause issues.
67498 *
67499 * @internal
67500 */
67501
67502function getFieldDef(schema, parentType, fieldName) {
67503  if (fieldName === introspection["a" /* SchemaMetaFieldDef */].name && schema.getQueryType() === parentType) {
67504    return introspection["a" /* SchemaMetaFieldDef */];
67505  } else if (fieldName === introspection["c" /* TypeMetaFieldDef */].name && schema.getQueryType() === parentType) {
67506    return introspection["c" /* TypeMetaFieldDef */];
67507  } else if (fieldName === introspection["d" /* TypeNameMetaFieldDef */].name) {
67508    return introspection["d" /* TypeNameMetaFieldDef */];
67509  }
67510
67511  return parentType.getFields()[fieldName];
67512}
67513
67514
67515/***/ }),
67516
67517/***/ "yVdY":
67518/***/ (function(module, exports, __webpack_require__) {
67519
67520"use strict";
67521
67522
67523var GetIntrinsic = __webpack_require__("AM7I");
67524
67525var $Math = GetIntrinsic('%Math%');
67526var $Number = GetIntrinsic('%Number%');
67527
67528module.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1;
67529
67530
67531/***/ }),
67532
67533/***/ "yXPU":
67534/***/ (function(module, exports) {
67535
67536function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
67537  try {
67538    var info = gen[key](arg);
67539    var value = info.value;
67540  } catch (error) {
67541    reject(error);
67542    return;
67543  }
67544
67545  if (info.done) {
67546    resolve(value);
67547  } else {
67548    Promise.resolve(value).then(_next, _throw);
67549  }
67550}
67551
67552function _asyncToGenerator(fn) {
67553  return function () {
67554    var self = this,
67555        args = arguments;
67556    return new Promise(function (resolve, reject) {
67557      var gen = fn.apply(self, args);
67558
67559      function _next(value) {
67560        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
67561      }
67562
67563      function _throw(err) {
67564        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
67565      }
67566
67567      _next(undefined);
67568    });
67569  };
67570}
67571
67572module.exports = _asyncToGenerator;
67573
67574/***/ }),
67575
67576/***/ "yfaO":
67577/***/ (function(module, exports, __webpack_require__) {
67578
67579"use strict";
67580
67581
67582var has = __webpack_require__("oNNP");
67583
67584var assertRecord = __webpack_require__("DELC");
67585
67586var Type = __webpack_require__("zOLO");
67587
67588// https://ecma-international.org/ecma-262/6.0/#sec-isaccessordescriptor
67589
67590module.exports = function IsAccessorDescriptor(Desc) {
67591	if (typeof Desc === 'undefined') {
67592		return false;
67593	}
67594
67595	assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
67596
67597	if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {
67598		return false;
67599	}
67600
67601	return true;
67602};
67603
67604
67605/***/ }),
67606
67607/***/ "z/Nw":
67608/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
67609
67610"use strict";
67611/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isPromise; });
67612/**
67613 * Returns true if the value acts like a Promise, i.e. has a "then" function,
67614 * otherwise returns false.
67615 */
67616// eslint-disable-next-line no-redeclare
67617function isPromise(value) {
67618  return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function';
67619}
67620
67621
67622/***/ }),
67623
67624/***/ "zOLO":
67625/***/ (function(module, exports, __webpack_require__) {
67626
67627"use strict";
67628
67629
67630var ES5Type = __webpack_require__("8JD9");
67631
67632// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values
67633
67634module.exports = function Type(x) {
67635	if (typeof x === 'symbol') {
67636		return 'Symbol';
67637	}
67638	if (typeof x === 'bigint') {
67639		return 'BigInt';
67640	}
67641	return ES5Type(x);
67642};
67643
67644
67645/***/ }),
67646
67647/***/ "zeTQ":
67648/***/ (function(module, exports, __webpack_require__) {
67649
67650"use strict";
67651
67652
67653// Gets all non-builtin properties up the prototype chain
67654const getAllProperties = object => {
67655	const properties = new Set();
67656
67657	do {
67658		for (const key of Reflect.ownKeys(object)) {
67659			properties.add([object, key]);
67660		}
67661	} while ((object = Reflect.getPrototypeOf(object)) && object !== Object.prototype);
67662
67663	return properties;
67664};
67665
67666module.exports = (self, {include, exclude} = {}) => {
67667	const filter = key => {
67668		const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);
67669
67670		if (include) {
67671			return include.some(match);
67672		}
67673
67674		if (exclude) {
67675			return !exclude.some(match);
67676		}
67677
67678		return true;
67679	};
67680
67681	for (const [object, key] of getAllProperties(self.constructor.prototype)) {
67682		if (key === 'constructor' || !filter(key)) {
67683			continue;
67684		}
67685
67686		const descriptor = Reflect.getOwnPropertyDescriptor(object, key);
67687		if (descriptor && typeof descriptor.value === 'function') {
67688			self[key] = self[key].bind(self);
67689		}
67690	}
67691
67692	return self;
67693};
67694
67695
67696/***/ }),
67697
67698/***/ "zkip":
67699/***/ (function(module, exports, __webpack_require__) {
67700
67701"use strict";
67702
67703
67704var GetIntrinsic = __webpack_require__("AM7I");
67705
67706var $TypeError = GetIntrinsic('%TypeError%');
67707
67708var isPropertyDescriptor = __webpack_require__("uam5");
67709var DefineOwnProperty = __webpack_require__("KPrL");
67710
67711var FromPropertyDescriptor = __webpack_require__("hYbJ");
67712var IsAccessorDescriptor = __webpack_require__("yfaO");
67713var IsDataDescriptor = __webpack_require__("ayMG");
67714var IsPropertyKey = __webpack_require__("ml7t");
67715var SameValue = __webpack_require__("tS0h");
67716var ToPropertyDescriptor = __webpack_require__("FiDd");
67717var Type = __webpack_require__("zOLO");
67718
67719// https://ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow
67720
67721module.exports = function DefinePropertyOrThrow(O, P, desc) {
67722	if (Type(O) !== 'Object') {
vendor: 4,509 bytes, lines 67723-67851
67723		throw new $TypeError('Assertion failed: Type(O) is not Object');
67724	}
67725
67726	if (!IsPropertyKey(P)) {
67727		throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
67728	}
67729
67730	var Desc = isPropertyDescriptor({
67731		Type: Type,
67732		IsDataDescriptor: IsDataDescriptor,
67733		IsAccessorDescriptor: IsAccessorDescriptor
67734	}, desc) ? desc : ToPropertyDescriptor(desc);
67735	if (!isPropertyDescriptor({
67736		Type: Type,
67737		IsDataDescriptor: IsDataDescriptor,
67738		IsAccessorDescriptor: IsAccessorDescriptor
67739	}, Desc)) {
67740		throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
67741	}
67742
67743	return DefineOwnProperty(
67744		IsDataDescriptor,
67745		SameValue,
67746		FromPropertyDescriptor,
67747		O,
67748		P,
67749		Desc
67750	);
67751};
67752
67753
67754/***/ }),
67755
67756/***/ "zpYP":
67757/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
67758
67759"use strict";
67760/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isObjectLike; });
67761function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
67762
67763/**
67764 * Return true if `value` is object-like. A value is object-like if it's not
67765 * `null` and has a `typeof` result of "object".
67766 */
67767function isObjectLike(value) {
67768  return _typeof(value) == 'object' && value !== null;
67769}
67770
67771
67772/***/ }),
67773
67774/***/ "zsKT":
67775/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
67776
67777"use strict";
67778/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return printLocation; });
67779/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return printSourceLocation; });
67780/* harmony import */ var _location_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("y4cC");
67781
67782/**
67783 * Render a helpful description of the location in the GraphQL Source document.
67784 */
67785
67786function printLocation(location) {
67787  return printSourceLocation(location.source, Object(_location_mjs__WEBPACK_IMPORTED_MODULE_0__[/* getLocation */ "a"])(location.source, location.start));
67788}
67789/**
67790 * Render a helpful description of the location in the GraphQL Source document.
67791 */
67792
67793function printSourceLocation(source, sourceLocation) {
67794  var firstLineColumnOffset = source.locationOffset.column - 1;
67795  var body = whitespace(firstLineColumnOffset) + source.body;
67796  var lineIndex = sourceLocation.line - 1;
67797  var lineOffset = source.locationOffset.line - 1;
67798  var lineNum = sourceLocation.line + lineOffset;
67799  var columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;
67800  var columnNum = sourceLocation.column + columnOffset;
67801  var locationStr = "".concat(source.name, ":").concat(lineNum, ":").concat(columnNum, "\n");
67802  var lines = body.split(/\r\n|[\n\r]/g);
67803  var locationLine = lines[lineIndex]; // Special case for minified documents
67804
67805  if (locationLine.length > 120) {
67806    var subLineIndex = Math.floor(columnNum / 80);
67807    var subLineColumnNum = columnNum % 80;
67808    var subLines = [];
67809
67810    for (var i = 0; i < locationLine.length; i += 80) {
67811      subLines.push(locationLine.slice(i, i + 80));
67812    }
67813
67814    return locationStr + printPrefixedLines([["".concat(lineNum), subLines[0]]].concat(subLines.slice(1, subLineIndex + 1).map(function (subLine) {
67815      return ['', subLine];
67816    }), [[' ', whitespace(subLineColumnNum - 1) + '^'], ['', subLines[subLineIndex + 1]]]));
67817  }
67818
67819  return locationStr + printPrefixedLines([// Lines specified like this: ["prefix", "string"],
67820  ["".concat(lineNum - 1), lines[lineIndex - 1]], ["".concat(lineNum), locationLine], ['', whitespace(columnNum - 1) + '^'], ["".concat(lineNum + 1), lines[lineIndex + 1]]]);
67821}
67822
67823function printPrefixedLines(lines) {
67824  var existingLines = lines.filter(function (_ref) {
67825    var _ = _ref[0],
67826        line = _ref[1];
67827    return line !== undefined;
67828  });
67829  var padLen = Math.max.apply(Math, existingLines.map(function (_ref2) {
67830    var prefix = _ref2[0];
67831    return prefix.length;
67832  }));
67833  return existingLines.map(function (_ref3) {
67834    var prefix = _ref3[0],
67835        line = _ref3[1];
67836    return leftPad(padLen, prefix) + (line ? ' | ' + line : ' |');
67837  }).join('\n');
67838}
67839
67840function whitespace(len) {
67841  return Array(len + 1).join(' ');
67842}
67843
67844function leftPad(len, str) {
67845  return whitespace(len - str.length) + str;
67846}
67847
67848
67849/***/ })
67850
67851/******/ });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.