{"version":3,"file":"ts-invariant-DDtGCmHW.js","sources":["../../node_modules/ts-invariant/lib/invariant.js"],"sourcesContent":["import { __extends } from \"tslib\";\nvar genericMessage = \"Invariant Violation\";\nvar _a = Object.setPrototypeOf, setPrototypeOf = _a === void 0 ? function (obj, proto) {\n obj.__proto__ = proto;\n return obj;\n} : _a;\nvar InvariantError = /** @class */ (function (_super) {\n __extends(InvariantError, _super);\n function InvariantError(message) {\n if (message === void 0) { message = genericMessage; }\n var _this = _super.call(this, typeof message === \"number\"\n ? genericMessage + \": \" + message + \" (see https://github.com/apollographql/invariant-packages)\"\n : message) || this;\n _this.framesToPop = 1;\n _this.name = genericMessage;\n setPrototypeOf(_this, InvariantError.prototype);\n return _this;\n }\n return InvariantError;\n}(Error));\nexport { InvariantError };\nexport function invariant(condition, message) {\n if (!condition) {\n throw new InvariantError(message);\n }\n}\nvar verbosityLevels = [\"debug\", \"log\", \"warn\", \"error\", \"silent\"];\nvar verbosityLevel = verbosityLevels.indexOf(\"log\");\nfunction wrapConsoleMethod(name) {\n return function () {\n if (verbosityLevels.indexOf(name) >= verbosityLevel) {\n // Default to console.log if this host environment happens not to provide\n // all the console.* methods we need.\n var method = console[name] || console.log;\n return method.apply(console, arguments);\n }\n };\n}\n(function (invariant) {\n invariant.debug = wrapConsoleMethod(\"debug\");\n invariant.log = wrapConsoleMethod(\"log\");\n invariant.warn = wrapConsoleMethod(\"warn\");\n invariant.error = wrapConsoleMethod(\"error\");\n})(invariant || (invariant = {}));\nexport function setVerbosity(level) {\n var old = verbosityLevels[verbosityLevel];\n verbosityLevel = Math.max(0, verbosityLevels.indexOf(level));\n return old;\n}\nexport default invariant;\n//# sourceMappingURL=invariant.js.map"],"names":["genericMessage","_a","Object","setPrototypeOf","obj","proto","__proto__","InvariantError","_super","message","_this","call","this","framesToPop","name","prototype","__extends","Error","invariant","condition","verbosityLevels","verbosityLevel","indexOf","wrapConsoleMethod","console","log","apply","arguments","debug","warn","error"],"mappings":"wCACA,IAAIA,EAAiB,sBACjBC,EAAKC,OAAOC,eAAgBA,OAAwB,IAAPF,EAAgB,SAAUG,EAAKC,GAErE,OADPD,EAAIE,UAAYD,EACTD,CACX,EAAIH,EACAM,EAAgC,SAAUC,GAE1C,SAASD,EAAeE,QACJ,IAAZA,IAAgCA,EAAAT,GACpC,IAAIU,EAAQF,EAAOG,KAAKC,KAAyB,iBAAZH,EAC/BT,EAAiB,KAAOS,EAAU,6DAClCA,IAAYG,KAIX,OAHPF,EAAMG,YAAc,EACpBH,EAAMI,KAAOd,EACEG,EAAAO,EAAOH,EAAeQ,WAC9BL,CACV,CACMH,OAXPS,EAAUT,EAAgBC,GAWnBD,CACX,CAbI,CAaFU,OAEK,SAASC,EAAUC,EAAWV,GACjC,IAAKU,EACK,MAAA,IAAIZ,EAAeE,EAEjC,CACA,IAYWS,EAZPE,EAAkB,CAAC,QAAS,MAAO,OAAQ,QAAS,UACpDC,EAAiBD,EAAgBE,QAAQ,OAC7C,SAASC,EAAkBT,GACvB,OAAO,WACH,GAAIM,EAAgBE,QAAQR,IAASO,EAI1B,OADMG,QAAQV,IAASU,QAAQC,KACxBC,MAAMF,QAASG,UAEzC,CACA,EACWT,EAKRA,IAAcA,EAAY,CAAA,IAJfU,MAAQL,EAAkB,SACpCL,EAAUO,IAAMF,EAAkB,OAClCL,EAAUW,KAAON,EAAkB,QACnCL,EAAUY,MAAQP,EAAkB","x_google_ignoreList":[0]}