Socket
Socket
Sign inDemoInstall

ow

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ow - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

dist/modifiers.d.ts

167

dist/index.d.ts

@@ -1,17 +0,5 @@

/// <reference types="node" />
import { Predicate } from './lib/predicates/predicate';
import { AnyPredicate } from './lib/predicates/any';
import { BasePredicate } from './lib/predicates/base-predicate';
import { StringPredicate } from './lib/predicates/string';
import { NumberPredicate } from './lib/predicates/number';
import { BooleanPredicate } from './lib/predicates/boolean';
import { ArrayPredicate } from './lib/predicates/array';
import { ObjectPredicate } from './lib/predicates/object';
import { DatePredicate } from './lib/predicates/date';
import { ErrorPredicate } from './lib/predicates/error';
import { MapPredicate } from './lib/predicates/map';
import { WeakMapPredicate } from './lib/predicates/weak-map';
import { SetPredicate } from './lib/predicates/set';
import { WeakSetPredicate } from './lib/predicates/weak-set';
declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
import { Modifiers } from './modifiers';
import { Predicates } from './predicates';
/**

@@ -21,3 +9,3 @@ * @hidden

export declare type Main = <T>(value: T, label: string | Function, predicate: BasePredicate<T>) => void;
export interface Ow {
export interface Ow extends Modifiers, Predicates {
/**

@@ -39,134 +27,2 @@ * Test if the value matches the predicate. Throws an `ArgumentError` if the test fails.

/**
* Test the value to be a string.
*/
readonly string: StringPredicate;
/**
* Test the value to be a number.
*/
readonly number: NumberPredicate;
/**
* Test the value to be a boolean.
*/
readonly boolean: BooleanPredicate;
/**
* Test the value to be undefined.
*/
readonly undefined: Predicate<undefined>;
/**
* Test the value to be null.
*/
readonly null: Predicate<null>;
/**
* Test the value to be null or undefined.
*/
readonly nullOrUndefined: Predicate<null | undefined>;
/**
* Test the value to be not a number.
*/
readonly nan: Predicate<number>;
/**
* Test the value to be a Symbol.
*/
readonly symbol: Predicate<Symbol>;
/**
* Test the value to be an array.
*/
readonly array: ArrayPredicate;
/**
* Test the value to be an object.
*/
readonly object: ObjectPredicate;
/**
* Test the value to be a Date.
*/
readonly date: DatePredicate;
/**
* Test the value to be an Error.
*/
readonly error: ErrorPredicate;
/**
* Test the value to be a Map.
*/
readonly map: MapPredicate;
/**
* Test the value to be a WeakMap.
*/
readonly weakMap: WeakMapPredicate;
/**
* Test the value to be a Set.
*/
readonly set: SetPredicate;
/**
* Test the value to be a WeakSet.
*/
readonly weakSet: WeakSetPredicate;
/**
* Test the value to be a Function.
*/
readonly function: Predicate<Function>;
/**
* Test the value to be a Buffer.
*/
readonly buffer: Predicate<Buffer>;
/**
* Test the value to be a RegExp.
*/
readonly regExp: Predicate<RegExp>;
/**
* Test the value to be a Promise.
*/
readonly promise: Predicate<Promise<any>>;
/**
* Test the value to be a typed array.
*/
readonly typedArray: Predicate<TypedArray>;
/**
* Test the value to be a Int8Array.
*/
readonly int8Array: Predicate<Int8Array>;
/**
* Test the value to be a Uint8Array.
*/
readonly uint8Array: Predicate<Uint8Array>;
/**
* Test the value to be a Uint8ClampedArray.
*/
readonly uint8ClampedArray: Predicate<Uint8ClampedArray>;
/**
* Test the value to be a Int16Array.
*/
readonly int16Array: Predicate<Int16Array>;
/**
* Test the value to be a Uint16Array.
*/
readonly uint16Array: Predicate<Uint16Array>;
/**
* Test the value to be a Int32Array.
*/
readonly int32Array: Predicate<Int32Array>;
/**
* Test the value to be a Uint32Array.
*/
readonly uint32Array: Predicate<Uint32Array>;
/**
* Test the value to be a Float32Array.
*/
readonly float32Array: Predicate<Float32Array>;
/**
* Test the value to be a Float64Array.
*/
readonly float64Array: Predicate<Float64Array>;
/**
* Test the value to be a ArrayBuffer.
*/
readonly arrayBuffer: Predicate<ArrayBuffer>;
/**
* Test the value to be a DataView.
*/
readonly dataView: Predicate<DataView>;
/**
* Test the value to be Iterable.
*/
readonly iterable: Predicate<Iterable<any>>;
/**
* Returns `true` if the value matches the predicate, otherwise returns `false`.

@@ -191,19 +47,6 @@ *

create<T>(label: string, predicate: BasePredicate<T>): (value: T) => void;
/**
* Test that the value matches at least one of the given predicates.
*/
any<T1>(p1: BasePredicate<T1>): AnyPredicate<T1>;
any<T1, T2>(p1: BasePredicate<T1>, p2: BasePredicate<T2>): AnyPredicate<T1 | T2>;
any<T1, T2, T3>(p1: BasePredicate<T1>, p2: BasePredicate<T2>, p3: BasePredicate<T3>): AnyPredicate<T1 | T2 | T3>;
any<T1, T2, T3, T4>(p1: BasePredicate<T1>, p2: BasePredicate<T2>, p3: BasePredicate<T3>, p4: BasePredicate<T4>): AnyPredicate<T1 | T2 | T3 | T4>;
any<T1, T2, T3, T4, T5>(p1: BasePredicate<T1>, p2: BasePredicate<T2>, p3: BasePredicate<T3>, p4: BasePredicate<T4>, p5: BasePredicate<T5>): AnyPredicate<T1 | T2 | T3 | T4 | T5>;
any<T1, T2, T3, T4, T5, T6>(p1: BasePredicate<T1>, p2: BasePredicate<T2>, p3: BasePredicate<T3>, p4: BasePredicate<T4>, p5: BasePredicate<T5>, p6: BasePredicate<T6>): AnyPredicate<T1 | T2 | T3 | T4 | T5 | T6>;
any<T1, T2, T3, T4, T5, T6, T7>(p1: BasePredicate<T1>, p2: BasePredicate<T2>, p3: BasePredicate<T3>, p4: BasePredicate<T4>, p5: BasePredicate<T5>, p6: BasePredicate<T6>, p7: BasePredicate<T7>): AnyPredicate<T1 | T2 | T3 | T4 | T5 | T6 | T7>;
any<T1, T2, T3, T4, T5, T6, T7, T8>(p1: BasePredicate<T1>, p2: BasePredicate<T2>, p3: BasePredicate<T3>, p4: BasePredicate<T4>, p5: BasePredicate<T5>, p6: BasePredicate<T6>, p7: BasePredicate<T7>, p8: BasePredicate<T8>): AnyPredicate<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>;
any<T1, T2, T3, T4, T5, T6, T7, T8, T9>(p1: BasePredicate<T1>, p2: BasePredicate<T2>, p3: BasePredicate<T3>, p4: BasePredicate<T4>, p5: BasePredicate<T5>, p6: BasePredicate<T6>, p7: BasePredicate<T7>, p8: BasePredicate<T8>, p9: BasePredicate<T9>): AnyPredicate<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>;
any<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(p1: BasePredicate<T1>, p2: BasePredicate<T2>, p3: BasePredicate<T3>, p4: BasePredicate<T4>, p5: BasePredicate<T5>, p6: BasePredicate<T6>, p7: BasePredicate<T7>, p8: BasePredicate<T8>, p9: BasePredicate<T9>, p10: BasePredicate<T10>): AnyPredicate<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>;
any(...predicate: BasePredicate[]): AnyPredicate;
}
declare const _default: Ow;
export default _default;
export { BasePredicate, Predicate, AnyPredicate, StringPredicate, NumberPredicate, BooleanPredicate, ArrayPredicate, ObjectPredicate, DatePredicate, ErrorPredicate, MapPredicate, WeakMapPredicate, SetPredicate, WeakSetPredicate };
export { BasePredicate, Predicate };
export { StringPredicate, NumberPredicate, BooleanPredicate, ArrayPredicate, ObjectPredicate, DatePredicate, ErrorPredicate, MapPredicate, WeakMapPredicate, SetPredicate, WeakSetPredicate, AnyPredicate } from './predicates';

@@ -1,2 +0,2 @@

module.exports=function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=r(7),o=r(5),s=r(15);t.validatorSymbol=Symbol("validators");t.Predicate=class{constructor(e,t={validators:[]}){this.type=e,this.context=t;const r=this.type[0].toLowerCase()+this.type.slice(1);this.addValidator({message:(e,t)=>`Expected ${t&&t.substring(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${n.default(e)}\``,validator:e=>n.default[r](e)})}[o.testSymbol](e,t,r){for(const{validator:a,message:n}of this.context.validators){const o=a(e);if(!0===o)continue;let s=r;throw"function"==typeof r&&(s=r()),s=s?`${this.type} \`${s}\``:this.type,new i.ArgumentError(n(e,s,o),t)}}get[t.validatorSymbol](){return this.context.validators}get not(){return s.not(this)}is(e){return this.addValidator({message:(e,t,r)=>r?`(${t}) ${r}`:`Expected ${t} \`${e}\` to pass custom validation function`,validator:t=>e(t)})}addValidator(e){return this.context.validators.push(e),this}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=((e,t,r=5)=>{const a=[];for(const n of t)if(!e.has(n)&&(a.push(n),a.length===r))return a;return 0===a.length||a})},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(8)),i=r(9),o=r(0);t.Predicate=o.Predicate;const s=r(16);t.AnyPredicate=s.AnyPredicate;const u=r(5),d=r(17);t.StringPredicate=d.StringPredicate;const l=r(19);t.NumberPredicate=l.NumberPredicate;const c=r(20);t.BooleanPredicate=c.BooleanPredicate;const f=r(21);t.ArrayPredicate=f.ArrayPredicate;const g=r(23);t.ObjectPredicate=g.ObjectPredicate;const p=r(27);t.DatePredicate=p.DatePredicate;const h=r(28);t.ErrorPredicate=h.ErrorPredicate;const y=r(29);t.MapPredicate=y.MapPredicate;const m=r(30);t.WeakMapPredicate=m.WeakMapPredicate;const v=r(31);t.SetPredicate=v.SetPredicate;const b=r(32);t.WeakSetPredicate=b.WeakSetPredicate;const _=(e,t,r)=>{r[u.testSymbol](e,_,t)},$=(e,t,r)=>{if(!u.isPredicate(t)&&"string"!=typeof t)throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof t}\``);if(u.isPredicate(t)){const r=n.default();_(e,()=>i.inferLabel(r),t)}else _(e,t,r)};Object.defineProperties($,{isValid:{value:(e,t)=>{try{return $(e,t),!0}catch(e){return!1}}},create:{value:(e,t)=>r=>{if(u.isPredicate(e)){const t=n.default();_(r,()=>i.inferLabel(t),e)}else _(r,e,t)}},any:{value:(...e)=>new s.AnyPredicate(e)},string:{get:()=>new d.StringPredicate},number:{get:()=>new l.NumberPredicate},boolean:{get:()=>new c.BooleanPredicate},undefined:{get:()=>new o.Predicate("undefined")},null:{get:()=>new o.Predicate("null")},nullOrUndefined:{get:()=>new o.Predicate("nullOrUndefined")},nan:{get:()=>new o.Predicate("nan")},symbol:{get:()=>new o.Predicate("symbol")},array:{get:()=>new f.ArrayPredicate},object:{get:()=>new g.ObjectPredicate},date:{get:()=>new p.DatePredicate},error:{get:()=>new h.ErrorPredicate},map:{get:()=>new y.MapPredicate},weakMap:{get:()=>new m.WeakMapPredicate},set:{get:()=>new v.SetPredicate},weakSet:{get:()=>new b.WeakSetPredicate},function:{get:()=>new o.Predicate("Function")},buffer:{get:()=>new o.Predicate("Buffer")},regExp:{get:()=>new o.Predicate("RegExp")},promise:{get:()=>new o.Predicate("Promise")},typedArray:{get:()=>new o.Predicate("TypedArray")},int8Array:{get:()=>new o.Predicate("Int8Array")},uint8Array:{get:()=>new o.Predicate("Uint8Array")},uint8ClampedArray:{get:()=>new o.Predicate("Uint8ClampedArray")},int16Array:{get:()=>new o.Predicate("Int16Array")},uint16Array:{get:()=>new o.Predicate("Uint16Array")},int32Array:{get:()=>new o.Predicate("Int32Array")},uint32Array:{get:()=>new o.Predicate("Uint32Array")},float32Array:{get:()=>new o.Predicate("Float32Array")},float64Array:{get:()=>new o.Predicate("Float64Array")},arrayBuffer:{get:()=>new o.Predicate("ArrayBuffer")},dataView:{get:()=>new o.Predicate("DataView")},iterable:{get:()=>new o.Predicate("Iterable")}}),t.default=$},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a="undefined"==typeof URL?r(14).URL:URL,n=Object.prototype.toString,i=e=>t=>typeof t===e,o=e=>!d.nullOrUndefined(e)&&!d.nullOrUndefined(e.constructor)&&d.function_(e.constructor.isBuffer)&&e.constructor.isBuffer(e),s=e=>{const t=n.call(e).slice(8,-1);return t||null},u=e=>t=>s(t)===e;function d(e){switch(e){case null:return"null";case!0:case!1:return"boolean"}switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"symbol":return"symbol"}if(d.function_(e))return"Function";if(d.observable(e))return"Observable";if(Array.isArray(e))return"Array";if(o(e))return"Buffer";const t=s(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}!function(e){const t=e=>"object"==typeof e;e.undefined=i("undefined"),e.string=i("string"),e.number=i("number"),e.function_=i("function"),e.null_=(e=>null===e),e.class_=(t=>e.function_(t)&&t.toString().startsWith("class ")),e.boolean=(e=>!0===e||!1===e),e.symbol=i("symbol"),e.numericString=(t=>e.string(t)&&t.length>0&&!Number.isNaN(Number(t))),e.array=Array.isArray,e.buffer=o,e.nullOrUndefined=(t=>e.null_(t)||e.undefined(t)),e.object=(r=>!e.nullOrUndefined(r)&&(e.function_(r)||t(r))),e.iterable=(t=>!e.nullOrUndefined(t)&&e.function_(t[Symbol.iterator])),e.asyncIterable=(t=>!e.nullOrUndefined(t)&&e.function_(t[Symbol.asyncIterator])),e.generator=(t=>e.iterable(t)&&e.function_(t.next)&&e.function_(t.throw)),e.nativePromise=(e=>u("Promise")(e));e.promise=(r=>e.nativePromise(r)||(r=>!e.null_(r)&&t(r)&&e.function_(r.then)&&e.function_(r.catch))(r)),e.generatorFunction=u("GeneratorFunction"),e.asyncFunction=u("AsyncFunction"),e.boundFunction=(t=>e.function_(t)&&!t.hasOwnProperty("prototype")),e.regExp=u("RegExp"),e.date=u("Date"),e.error=u("Error"),e.map=(e=>u("Map")(e)),e.set=(e=>u("Set")(e)),e.weakMap=(e=>u("WeakMap")(e)),e.weakSet=(e=>u("WeakSet")(e)),e.int8Array=u("Int8Array"),e.uint8Array=u("Uint8Array"),e.uint8ClampedArray=u("Uint8ClampedArray"),e.int16Array=u("Int16Array"),e.uint16Array=u("Uint16Array"),e.int32Array=u("Int32Array"),e.uint32Array=u("Uint32Array"),e.float32Array=u("Float32Array"),e.float64Array=u("Float64Array"),e.arrayBuffer=u("ArrayBuffer"),e.sharedArrayBuffer=u("SharedArrayBuffer"),e.dataView=u("DataView"),e.directInstanceOf=((e,t)=>Object.getPrototypeOf(e)===t.prototype),e.urlInstance=(e=>u("URL")(e)),e.urlString=(t=>{if(!e.string(t))return!1;try{return new a(t),!0}catch(e){return!1}}),e.truthy=(e=>Boolean(e)),e.falsy=(e=>!e),e.nan=(e=>Number.isNaN(e));const r=new Set(["undefined","string","number","boolean","symbol"]);e.primitive=(t=>e.null_(t)||r.has(typeof t)),e.integer=(e=>Number.isInteger(e)),e.safeInteger=(e=>Number.isSafeInteger(e)),e.plainObject=(e=>{let t;return"Object"===s(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))});const n=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"]);e.typedArray=(e=>{const t=s(e);return null!==t&&n.has(t)});e.arrayLike=(t=>!e.nullOrUndefined(t)&&!e.function_(t)&&(t=>e.safeInteger(t)&&t>-1)(t.length)),e.inRange=((t,r)=>{if(e.number(r))return t>=Math.min(0,r)&&t<=Math.max(r,0);if(e.array(r)&&2===r.length)return t>=Math.min(...r)&&t<=Math.max(...r);throw new TypeError(`Invalid range: ${JSON.stringify(r)}`)});const d=["innerHTML","ownerDocument","style","attributes","nodeValue"];e.domElement=(t=>e.object(t)&&1===t.nodeType&&e.string(t.nodeName)&&!e.plainObject(t)&&d.every(e=>e in t)),e.observable=(e=>!!e&&(!(!e[Symbol.observable]||e!==e[Symbol.observable]())||!(!e["@@observable"]||e!==e["@@observable"]()))),e.nodeStream=(r=>!e.nullOrUndefined(r)&&t(r)&&e.function_(r.pipe)&&!e.observable(r)),e.infinite=(e=>e===1/0||e===-1/0);const l=t=>r=>e.integer(r)&&Math.abs(r%2)===t;e.even=l(0),e.odd=l(1);e.emptyArray=(t=>e.array(t)&&0===t.length),e.nonEmptyArray=(t=>e.array(t)&&t.length>0),e.emptyString=(t=>e.string(t)&&0===t.length),e.nonEmptyString=(t=>e.string(t)&&t.length>0),e.emptyStringOrWhitespace=(t=>e.emptyString(t)||(t=>e.string(t)&&!1===/\S/.test(t))(t)),e.emptyObject=(t=>e.object(t)&&!e.map(t)&&!e.set(t)&&0===Object.keys(t).length),e.nonEmptyObject=(t=>e.object(t)&&!e.map(t)&&!e.set(t)&&Object.keys(t).length>0),e.emptySet=(t=>e.set(t)&&0===t.size),e.nonEmptySet=(t=>e.set(t)&&t.size>0),e.emptyMap=(t=>e.map(t)&&0===t.size),e.nonEmptyMap=(t=>e.map(t)&&t.size>0);const c=(t,r,a)=>{if(!1===e.function_(r))throw new TypeError(`Invalid predicate: ${JSON.stringify(r)}`);if(0===a.length)throw new TypeError("Invalid number of values");return t.call(a,r)};e.any=((e,...t)=>c(Array.prototype.some,e,t)),e.all=((e,...t)=>c(Array.prototype.every,e,t))}(d||(d={})),Object.defineProperties(d,{class:{value:d.class_},function:{value:d.function_},null:{value:d.null_}}),t.default=d,e.exports=d,e.exports.default=d},function(e,t,r){(function(e){var r=200,a="__lodash_hash_undefined__",n=1,i=2,o=9007199254740991,s="[object Arguments]",u="[object Array]",d="[object AsyncFunction]",l="[object Boolean]",c="[object Date]",f="[object Error]",g="[object Function]",p="[object GeneratorFunction]",h="[object Map]",y="[object Number]",m="[object Null]",v="[object Object]",b="[object Proxy]",_="[object RegExp]",$="[object Set]",O="[object String]",x="[object Symbol]",P="[object Undefined]",E="[object ArrayBuffer]",j="[object DataView]",S=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[s]=A[u]=A[E]=A[l]=A[j]=A[c]=A[f]=A[g]=A[h]=A[y]=A[v]=A[_]=A[$]=A[O]=A["[object WeakMap]"]=!1;var V="object"==typeof global&&global&&global.Object===Object&&global,M="object"==typeof self&&self&&self.Object===Object&&self,z=V||M||Function("return this")(),N=t&&!t.nodeType&&t,k=N&&"object"==typeof e&&e&&!e.nodeType&&e,I=k&&k.exports===N,T=I&&V.process,U=function(){try{return T&&T.binding&&T.binding("util")}catch(e){}}(),J=U&&U.isTypedArray;function D(e,t){for(var r=-1,a=null==e?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}function W(e){var t=-1,r=Array(e.size);return e.forEach(function(e,a){r[++t]=[a,e]}),r}function B(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var F,q,L,R=Array.prototype,C=Function.prototype,K=Object.prototype,G=z["__core-js_shared__"],H=C.toString,Q=K.hasOwnProperty,X=(F=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+F:"",Y=K.toString,Z=RegExp("^"+H.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=I?z.Buffer:void 0,te=z.Symbol,re=z.Uint8Array,ae=K.propertyIsEnumerable,ne=R.splice,ie=te?te.toStringTag:void 0,oe=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,ue=(q=Object.keys,L=Object,function(e){return q(L(e))}),de=Ue(z,"DataView"),le=Ue(z,"Map"),ce=Ue(z,"Promise"),fe=Ue(z,"Set"),ge=Ue(z,"WeakMap"),pe=Ue(Object,"create"),he=Be(de),ye=Be(le),me=Be(ce),ve=Be(fe),be=Be(ge),_e=te?te.prototype:void 0,$e=_e?_e.valueOf:void 0;function Oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}function xe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}function Pe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}function Ee(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Pe;++t<r;)this.add(e[t])}function je(e){var t=this.__data__=new xe(e);this.size=t.size}function Se(e,t){var r=Le(e),a=!r&&qe(e),n=!r&&!a&&Re(e),i=!r&&!a&&!n&&Qe(e),o=r||a||n||i,s=o?function(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}(e.length,String):[],u=s.length;for(var d in e)!t&&!Q.call(e,d)||o&&("length"==d||n&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||We(d,u))||s.push(d);return s}function we(e,t){for(var r=e.length;r--;)if(Fe(e[r][0],t))return r;return-1}function Ae(e){return null==e?void 0===e?P:m:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),r=e[ie];try{e[ie]=void 0;var a=!0}catch(e){}var n=Y.call(e);a&&(t?e[ie]=r:delete e[ie]);return n}(e):function(e){return Y.call(e)}(e)}function Ve(e){return He(e)&&Ae(e)==s}function Me(e,t,r,a,o){return e===t||(null==e||null==t||!He(e)&&!He(t)?e!=e&&t!=t:function(e,t,r,a,o,d){var g=Le(e),p=Le(t),m=g?u:De(e),b=p?u:De(t),P=(m=m==s?v:m)==v,S=(b=b==s?v:b)==v,w=m==b;if(w&&Re(e)){if(!Re(t))return!1;g=!0,P=!1}if(w&&!P)return d||(d=new je),g||Qe(e)?ke(e,t,r,a,o,d):function(e,t,r,a,o,s,u){switch(r){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!s(new re(e),new re(t)));case l:case c:case y:return Fe(+e,+t);case f:return e.name==t.name&&e.message==t.message;case _:case O:return e==t+"";case h:var d=W;case $:var g=a&n;if(d||(d=B),e.size!=t.size&&!g)return!1;var p=u.get(e);if(p)return p==t;a|=i,u.set(e,t);var m=ke(d(e),d(t),a,o,s,u);return u.delete(e),m;case x:if($e)return $e.call(e)==$e.call(t)}return!1}(e,t,m,r,a,o,d);if(!(r&n)){var A=P&&Q.call(e,"__wrapped__"),V=S&&Q.call(t,"__wrapped__");if(A||V){var M=A?e.value():e,z=V?t.value():t;return d||(d=new je),o(M,z,r,a,d)}}if(!w)return!1;return d||(d=new je),function(e,t,r,a,i,o){var s=r&n,u=Ie(e),d=u.length,l=Ie(t).length;if(d!=l&&!s)return!1;for(var c=d;c--;){var f=u[c];if(!(s?f in t:Q.call(t,f)))return!1}var g=o.get(e);if(g&&o.get(t))return g==t;var p=!0;o.set(e,t),o.set(t,e);for(var h=s;++c<d;){f=u[c];var y=e[f],m=t[f];if(a)var v=s?a(m,y,f,t,e,o):a(y,m,f,e,t,o);if(!(void 0===v?y===m||i(y,m,r,a,o):v)){p=!1;break}h||(h="constructor"==f)}if(p&&!h){var b=e.constructor,_=t.constructor;b!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return o.delete(e),o.delete(t),p}(e,t,r,a,o,d)}(e,t,r,a,Me,o))}function ze(e){return!(!Ge(e)||(t=e,X&&X in t))&&(Ce(e)?Z:S).test(Be(e));var t}function Ne(e){if(r=(t=e)&&t.constructor,a="function"==typeof r&&r.prototype||K,t!==a)return ue(e);var t,r,a,n=[];for(var i in Object(e))Q.call(e,i)&&"constructor"!=i&&n.push(i);return n}function ke(e,t,r,a,o,s){var u=r&n,d=e.length,l=t.length;if(d!=l&&!(u&&l>d))return!1;var c=s.get(e);if(c&&s.get(t))return c==t;var f=-1,g=!0,p=r&i?new Ee:void 0;for(s.set(e,t),s.set(t,e);++f<d;){var h=e[f],y=t[f];if(a)var m=u?a(y,h,f,t,e,s):a(h,y,f,e,t,s);if(void 0!==m){if(m)continue;g=!1;break}if(p){if(!D(t,function(e,t){if(n=t,!p.has(n)&&(h===e||o(h,e,r,a,s)))return p.push(t);var n})){g=!1;break}}else if(h!==y&&!o(h,y,r,a,s)){g=!1;break}}return s.delete(e),s.delete(t),g}function Ie(e){return function(e,t,r){var a=t(e);return Le(e)?a:function(e,t){for(var r=-1,a=t.length,n=e.length;++r<a;)e[n+r]=t[r];return e}(a,r(e))}(e,Xe,Je)}function Te(e,t){var r,a,n=e.__data__;return("string"==(a=typeof(r=t))||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==r:null===r)?n["string"==typeof t?"string":"hash"]:n.map}function Ue(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ze(r)?r:void 0}Oe.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},Oe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Oe.prototype.get=function(e){var t=this.__data__;if(pe){var r=t[e];return r===a?void 0:r}return Q.call(t,e)?t[e]:void 0},Oe.prototype.has=function(e){var t=this.__data__;return pe?void 0!==t[e]:Q.call(t,e)},Oe.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pe&&void 0===t?a:t,this},xe.prototype.clear=function(){this.__data__=[],this.size=0},xe.prototype.delete=function(e){var t=this.__data__,r=we(t,e);return!(r<0||(r==t.length-1?t.pop():ne.call(t,r,1),--this.size,0))},xe.prototype.get=function(e){var t=this.__data__,r=we(t,e);return r<0?void 0:t[r][1]},xe.prototype.has=function(e){return we(this.__data__,e)>-1},xe.prototype.set=function(e,t){var r=this.__data__,a=we(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this},Pe.prototype.clear=function(){this.size=0,this.__data__={hash:new Oe,map:new(le||xe),string:new Oe}},Pe.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},Pe.prototype.get=function(e){return Te(this,e).get(e)},Pe.prototype.has=function(e){return Te(this,e).has(e)},Pe.prototype.set=function(e,t){var r=Te(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this},Ee.prototype.add=Ee.prototype.push=function(e){return this.__data__.set(e,a),this},Ee.prototype.has=function(e){return this.__data__.has(e)},je.prototype.clear=function(){this.__data__=new xe,this.size=0},je.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},je.prototype.get=function(e){return this.__data__.get(e)},je.prototype.has=function(e){return this.__data__.has(e)},je.prototype.set=function(e,t){var a=this.__data__;if(a instanceof xe){var n=a.__data__;if(!le||n.length<r-1)return n.push([e,t]),this.size=++a.size,this;a=this.__data__=new Pe(n)}return a.set(e,t),this.size=a.size,this};var Je=oe?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,a=null==e?0:e.length,n=0,i=[];++r<a;){var o=e[r];t(o,r,e)&&(i[n++]=o)}return i}(oe(e),function(t){return ae.call(e,t)}))}:function(){return[]},De=Ae;function We(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Be(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fe(e,t){return e===t||e!=e&&t!=t}(de&&De(new de(new ArrayBuffer(1)))!=j||le&&De(new le)!=h||ce&&"[object Promise]"!=De(ce.resolve())||fe&&De(new fe)!=$||ge&&"[object WeakMap]"!=De(new ge))&&(De=function(e){var t=Ae(e),r=t==v?e.constructor:void 0,a=r?Be(r):"";if(a)switch(a){case he:return j;case ye:return h;case me:return"[object Promise]";case ve:return $;case be:return"[object WeakMap]"}return t});var qe=Ve(function(){return arguments}())?Ve:function(e){return He(e)&&Q.call(e,"callee")&&!ae.call(e,"callee")},Le=Array.isArray;var Re=se||function(){return!1};function Ce(e){if(!Ge(e))return!1;var t=Ae(e);return t==g||t==p||t==d||t==b}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Ge(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var Qe=J?function(e){return function(t){return e(t)}}(J):function(e){return He(e)&&Ke(e.length)&&!!A[Ae(e)]};function Xe(e){return null!=(t=e)&&Ke(t.length)&&!Ce(t)?Se(e):Ne(e);var t}e.exports=function(e,t){return Me(e,t)}}).call(this,r(22)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testSymbol=Symbol("test"),t.isPredicate=(e=>Boolean(e&&e[t.testSymbol]))},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(2));t.default=((e,t)=>{try{for(const r of e)n.default(r,t);return!0}catch(e){return e.message}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ArgumentError=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,t),this.name="ArgumentError"}}},function(e,t,r){"use strict";const a=()=>{const e=Error.prepareStackTrace;Error.prepareStackTrace=((e,t)=>t);const t=(new Error).stack.slice(1);return Error.prepareStackTrace=e,t};e.exports=a,e.exports.default=a},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const i=a(r(10)),o=n(r(12)),s=a(r(13)),u=/^.*?\((.*?)[,)]/;t.inferLabel=(e=>{if(!o)return;const t=i.default(),r=e[1],a=r.getFileName(),n=r.getLineNumber(),d=r.getColumnNumber();if(!a||null===n||null===d)return;let l=[];try{l=t.readFileSync(a,"utf8").split("\n")}catch(e){return}let c=l[n-1];if(!c)return;c=c.slice(d-1);const f=u.exec(c);if(!f||!f[1])return;const g=f[1];return s.default(g)||s.default(g.split(".").pop())?g:void 0})},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(11));t.default=(()=>n.default("fs"))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default="function"==typeof global.__non_webpack_require__?global.__non_webpack_require__:eval("require")},function(e,t,r){"use strict";e.exports=!("undefined"==typeof process||!process.versions||!process.versions.node)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=/^[a-z$_][a-z$_0-9]*$/i,n=new Set(["undefined","null","true","false","super","this","Infinity","NaN"]);t.default=(e=>e&&!n.has(e)&&a.test(e))},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.not=(e=>{const t=e.addValidator;return e.addValidator=(r=>{const n=r.validator,i=r.message;return r.message=((e,t)=>`[NOT] ${i(e,t)}`),r.validator=(e=>!n(e)),e[a.validatorSymbol].push(r),e.addValidator=t,e}),e})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(7),n=r(5);t.AnyPredicate=class{constructor(e){this.predicates=e}[n.testSymbol](e,t,r){const n=["Any predicate failed with the following errors:"];for(const a of this.predicates)try{return void t(e,r,a)}catch(e){n.push(`- ${e.message}`)}throw new a.ArgumentError(n.join("\n"),t)}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(18)),i=r(0);t.StringPredicate=class extends i.Predicate{constructor(e){super("string",e)}length(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have length \`${e}\`, got \`${t}\``,validator:t=>t.length===e})}minLength(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a minimum length of \`${e}\`, got \`${t}\``,validator:t=>t.length>=e})}maxLength(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a maximum length of \`${e}\`, got \`${t}\``,validator:t=>t.length<=e})}matches(e){return this.addValidator({message:(t,r)=>`Expected ${r} to match \`${e}\`, got \`${t}\``,validator:t=>e.test(t)})}startsWith(e){return this.addValidator({message:(t,r)=>`Expected ${r} to start with \`${e}\`, got \`${t}\``,validator:t=>t.startsWith(e)})}endsWith(e){return this.addValidator({message:(t,r)=>`Expected ${r} to end with \`${e}\`, got \`${t}\``,validator:t=>t.endsWith(e)})}includes(e){return this.addValidator({message:(t,r)=>`Expected ${r} to include \`${e}\`, got \`${t}\``,validator:t=>t.includes(e)})}oneOf(e){return this.addValidator({message:(t,r)=>{let a=JSON.stringify(e);if(e.length>10){const t=e.length-10;a=JSON.stringify(e.slice(0,10)).replace(/]$/,`,…+${t} more]`)}return`Expected ${r} to be one of \`${a}\`, got \`${t}\``},validator:t=>e.includes(t)})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${e}\``,validator:e=>""===e})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>""!==e})}equals(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be equal to \`${e}\`, got \`${t}\``,validator:t=>t===e})}get alphanumeric(){return this.addValidator({message:(e,t)=>`Expected ${t} to be alphanumeric, got \`${e}\``,validator:e=>/^[a-z\d]+$/i.test(e)})}get alphabetical(){return this.addValidator({message:(e,t)=>`Expected ${t} to be alphabetical, got \`${e}\``,validator:e=>/^[a-z]+$/gi.test(e)})}get numeric(){return this.addValidator({message:(e,t)=>`Expected ${t} to be numeric, got \`${e}\``,validator:e=>/^(\+|-)?\d+$/i.test(e)})}get date(){return this.addValidator({message:(e,t)=>`Expected ${t} to be a date, got \`${e}\``,validator:e=>n.default(e)})}get lowercase(){return this.addValidator({message:(e,t)=>`Expected ${t} to be lowercase, got \`${e}\``,validator:e=>""!==e.trim()&&e===e.toLowerCase()})}get uppercase(){return this.addValidator({message:(e,t)=>`Expected ${t} to be uppercase, got \`${e}\``,validator:e=>""!==e.trim()&&e===e.toUpperCase()})}}},function(e,t,r){"use strict";e.exports=function(e){return!isNaN(Date.parse(e))}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=r(0);t.NumberPredicate=class extends i.Predicate{constructor(e){super("number",e)}inRange(e,t){return this.addValidator({message:(r,a)=>`Expected ${a} to be in range [${e}..${t}], got ${r}`,validator:r=>n.default.inRange(r,[e,t])})}greaterThan(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be greater than ${e}, got ${t}`,validator:t=>t>e})}greaterThanOrEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be greater than or equal to ${e}, got ${t}`,validator:t=>t>=e})}lessThan(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be less than ${e}, got ${t}`,validator:t=>t<e})}lessThanOrEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be less than or equal to ${e}, got ${t}`,validator:t=>t<=e})}equal(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be equal to ${e}, got ${t}`,validator:t=>t===e})}get integer(){return this.addValidator({message:(e,t)=>`Expected ${t} to be an integer, got ${e}`,validator:e=>n.default.integer(e)})}get finite(){return this.addValidator({message:(e,t)=>`Expected ${t} to be finite, got ${e}`,validator:e=>!n.default.infinite(e)})}get infinite(){return this.addValidator({message:(e,t)=>`Expected ${t} to be infinite, got ${e}`,validator:e=>n.default.infinite(e)})}get positive(){return this.addValidator({message:(e,t)=>`Expected ${t} to be positive, got ${e}`,validator:e=>e>0})}get negative(){return this.addValidator({message:(e,t)=>`Expected ${t} to be negative, got ${e}`,validator:e=>e<0})}get integerOrInfinite(){return this.addValidator({message:(e,t)=>`Expected ${t} to be an integer or infinite, got ${e}`,validator:e=>n.default.integer(e)||n.default.infinite(e)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.BooleanPredicate=class extends a.Predicate{constructor(e){super("boolean",e)}get true(){return this.addValidator({message:(e,t)=>`Expected ${t} to be true, got ${e}`,validator:e=>!0===e})}get false(){return this.addValidator({message:(e,t)=>`Expected ${t} to be false, got ${e}`,validator:e=>!1===e})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(4)),i=a(r(2)),o=r(0);t.ArrayPredicate=class extends o.Predicate{constructor(e){super("array",e)}length(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have length \`${e}\`, got \`${t.length}\``,validator:t=>t.length===e})}minLength(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a minimum length of \`${e}\`, got \`${t.length}\``,validator:t=>t.length>=e})}maxLength(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a maximum length of \`${e}\`, got \`${t.length}\``,validator:t=>t.length<=e})}startsWith(e){return this.addValidator({message:(t,r)=>`Expected ${r} to start with \`${e}\`, got \`${t[0]}\``,validator:t=>t[0]===e})}endsWith(e){return this.addValidator({message:(t,r)=>`Expected ${r} to end with \`${e}\`, got \`${t[t.length-1]}\``,validator:t=>t[t.length-1]===e})}includes(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to include all elements of \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>e.every(e=>-1!==t.indexOf(e))})}includesAny(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to include any element of \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>e.some(e=>-1!==t.indexOf(e))})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${JSON.stringify(e)}\``,validator:e=>0===e.length})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>e.length>0})}deepEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be deeply equal to \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>n.default(t,e)})}ofType(e){let t;return this.addValidator({message:(e,r)=>`(${r}) ${t}`,validator:r=>{try{for(const t of r)i.default(t,e);return!0}catch(e){return t=e.message,!1}}})}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=a(r(24)),o=a(r(4)),s=r(0),u=a(r(1)),d=a(r(6)),l=a(r(26));t.ObjectPredicate=class extends s.Predicate{constructor(e){super("object",e)}get plain(){return this.addValidator({message:(e,t)=>`Expected ${t} to be a plain object`,validator:e=>n.default.plainObject(e)})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${JSON.stringify(e)}\``,validator:e=>0===Object.keys(e).length})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>Object.keys(e).length>0})}valuesOfType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>{const r=Object.keys(t).map(e=>t[e]);return d.default(r,e)}})}deepValuesOfType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>l.default(t,e)})}deepEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be deeply equal to \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>o.default(t,e)})}instanceOf(e){return this.addValidator({message:(t,r)=>{let a=t.constructor.name;return a&&"Object"!==a||(a=JSON.stringify(t)),`Expected ${r} \`${a}\` to be of type \`${e.name}\``},validator:t=>t instanceof e})}hasKeys(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have keys \`${JSON.stringify(r)}\``,validator:t=>u.default({has:e=>i.default.has(t,e)},e)})}hasAnyKeys(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any key of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>i.default.has(t,e))})}}},function(e,t,r){"use strict";const a=r(25);function n(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let a=t[e];for(;"\\"===a[a.length-1]&&void 0!==t[e+1];)a=a.slice(0,-1)+".",a+=t[++e];r.push(a)}return r}e.exports={get(e,t,r){if(!a(e)||"string"!=typeof t)return void 0===r?e:r;const i=n(t);for(let t=0;t<i.length;t++){if(!Object.prototype.propertyIsEnumerable.call(e,i[t]))return r;if(null==(e=e[i[t]])){if(t!==i.length-1)return r;break}}return e},set(e,t,r){if(!a(e)||"string"!=typeof t)return e;const i=e,o=n(t);for(let t=0;t<o.length;t++){const n=o[t];a(e[n])||(e[n]={}),t===o.length-1&&(e[n]=r),e=e[n]}return i},delete(e,t){if(!a(e)||"string"!=typeof t)return;const r=n(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1)return void delete e[n];if(e=e[n],!a(e))return}},has(e,t){if(!a(e)||"string"!=typeof t)return!1;const r=n(t);for(let t=0;t<r.length;t++){if(!a(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}}},function(e,t,r){"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=a(r(2)),o=(e,t)=>n.default.plainObject(e)?Object.keys(e).every(r=>o(e[r],t)):(i.default(e,t),!0);t.default=((e,t)=>{try{return o(e,t)}catch(e){return e.message}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.DatePredicate=class extends a.Predicate{constructor(e){super("date",e)}before(e){return this.addValidator({message:(t,r)=>`Expected ${r} ${t.toISOString()} to be before ${e.toISOString()}`,validator:t=>t.getTime()<e.getTime()})}after(e){return this.addValidator({message:(t,r)=>`Expected ${r} ${t.toISOString()} to be after ${e.toISOString()}`,validator:t=>t.getTime()>e.getTime()})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.ErrorPredicate=class extends a.Predicate{constructor(e){super("error",e)}name(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have name \`${e}\`, got \`${t.name}\``,validator:t=>t.name===e})}message(e){return this.addValidator({message:(t,r)=>`Expected ${r} message to be \`${e}\`, got \`${t.message}\``,validator:t=>t.message===e})}messageIncludes(e){return this.addValidator({message:(t,r)=>`Expected ${r} message to include \`${e}\`, got \`${t.message}\``,validator:t=>t.message.includes(e)})}hasKeys(...e){return this.addValidator({message:(t,r)=>`Expected ${r} message to have keys \`${e.join("`, `")}\``,validator:t=>e.every(e=>t.hasOwnProperty(e))})}instanceOf(e){return this.addValidator({message:(t,r)=>`Expected ${r} \`${t.name}\` to be of type \`${e.name}\``,validator:t=>t instanceof e})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(4)),i=r(0),o=a(r(1)),s=a(r(6));t.MapPredicate=class extends i.Predicate{constructor(e){super("Map",e)}size(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have size \`${e}\`, got \`${t.size}\``,validator:t=>t.size===e})}minSize(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a minimum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size>=e})}maxSize(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a maximum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size<=e})}hasKeys(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have keys \`${JSON.stringify(r)}\``,validator:t=>o.default(t,e)})}hasAnyKeys(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any key of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}hasValues(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have values \`${JSON.stringify(r)}\``,validator:t=>o.default(new Set(t.values()),e)})}hasAnyValues(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any value of \`${JSON.stringify(e)}\``,validator:t=>{const r=new Set(t.values());return e.some(e=>r.has(e))}})}keysOfType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>s.default(t.keys(),e)})}valuesOfType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>s.default(t.values(),e)})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${JSON.stringify(Array.from(e))}\``,validator:e=>0===e.size})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>e.size>0})}deepEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be deeply equal to \`${JSON.stringify(Array.from(e))}\`, got \`${JSON.stringify(Array.from(t))}\``,validator:t=>n.default(t,e)})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),i=a(r(1));t.WeakMapPredicate=class extends n.Predicate{constructor(e){super("WeakMap",e)}hasKeys(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have keys \`${JSON.stringify(r)}\``,validator:t=>i.default(t,e)})}hasAnyKeys(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any key of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(4)),i=r(0),o=a(r(1)),s=a(r(6));t.SetPredicate=class extends i.Predicate{constructor(e){super("Set",e)}size(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have size \`${e}\`, got \`${t.size}\``,validator:t=>t.size===e})}minSize(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a minimum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size>=e})}maxSize(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a maximum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size<=e})}has(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have items \`${JSON.stringify(r)}\``,validator:t=>o.default(t,e)})}hasAny(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any item of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}ofType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>s.default(t,e)})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${JSON.stringify(Array.from(e))}\``,validator:e=>0===e.size})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>e.size>0})}deepEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be deeply equal to \`${JSON.stringify(Array.from(e))}\`, got \`${JSON.stringify(Array.from(t))}\``,validator:t=>n.default(t,e)})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),i=a(r(1));t.WeakSetPredicate=class extends n.Predicate{constructor(e){super("WeakSet",e)}has(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have items \`${JSON.stringify(r)}\``,validator:t=>i.default(t,e)})}hasAny(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any item of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}}}]);const __export__=module.exports.default;module.exports=__export__,module.exports.default=__export__;
module.exports=function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=r(8),o=r(5),s=r(16);t.validatorSymbol=Symbol("validators");t.Predicate=class{constructor(e,t={}){this.type=e,this.options=t,this.context={validators:[]},this.context=Object.assign({},this.context,this.options);const r=this.type[0].toLowerCase()+this.type.slice(1);this.addValidator({message:(e,t)=>`Expected ${t&&t.substring(this.type.length+1)||"argument"} to be of type \`${this.type}\` but received type \`${n.default(e)}\``,validator:e=>n.default[r](e)})}[o.testSymbol](e,t,r){for(const{validator:a,message:n}of this.context.validators){const o=a(e);if(!0===o||!0===this.options.optional&&void 0===e)continue;let s=r;throw"function"==typeof r&&(s=r()),s=s?`${this.type} \`${s}\``:this.type,new i.ArgumentError(n(e,s,o),t)}}get[t.validatorSymbol](){return this.context.validators}get not(){return s.not(this)}is(e){return this.addValidator({message:(e,t,r)=>r?`(${t}) ${r}`:`Expected ${t} \`${e}\` to pass custom validation function`,validator:t=>e(t)})}addValidator(e){return this.context.validators.push(e),this}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=((e,t,r=5)=>{const a=[];for(const n of t)if(!e.has(n)&&(a.push(n),a.length===r))return a;return 0===a.length||a})},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(9)),i=r(10),o=r(0);t.Predicate=o.Predicate;const s=r(5),u=a(r(17)),d=a(r(6)),c=(e,t,r)=>{r[s.testSymbol](e,c,t)},l=(e,t,r)=>{if(!s.isPredicate(t)&&"string"!=typeof t)throw new TypeError(`Expected second argument to be a predicate or a string, got \`${typeof t}\``);if(s.isPredicate(t)){const r=n.default();c(e,()=>i.inferLabel(r),t)}else c(e,t,r)};Object.defineProperties(l,{isValid:{value:(e,t)=>{try{return l(e,t),!0}catch(e){return!1}}},create:{value:(e,t)=>r=>{if(s.isPredicate(e)){const t=n.default();c(r,()=>i.inferLabel(t),e)}else c(r,e,t)}}}),t.default=d.default(u.default(l));var f=r(6);t.StringPredicate=f.StringPredicate,t.NumberPredicate=f.NumberPredicate,t.BooleanPredicate=f.BooleanPredicate,t.ArrayPredicate=f.ArrayPredicate,t.ObjectPredicate=f.ObjectPredicate,t.DatePredicate=f.DatePredicate,t.ErrorPredicate=f.ErrorPredicate,t.MapPredicate=f.MapPredicate,t.WeakMapPredicate=f.WeakMapPredicate,t.SetPredicate=f.SetPredicate,t.WeakSetPredicate=f.WeakSetPredicate,t.AnyPredicate=f.AnyPredicate},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a="undefined"==typeof URL?r(15).URL:URL,n=Object.prototype.toString,i=e=>t=>typeof t===e,o=e=>!d.nullOrUndefined(e)&&!d.nullOrUndefined(e.constructor)&&d.function_(e.constructor.isBuffer)&&e.constructor.isBuffer(e),s=e=>{const t=n.call(e).slice(8,-1);return t||null},u=e=>t=>s(t)===e;function d(e){switch(e){case null:return"null";case!0:case!1:return"boolean"}switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"symbol":return"symbol"}if(d.function_(e))return"Function";if(d.observable(e))return"Observable";if(Array.isArray(e))return"Array";if(o(e))return"Buffer";const t=s(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}!function(e){const t=e=>"object"==typeof e;e.undefined=i("undefined"),e.string=i("string"),e.number=i("number"),e.function_=i("function"),e.null_=(e=>null===e),e.class_=(t=>e.function_(t)&&t.toString().startsWith("class ")),e.boolean=(e=>!0===e||!1===e),e.symbol=i("symbol"),e.numericString=(t=>e.string(t)&&t.length>0&&!Number.isNaN(Number(t))),e.array=Array.isArray,e.buffer=o,e.nullOrUndefined=(t=>e.null_(t)||e.undefined(t)),e.object=(r=>!e.nullOrUndefined(r)&&(e.function_(r)||t(r))),e.iterable=(t=>!e.nullOrUndefined(t)&&e.function_(t[Symbol.iterator])),e.asyncIterable=(t=>!e.nullOrUndefined(t)&&e.function_(t[Symbol.asyncIterator])),e.generator=(t=>e.iterable(t)&&e.function_(t.next)&&e.function_(t.throw)),e.nativePromise=(e=>u("Promise")(e));e.promise=(r=>e.nativePromise(r)||(r=>!e.null_(r)&&t(r)&&e.function_(r.then)&&e.function_(r.catch))(r)),e.generatorFunction=u("GeneratorFunction"),e.asyncFunction=u("AsyncFunction"),e.boundFunction=(t=>e.function_(t)&&!t.hasOwnProperty("prototype")),e.regExp=u("RegExp"),e.date=u("Date"),e.error=u("Error"),e.map=(e=>u("Map")(e)),e.set=(e=>u("Set")(e)),e.weakMap=(e=>u("WeakMap")(e)),e.weakSet=(e=>u("WeakSet")(e)),e.int8Array=u("Int8Array"),e.uint8Array=u("Uint8Array"),e.uint8ClampedArray=u("Uint8ClampedArray"),e.int16Array=u("Int16Array"),e.uint16Array=u("Uint16Array"),e.int32Array=u("Int32Array"),e.uint32Array=u("Uint32Array"),e.float32Array=u("Float32Array"),e.float64Array=u("Float64Array"),e.arrayBuffer=u("ArrayBuffer"),e.sharedArrayBuffer=u("SharedArrayBuffer"),e.dataView=u("DataView"),e.directInstanceOf=((e,t)=>Object.getPrototypeOf(e)===t.prototype),e.urlInstance=(e=>u("URL")(e)),e.urlString=(t=>{if(!e.string(t))return!1;try{return new a(t),!0}catch(e){return!1}}),e.truthy=(e=>Boolean(e)),e.falsy=(e=>!e),e.nan=(e=>Number.isNaN(e));const r=new Set(["undefined","string","number","boolean","symbol"]);e.primitive=(t=>e.null_(t)||r.has(typeof t)),e.integer=(e=>Number.isInteger(e)),e.safeInteger=(e=>Number.isSafeInteger(e)),e.plainObject=(e=>{let t;return"Object"===s(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))});const n=new Set(["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"]);e.typedArray=(e=>{const t=s(e);return null!==t&&n.has(t)});e.arrayLike=(t=>!e.nullOrUndefined(t)&&!e.function_(t)&&(t=>e.safeInteger(t)&&t>-1)(t.length)),e.inRange=((t,r)=>{if(e.number(r))return t>=Math.min(0,r)&&t<=Math.max(r,0);if(e.array(r)&&2===r.length)return t>=Math.min(...r)&&t<=Math.max(...r);throw new TypeError(`Invalid range: ${JSON.stringify(r)}`)});const d=["innerHTML","ownerDocument","style","attributes","nodeValue"];e.domElement=(t=>e.object(t)&&1===t.nodeType&&e.string(t.nodeName)&&!e.plainObject(t)&&d.every(e=>e in t)),e.observable=(e=>!!e&&(!(!e[Symbol.observable]||e!==e[Symbol.observable]())||!(!e["@@observable"]||e!==e["@@observable"]()))),e.nodeStream=(r=>!e.nullOrUndefined(r)&&t(r)&&e.function_(r.pipe)&&!e.observable(r)),e.infinite=(e=>e===1/0||e===-1/0);const c=t=>r=>e.integer(r)&&Math.abs(r%2)===t;e.even=c(0),e.odd=c(1);e.emptyArray=(t=>e.array(t)&&0===t.length),e.nonEmptyArray=(t=>e.array(t)&&t.length>0),e.emptyString=(t=>e.string(t)&&0===t.length),e.nonEmptyString=(t=>e.string(t)&&t.length>0),e.emptyStringOrWhitespace=(t=>e.emptyString(t)||(t=>e.string(t)&&!1===/\S/.test(t))(t)),e.emptyObject=(t=>e.object(t)&&!e.map(t)&&!e.set(t)&&0===Object.keys(t).length),e.nonEmptyObject=(t=>e.object(t)&&!e.map(t)&&!e.set(t)&&Object.keys(t).length>0),e.emptySet=(t=>e.set(t)&&0===t.size),e.nonEmptySet=(t=>e.set(t)&&t.size>0),e.emptyMap=(t=>e.map(t)&&0===t.size),e.nonEmptyMap=(t=>e.map(t)&&t.size>0);const l=(t,r,a)=>{if(!1===e.function_(r))throw new TypeError(`Invalid predicate: ${JSON.stringify(r)}`);if(0===a.length)throw new TypeError("Invalid number of values");return t.call(a,r)};e.any=((e,...t)=>l(Array.prototype.some,e,t)),e.all=((e,...t)=>l(Array.prototype.every,e,t))}(d||(d={})),Object.defineProperties(d,{class:{value:d.class_},function:{value:d.function_},null:{value:d.null_}}),t.default=d,e.exports=d,e.exports.default=d},function(e,t,r){(function(e){var r=200,a="__lodash_hash_undefined__",n=1,i=2,o=9007199254740991,s="[object Arguments]",u="[object Array]",d="[object AsyncFunction]",c="[object Boolean]",l="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",h="[object Map]",y="[object Number]",m="[object Null]",v="[object Object]",b="[object Proxy]",_="[object RegExp]",$="[object Set]",P="[object String]",O="[object Symbol]",x="[object Undefined]",E="[object ArrayBuffer]",j="[object DataView]",S=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[s]=A[u]=A[E]=A[c]=A[j]=A[l]=A[f]=A[p]=A[h]=A[y]=A[v]=A[_]=A[$]=A[P]=A["[object WeakMap]"]=!1;var V="object"==typeof global&&global&&global.Object===Object&&global,M="object"==typeof self&&self&&self.Object===Object&&self,z=V||M||Function("return this")(),N=t&&!t.nodeType&&t,k=N&&"object"==typeof e&&e&&!e.nodeType&&e,I=k&&k.exports===N,T=I&&V.process,U=function(){try{return T&&T.binding&&T.binding("util")}catch(e){}}(),J=U&&U.isTypedArray;function D(e,t){for(var r=-1,a=null==e?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}function W(e){var t=-1,r=Array(e.size);return e.forEach(function(e,a){r[++t]=[a,e]}),r}function B(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var F,q,L,R=Array.prototype,C=Function.prototype,K=Object.prototype,G=z["__core-js_shared__"],H=C.toString,Q=K.hasOwnProperty,X=(F=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+F:"",Y=K.toString,Z=RegExp("^"+H.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=I?z.Buffer:void 0,te=z.Symbol,re=z.Uint8Array,ae=K.propertyIsEnumerable,ne=R.splice,ie=te?te.toStringTag:void 0,oe=Object.getOwnPropertySymbols,se=ee?ee.isBuffer:void 0,ue=(q=Object.keys,L=Object,function(e){return q(L(e))}),de=Ue(z,"DataView"),ce=Ue(z,"Map"),le=Ue(z,"Promise"),fe=Ue(z,"Set"),pe=Ue(z,"WeakMap"),ge=Ue(Object,"create"),he=Be(de),ye=Be(ce),me=Be(le),ve=Be(fe),be=Be(pe),_e=te?te.prototype:void 0,$e=_e?_e.valueOf:void 0;function Pe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}function Oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}function xe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}function Ee(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new xe;++t<r;)this.add(e[t])}function je(e){var t=this.__data__=new Oe(e);this.size=t.size}function Se(e,t){var r=Le(e),a=!r&&qe(e),n=!r&&!a&&Re(e),i=!r&&!a&&!n&&Qe(e),o=r||a||n||i,s=o?function(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}(e.length,String):[],u=s.length;for(var d in e)!t&&!Q.call(e,d)||o&&("length"==d||n&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||We(d,u))||s.push(d);return s}function we(e,t){for(var r=e.length;r--;)if(Fe(e[r][0],t))return r;return-1}function Ae(e){return null==e?void 0===e?x:m:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),r=e[ie];try{e[ie]=void 0;var a=!0}catch(e){}var n=Y.call(e);a&&(t?e[ie]=r:delete e[ie]);return n}(e):function(e){return Y.call(e)}(e)}function Ve(e){return He(e)&&Ae(e)==s}function Me(e,t,r,a,o){return e===t||(null==e||null==t||!He(e)&&!He(t)?e!=e&&t!=t:function(e,t,r,a,o,d){var p=Le(e),g=Le(t),m=p?u:De(e),b=g?u:De(t),x=(m=m==s?v:m)==v,S=(b=b==s?v:b)==v,w=m==b;if(w&&Re(e)){if(!Re(t))return!1;p=!0,x=!1}if(w&&!x)return d||(d=new je),p||Qe(e)?ke(e,t,r,a,o,d):function(e,t,r,a,o,s,u){switch(r){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!s(new re(e),new re(t)));case c:case l:case y:return Fe(+e,+t);case f:return e.name==t.name&&e.message==t.message;case _:case P:return e==t+"";case h:var d=W;case $:var p=a&n;if(d||(d=B),e.size!=t.size&&!p)return!1;var g=u.get(e);if(g)return g==t;a|=i,u.set(e,t);var m=ke(d(e),d(t),a,o,s,u);return u.delete(e),m;case O:if($e)return $e.call(e)==$e.call(t)}return!1}(e,t,m,r,a,o,d);if(!(r&n)){var A=x&&Q.call(e,"__wrapped__"),V=S&&Q.call(t,"__wrapped__");if(A||V){var M=A?e.value():e,z=V?t.value():t;return d||(d=new je),o(M,z,r,a,d)}}if(!w)return!1;return d||(d=new je),function(e,t,r,a,i,o){var s=r&n,u=Ie(e),d=u.length,c=Ie(t).length;if(d!=c&&!s)return!1;for(var l=d;l--;){var f=u[l];if(!(s?f in t:Q.call(t,f)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var g=!0;o.set(e,t),o.set(t,e);for(var h=s;++l<d;){f=u[l];var y=e[f],m=t[f];if(a)var v=s?a(m,y,f,t,e,o):a(y,m,f,e,t,o);if(!(void 0===v?y===m||i(y,m,r,a,o):v)){g=!1;break}h||(h="constructor"==f)}if(g&&!h){var b=e.constructor,_=t.constructor;b!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(g=!1)}return o.delete(e),o.delete(t),g}(e,t,r,a,o,d)}(e,t,r,a,Me,o))}function ze(e){return!(!Ge(e)||(t=e,X&&X in t))&&(Ce(e)?Z:S).test(Be(e));var t}function Ne(e){if(r=(t=e)&&t.constructor,a="function"==typeof r&&r.prototype||K,t!==a)return ue(e);var t,r,a,n=[];for(var i in Object(e))Q.call(e,i)&&"constructor"!=i&&n.push(i);return n}function ke(e,t,r,a,o,s){var u=r&n,d=e.length,c=t.length;if(d!=c&&!(u&&c>d))return!1;var l=s.get(e);if(l&&s.get(t))return l==t;var f=-1,p=!0,g=r&i?new Ee:void 0;for(s.set(e,t),s.set(t,e);++f<d;){var h=e[f],y=t[f];if(a)var m=u?a(y,h,f,t,e,s):a(h,y,f,e,t,s);if(void 0!==m){if(m)continue;p=!1;break}if(g){if(!D(t,function(e,t){if(n=t,!g.has(n)&&(h===e||o(h,e,r,a,s)))return g.push(t);var n})){p=!1;break}}else if(h!==y&&!o(h,y,r,a,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Ie(e){return function(e,t,r){var a=t(e);return Le(e)?a:function(e,t){for(var r=-1,a=t.length,n=e.length;++r<a;)e[n+r]=t[r];return e}(a,r(e))}(e,Xe,Je)}function Te(e,t){var r,a,n=e.__data__;return("string"==(a=typeof(r=t))||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==r:null===r)?n["string"==typeof t?"string":"hash"]:n.map}function Ue(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ze(r)?r:void 0}Pe.prototype.clear=function(){this.__data__=ge?ge(null):{},this.size=0},Pe.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Pe.prototype.get=function(e){var t=this.__data__;if(ge){var r=t[e];return r===a?void 0:r}return Q.call(t,e)?t[e]:void 0},Pe.prototype.has=function(e){var t=this.__data__;return ge?void 0!==t[e]:Q.call(t,e)},Pe.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ge&&void 0===t?a:t,this},Oe.prototype.clear=function(){this.__data__=[],this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,r=we(t,e);return!(r<0||(r==t.length-1?t.pop():ne.call(t,r,1),--this.size,0))},Oe.prototype.get=function(e){var t=this.__data__,r=we(t,e);return r<0?void 0:t[r][1]},Oe.prototype.has=function(e){return we(this.__data__,e)>-1},Oe.prototype.set=function(e,t){var r=this.__data__,a=we(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this},xe.prototype.clear=function(){this.size=0,this.__data__={hash:new Pe,map:new(ce||Oe),string:new Pe}},xe.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},xe.prototype.get=function(e){return Te(this,e).get(e)},xe.prototype.has=function(e){return Te(this,e).has(e)},xe.prototype.set=function(e,t){var r=Te(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this},Ee.prototype.add=Ee.prototype.push=function(e){return this.__data__.set(e,a),this},Ee.prototype.has=function(e){return this.__data__.has(e)},je.prototype.clear=function(){this.__data__=new Oe,this.size=0},je.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},je.prototype.get=function(e){return this.__data__.get(e)},je.prototype.has=function(e){return this.__data__.has(e)},je.prototype.set=function(e,t){var a=this.__data__;if(a instanceof Oe){var n=a.__data__;if(!ce||n.length<r-1)return n.push([e,t]),this.size=++a.size,this;a=this.__data__=new xe(n)}return a.set(e,t),this.size=a.size,this};var Je=oe?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,a=null==e?0:e.length,n=0,i=[];++r<a;){var o=e[r];t(o,r,e)&&(i[n++]=o)}return i}(oe(e),function(t){return ae.call(e,t)}))}:function(){return[]},De=Ae;function We(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Be(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fe(e,t){return e===t||e!=e&&t!=t}(de&&De(new de(new ArrayBuffer(1)))!=j||ce&&De(new ce)!=h||le&&"[object Promise]"!=De(le.resolve())||fe&&De(new fe)!=$||pe&&"[object WeakMap]"!=De(new pe))&&(De=function(e){var t=Ae(e),r=t==v?e.constructor:void 0,a=r?Be(r):"";if(a)switch(a){case he:return j;case ye:return h;case me:return"[object Promise]";case ve:return $;case be:return"[object WeakMap]"}return t});var qe=Ve(function(){return arguments}())?Ve:function(e){return He(e)&&Q.call(e,"callee")&&!ae.call(e,"callee")},Le=Array.isArray;var Re=se||function(){return!1};function Ce(e){if(!Ge(e))return!1;var t=Ae(e);return t==p||t==g||t==d||t==b}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Ge(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function He(e){return null!=e&&"object"==typeof e}var Qe=J?function(e){return function(t){return e(t)}}(J):function(e){return He(e)&&Ke(e.length)&&!!A[Ae(e)]};function Xe(e){return null!=(t=e)&&Ke(t.length)&&!Ce(t)?Se(e):Ne(e);var t}e.exports=function(e,t){return Me(e,t)}}).call(this,r(23)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.testSymbol=Symbol("test"),t.isPredicate=(e=>Boolean(e&&e[t.testSymbol]))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(18);t.StringPredicate=a.StringPredicate;const n=r(20);t.NumberPredicate=n.NumberPredicate;const i=r(21);t.BooleanPredicate=i.BooleanPredicate;const o=r(0),s=r(22);t.ArrayPredicate=s.ArrayPredicate;const u=r(24);t.ObjectPredicate=u.ObjectPredicate;const d=r(28);t.DatePredicate=d.DatePredicate;const c=r(29);t.ErrorPredicate=c.ErrorPredicate;const l=r(30);t.MapPredicate=l.MapPredicate;const f=r(31);t.WeakMapPredicate=f.WeakMapPredicate;const p=r(32);t.SetPredicate=p.SetPredicate;const g=r(33);t.WeakSetPredicate=g.WeakSetPredicate;const h=r(34);t.AnyPredicate=h.AnyPredicate,t.default=((e,t)=>(Object.defineProperties(e,{string:{get:()=>new a.StringPredicate(t)},number:{get:()=>new n.NumberPredicate(t)},boolean:{get:()=>new i.BooleanPredicate(t)},undefined:{get:()=>new o.Predicate("undefined",t)},null:{get:()=>new o.Predicate("null",t)},nullOrUndefined:{get:()=>new o.Predicate("nullOrUndefined",t)},nan:{get:()=>new o.Predicate("nan",t)},symbol:{get:()=>new o.Predicate("symbol",t)},array:{get:()=>new s.ArrayPredicate(t)},object:{get:()=>new u.ObjectPredicate(t)},date:{get:()=>new d.DatePredicate(t)},error:{get:()=>new c.ErrorPredicate(t)},map:{get:()=>new l.MapPredicate(t)},weakMap:{get:()=>new f.WeakMapPredicate(t)},set:{get:()=>new p.SetPredicate(t)},weakSet:{get:()=>new g.WeakSetPredicate(t)},function:{get:()=>new o.Predicate("Function",t)},buffer:{get:()=>new o.Predicate("Buffer",t)},regExp:{get:()=>new o.Predicate("RegExp",t)},promise:{get:()=>new o.Predicate("Promise",t)},typedArray:{get:()=>new o.Predicate("TypedArray",t)},int8Array:{get:()=>new o.Predicate("Int8Array",t)},uint8Array:{get:()=>new o.Predicate("Uint8Array",t)},uint8ClampedArray:{get:()=>new o.Predicate("Uint8ClampedArray",t)},int16Array:{get:()=>new o.Predicate("Int16Array",t)},uint16Array:{get:()=>new o.Predicate("Uint16Array",t)},int32Array:{get:()=>new o.Predicate("Int32Array",t)},uint32Array:{get:()=>new o.Predicate("Uint32Array",t)},float32Array:{get:()=>new o.Predicate("Float32Array",t)},float64Array:{get:()=>new o.Predicate("Float64Array",t)},arrayBuffer:{get:()=>new o.Predicate("ArrayBuffer",t)},dataView:{get:()=>new o.Predicate("DataView",t)},iterable:{get:()=>new o.Predicate("Iterable",t)},any:{value:(...e)=>new h.AnyPredicate(e,t)}}),e))},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(2));t.default=((e,t)=>{try{for(const r of e)n.default(r,t);return!0}catch(e){return e.message}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ArgumentError=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,t),this.name="ArgumentError"}}},function(e,t,r){"use strict";const a=()=>{const e=Error.prepareStackTrace;Error.prepareStackTrace=((e,t)=>t);const t=(new Error).stack.slice(1);return Error.prepareStackTrace=e,t};e.exports=a,e.exports.default=a},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});const i=a(r(11)),o=n(r(13)),s=a(r(14)),u=/^.*?\((.*?)[,)]/;t.inferLabel=(e=>{if(!o)return;const t=i.default(),r=e[1],a=r.getFileName(),n=r.getLineNumber(),d=r.getColumnNumber();if(!a||null===n||null===d)return;let c=[];try{c=t.readFileSync(a,"utf8").split("\n")}catch(e){return}let l=c[n-1];if(!l)return;l=l.slice(d-1);const f=u.exec(l);if(!f||!f[1])return;const p=f[1];return s.default(p)||s.default(p.split(".").pop())?p:void 0})},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(12));t.default=(()=>n.default("fs"))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default="function"==typeof global.__non_webpack_require__?global.__non_webpack_require__:eval("require")},function(e,t,r){"use strict";e.exports=!("undefined"==typeof process||!process.versions||!process.versions.node)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=/^[a-z$_][a-z$_0-9]*$/i,n=new Set(["undefined","null","true","false","super","this","Infinity","NaN"]);t.default=(e=>e&&!n.has(e)&&a.test(e))},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.not=(e=>{const t=e.addValidator;return e.addValidator=(r=>{const n=r.validator,i=r.message;return r.message=((e,t)=>`[NOT] ${i(e,t)}`),r.validator=(e=>!n(e)),e[a.validatorSymbol].push(r),e.addValidator=t,e}),e})},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(6));t.default=(e=>(Object.defineProperties(e,{optional:{get:()=>n.default({},{optional:!0})}}),e))},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(19)),i=r(0);t.StringPredicate=class extends i.Predicate{constructor(e){super("string",e)}length(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have length \`${e}\`, got \`${t}\``,validator:t=>t.length===e})}minLength(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a minimum length of \`${e}\`, got \`${t}\``,validator:t=>t.length>=e})}maxLength(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a maximum length of \`${e}\`, got \`${t}\``,validator:t=>t.length<=e})}matches(e){return this.addValidator({message:(t,r)=>`Expected ${r} to match \`${e}\`, got \`${t}\``,validator:t=>e.test(t)})}startsWith(e){return this.addValidator({message:(t,r)=>`Expected ${r} to start with \`${e}\`, got \`${t}\``,validator:t=>t.startsWith(e)})}endsWith(e){return this.addValidator({message:(t,r)=>`Expected ${r} to end with \`${e}\`, got \`${t}\``,validator:t=>t.endsWith(e)})}includes(e){return this.addValidator({message:(t,r)=>`Expected ${r} to include \`${e}\`, got \`${t}\``,validator:t=>t.includes(e)})}oneOf(e){return this.addValidator({message:(t,r)=>{let a=JSON.stringify(e);if(e.length>10){const t=e.length-10;a=JSON.stringify(e.slice(0,10)).replace(/]$/,`,…+${t} more]`)}return`Expected ${r} to be one of \`${a}\`, got \`${t}\``},validator:t=>e.includes(t)})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${e}\``,validator:e=>""===e})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>""!==e})}equals(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be equal to \`${e}\`, got \`${t}\``,validator:t=>t===e})}get alphanumeric(){return this.addValidator({message:(e,t)=>`Expected ${t} to be alphanumeric, got \`${e}\``,validator:e=>/^[a-z\d]+$/i.test(e)})}get alphabetical(){return this.addValidator({message:(e,t)=>`Expected ${t} to be alphabetical, got \`${e}\``,validator:e=>/^[a-z]+$/gi.test(e)})}get numeric(){return this.addValidator({message:(e,t)=>`Expected ${t} to be numeric, got \`${e}\``,validator:e=>/^(\+|-)?\d+$/i.test(e)})}get date(){return this.addValidator({message:(e,t)=>`Expected ${t} to be a date, got \`${e}\``,validator:e=>n.default(e)})}get lowercase(){return this.addValidator({message:(e,t)=>`Expected ${t} to be lowercase, got \`${e}\``,validator:e=>""!==e.trim()&&e===e.toLowerCase()})}get uppercase(){return this.addValidator({message:(e,t)=>`Expected ${t} to be uppercase, got \`${e}\``,validator:e=>""!==e.trim()&&e===e.toUpperCase()})}}},function(e,t,r){"use strict";e.exports=function(e){return!isNaN(Date.parse(e))}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=r(0);t.NumberPredicate=class extends i.Predicate{constructor(e){super("number",e)}inRange(e,t){return this.addValidator({message:(r,a)=>`Expected ${a} to be in range [${e}..${t}], got ${r}`,validator:r=>n.default.inRange(r,[e,t])})}greaterThan(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be greater than ${e}, got ${t}`,validator:t=>t>e})}greaterThanOrEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be greater than or equal to ${e}, got ${t}`,validator:t=>t>=e})}lessThan(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be less than ${e}, got ${t}`,validator:t=>t<e})}lessThanOrEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be less than or equal to ${e}, got ${t}`,validator:t=>t<=e})}equal(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be equal to ${e}, got ${t}`,validator:t=>t===e})}get integer(){return this.addValidator({message:(e,t)=>`Expected ${t} to be an integer, got ${e}`,validator:e=>n.default.integer(e)})}get finite(){return this.addValidator({message:(e,t)=>`Expected ${t} to be finite, got ${e}`,validator:e=>!n.default.infinite(e)})}get infinite(){return this.addValidator({message:(e,t)=>`Expected ${t} to be infinite, got ${e}`,validator:e=>n.default.infinite(e)})}get positive(){return this.addValidator({message:(e,t)=>`Expected ${t} to be positive, got ${e}`,validator:e=>e>0})}get negative(){return this.addValidator({message:(e,t)=>`Expected ${t} to be negative, got ${e}`,validator:e=>e<0})}get integerOrInfinite(){return this.addValidator({message:(e,t)=>`Expected ${t} to be an integer or infinite, got ${e}`,validator:e=>n.default.integer(e)||n.default.infinite(e)})}get uint8(){return this.integer.inRange(0,255)}get uint16(){return this.integer.inRange(0,65535)}get uint32(){return this.integer.inRange(0,4294967295)}get int8(){return this.integer.inRange(-128,127)}get int16(){return this.integer.inRange(-32768,32767)}get int32(){return this.integer.inRange(-2147483648,2147483647)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.BooleanPredicate=class extends a.Predicate{constructor(e){super("boolean",e)}get true(){return this.addValidator({message:(e,t)=>`Expected ${t} to be true, got ${e}`,validator:e=>!0===e})}get false(){return this.addValidator({message:(e,t)=>`Expected ${t} to be false, got ${e}`,validator:e=>!1===e})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(4)),i=a(r(2)),o=r(0);t.ArrayPredicate=class extends o.Predicate{constructor(e){super("array",e)}length(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have length \`${e}\`, got \`${t.length}\``,validator:t=>t.length===e})}minLength(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a minimum length of \`${e}\`, got \`${t.length}\``,validator:t=>t.length>=e})}maxLength(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a maximum length of \`${e}\`, got \`${t.length}\``,validator:t=>t.length<=e})}startsWith(e){return this.addValidator({message:(t,r)=>`Expected ${r} to start with \`${e}\`, got \`${t[0]}\``,validator:t=>t[0]===e})}endsWith(e){return this.addValidator({message:(t,r)=>`Expected ${r} to end with \`${e}\`, got \`${t[t.length-1]}\``,validator:t=>t[t.length-1]===e})}includes(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to include all elements of \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>e.every(e=>-1!==t.indexOf(e))})}includesAny(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to include any element of \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>e.some(e=>-1!==t.indexOf(e))})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${JSON.stringify(e)}\``,validator:e=>0===e.length})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>e.length>0})}deepEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be deeply equal to \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>n.default(t,e)})}ofType(e){let t;return this.addValidator({message:(e,r)=>`(${r}) ${t}`,validator:r=>{try{for(const t of r)i.default(t,e);return!0}catch(e){return t=e.message,!1}}})}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=a(r(25)),o=a(r(4)),s=r(0),u=a(r(1)),d=a(r(7)),c=a(r(27));t.ObjectPredicate=class extends s.Predicate{constructor(e){super("object",e)}get plain(){return this.addValidator({message:(e,t)=>`Expected ${t} to be a plain object`,validator:e=>n.default.plainObject(e)})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${JSON.stringify(e)}\``,validator:e=>0===Object.keys(e).length})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>Object.keys(e).length>0})}valuesOfType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>{const r=Object.keys(t).map(e=>t[e]);return d.default(r,e)}})}deepValuesOfType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>c.default(t,e)})}deepEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be deeply equal to \`${JSON.stringify(e)}\`, got \`${JSON.stringify(t)}\``,validator:t=>o.default(t,e)})}instanceOf(e){return this.addValidator({message:(t,r)=>{let a=t.constructor.name;return a&&"Object"!==a||(a=JSON.stringify(t)),`Expected ${r} \`${a}\` to be of type \`${e.name}\``},validator:t=>t instanceof e})}hasKeys(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have keys \`${JSON.stringify(r)}\``,validator:t=>u.default({has:e=>i.default.has(t,e)},e)})}hasAnyKeys(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any key of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>i.default.has(t,e))})}}},function(e,t,r){"use strict";const a=r(26);function n(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let a=t[e];for(;"\\"===a[a.length-1]&&void 0!==t[e+1];)a=a.slice(0,-1)+".",a+=t[++e];r.push(a)}return r}e.exports={get(e,t,r){if(!a(e)||"string"!=typeof t)return void 0===r?e:r;const i=n(t);for(let t=0;t<i.length;t++){if(!Object.prototype.propertyIsEnumerable.call(e,i[t]))return r;if(null==(e=e[i[t]])){if(t!==i.length-1)return r;break}}return e},set(e,t,r){if(!a(e)||"string"!=typeof t)return e;const i=e,o=n(t);for(let t=0;t<o.length;t++){const n=o[t];a(e[n])||(e[n]={}),t===o.length-1&&(e[n]=r),e=e[n]}return i},delete(e,t){if(!a(e)||"string"!=typeof t)return;const r=n(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1)return void delete e[n];if(e=e[n],!a(e))return}},has(e,t){if(!a(e)||"string"!=typeof t)return!1;const r=n(t);for(let t=0;t<r.length;t++){if(!a(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}}},function(e,t,r){"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(3)),i=a(r(2)),o=(e,t)=>n.default.plainObject(e)?Object.keys(e).every(r=>o(e[r],t)):(i.default(e,t),!0);t.default=((e,t)=>{try{return o(e,t)}catch(e){return e.message}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.DatePredicate=class extends a.Predicate{constructor(e){super("date",e)}before(e){return this.addValidator({message:(t,r)=>`Expected ${r} ${t.toISOString()} to be before ${e.toISOString()}`,validator:t=>t.getTime()<e.getTime()})}after(e){return this.addValidator({message:(t,r)=>`Expected ${r} ${t.toISOString()} to be after ${e.toISOString()}`,validator:t=>t.getTime()>e.getTime()})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(0);t.ErrorPredicate=class extends a.Predicate{constructor(e){super("error",e)}name(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have name \`${e}\`, got \`${t.name}\``,validator:t=>t.name===e})}message(e){return this.addValidator({message:(t,r)=>`Expected ${r} message to be \`${e}\`, got \`${t.message}\``,validator:t=>t.message===e})}messageIncludes(e){return this.addValidator({message:(t,r)=>`Expected ${r} message to include \`${e}\`, got \`${t.message}\``,validator:t=>t.message.includes(e)})}hasKeys(...e){return this.addValidator({message:(t,r)=>`Expected ${r} message to have keys \`${e.join("`, `")}\``,validator:t=>e.every(e=>t.hasOwnProperty(e))})}instanceOf(e){return this.addValidator({message:(t,r)=>`Expected ${r} \`${t.name}\` to be of type \`${e.name}\``,validator:t=>t instanceof e})}get typeError(){return this.instanceOf(TypeError)}get evalError(){return this.instanceOf(EvalError)}get rangeError(){return this.instanceOf(RangeError)}get referenceError(){return this.instanceOf(ReferenceError)}get syntaxError(){return this.instanceOf(SyntaxError)}get uriError(){return this.instanceOf(URIError)}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(4)),i=r(0),o=a(r(1)),s=a(r(7));t.MapPredicate=class extends i.Predicate{constructor(e){super("Map",e)}size(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have size \`${e}\`, got \`${t.size}\``,validator:t=>t.size===e})}minSize(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a minimum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size>=e})}maxSize(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a maximum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size<=e})}hasKeys(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have keys \`${JSON.stringify(r)}\``,validator:t=>o.default(t,e)})}hasAnyKeys(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any key of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}hasValues(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have values \`${JSON.stringify(r)}\``,validator:t=>o.default(new Set(t.values()),e)})}hasAnyValues(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any value of \`${JSON.stringify(e)}\``,validator:t=>{const r=new Set(t.values());return e.some(e=>r.has(e))}})}keysOfType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>s.default(t.keys(),e)})}valuesOfType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>s.default(t.values(),e)})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${JSON.stringify(Array.from(e))}\``,validator:e=>0===e.size})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>e.size>0})}deepEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be deeply equal to \`${JSON.stringify(Array.from(e))}\`, got \`${JSON.stringify(Array.from(t))}\``,validator:t=>n.default(t,e)})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),i=a(r(1));t.WeakMapPredicate=class extends n.Predicate{constructor(e){super("WeakMap",e)}hasKeys(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have keys \`${JSON.stringify(r)}\``,validator:t=>i.default(t,e)})}hasAnyKeys(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any key of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=a(r(4)),i=r(0),o=a(r(1)),s=a(r(7));t.SetPredicate=class extends i.Predicate{constructor(e){super("Set",e)}size(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have size \`${e}\`, got \`${t.size}\``,validator:t=>t.size===e})}minSize(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a minimum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size>=e})}maxSize(e){return this.addValidator({message:(t,r)=>`Expected ${r} to have a maximum size of \`${e}\`, got \`${t.size}\``,validator:t=>t.size<=e})}has(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have items \`${JSON.stringify(r)}\``,validator:t=>o.default(t,e)})}hasAny(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any item of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}ofType(e){return this.addValidator({message:(e,t,r)=>`(${t}) ${r}`,validator:t=>s.default(t,e)})}get empty(){return this.addValidator({message:(e,t)=>`Expected ${t} to be empty, got \`${JSON.stringify(Array.from(e))}\``,validator:e=>0===e.size})}get nonEmpty(){return this.addValidator({message:(e,t)=>`Expected ${t} to not be empty`,validator:e=>e.size>0})}deepEqual(e){return this.addValidator({message:(t,r)=>`Expected ${r} to be deeply equal to \`${JSON.stringify(Array.from(e))}\`, got \`${JSON.stringify(Array.from(t))}\``,validator:t=>n.default(t,e)})}}},function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=r(0),i=a(r(1));t.WeakSetPredicate=class extends n.Predicate{constructor(e){super("WeakSet",e)}has(...e){return this.addValidator({message:(e,t,r)=>`Expected ${t} to have items \`${JSON.stringify(r)}\``,validator:t=>i.default(t,e)})}hasAny(...e){return this.addValidator({message:(t,r)=>`Expected ${r} to have any item of \`${JSON.stringify(e)}\``,validator:t=>e.some(e=>t.has(e))})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const a=r(8),n=r(5);t.AnyPredicate=class{constructor(e,t={}){this.predicates=e,this.options=t}[n.testSymbol](e,t,r){const n=["Any predicate failed with the following errors:"];for(const a of this.predicates)try{return void t(e,r,a)}catch(t){if(void 0===e&&!0===this.options.optional)return;n.push(`- ${t.message}`)}throw new a.ArgumentError(n.join("\n"),t)}}}]);const __export__=module.exports.default;module.exports=__export__,module.exports.default=__export__;
//# sourceMappingURL=index.js.map
import { BasePredicate, testSymbol } from './base-predicate';
import { Main } from '../..';
import { PredicateOptions } from './predicate';
/**

@@ -8,4 +9,5 @@ * @hidden

private readonly predicates;
constructor(predicates: BasePredicate[]);
private readonly options;
constructor(predicates: BasePredicate[], options?: PredicateOptions);
[testSymbol](value: T, main: Main, label: string | Function): void;
}

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class ArrayPredicate<T = any> extends Predicate<T[]> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<T[]>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test an array to have a specific length.

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class BooleanPredicate extends Predicate<boolean> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<boolean>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test a boolean to be true.

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class DatePredicate extends Predicate<Date> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<Date>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test a date to be before another date.

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class ErrorPredicate extends Predicate<Error> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<Error>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test an error to have a specific name.

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class MapPredicate<T1 = any, T2 = any> extends Predicate<Map<T1, T2>> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<Map<T1, T2>>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test a Map to have a specific size.

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class NumberPredicate extends Predicate<number> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<number>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test a number to be in a specified range.

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class ObjectPredicate extends Predicate<object> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<object>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test if an Object is a plain object.

@@ -13,5 +13,10 @@ import { Main } from '../..';

*/
export interface Context<T> {
export interface PredicateOptions {
optional?: boolean;
}
/**
* @hidden
*/
export interface Context<T = unknown> extends PredicateOptions {
validators: Validator<T>[];
label?: string;
}

@@ -27,4 +32,5 @@ /**

private readonly type;
private readonly options;
private readonly context;
constructor(type: string, context?: Context<T>);
constructor(type: string, options?: PredicateOptions);
/**

@@ -31,0 +37,0 @@ * @hidden

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class SetPredicate<T = any> extends Predicate<Set<T>> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<Set<T>>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test a Set to have a specific size.

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class StringPredicate extends Predicate<string> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<string>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test a string to have a specific length.

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class WeakMapPredicate<T1 extends object = any, T2 = any> extends Predicate<WeakMap<T1, T2>> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<WeakMap<T1, T2>>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test a WeakMap to include all the provided keys. The keys are tested by identity, not structure.

@@ -1,2 +0,2 @@

import { Predicate, Context } from './predicate';
import { Predicate, PredicateOptions } from './predicate';
export declare class WeakSetPredicate<T extends object = any> extends Predicate<WeakSet<T>> {

@@ -6,3 +6,3 @@ /**

*/
constructor(context?: Context<WeakSet<T>>);
constructor(options?: PredicateOptions);
/**

@@ -9,0 +9,0 @@ * Test a WeakSet to include all the provided items. The items are tested by identity, not structure.

{
"name": "ow",
"version": "0.10.0",
"version": "0.11.0",
"description": "Function argument validation for humans",

@@ -20,3 +20,3 @@ "license": "MIT",

"test": "npm run lint && nyc ava dist/test",
"lint": "tslint --fix --format stylish --project .",
"lint": "tslint --format stylish --project .",
"build": "npm run clean && webpack",

@@ -23,0 +23,0 @@ "compile": "npm run clean && tsc",

@@ -97,2 +97,12 @@ <p align="center">

### ow.optional.{type}
Makes the predicate optional. An optional predicate means that it doesn't fail if the value is `undefined`.
```ts
ow(1, ow.optional.number);
ow(undefined, ow.optional.number);
```
### ow.{type}

@@ -99,0 +109,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc