1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, '__esModule', { value: true });
|
4 |
|
5 | var tsInvariant = require('ts-invariant');
|
6 | var process$1 = require('ts-invariant/process');
|
7 | var graphql = require('graphql');
|
8 |
|
9 | function maybe(thunk) {
|
10 | try {
|
11 | return thunk();
|
12 | }
|
13 | catch (_a) { }
|
14 | }
|
15 |
|
16 | var global$1 = (maybe(function () { return globalThis; }) ||
|
17 | maybe(function () { return window; }) ||
|
18 | maybe(function () { return self; }) ||
|
19 | maybe(function () { return global; }) ||
|
20 | maybe(function () { return maybe.constructor("return this")(); }));
|
21 |
|
22 | var __ = "__";
|
23 | var GLOBAL_KEY = [__, __].join("DEV");
|
24 | function getDEV() {
|
25 | try {
|
26 | return Boolean(__DEV__);
|
27 | }
|
28 | catch (_a) {
|
29 | Object.defineProperty(global$1, GLOBAL_KEY, {
|
30 | value: maybe(function () { return process.env.NODE_ENV; }) !== "production",
|
31 | enumerable: false,
|
32 | configurable: true,
|
33 | writable: true,
|
34 | });
|
35 | return global$1[GLOBAL_KEY];
|
36 | }
|
37 | }
|
38 | var DEV = getDEV();
|
39 |
|
40 | function removeTemporaryGlobals() {
|
41 | return typeof graphql.Source === "function" ? process$1.remove() : process$1.remove();
|
42 | }
|
43 |
|
44 | function checkDEV() {
|
45 | __DEV__ ? tsInvariant.invariant("boolean" === typeof DEV, DEV) : tsInvariant.invariant("boolean" === typeof DEV, 38);
|
46 | }
|
47 | removeTemporaryGlobals();
|
48 | checkDEV();
|
49 |
|
50 | exports.InvariantError = tsInvariant.InvariantError;
|
51 | exports.invariant = tsInvariant.invariant;
|
52 | exports.DEV = DEV;
|
53 | exports.checkDEV = checkDEV;
|
54 | exports.global = global$1;
|
55 | exports.maybe = maybe;
|
56 |
|