a1eedbb1a2f035e87ed44af688f5ed37.json 3.15 KB
{"ast":null,"code":"var validateFormat=function validateFormat(){};if(process.env!=='production'){validateFormat=function validateFormat(format){if(format===undefined){throw new Error('invariant requires an error message argument');}};}function invariant(condition,format,a,b,c,d,e,f){validateFormat(format);if(!condition){var error;if(format===undefined){error=new Error('Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.');}else{var args=[a,b,c,d,e,f];var argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++];}));error.name='Invariant Violation';}error.framesToPop=1;throw error;}}module.exports=invariant;","map":{"version":3,"sources":["invariant.js"],"names":["validateFormat","process","format","error","args","argIndex","module"],"mappings":"AAaA,GAAIA,CAAAA,cAAc,CAAG,QAAA,CAAA,cAAA,EAAW,CAAhC,CAAA,CAEA,GAAIC,OAAO,CAAPA,GAAAA,GAAJ,YAAA,CAAkC,CAChCD,cAAc,CAAG,QAAA,CAAA,cAAA,CAAA,MAAA,CAAiB,CAChC,GAAIE,MAAM,GAAV,SAAA,CAA0B,CACxB,KAAM,IAAA,CAAA,KAAA,CAAN,8CAAM,CAAN,CAEH,CAJDF,CAAAA,CAOF,SAAA,CAAA,SAAA,CAAA,SAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwD,CACtDA,cAAc,CAAdA,MAAc,CAAdA,CAEA,GAAI,CAAJ,SAAA,CAAgB,CACd,GAAA,CAAA,KAAA,CACA,GAAIE,MAAM,GAAV,SAAA,CAA0B,CACxBC,KAAK,CAAG,GAAA,CAAA,KAAA,CAARA,+HAAQ,CAARA,CADF,CAAA,IAIO,CACL,GAAIC,CAAAA,IAAI,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAX,CAAW,CAAX,CACA,GAAIC,CAAAA,QAAQ,CAAZ,CAAA,CACAF,KAAK,CAAG,GAAA,CAAA,KAAA,CACND,MAAM,CAANA,OAAAA,CAAAA,KAAAA,CAAsB,UAAW,CAC/B,MAAOE,CAAAA,IAAI,CAACC,QAAZ,EAAW,CAAX,CAFJF,CACED,CADM,CAARC,CAKAA,KAAK,CAALA,IAAAA,CAAAA,qBAAAA,CAGFA,CAAAA,KAAK,CAALA,WAAAA,CAAAA,CAAAA,CACA,KAAA,CAAA,KAAA,CAEH,CAEDG,CAAAA,MAAM,CAANA,OAAAA,CAAAA,SAAAA","sourcesContent":["/* eslint-disable import/no-commonjs */\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function() {};\n\nif (process.env !== 'production') {\n  validateFormat = function(format) {\n    if (format === undefined) {\n      throw new Error('invariant requires an error message argument');\n    }\n  };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n  validateFormat(format);\n\n  if (!condition) {\n    var error;\n    if (format === undefined) {\n      error = new Error(\n        'Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.'\n      );\n    } else {\n      var args = [a, b, c, d, e, f];\n      var argIndex = 0;\n      error = new Error(\n        format.replace(/%s/g, function() {\n          return args[argIndex++];\n        })\n      );\n      error.name = 'Invariant Violation';\n    }\n\n    error.framesToPop = 1; // we don't care about invariant's own frame\n    throw error;\n  }\n}\n\nmodule.exports = invariant;\n"]},"metadata":{},"sourceType":"script"}