eventman/static/js/api-check.min.js

4 lines
15 KiB
JavaScript
Raw Normal View History

2016-06-18 20:01:17 +02:00
// apiCheck.js v7.2.4 built with ♥ by Kent C. Dodds (ó ì_í)=óò=(ì_í ò)
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):"object"==typeof exports?exports.apiCheck=r():e.apiCheck=r()}(this,function(){return function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var t={};return r.m=e,r.c=t,r.p="",r(0)}([function(e,r,t){"use strict";e.exports=t(3)},function(e){function r(e,r){var n=[],o=[];return r=r||function(e,r){return"[Circular "+t(r,n,o)+"]"},function(t,i){var a=i;return"object"==typeof i&&i&&(-1!==n.indexOf(i)?a=r(t,i):(n.push(i),o.push(t))),e&&(a=e(t,a)),a}}function t(e,r,t){var n=r.indexOf(e),o=[t[n]];for(n--;n>=0;n--)r[n][o[0]]===e&&(e=r[n],o.unshift(t[n]));return"~"+o.join(".")}function n(e,t,n,o){return JSON.stringify(e,r(t,o),n)}e.exports=n,n.getSerialize=r},function(e,r,t){"use strict";function n(e){var r=o(e),t=void 0;if("array"===r)t=[];else{if("object"!==r)return e;t={}}return p(e,function(e,r){t[r]=e}),t}function o(e){return Array.isArray(e)?"array":e instanceof RegExp?"object":typeof e}function i(e,r){var t=void 0,n=r&&r["short"];return t=n&&e.shortType?e.shortType:!n&&"object"==typeof e.type||"function"===e.type?a(e,r):a(e,r)||e.displayName||e.name}function a(e,r){var t=e.type;if("function"==typeof t){var n=t.__apiCheckData,o=t(r);t=_({__apiCheckData:n},n.type,o)}return t}function u(e){return e?Array.isArray(e)?e:[e]:[]}function p(e){return Array.isArray(e)?c.apply(void 0,arguments):f.apply(void 0,arguments)}function f(e,r,t){var n,o=Object.prototype.hasOwnProperty;for(var i in e)if(o.call(e,i)&&(n=r.call(t,e[i],i,e),n===!1))return n;return!0}function c(e,r,t){for(var n,o=e.length,i=0;o>i;i++)if(n=r.call(t,e[i],i,e),n===!1)return n;return!0}function s(e){return e instanceof Error}function l(e,r,t){e=u(e);var n=e.slice(),o=n.pop();return 1===n.length&&(r=" "),n.join(r)+(""+(n.length?r+t:"")+o)}function y(e,r,t){"function"==typeof t&&(t=t({"short":!0}));var n="object"!=typeof t?t:A(t);return new Error(""+h(e,r)+" must be "+d(n))}function h(e,r){var t=d(e||"value"),n=r?" at "+d(r):"";return""+t+n}function d(e){return"`"+e+"`"}function v(e){return"undefined"==typeof e}function g(e,r,t){return t&&(e=x(),e.isNoop=!0),"string"==typeof e.type&&(e.shortType=e.type),p(r,function(r,t){return e[t]=r}),e.displayName||(e.displayName="apiCheck "+d(e.shortType||e.type||e.name)+" type checker"),e.notRequired||(e=b(e,t)),e.notNullable||O(e,t),e.notOptional||m(e,t),e}function b(e,r){var t=r?x():function(r,t,n,o){if(v(r)&&!e.isOptional){var a=n?" in "+d(n):"",u=i(e,{"short":!0}),p="object"!=typeof u?u:A(u);return new Error("Required "+d(t)+" not specified"+a+". Must be "+d(p))}return e(r,t,n,o)};return C(e,t),t.originalChecker=e,t}function m(e,r){var t=r?x():function(r,t,n,o){return v(r)?void 0:e(r,t,n,o)};C(e,t),t.isOptional=!0,t.displayName=e.displayName+" (optional)",t.originalChecker=e,e.optional=t,k(e,e.optional)}function O(e,r){var t=r?x():function(r,t,n,o){return null!==r?e(r,t,n,o):void 0};C(e,t),t.isNullable=!0,t.displayName=e.displayName+" (nullable)",t.originalChecker=e,e.nullable=t,k(e,e.nullable),e.notOptional||m(e.nullable,r)}function k(e,r){if("object"==typeof r.type)r.type=n(r.type);else{if("function"!=typeof r.type)return void(r.type+=" (optional)");r.type=function(){return e.type.apply(e,arguments)}}r.type.__apiCheckData=n(e.type.__apiCheckData)||{},r.type.__apiCheckData.optional=!0}function C(e,r){p(Object.keys(e),function(t){return r[t]=e[t]})}function j(){}function x(){return function(){}}var _=function(e,r,t){return Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0})},A=t(1),w={addOptional:m,getRequiredVersion:b,setupChecker:g,addNullable:O};e.exports={each:p,copy:n,typeOf:o,arrayify:u,getCheckerDisplay:i,isError:s,list:l,getError:y,nAtL:h,t:d,undef:v,checkerHelpers:w,noop:j}},function(e,r,t){"use strict";function n(){function r(n,i,a){if(r.config.disabled||e.exports.globalConfig.disabled)return{apiTypes:{},argTypes:{},passed:!0,message:"",failed:!1};t(arguments),A
//# sourceMappingURL=api-check.min.js.map