Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-types

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-types - npm Package Compare versions

Comparing version 5.0.2 to 5.0.3-next.0

12

dist/index.d.ts

@@ -43,6 +43,3 @@ import { toType, toValidableType, validateType, fromType } from './utils';

readonly symbol: VueTypeDef<symbol>;
readonly nullable: {
type: import("./types").PropType<null>;
validator(value: unknown): boolean;
};
readonly nullable: PropOptions<null, null>;
readonly custom: typeof custom;

@@ -91,6 +88,3 @@ readonly oneOf: typeof oneOf;

readonly symbol: VueTypeDef<symbol>;
readonly nullable: {
type: import("./types").PropType<null>;
validator(value: unknown): boolean;
};
readonly nullable: PropOptions<null, null>;
readonly custom: typeof custom;

@@ -112,3 +106,3 @@ readonly oneOf: typeof oneOf;

export { any, func, bool, string, number, array, integer, symbol, object, custom, oneOf, oneOfType, arrayOf, instanceOf, objectOf, shape, nullable, createTypes, toType, toValidableType, validateType, fromType, config, };
export declare type VueTypesInterface = ReturnType<typeof createTypes>;
export type VueTypesInterface = ReturnType<typeof createTypes>;
export type { VueTypeDef, VueTypeValidableDef, VueTypeShape, VueTypeLooseShape };

@@ -5,3 +5,3 @@ import { config } from './config';

export { config };
declare type TypeShim = <T = any>(...args: any[]) => any;
type TypeShim = <T = any>(...args: any[]) => any;
export declare const any: TypeShim;

@@ -8,0 +8,0 @@ export declare const func: TypeShim;

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

import{isPlainObject as t}from"is-plain-object";function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}var i={silent:!1,logLevel:"warn"},o=Object.defineProperty,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function c(e,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var u={_vueTypes_name:{value:e,writable:!0},def:{value:function(e){return void 0===e?("default"in this&&delete this.default,this):(this.default=f(e)?function(){return[].concat(e)}:t(e)?function(){return Object.assign({},e)}:e,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(u.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,u)}var a=function(){return c("any",{},!0)},s=function(){return c("func",{type:Function},!0)},l=function(){return c("bool",{type:Boolean},!0)},d=function(){return c("string",{type:String},!0)},y=function(){return c("number",{type:Number},!0)},p=function(){return c("array",{type:Array},!0)},b=function(){return c("object",{type:Object},!0)},v=function(){return c("symbol")},g=function(){return c("integer",{type:Number})},h=function(t){return c("oneOf")},O=function(t){return c("custom")},j=function(t){return c("instanceOf",{type:t})},m=function(t){return c("oneOfType")},k=function(t){return c("arrayOf",{type:Array})},w=function(t){return c("objectOf",{type:Object})},_=function(t){return o(c("shape",{type:Object}),"loose",{get:function(){return this}})},P=function(){return{type:null}};function T(t,e,n,r,u){var i;void 0===r&&(r=!1),void 0===u&&(u=!1);var f=((i={})[r?"get":"value"]=function(){return c(e,Object.assign({},n),u).def(r?t.defaults[e]:void 0)},i);return o(t,e,f)}function A(t,e,n){void 0===n&&(n={});var r=c(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r}var N=function(t,e){return c(t,e,!0)},x=function(t,e){return c(t,e)},D=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var n=this;if(f(e))return e.forEach(function(t){return n.extend(t)}),this;var r=e.validate,u=e.getter,i=void 0!==u&&u,o=e.type,c=void 0===o?null:o;return T(this,e.name,{type:t(c)&&c.type?null:c},i,!!r)},n(e,null,[{key:"any",get:function(){return a()}},{key:"func",get:function(){return s().def(this.defaults.func)}},{key:"bool",get:function(){return l().def(this.defaults.bool)}},{key:"string",get:function(){return d().def(this.defaults.string)}},{key:"number",get:function(){return y().def(this.defaults.number)}},{key:"array",get:function(){return p().def(this.defaults.array)}},{key:"object",get:function(){return b().def(this.defaults.object)}},{key:"symbol",get:function(){return v()}},{key:"integer",get:function(){return g().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=i,e.oneOf=h,e.custom=O,e.instanceOf=j,e.oneOfType=m,e.arrayOf=k,e.objectOf=w,e.shape=_,e.utils={toType:c,validate:function(){return!![].slice.call(arguments)}},e}();function E(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function u(){return e.apply(this,arguments)||this}return r(u,e),n(u,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),u}(D),e.defaults=Object.assign({},t),e}function V(t,e,n){return!0}"production"!==process.env.NODE_ENV&&!1===i.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");var q=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(E());export{a as any,p as array,k as arrayOf,l as bool,i as config,E as createTypes,O as custom,q as default,A as fromType,s as func,j as instanceOf,g as integer,P as nullable,y as number,b as object,w as objectOf,h as oneOf,m as oneOfType,_ as shape,d as string,v as symbol,x as toType,N as toValidableType,V as validateType};
import{isPlainObject as t}from"is-plain-object";function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(u=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?u:String(u),r)}var u}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}var i={silent:!1,logLevel:"warn"},o=Object.defineProperty,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function c(e,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var u={_vueTypes_name:{value:e,writable:!0},def:{value:function(e){return void 0===e?("default"in this&&delete this.default,this):(this.default=f(e)?function(){return[].concat(e)}:t(e)?function(){return Object.assign({},e)}:e,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(u.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,u)}var a=function(){return c("any",{},!0)},s=function(){return c("func",{type:Function},!0)},l=function(){return c("bool",{type:Boolean},!0)},y=function(){return c("string",{type:String},!0)},d=function(){return c("number",{type:Number},!0)},p=function(){return c("array",{type:Array},!0)},b=function(){return c("object",{type:Object},!0)},v=function(){return c("symbol")},g=function(){return c("integer",{type:Number})},h=function(t){return c("oneOf")},O=function(t){return c("custom")},j=function(t){return c("instanceOf",{type:t})},m=function(t){return c("oneOfType")},k=function(t){return c("arrayOf",{type:Array})},w=function(t){return c("objectOf",{type:Object})},P=function(t){return o(c("shape",{type:Object}),"loose",{get:function(){return this}})},T=function(){return{type:null}};function _(t,e,n,r,u){var i;void 0===r&&(r=!1),void 0===u&&(u=!1);var f=((i={})[r?"get":"value"]=function(){return c(e,Object.assign({},n),u).def(r?t.defaults[e]:void 0)},i);return o(t,e,f)}function A(t,e,n){void 0===n&&(n={});var r=c(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r}var S=function(t,e){return c(t,e,!0)},E=function(t,e){return c(t,e)},N=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var n=this;if(f(e))return e.forEach(function(t){return n.extend(t)}),this;var r=e.validate,u=e.getter,i=void 0!==u&&u,o=e.type,c=void 0===o?null:o;return _(this,e.name,{type:t(c)&&c.type?null:c},i,!!r)},n(e,null,[{key:"any",get:function(){return a()}},{key:"func",get:function(){return s().def(this.defaults.func)}},{key:"bool",get:function(){return l().def(this.defaults.bool)}},{key:"string",get:function(){return y().def(this.defaults.string)}},{key:"number",get:function(){return d().def(this.defaults.number)}},{key:"array",get:function(){return p().def(this.defaults.array)}},{key:"object",get:function(){return b().def(this.defaults.object)}},{key:"symbol",get:function(){return v()}},{key:"integer",get:function(){return g().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=i,e.oneOf=h,e.custom=O,e.instanceOf=j,e.oneOfType=m,e.arrayOf=k,e.objectOf=w,e.shape=P,e.utils={toType:c,validate:function(){return!![].slice.call(arguments)}},e}();function x(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function u(){return e.apply(this,arguments)||this}return r(u,e),n(u,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),u}(N),e.defaults=Object.assign({},t),e}function D(t,e,n){return!0}"production"!==process.env.NODE_ENV&&!1===i.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");var V=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(x());export{a as any,p as array,k as arrayOf,l as bool,i as config,x as createTypes,O as custom,V as default,A as fromType,s as func,j as instanceOf,g as integer,T as nullable,d as number,b as object,w as objectOf,h as oneOf,m as oneOfType,P as shape,y as string,v as symbol,E as toType,S as toValidableType,D as validateType};
//# sourceMappingURL=shim.m.js.map

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("is-plain-object")):"function"==typeof define&&define.amd?define(["exports","is-plain-object"],e):e((t||self).VueTypes={},t.isPlainObject)}(this,function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o={silent:!1,logLevel:"warn"},f=Object.defineProperty,c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function a(t,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var u={_vueTypes_name:{value:t,writable:!0},def:{value:function(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=c(t)?function(){return[].concat(t)}:e.isPlainObject(t)?function(){return Object.assign({},t)}:t,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(u.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,u)}var s=function(){return a("any",{},!0)},l=function(){return a("func",{type:Function},!0)},y=function(){return a("bool",{type:Boolean},!0)},d=function(){return a("string",{type:String},!0)},b=function(){return a("number",{type:Number},!0)},p=function(){return a("array",{type:Array},!0)},v=function(){return a("object",{type:Object},!0)},g=function(){return a("symbol")},O=function(){return a("integer",{type:Number})},h=function(t){return a("oneOf")},j=function(t){return a("custom")},m=function(t){return a("instanceOf",{type:t})},T=function(t){return a("oneOfType")},k=function(t){return a("arrayOf",{type:Array})},P=function(t){return a("objectOf",{type:Object})},_=function(t){return f(a("shape",{type:Object}),"loose",{get:function(){return this}})};function x(t,e,n,r,u){var i;void 0===r&&(r=!1),void 0===u&&(u=!1);var o=((i={})[r?"get":"value"]=function(){return a(e,Object.assign({},n),u).def(r?t.defaults[e]:void 0)},i);return f(t,e,o)}var A=/*#__PURE__*/function(){var t;return t=/*#__PURE__*/function(){function t(){}return t.extend=function(t){var n=this;if(c(t))return t.forEach(function(t){return n.extend(t)}),this;var r=t.validate,u=t.getter,i=void 0!==u&&u,o=t.type,f=void 0===o?null:o;return x(this,t.name,{type:e.isPlainObject(f)&&f.type?null:f},i,!!r)},r(t,null,[{key:"any",get:function(){return s()}},{key:"func",get:function(){return l().def(this.defaults.func)}},{key:"bool",get:function(){return y().def(this.defaults.bool)}},{key:"string",get:function(){return d().def(this.defaults.string)}},{key:"number",get:function(){return b().def(this.defaults.number)}},{key:"array",get:function(){return p().def(this.defaults.array)}},{key:"object",get:function(){return v().def(this.defaults.object)}},{key:"symbol",get:function(){return g()}},{key:"integer",get:function(){return O().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),t}(),t.defaults={},t.sensibleDefaults=void 0,t.config=o,t.oneOf=h,t.custom=j,t.instanceOf=m,t.oneOfType=T,t.arrayOf=k,t.objectOf=P,t.shape=_,t.utils={toType:a,validate:function(){return!![].slice.call(arguments)}},t}();function w(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return u(n,e),r(n,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),n}(A),e.defaults=Object.assign({},t),e}var q=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return u(e,t),e}(w());t.any=s,t.array=p,t.arrayOf=k,t.bool=y,t.config=o,t.createTypes=w,t.custom=j,t.default=q,t.fromType=function(t,e,n){void 0===n&&(n={});var r=a(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r},t.func=l,t.instanceOf=m,t.integer=O,t.nullable=function(){return{type:null}},t.number=b,t.object=v,t.objectOf=P,t.oneOf=h,t.oneOfType=T,t.shape=_,t.string=d,t.symbol=g,t.toType=function(t,e){return a(t,e)},t.toValidableType=function(t,e){return a(t,e,!0)},t.validateType=function(t,e,n){return!0}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("is-plain-object")):"function"==typeof define&&define.amd?define(["exports","is-plain-object"],e):e((t||self).VueTypes={},t.isPlainObject)}(this,function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?i:String(i),r)}var i}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}var o={silent:!1,logLevel:"warn"},f=Object.defineProperty,a=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function c(t,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var i={_vueTypes_name:{value:t,writable:!0},def:{value:function(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=a(t)?function(){return[].concat(t)}:e.isPlainObject(t)?function(){return Object.assign({},t)}:t,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(i.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,i)}var l=function(){return c("any",{},!0)},s=function(){return c("func",{type:Function},!0)},y=function(){return c("bool",{type:Boolean},!0)},d=function(){return c("string",{type:String},!0)},p=function(){return c("number",{type:Number},!0)},b=function(){return c("array",{type:Array},!0)},v=function(){return c("object",{type:Object},!0)},g=function(){return c("symbol")},O=function(){return c("integer",{type:Number})},j=function(t){return c("oneOf")},h=function(t){return c("custom")},m=function(t){return c("instanceOf",{type:t})},T=function(t){return c("oneOfType")},k=function(t){return c("arrayOf",{type:Array})},P=function(t){return c("objectOf",{type:Object})},w=function(t){return f(c("shape",{type:Object}),"loose",{get:function(){return this}})};function _(t,e,n,r,i){var u;void 0===r&&(r=!1),void 0===i&&(i=!1);var o=((u={})[r?"get":"value"]=function(){return c(e,Object.assign({},n),i).def(r?t.defaults[e]:void 0)},u);return f(t,e,o)}var x=/*#__PURE__*/function(){var t;return t=/*#__PURE__*/function(){function t(){}return t.extend=function(t){var n=this;if(a(t))return t.forEach(function(t){return n.extend(t)}),this;var r=t.validate,i=t.getter,u=void 0!==i&&i,o=t.type,f=void 0===o?null:o;return _(this,t.name,{type:e.isPlainObject(f)&&f.type?null:f},u,!!r)},r(t,null,[{key:"any",get:function(){return l()}},{key:"func",get:function(){return s().def(this.defaults.func)}},{key:"bool",get:function(){return y().def(this.defaults.bool)}},{key:"string",get:function(){return d().def(this.defaults.string)}},{key:"number",get:function(){return p().def(this.defaults.number)}},{key:"array",get:function(){return b().def(this.defaults.array)}},{key:"object",get:function(){return v().def(this.defaults.object)}},{key:"symbol",get:function(){return g()}},{key:"integer",get:function(){return O().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),t}(),t.defaults={},t.sensibleDefaults=void 0,t.config=o,t.oneOf=j,t.custom=h,t.instanceOf=m,t.oneOfType=T,t.arrayOf=k,t.objectOf=P,t.shape=w,t.utils={toType:c,validate:function(){return!![].slice.call(arguments)}},t}();function A(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return i(n,e),r(n,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),n}(x),e.defaults=Object.assign({},t),e}var S=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e}(A());t.any=l,t.array=b,t.arrayOf=k,t.bool=y,t.config=o,t.createTypes=A,t.custom=h,t.default=S,t.fromType=function(t,e,n){void 0===n&&(n={});var r=c(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r},t.func=s,t.instanceOf=m,t.integer=O,t.nullable=function(){return{type:null}},t.number=p,t.object=v,t.objectOf=P,t.oneOf=j,t.oneOfType=T,t.shape=w,t.string=d,t.symbol=g,t.toType=function(t,e){return c(t,e)},t.toValidableType=function(t,e){return c(t,e,!0)},t.validateType=function(t,e,n){return!0}});
//# sourceMappingURL=shim.umd.js.map

@@ -5,3 +5,3 @@ import { VueTypeDef, VueTypeValidableDef, VueProp, InferType, PropOptions, VueTypesConfig } from './types';

export declare function getNativeType(value: any): string;
declare type PlainObject = {
type PlainObject = {
[key: string]: any;

@@ -8,0 +8,0 @@ };

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

import { PropType } from '../types';
import { PropOptions } from '../types';
export declare const any: <T = any>() => import("../types").VueTypeValidableDef<T>;

@@ -13,5 +13,2 @@ export declare const func: <T extends (...args: any[]) => any>() => import("../types").VueTypeValidableDef<T>;

export declare const symbol: () => import("../types").VueTypeDef<symbol>;
export declare const nullable: () => {
type: PropType<null>;
validator(value: unknown): boolean;
};
export declare const nullable: () => PropOptions<null, null>;

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

import{isPlainObject as e}from"is-plain-object";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function u(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var a={silent:!1,logLevel:"warn"},f=["validator"],l=Object.prototype,c=l.toString,s=l.hasOwnProperty,d=/^\s*function (\w+)/;function v(e){var t,n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){var r=n.toString().match(d);return r?r[1]:""}return""}var p=e,y=function(e){return e},h=y;if("production"!==process.env.NODE_ENV){var b="undefined"!=typeof console;h=b?function(e,t){void 0===t&&(t=a.logLevel),!1===a.silent&&console[t]("[VueTypes warn]: "+e)}:y}var g=function(e,t){return s.call(e,t)},O=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},m=Array.isArray||function(e){return"[object Array]"===c.call(e)},j=function(e){return"[object Function]"===c.call(e)},_=function(e,t){return p(e)&&g(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t)},T=function(e){return p(e)&&(g(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return g(e,t)}))};function w(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function k(e,t,n){var r;void 0===n&&(n=!1);var i=!0,o="";r=p(e)?e:{type:e};var u=_(r)?r._vueTypes_name+" - ":"";if(T(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return i;if(!r.required&&void 0===t)return i;m(r.type)?(i=r.type.some(function(e){return!0===k(e,t,!0)}),o=r.type.map(function(e){return v(e)}).join(" or ")):i="Array"===(o=v(r))?m(t):"Object"===o?p(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return"";var t=e.constructor.toString().match(d);return t?t[1]:""}(t)===o:t instanceof r.type}if(!i){var a=u+'value "'+t+'" should be of type "'+o+'"';return!1===n?(h(a),!1):a}if(g(r,"validator")&&j(r.validator)){var f=h,l=[];if(h=function(e){l.push(e)},i=r.validator(t),h=f,!i){var c=(l.length>1?"* ":"")+l.join("\n* ");return l.length=0,!1===n?(h(c),i):c}}return i}function P(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(g(this,"default")&&delete this.default,this):j(e)||!0===k(this,e,!0)?(this.default=m(e)?function(){return[].concat(e)}:p(e)?function(){return Object.assign({},e)}:e,this):(h(this._vueTypes_name+' - invalid default value: "'+e+'"'),this)}}}),r=n.validator;return j(r)&&(n.validator=w(r,n)),n}function x(e,t){var n=P(e,t);return Object.defineProperty(n,"validate",{value:function(e){return j(this.validator)&&h(this._vueTypes_name+" - calling .validate() will overwrite the current custom validator function. Validator info:\n"+JSON.stringify(this)),this.validator=w(e,this),this}})}function A(e,t,n){var r,i,o=(r=t,i={},Object.getOwnPropertyNames(r).forEach(function(e){i[e]=Object.getOwnPropertyDescriptor(r,e)}),Object.defineProperties({},i));if(o._vueTypes_name=e,!p(n))return o;var a,l,c=n.validator,s=u(n,f);if(j(c)){var d=o.validator;d&&(d=null!==(l=(a=d).__original)&&void 0!==l?l:a),o.validator=w(d?function(e){return d.call(this,e)&&c.call(this,e)}:c,o)}return Object.assign(o,s)}function E(e){return e.replace(/^(?!\s*$)/gm," ")}var S=function(){return x("any",{})},N=function(){return x("function",{type:Function})},V=function(){return x("boolean",{type:Boolean})},q=function(){return x("string",{type:String})},L=function(){return x("number",{type:Number})},B=function(){return x("array",{type:Array})},D=function(){return x("object",{type:Object})},F=function(){return P("integer",{type:Number,validator:function(e){var t=O(e);return!1===t&&h('integer - "'+e+'" is not an integer'),t}})},Y=function(){return P("symbol",{validator:function(e){var t="symbol"==typeof e;return!1===t&&h('symbol - invalid value "'+e+'"'),t}})},I=function(){return Object.defineProperty({type:null,validator:function(e){var t=null===e;return!1===t&&h("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"})};function J(e,t){if(void 0===t&&(t="custom validation failed"),"function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return P(e.name||"<<anonymous function>>",{type:null,validator:function(n){var r=e(n);return r||h(this._vueTypes_name+" - "+t),r}})}function M(e){if(!m(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.map(function(e){return"symbol"==typeof e?e.toString():e}).join('", "')+'".',n={validator:function(n){var r=-1!==e.indexOf(n);return r||h(t),r}};if(-1===e.indexOf(null)){var r=e.reduce(function(e,t){if(null!=t){var n=t.constructor;-1===e.indexOf(n)&&e.push(n)}return e},[]);r.length>0&&(n.type=r)}return P("oneOf",n)}function R(e){if(!m(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=!1,r=[],i=0;i<e.length;i+=1){var o=e[i];if(T(o)){if(j(o.validator)&&(t=!0),_(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(_(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){h('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter(function(e,t){return r.indexOf(e)===t});var u=!1===n&&r.length>0?r:null;return P("oneOfType",t?{type:u,validator:function(t){var n=[],r=e.some(function(e){var r=k(e,t,!0);return"string"==typeof r&&n.push(r),!0===r});return r||h("oneOfType - provided value does not match any of the "+n.length+" passed-in validators:\n"+E(n.join("\n"))),r}}:{type:u})}function U(e){return P("arrayOf",{type:Array,validator:function(t){var n="",r=t.every(function(t){return!0===(n=k(e,t,!0))});return r||h("arrayOf - value validation error:\n"+E(n)),r}})}function $(e){return P("instanceOf",{type:e})}function z(e){return P("objectOf",{type:Object,validator:function(t){var n="",r=Object.keys(t).every(function(r){return!0===(n=k(e,t[r],!0))});return r||h("objectOf - value validation error:\n"+E(n)),r}})}function C(e){var t=Object.keys(e),n=t.filter(function(t){var n;return!(null===(n=e[t])||void 0===n||!n.required)}),r=P("shape",{type:Object,validator:function(r){var i=this;if(!p(r))return!1;var o=Object.keys(r);if(n.length>0&&n.some(function(e){return-1===o.indexOf(e)})){var u=n.filter(function(e){return-1===o.indexOf(e)});return h(1===u.length?'shape - required property "'+u[0]+'" is not defined.':'shape - required properties "'+u.join('", "')+'" are not defined.'),!1}return o.every(function(n){if(-1===t.indexOf(n))return!0===i._vueTypes_isLoose||(h('shape - shape definition does not include a "'+n+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var o=k(e[n],r[n],!0);return"string"==typeof o&&h('shape - "'+n+'" property validation error:\n '+E(o)),!0===o})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),r}var G=["name","validate","getter"],H=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var t=this;if(h("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),m(e))return e.forEach(function(e){return t.extend(e)}),this;var n=e.name,r=e.validate,i=void 0!==r&&r,o=e.getter,a=void 0!==o&&o,f=u(e,G);if(g(this,n))throw new TypeError('[VueTypes error]: Type "'+n+'" already defined');var l,c=f.type;return _(c)?(delete f.type,Object.defineProperty(this,n,a?{get:function(){return A(n,c,f)}}:{value:function(){var e,t=A(n,c,f);return t.validator&&(t.validator=(e=t.validator).bind.apply(e,[t].concat([].slice.call(arguments)))),t}})):(l=a?{get:function(){var e=Object.assign({},f);return i?x(n,e):P(n,e)},enumerable:!0}:{value:function(){var e,t,r=Object.assign({},f);return e=i?x(n,r):P(n,r),r.validator&&(e.validator=(t=r.validator).bind.apply(t,[e].concat([].slice.call(arguments)))),e},enumerable:!0},Object.defineProperty(this,n,l))},n(e,null,[{key:"any",get:function(){return S()}},{key:"func",get:function(){return N().def(this.defaults.func)}},{key:"bool",get:function(){return void 0===this.defaults.bool?V():V().def(this.defaults.bool)}},{key:"string",get:function(){return q().def(this.defaults.string)}},{key:"number",get:function(){return L().def(this.defaults.number)}},{key:"array",get:function(){return B().def(this.defaults.array)}},{key:"object",get:function(){return D().def(this.defaults.object)}},{key:"integer",get:function(){return F().def(this.defaults.integer)}},{key:"symbol",get:function(){return Y()}},{key:"nullable",get:function(){return I()}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=a,e.custom=J,e.oneOf=M,e.instanceOf=$,e.oneOfType=R,e.arrayOf=U,e.objectOf=z,e.shape=C,e.utils={validate:function(e,t){return!0===k(t,e,!0)},toType:function(e,t,n){return void 0===n&&(n=!1),n?x(e,t):P(e,t)}},e}();function K(e){var t;return void 0===e&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),t=/*#__PURE__*/function(t){function o(){return t.apply(this,arguments)||this}return i(o,t),n(o,null,[{key:"sensibleDefaults",get:function(){return r({},this.defaults)},set:function(t){this.defaults=!1!==t?r({},!0!==t?t:e):{}}}]),o}(H),t.defaults=r({},e),t}var Q=/*#__PURE__*/function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(K());export{S as any,B as array,U as arrayOf,V as bool,a as config,K as createTypes,J as custom,Q as default,A as fromType,N as func,$ as instanceOf,F as integer,I as nullable,L as number,D as object,z as objectOf,M as oneOf,R as oneOfType,C as shape,q as string,Y as symbol,P as toType,x as toValidableType,k as validateType};
import{isPlainObject as e}from"is-plain-object";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function u(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var a={silent:!1,logLevel:"warn"},f=["validator"],l=Object.prototype,c=l.toString,s=l.hasOwnProperty,v=/^\s*function (\w+)/;function d(e){var t,n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){var r=n.toString().match(v);return r?r[1]:""}return""}var y=e,p=function(e){return e},h=p;if("production"!==process.env.NODE_ENV){var b="undefined"!=typeof console;h=b?function(e,t){void 0===t&&(t=a.logLevel),!1===a.silent&&console[t]("[VueTypes warn]: "+e)}:p}var g=function(e,t){return s.call(e,t)},O=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},m=Array.isArray||function(e){return"[object Array]"===c.call(e)},j=function(e){return"[object Function]"===c.call(e)},_=function(e,t){return y(e)&&g(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t)},T=function(e){return y(e)&&(g(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return g(e,t)}))};function w(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function P(e,t,n){var r;void 0===n&&(n=!1);var i=!0,o="";r=y(e)?e:{type:e};var u=_(r)?r._vueTypes_name+" - ":"";if(T(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return i;if(!r.required&&null==t)return i;m(r.type)?(i=r.type.some(function(e){return!0===P(e,t,!0)}),o=r.type.map(function(e){return d(e)}).join(" or ")):i="Array"===(o=d(r))?m(t):"Object"===o?y(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return"";var t=e.constructor.toString().match(v);return t?t[1]:""}(t)===o:t instanceof r.type}if(!i){var a=u+'value "'+t+'" should be of type "'+o+'"';return!1===n?(h(a),!1):a}if(g(r,"validator")&&j(r.validator)){var f=h,l=[];if(h=function(e){l.push(e)},i=r.validator(t),h=f,!i){var c=(l.length>1?"* ":"")+l.join("\n* ");return l.length=0,!1===n?(h(c),i):c}}return i}function k(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(g(this,"default")&&delete this.default,this):j(e)||!0===P(this,e,!0)?(this.default=m(e)?function(){return[].concat(e)}:y(e)?function(){return Object.assign({},e)}:e,this):(h(this._vueTypes_name+' - invalid default value: "'+e+'"'),this)}}}),r=n.validator;return j(r)&&(n.validator=w(r,n)),n}function x(e,t){var n=k(e,t);return Object.defineProperty(n,"validate",{value:function(e){return j(this.validator)&&h(this._vueTypes_name+" - calling .validate() will overwrite the current custom validator function. Validator info:\n"+JSON.stringify(this)),this.validator=w(e,this),this}})}function S(e,t,n){var r,i,o=(r=t,i={},Object.getOwnPropertyNames(r).forEach(function(e){i[e]=Object.getOwnPropertyDescriptor(r,e)}),Object.defineProperties({},i));if(o._vueTypes_name=e,!y(n))return o;var a,l,c=n.validator,s=u(n,f);if(j(c)){var v=o.validator;v&&(v=null!==(l=(a=v).__original)&&void 0!==l?l:a),o.validator=w(v?function(e){return v.call(this,e)&&c.call(this,e)}:c,o)}return Object.assign(o,s)}function E(e){return e.replace(/^(?!\s*$)/gm," ")}var A=function(){return x("any",{})},N=function(){return x("function",{type:Function})},V=function(){return x("boolean",{type:Boolean})},q=function(){return x("string",{type:String})},L=function(){return x("number",{type:Number})},B=function(){return x("array",{type:Array})},D=function(){return x("object",{type:Object})},F=function(){return k("integer",{type:Number,validator:function(e){var t=O(e);return!1===t&&h('integer - "'+e+'" is not an integer'),t}})},Y=function(){return k("symbol",{validator:function(e){var t="symbol"==typeof e;return!1===t&&h('symbol - invalid value "'+e+'"'),t}})},I=function(){return Object.defineProperty({type:null,validator:function(e){var t=null===e;return!1===t&&h("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"})};function J(e,t){if(void 0===t&&(t="custom validation failed"),"function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return k(e.name||"<<anonymous function>>",{type:null,validator:function(n){var r=e(n);return r||h(this._vueTypes_name+" - "+t),r}})}function M(e){if(!m(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.map(function(e){return"symbol"==typeof e?e.toString():e}).join('", "')+'".',n={validator:function(n){var r=-1!==e.indexOf(n);return r||h(t),r}};if(-1===e.indexOf(null)){var r=e.reduce(function(e,t){if(null!=t){var n=t.constructor;-1===e.indexOf(n)&&e.push(n)}return e},[]);r.length>0&&(n.type=r)}return k("oneOf",n)}function R(e){if(!m(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=!1,r=[],i=0;i<e.length;i+=1){var o=e[i];if(T(o)){if(j(o.validator)&&(t=!0),_(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(_(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){h('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter(function(e,t){return r.indexOf(e)===t});var u=!1===n&&r.length>0?r:null;return k("oneOfType",t?{type:u,validator:function(t){var n=[],r=e.some(function(e){var r=P(e,t,!0);return"string"==typeof r&&n.push(r),!0===r});return r||h("oneOfType - provided value does not match any of the "+n.length+" passed-in validators:\n"+E(n.join("\n"))),r}}:{type:u})}function U(e){return k("arrayOf",{type:Array,validator:function(t){var n="",r=t.every(function(t){return!0===(n=P(e,t,!0))});return r||h("arrayOf - value validation error:\n"+E(n)),r}})}function $(e){return k("instanceOf",{type:e})}function z(e){return k("objectOf",{type:Object,validator:function(t){var n="",r=Object.keys(t).every(function(r){return!0===(n=P(e,t[r],!0))});return r||h("objectOf - value validation error:\n"+E(n)),r}})}function C(e){var t=Object.keys(e),n=t.filter(function(t){var n;return!(null===(n=e[t])||void 0===n||!n.required)}),r=k("shape",{type:Object,validator:function(r){var i=this;if(!y(r))return!1;var o=Object.keys(r);if(n.length>0&&n.some(function(e){return-1===o.indexOf(e)})){var u=n.filter(function(e){return-1===o.indexOf(e)});return h(1===u.length?'shape - required property "'+u[0]+'" is not defined.':'shape - required properties "'+u.join('", "')+'" are not defined.'),!1}return o.every(function(n){if(-1===t.indexOf(n))return!0===i._vueTypes_isLoose||(h('shape - shape definition does not include a "'+n+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var o=P(e[n],r[n],!0);return"string"==typeof o&&h('shape - "'+n+'" property validation error:\n '+E(o)),!0===o})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),r}var G=["name","validate","getter"],H=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var t=this;if(h("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),m(e))return e.forEach(function(e){return t.extend(e)}),this;var n=e.name,r=e.validate,i=void 0!==r&&r,o=e.getter,a=void 0!==o&&o,f=u(e,G);if(g(this,n))throw new TypeError('[VueTypes error]: Type "'+n+'" already defined');var l,c=f.type;return _(c)?(delete f.type,Object.defineProperty(this,n,a?{get:function(){return S(n,c,f)}}:{value:function(){var e,t=S(n,c,f);return t.validator&&(t.validator=(e=t.validator).bind.apply(e,[t].concat([].slice.call(arguments)))),t}})):(l=a?{get:function(){var e=Object.assign({},f);return i?x(n,e):k(n,e)},enumerable:!0}:{value:function(){var e,t,r=Object.assign({},f);return e=i?x(n,r):k(n,r),r.validator&&(e.validator=(t=r.validator).bind.apply(t,[e].concat([].slice.call(arguments)))),e},enumerable:!0},Object.defineProperty(this,n,l))},n(e,null,[{key:"any",get:function(){return A()}},{key:"func",get:function(){return N().def(this.defaults.func)}},{key:"bool",get:function(){return void 0===this.defaults.bool?V():V().def(this.defaults.bool)}},{key:"string",get:function(){return q().def(this.defaults.string)}},{key:"number",get:function(){return L().def(this.defaults.number)}},{key:"array",get:function(){return B().def(this.defaults.array)}},{key:"object",get:function(){return D().def(this.defaults.object)}},{key:"integer",get:function(){return F().def(this.defaults.integer)}},{key:"symbol",get:function(){return Y()}},{key:"nullable",get:function(){return I()}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=a,e.custom=J,e.oneOf=M,e.instanceOf=$,e.oneOfType=R,e.arrayOf=U,e.objectOf=z,e.shape=C,e.utils={validate:function(e,t){return!0===P(t,e,!0)},toType:function(e,t,n){return void 0===n&&(n=!1),n?x(e,t):k(e,t)}},e}();function K(e){var t;return void 0===e&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),t=/*#__PURE__*/function(t){function o(){return t.apply(this,arguments)||this}return i(o,t),n(o,null,[{key:"sensibleDefaults",get:function(){return r({},this.defaults)},set:function(t){this.defaults=!1!==t?r({},!0!==t?t:e):{}}}]),o}(H),t.defaults=r({},e),t}var Q=/*#__PURE__*/function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(K());export{A as any,B as array,U as arrayOf,V as bool,a as config,K as createTypes,J as custom,Q as default,S as fromType,N as func,$ as instanceOf,F as integer,I as nullable,L as number,D as object,z as objectOf,M as oneOf,R as oneOfType,C as shape,q as string,Y as symbol,k as toType,x as toValidableType,P as validateType};
//# sourceMappingURL=vue-types.m.js.map

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

import{isPlainObject as e}from"is-plain-object";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}const r={silent:!1,logLevel:"warn"},i=["validator"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\s*function (\w+)/;function l(e){var t;const n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){const e=n.toString().match(u);return e?e[1]:""}return""}const c=e,d=e=>e;let f=d;if("production"!==process.env.NODE_ENV){const e="undefined"!=typeof console;f=e?function(e,t=r.logLevel){!1===r.silent&&console[t](`[VueTypes warn]: ${e}`)}:d}const p=(e,t)=>s.call(e,t),y=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},v=Array.isArray||function(e){return"[object Array]"===a.call(e)},h=e=>"[object Function]"===a.call(e),b=(e,t)=>c(e)&&p(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),g=e=>c(e)&&(p(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>p(e,t)));function O(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function m(e,t,n=!1){let r,i=!0,o="";r=c(e)?e:{type:e};const a=b(r)?r._vueTypes_name+" - ":"";if(g(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return i;if(!r.required&&void 0===t)return i;v(r.type)?(i=r.type.some(e=>!0===m(e,t,!0)),o=r.type.map(e=>l(e)).join(" or ")):(o=l(r),i="Array"===o?v(t):"Object"===o?c(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return"";const t=e.constructor.toString().match(u);return t?t[1]:""}(t)===o:t instanceof r.type)}if(!i){const e=`${a}value "${t}" should be of type "${o}"`;return!1===n?(f(e),!1):e}if(p(r,"validator")&&h(r.validator)){const e=f,o=[];if(f=e=>{o.push(e)},i=r.validator(t),f=e,!i){const e=(o.length>1?"* ":"")+o.join("\n* ");return o.length=0,!1===n?(f(e),i):e}}return i}function j(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(p(this,"default")&&delete this.default,this):h(e)||!0===m(this,e,!0)?(this.default=v(e)?()=>[...e]:c(e)?()=>Object.assign({},e):e,this):(f(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:r}=n;return h(r)&&(n.validator=O(r,n)),n}function _(e,t){const n=j(e,t);return Object.defineProperty(n,"validate",{value(e){return h(this.validator)&&f(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=O(e,this),this}})}function T(e,t,r){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=Object.getOwnPropertyDescriptor(e,n)}),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!c(r))return o;const{validator:a}=r,s=n(r,i);if(h(a)){let{validator:e}=o;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),o.validator=O(e?function(t){return e.call(this,t)&&a.call(this,t)}:a,o)}var u,l;return Object.assign(o,s)}function $(e){return e.replace(/^(?!\s*$)/gm," ")}const w=()=>_("any",{}),x=()=>_("function",{type:Function}),P=()=>_("boolean",{type:Boolean}),A=()=>_("string",{type:String}),E=()=>_("number",{type:Number}),S=()=>_("array",{type:Array}),N=()=>_("object",{type:Object}),V=()=>j("integer",{type:Number,validator(e){const t=y(e);return!1===t&&f(`integer - "${e}" is not an integer`),t}}),q=()=>j("symbol",{validator(e){const t="symbol"==typeof e;return!1===t&&f(`symbol - invalid value "${e}"`),t}}),k=()=>Object.defineProperty({type:null,validator(e){const t=null===e;return!1===t&&f("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"});function D(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return j(e.name||"<<anonymous function>>",{type:null,validator(n){const r=e(n);return r||f(`${this._vueTypes_name} - ${t}`),r}})}function L(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map(e=>"symbol"==typeof e?e.toString():e).join('", "')}".`,n={validator(n){const r=-1!==e.indexOf(n);return r||f(t),r}};if(-1===e.indexOf(null)){const t=e.reduce((e,t)=>{if(null!=t){const n=t.constructor;-1===e.indexOf(n)&&e.push(n)}return e},[]);t.length>0&&(n.type=t)}return j("oneOf",n)}function B(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=!1,r=[];for(let i=0;i<e.length;i+=1){const o=e[i];if(g(o)){if(h(o.validator)&&(t=!0),b(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(b(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){f('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter((e,t)=>r.indexOf(e)===t);const i=!1===n&&r.length>0?r:null;return j("oneOfType",t?{type:i,validator(t){const n=[],r=e.some(e=>{const r=m(e,t,!0);return"string"==typeof r&&n.push(r),!0===r});return r||f(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${$(n.join("\n"))}`),r}}:{type:i})}function F(e){return j("arrayOf",{type:Array,validator(t){let n="";const r=t.every(t=>(n=m(e,t,!0),!0===n));return r||f(`arrayOf - value validation error:\n${$(n)}`),r}})}function Y(e){return j("instanceOf",{type:e})}function I(e){return j("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every(r=>(n=m(e,t[r],!0),!0===n));return r||f(`objectOf - value validation error:\n${$(n)}`),r}})}function J(e){const t=Object.keys(e),n=t.filter(t=>{var n;return!(null===(n=e[t])||void 0===n||!n.required)}),r=j("shape",{type:Object,validator(r){if(!c(r))return!1;const i=Object.keys(r);if(n.length>0&&n.some(e=>-1===i.indexOf(e))){const e=n.filter(e=>-1===i.indexOf(e));return f(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return i.every(n=>{if(-1===t.indexOf(n))return!0===this._vueTypes_isLoose||(f(`shape - shape definition does not include a "${n}" property. Allowed keys: "${t.join('", "')}".`),!1);const i=m(e[n],r[n],!0);return"string"==typeof i&&f(`shape - "${n}" property validation error:\n ${$(i)}`),!0===i})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const M=["name","validate","getter"],R=/*#__PURE__*/(()=>{var e;return(e=class{static get any(){return w()}static get func(){return x().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?P():P().def(this.defaults.bool)}static get string(){return A().def(this.defaults.string)}static get number(){return E().def(this.defaults.number)}static get array(){return S().def(this.defaults.array)}static get object(){return N().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return q()}static get nullable(){return k()}static extend(e){if(f("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),v(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:r=!1,getter:i=!1}=e,o=n(e,M);if(p(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:a}=o;if(b(a))return delete o.type,Object.defineProperty(this,t,i?{get:()=>T(t,a,o)}:{value(...e){const n=T(t,a,o);return n.validator&&(n.validator=n.validator.bind(n,...e)),n}});let s;return s=i?{get(){const e=Object.assign({},o);return r?_(t,e):j(t,e)},enumerable:!0}:{value(...e){const n=Object.assign({},o);let i;return i=r?_(t,n):j(t,n),n.validator&&(i.validator=n.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}}).defaults={},e.sensibleDefaults=void 0,e.config=r,e.custom=D,e.oneOf=L,e.instanceOf=Y,e.oneOfType=B,e.arrayOf=F,e.objectOf=I,e.shape=J,e.utils={validate:(e,t)=>!0===m(t,e,!0),toType:(e,t,n=!1)=>n?_(e,t):j(e,t)},e})();function U(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var n;return(n=class extends R{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(n){this.defaults=!1!==n?t({},!0!==n?n:e):{}}}).defaults=t({},e),n}class z extends(U()){}export{w as any,S as array,F as arrayOf,P as bool,r as config,U as createTypes,D as custom,z as default,T as fromType,x as func,Y as instanceOf,V as integer,k as nullable,E as number,N as object,I as objectOf,L as oneOf,B as oneOfType,J as shape,A as string,q as symbol,j as toType,_ as toValidableType,m as validateType};
import{isPlainObject as e}from"is-plain-object";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}const r={silent:!1,logLevel:"warn"},i=["validator"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\s*function (\w+)/;function l(e){var t;const n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){const e=n.toString().match(u);return e?e[1]:""}return""}const c=e,f=e=>e;let d=f;if("production"!==process.env.NODE_ENV){const e="undefined"!=typeof console;d=e?function(e,t=r.logLevel){!1===r.silent&&console[t](`[VueTypes warn]: ${e}`)}:f}const p=(e,t)=>s.call(e,t),y=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},v=Array.isArray||function(e){return"[object Array]"===a.call(e)},h=e=>"[object Function]"===a.call(e),b=(e,t)=>c(e)&&p(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t),g=e=>c(e)&&(p(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>p(e,t)));function O(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function m(e,t,n=!1){let r,i=!0,o="";r=c(e)?e:{type:e};const a=b(r)?r._vueTypes_name+" - ":"";if(g(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return i;if(!r.required&&null==t)return i;v(r.type)?(i=r.type.some(e=>!0===m(e,t,!0)),o=r.type.map(e=>l(e)).join(" or ")):(o=l(r),i="Array"===o?v(t):"Object"===o?c(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return"";const t=e.constructor.toString().match(u);return t?t[1]:""}(t)===o:t instanceof r.type)}if(!i){const e=`${a}value "${t}" should be of type "${o}"`;return!1===n?(d(e),!1):e}if(p(r,"validator")&&h(r.validator)){const e=d,o=[];if(d=e=>{o.push(e)},i=r.validator(t),d=e,!i){const e=(o.length>1?"* ":"")+o.join("\n* ");return o.length=0,!1===n?(d(e),i):e}}return i}function j(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(p(this,"default")&&delete this.default,this):h(e)||!0===m(this,e,!0)?(this.default=v(e)?()=>[...e]:c(e)?()=>Object.assign({},e):e,this):(d(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:r}=n;return h(r)&&(n.validator=O(r,n)),n}function _(e,t){const n=j(e,t);return Object.defineProperty(n,"validate",{value(e){return h(this.validator)&&d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=O(e,this),this}})}function T(e,t,r){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=Object.getOwnPropertyDescriptor(e,n)}),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!c(r))return o;const{validator:a}=r,s=n(r,i);if(h(a)){let{validator:e}=o;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),o.validator=O(e?function(t){return e.call(this,t)&&a.call(this,t)}:a,o)}var u,l;return Object.assign(o,s)}function $(e){return e.replace(/^(?!\s*$)/gm," ")}const w=()=>_("any",{}),x=()=>_("function",{type:Function}),P=()=>_("boolean",{type:Boolean}),A=()=>_("string",{type:String}),E=()=>_("number",{type:Number}),S=()=>_("array",{type:Array}),N=()=>_("object",{type:Object}),V=()=>j("integer",{type:Number,validator(e){const t=y(e);return!1===t&&d(`integer - "${e}" is not an integer`),t}}),q=()=>j("symbol",{validator(e){const t="symbol"==typeof e;return!1===t&&d(`symbol - invalid value "${e}"`),t}}),k=()=>Object.defineProperty({type:null,validator(e){const t=null===e;return!1===t&&d("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"});function D(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return j(e.name||"<<anonymous function>>",{type:null,validator(n){const r=e(n);return r||d(`${this._vueTypes_name} - ${t}`),r}})}function L(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.map(e=>"symbol"==typeof e?e.toString():e).join('", "')}".`,n={validator(n){const r=-1!==e.indexOf(n);return r||d(t),r}};if(-1===e.indexOf(null)){const t=e.reduce((e,t)=>{if(null!=t){const n=t.constructor;-1===e.indexOf(n)&&e.push(n)}return e},[]);t.length>0&&(n.type=t)}return j("oneOf",n)}function B(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=!1,r=[];for(let i=0;i<e.length;i+=1){const o=e[i];if(g(o)){if(h(o.validator)&&(t=!0),b(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(b(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){d('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter((e,t)=>r.indexOf(e)===t);const i=!1===n&&r.length>0?r:null;return j("oneOfType",t?{type:i,validator(t){const n=[],r=e.some(e=>{const r=m(e,t,!0);return"string"==typeof r&&n.push(r),!0===r});return r||d(`oneOfType - provided value does not match any of the ${n.length} passed-in validators:\n${$(n.join("\n"))}`),r}}:{type:i})}function F(e){return j("arrayOf",{type:Array,validator(t){let n="";const r=t.every(t=>(n=m(e,t,!0),!0===n));return r||d(`arrayOf - value validation error:\n${$(n)}`),r}})}function Y(e){return j("instanceOf",{type:e})}function I(e){return j("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every(r=>(n=m(e,t[r],!0),!0===n));return r||d(`objectOf - value validation error:\n${$(n)}`),r}})}function J(e){const t=Object.keys(e),n=t.filter(t=>{var n;return!(null===(n=e[t])||void 0===n||!n.required)}),r=j("shape",{type:Object,validator(r){if(!c(r))return!1;const i=Object.keys(r);if(n.length>0&&n.some(e=>-1===i.indexOf(e))){const e=n.filter(e=>-1===i.indexOf(e));return d(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return i.every(n=>{if(-1===t.indexOf(n))return!0===this._vueTypes_isLoose||(d(`shape - shape definition does not include a "${n}" property. Allowed keys: "${t.join('", "')}".`),!1);const i=m(e[n],r[n],!0);return"string"==typeof i&&d(`shape - "${n}" property validation error:\n ${$(i)}`),!0===i})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const M=["name","validate","getter"],R=/*#__PURE__*/(()=>{var e;return(e=class{static get any(){return w()}static get func(){return x().def(this.defaults.func)}static get bool(){return void 0===this.defaults.bool?P():P().def(this.defaults.bool)}static get string(){return A().def(this.defaults.string)}static get number(){return E().def(this.defaults.number)}static get array(){return S().def(this.defaults.array)}static get object(){return N().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return q()}static get nullable(){return k()}static extend(e){if(d("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),v(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:r=!1,getter:i=!1}=e,o=n(e,M);if(p(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:a}=o;if(b(a))return delete o.type,Object.defineProperty(this,t,i?{get:()=>T(t,a,o)}:{value(...e){const n=T(t,a,o);return n.validator&&(n.validator=n.validator.bind(n,...e)),n}});let s;return s=i?{get(){const e=Object.assign({},o);return r?_(t,e):j(t,e)},enumerable:!0}:{value(...e){const n=Object.assign({},o);let i;return i=r?_(t,n):j(t,n),n.validator&&(i.validator=n.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}}).defaults={},e.sensibleDefaults=void 0,e.config=r,e.custom=D,e.oneOf=L,e.instanceOf=Y,e.oneOfType=B,e.arrayOf=F,e.objectOf=I,e.shape=J,e.utils={validate:(e,t)=>!0===m(t,e,!0),toType:(e,t,n=!1)=>n?_(e,t):j(e,t)},e})();function U(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var n;return(n=class extends R{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(n){this.defaults=!1!==n?t({},!0!==n?n:e):{}}}).defaults=t({},e),n}class z extends(U()){}export{w as any,S as array,F as arrayOf,P as bool,r as config,U as createTypes,D as custom,z as default,T as fromType,x as func,Y as instanceOf,V as integer,k as nullable,E as number,N as object,I as objectOf,L as oneOf,B as oneOfType,J as shape,A as string,q as symbol,j as toType,_ as toValidableType,m as validateType};
//# sourceMappingURL=vue-types.modern.js.map

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("is-plain-object")):"function"==typeof define&&define.amd?define(["exports","is-plain-object"],t):t((e||self).VueTypes={},e.isPlainObject)}(this,function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function a(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var f={silent:!1,logLevel:"warn"},l=["validator"],c=Object.prototype,s=c.toString,d=c.hasOwnProperty,y=/^\s*function (\w+)/;function p(e){var t,n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){var r=n.toString().match(y);return r?r[1]:""}return""}var v=t.isPlainObject,b=function(e){return e},h=function(e,t){return d.call(e,t)},g=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},O=Array.isArray||function(e){return"[object Array]"===s.call(e)},m=function(e){return"[object Function]"===s.call(e)},j=function(e,t){return v(e)&&h(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t)},T=function(e){return v(e)&&(h(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return h(e,t)}))};function _(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function w(e,t,n){var r;void 0===n&&(n=!1);var i=!0,o="";r=v(e)?e:{type:e};var u=j(r)?r._vueTypes_name+" - ":"";if(T(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return i;if(!r.required&&void 0===t)return i;O(r.type)?(i=r.type.some(function(e){return!0===w(e,t,!0)}),o=r.type.map(function(e){return p(e)}).join(" or ")):i="Array"===(o=p(r))?O(t):"Object"===o?v(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return"";var t=e.constructor.toString().match(y);return t?t[1]:""}(t)===o:t instanceof r.type}if(!i){var a=u+'value "'+t+'" should be of type "'+o+'"';return!1===n?(b(a),!1):a}if(h(r,"validator")&&m(r.validator)){var f=b,l=[];if(b=function(e){l.push(e)},i=r.validator(t),b=f,!i){var c=(l.length>1?"* ":"")+l.join("\n* ");return l.length=0,!1===n?(b(c),i):c}}return i}function P(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(h(this,"default")&&delete this.default,this):m(e)||!0===w(this,e,!0)?(this.default=O(e)?function(){return[].concat(e)}:v(e)?function(){return Object.assign({},e)}:e,this):(b(this._vueTypes_name+' - invalid default value: "'+e+'"'),this)}}}),r=n.validator;return m(r)&&(n.validator=_(r,n)),n}function k(e,t){var n=P(e,t);return Object.defineProperty(n,"validate",{value:function(e){return m(this.validator)&&b(this._vueTypes_name+" - calling .validate() will overwrite the current custom validator function. Validator info:\n"+JSON.stringify(this)),this.validator=_(e,this),this}})}function x(e,t,n){var r,i,o=(r=t,i={},Object.getOwnPropertyNames(r).forEach(function(e){i[e]=Object.getOwnPropertyDescriptor(r,e)}),Object.defineProperties({},i));if(o._vueTypes_name=e,!v(n))return o;var u,f,c=n.validator,s=a(n,l);if(m(c)){var d=o.validator;d&&(d=null!==(f=(u=d).__original)&&void 0!==f?f:u),o.validator=_(d?function(e){return d.call(this,e)&&c.call(this,e)}:c,o)}return Object.assign(o,s)}function A(e){return e.replace(/^(?!\s*$)/gm," ")}var S=function(){return k("any",{})},q=function(){return k("function",{type:Function})},V=function(){return k("boolean",{type:Boolean})},E=function(){return k("string",{type:String})},N=function(){return k("number",{type:Number})},B=function(){return k("array",{type:Array})},F=function(){return k("object",{type:Object})},L=function(){return P("integer",{type:Number,validator:function(e){var t=g(e);return!1===t&&b('integer - "'+e+'" is not an integer'),t}})},D=function(){return P("symbol",{validator:function(e){var t="symbol"==typeof e;return!1===t&&b('symbol - invalid value "'+e+'"'),t}})},Y=function(){return Object.defineProperty({type:null,validator:function(e){var t=null===e;return!1===t&&b("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"})};function I(e,t){if(void 0===t&&(t="custom validation failed"),"function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return P(e.name||"<<anonymous function>>",{type:null,validator:function(n){var r=e(n);return r||b(this._vueTypes_name+" - "+t),r}})}function J(e){if(!O(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.map(function(e){return"symbol"==typeof e?e.toString():e}).join('", "')+'".',n={validator:function(n){var r=-1!==e.indexOf(n);return r||b(t),r}};if(-1===e.indexOf(null)){var r=e.reduce(function(e,t){if(null!=t){var n=t.constructor;-1===e.indexOf(n)&&e.push(n)}return e},[]);r.length>0&&(n.type=r)}return P("oneOf",n)}function M(e){if(!O(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=!1,r=[],i=0;i<e.length;i+=1){var o=e[i];if(T(o)){if(m(o.validator)&&(t=!0),j(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(j(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){b('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter(function(e,t){return r.indexOf(e)===t});var u=!1===n&&r.length>0?r:null;return P("oneOfType",t?{type:u,validator:function(t){var n=[],r=e.some(function(e){var r=w(e,t,!0);return"string"==typeof r&&n.push(r),!0===r});return r||b("oneOfType - provided value does not match any of the "+n.length+" passed-in validators:\n"+A(n.join("\n"))),r}}:{type:u})}function R(e){return P("arrayOf",{type:Array,validator:function(t){var n="",r=t.every(function(t){return!0===(n=w(e,t,!0))});return r||b("arrayOf - value validation error:\n"+A(n)),r}})}function U(e){return P("instanceOf",{type:e})}function $(e){return P("objectOf",{type:Object,validator:function(t){var n="",r=Object.keys(t).every(function(r){return!0===(n=w(e,t[r],!0))});return r||b("objectOf - value validation error:\n"+A(n)),r}})}function z(e){var t=Object.keys(e),n=t.filter(function(t){var n;return!(null===(n=e[t])||void 0===n||!n.required)}),r=P("shape",{type:Object,validator:function(r){var i=this;if(!v(r))return!1;var o=Object.keys(r);if(n.length>0&&n.some(function(e){return-1===o.indexOf(e)})){var u=n.filter(function(e){return-1===o.indexOf(e)});return b(1===u.length?'shape - required property "'+u[0]+'" is not defined.':'shape - required properties "'+u.join('", "')+'" are not defined.'),!1}return o.every(function(n){if(-1===t.indexOf(n))return!0===i._vueTypes_isLoose||(b('shape - shape definition does not include a "'+n+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var o=w(e[n],r[n],!0);return"string"==typeof o&&b('shape - "'+n+'" property validation error:\n '+A(o)),!0===o})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),r}var C=["name","validate","getter"],G=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var t=this;if(b("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),O(e))return e.forEach(function(e){return t.extend(e)}),this;var n=e.name,r=e.validate,i=void 0!==r&&r,o=e.getter,u=void 0!==o&&o,f=a(e,C);if(h(this,n))throw new TypeError('[VueTypes error]: Type "'+n+'" already defined');var l,c=f.type;return j(c)?(delete f.type,Object.defineProperty(this,n,u?{get:function(){return x(n,c,f)}}:{value:function(){var e,t=x(n,c,f);return t.validator&&(t.validator=(e=t.validator).bind.apply(e,[t].concat([].slice.call(arguments)))),t}})):(l=u?{get:function(){var e=Object.assign({},f);return i?k(n,e):P(n,e)},enumerable:!0}:{value:function(){var e,t,r=Object.assign({},f);return e=i?k(n,r):P(n,r),r.validator&&(e.validator=(t=r.validator).bind.apply(t,[e].concat([].slice.call(arguments)))),e},enumerable:!0},Object.defineProperty(this,n,l))},r(e,null,[{key:"any",get:function(){return S()}},{key:"func",get:function(){return q().def(this.defaults.func)}},{key:"bool",get:function(){return void 0===this.defaults.bool?V():V().def(this.defaults.bool)}},{key:"string",get:function(){return E().def(this.defaults.string)}},{key:"number",get:function(){return N().def(this.defaults.number)}},{key:"array",get:function(){return B().def(this.defaults.array)}},{key:"object",get:function(){return F().def(this.defaults.object)}},{key:"integer",get:function(){return L().def(this.defaults.integer)}},{key:"symbol",get:function(){return D()}},{key:"nullable",get:function(){return Y()}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=f,e.custom=I,e.oneOf=J,e.instanceOf=U,e.oneOfType=M,e.arrayOf=R,e.objectOf=$,e.shape=z,e.utils={validate:function(e,t){return!0===w(t,e,!0)},toType:function(e,t,n){return void 0===n&&(n=!1),n?k(e,t):P(e,t)}},e}();function H(e){var t;return void 0===e&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),t=/*#__PURE__*/function(t){function n(){return t.apply(this,arguments)||this}return o(n,t),r(n,null,[{key:"sensibleDefaults",get:function(){return i({},this.defaults)},set:function(t){this.defaults=!1!==t?i({},!0!==t?t:e):{}}}]),n}(G),t.defaults=i({},e),t}var K=/*#__PURE__*/function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(H());e.any=S,e.array=B,e.arrayOf=R,e.bool=V,e.config=f,e.createTypes=H,e.custom=I,e.default=K,e.fromType=x,e.func=q,e.instanceOf=U,e.integer=L,e.nullable=Y,e.number=N,e.object=F,e.objectOf=$,e.oneOf=J,e.oneOfType=M,e.shape=z,e.string=E,e.symbol=D,e.toType=P,e.toValidableType=k,e.validateType=w});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("is-plain-object")):"function"==typeof define&&define.amd?define(["exports","is-plain-object"],t):t((e||self).VueTypes={},e.isPlainObject)}(this,function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function a(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var f={silent:!1,logLevel:"warn"},l=["validator"],c=Object.prototype,s=c.toString,y=c.hasOwnProperty,d=/^\s*function (\w+)/;function p(e){var t,n=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(n){var r=n.toString().match(d);return r?r[1]:""}return""}var v=t.isPlainObject,b=function(e){return e},h=function(e,t){return y.call(e,t)},g=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},O=Array.isArray||function(e){return"[object Array]"===s.call(e)},m=function(e){return"[object Function]"===s.call(e)},j=function(e,t){return v(e)&&h(e,"_vueTypes_name")&&(!t||e._vueTypes_name===t)},T=function(e){return v(e)&&(h(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return h(e,t)}))};function _(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function w(e,t,n){var r;void 0===n&&(n=!1);var i=!0,o="";r=v(e)?e:{type:e};var u=j(r)?r._vueTypes_name+" - ":"";if(T(r)&&null!==r.type){if(void 0===r.type||!0===r.type)return i;if(!r.required&&null==t)return i;O(r.type)?(i=r.type.some(function(e){return!0===w(e,t,!0)}),o=r.type.map(function(e){return p(e)}).join(" or ")):i="Array"===(o=p(r))?O(t):"Object"===o?v(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return"";var t=e.constructor.toString().match(d);return t?t[1]:""}(t)===o:t instanceof r.type}if(!i){var a=u+'value "'+t+'" should be of type "'+o+'"';return!1===n?(b(a),!1):a}if(h(r,"validator")&&m(r.validator)){var f=b,l=[];if(b=function(e){l.push(e)},i=r.validator(t),b=f,!i){var c=(l.length>1?"* ":"")+l.join("\n* ");return l.length=0,!1===n?(b(c),i):c}}return i}function P(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(e){return void 0===e?this.type===Boolean||Array.isArray(this.type)&&this.type.includes(Boolean)?void(this.default=void 0):(h(this,"default")&&delete this.default,this):m(e)||!0===w(this,e,!0)?(this.default=O(e)?function(){return[].concat(e)}:v(e)?function(){return Object.assign({},e)}:e,this):(b(this._vueTypes_name+' - invalid default value: "'+e+'"'),this)}}}),r=n.validator;return m(r)&&(n.validator=_(r,n)),n}function k(e,t){var n=P(e,t);return Object.defineProperty(n,"validate",{value:function(e){return m(this.validator)&&b(this._vueTypes_name+" - calling .validate() will overwrite the current custom validator function. Validator info:\n"+JSON.stringify(this)),this.validator=_(e,this),this}})}function x(e,t,n){var r,i,o=(r=t,i={},Object.getOwnPropertyNames(r).forEach(function(e){i[e]=Object.getOwnPropertyDescriptor(r,e)}),Object.defineProperties({},i));if(o._vueTypes_name=e,!v(n))return o;var u,f,c=n.validator,s=a(n,l);if(m(c)){var y=o.validator;y&&(y=null!==(f=(u=y).__original)&&void 0!==f?f:u),o.validator=_(y?function(e){return y.call(this,e)&&c.call(this,e)}:c,o)}return Object.assign(o,s)}function S(e){return e.replace(/^(?!\s*$)/gm," ")}var A=function(){return k("any",{})},q=function(){return k("function",{type:Function})},E=function(){return k("boolean",{type:Boolean})},V=function(){return k("string",{type:String})},N=function(){return k("number",{type:Number})},B=function(){return k("array",{type:Array})},F=function(){return k("object",{type:Object})},L=function(){return P("integer",{type:Number,validator:function(e){var t=g(e);return!1===t&&b('integer - "'+e+'" is not an integer'),t}})},D=function(){return P("symbol",{validator:function(e){var t="symbol"==typeof e;return!1===t&&b('symbol - invalid value "'+e+'"'),t}})},Y=function(){return Object.defineProperty({type:null,validator:function(e){var t=null===e;return!1===t&&b("nullable - value should be null"),t}},"_vueTypes_name",{value:"nullable"})};function I(e,t){if(void 0===t&&(t="custom validation failed"),"function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return P(e.name||"<<anonymous function>>",{type:null,validator:function(n){var r=e(n);return r||b(this._vueTypes_name+" - "+t),r}})}function J(e){if(!O(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.map(function(e){return"symbol"==typeof e?e.toString():e}).join('", "')+'".',n={validator:function(n){var r=-1!==e.indexOf(n);return r||b(t),r}};if(-1===e.indexOf(null)){var r=e.reduce(function(e,t){if(null!=t){var n=t.constructor;-1===e.indexOf(n)&&e.push(n)}return e},[]);r.length>0&&(n.type=r)}return P("oneOf",n)}function M(e){if(!O(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=!1,r=[],i=0;i<e.length;i+=1){var o=e[i];if(T(o)){if(m(o.validator)&&(t=!0),j(o,"oneOf")&&o.type){r=r.concat(o.type);continue}if(j(o,"nullable")){n=!0;continue}if(!0===o.type||!o.type){b('oneOfType - invalid usage of "true" and "null" as types.');continue}r=r.concat(o.type)}else r.push(o)}r=r.filter(function(e,t){return r.indexOf(e)===t});var u=!1===n&&r.length>0?r:null;return P("oneOfType",t?{type:u,validator:function(t){var n=[],r=e.some(function(e){var r=w(e,t,!0);return"string"==typeof r&&n.push(r),!0===r});return r||b("oneOfType - provided value does not match any of the "+n.length+" passed-in validators:\n"+S(n.join("\n"))),r}}:{type:u})}function R(e){return P("arrayOf",{type:Array,validator:function(t){var n="",r=t.every(function(t){return!0===(n=w(e,t,!0))});return r||b("arrayOf - value validation error:\n"+S(n)),r}})}function U(e){return P("instanceOf",{type:e})}function $(e){return P("objectOf",{type:Object,validator:function(t){var n="",r=Object.keys(t).every(function(r){return!0===(n=w(e,t[r],!0))});return r||b("objectOf - value validation error:\n"+S(n)),r}})}function z(e){var t=Object.keys(e),n=t.filter(function(t){var n;return!(null===(n=e[t])||void 0===n||!n.required)}),r=P("shape",{type:Object,validator:function(r){var i=this;if(!v(r))return!1;var o=Object.keys(r);if(n.length>0&&n.some(function(e){return-1===o.indexOf(e)})){var u=n.filter(function(e){return-1===o.indexOf(e)});return b(1===u.length?'shape - required property "'+u[0]+'" is not defined.':'shape - required properties "'+u.join('", "')+'" are not defined.'),!1}return o.every(function(n){if(-1===t.indexOf(n))return!0===i._vueTypes_isLoose||(b('shape - shape definition does not include a "'+n+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var o=w(e[n],r[n],!0);return"string"==typeof o&&b('shape - "'+n+'" property validation error:\n '+S(o)),!0===o})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),r}var C=["name","validate","getter"],G=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var t=this;if(b("VueTypes.extend is deprecated. Use the ES6+ method instead. See https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#extending-namespaced-validators-in-es6 for details."),O(e))return e.forEach(function(e){return t.extend(e)}),this;var n=e.name,r=e.validate,i=void 0!==r&&r,o=e.getter,u=void 0!==o&&o,f=a(e,C);if(h(this,n))throw new TypeError('[VueTypes error]: Type "'+n+'" already defined');var l,c=f.type;return j(c)?(delete f.type,Object.defineProperty(this,n,u?{get:function(){return x(n,c,f)}}:{value:function(){var e,t=x(n,c,f);return t.validator&&(t.validator=(e=t.validator).bind.apply(e,[t].concat([].slice.call(arguments)))),t}})):(l=u?{get:function(){var e=Object.assign({},f);return i?k(n,e):P(n,e)},enumerable:!0}:{value:function(){var e,t,r=Object.assign({},f);return e=i?k(n,r):P(n,r),r.validator&&(e.validator=(t=r.validator).bind.apply(t,[e].concat([].slice.call(arguments)))),e},enumerable:!0},Object.defineProperty(this,n,l))},r(e,null,[{key:"any",get:function(){return A()}},{key:"func",get:function(){return q().def(this.defaults.func)}},{key:"bool",get:function(){return void 0===this.defaults.bool?E():E().def(this.defaults.bool)}},{key:"string",get:function(){return V().def(this.defaults.string)}},{key:"number",get:function(){return N().def(this.defaults.number)}},{key:"array",get:function(){return B().def(this.defaults.array)}},{key:"object",get:function(){return F().def(this.defaults.object)}},{key:"integer",get:function(){return L().def(this.defaults.integer)}},{key:"symbol",get:function(){return D()}},{key:"nullable",get:function(){return Y()}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=f,e.custom=I,e.oneOf=J,e.instanceOf=U,e.oneOfType=M,e.arrayOf=R,e.objectOf=$,e.shape=z,e.utils={validate:function(e,t){return!0===w(t,e,!0)},toType:function(e,t,n){return void 0===n&&(n=!1),n?k(e,t):P(e,t)}},e}();function H(e){var t;return void 0===e&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),t=/*#__PURE__*/function(t){function n(){return t.apply(this,arguments)||this}return o(n,t),r(n,null,[{key:"sensibleDefaults",get:function(){return i({},this.defaults)},set:function(t){this.defaults=!1!==t?i({},!0!==t?t:e):{}}}]),n}(G),t.defaults=i({},e),t}var K=/*#__PURE__*/function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t}(H());e.any=A,e.array=B,e.arrayOf=R,e.bool=E,e.config=f,e.createTypes=H,e.custom=I,e.default=K,e.fromType=x,e.func=q,e.instanceOf=U,e.integer=L,e.nullable=Y,e.number=N,e.object=F,e.objectOf=$,e.oneOf=J,e.oneOfType=M,e.shape=z,e.string=V,e.symbol=D,e.toType=P,e.toValidableType=k,e.validateType=w});
//# sourceMappingURL=vue-types.umd.js.map
{
"name": "vue-types",
"version": "5.0.2",
"version": "5.0.3-next.0",
"description": "Prop types utility for Vue",

@@ -66,7 +66,7 @@ "author": "Marco Solazzi",

"devDependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "7.16.7",
"@babel/plugin-proposal-optional-chaining": "7.16.7",
"@types/node": "16.11.68",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
"@babel/plugin-proposal-optional-chaining": "7.21.0",
"@types/node": "18.15.13",
"babel-plugin-transform-node-env-inline": "0.4.3",
"cpy-cli": "4.1.0",
"cpy-cli": "4.2.0",
"cross-env": "7.0.3",

@@ -77,3 +77,3 @@ "del": "7.0.0",

"npm-run-all": "4.1.5",
"typescript": "4.6.4"
"typescript": "4.9.5"
},

@@ -80,0 +80,0 @@ "dependencies": {

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

var t=require("is-plain-object");function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}var u={silent:!1,logLevel:"warn"},i=Object.defineProperty,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function s(e,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var o={_vueTypes_name:{value:e,writable:!0},def:{value:function(e){return void 0===e?("default"in this&&delete this.default,this):(this.default=f(e)?function(){return[].concat(e)}:t.isPlainObject(e)?function(){return Object.assign({},e)}:e,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(o.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,o)}var a=function(){return s("any",{},!0)},c=function(){return s("func",{type:Function},!0)},l=function(){return s("bool",{type:Boolean},!0)},p=function(){return s("string",{type:String},!0)},y=function(){return s("number",{type:Number},!0)},d=function(){return s("array",{type:Array},!0)},b=function(){return s("object",{type:Object},!0)},v=function(){return s("symbol")},g=function(){return s("integer",{type:Number})},O=function(t){return s("oneOf")},h=function(t){return s("custom")},j=function(t){return s("instanceOf",{type:t})},x=function(t){return s("oneOfType")},m=function(t){return s("arrayOf",{type:Array})},k=function(t){return s("objectOf",{type:Object})},T=function(t){return i(s("shape",{type:Object}),"loose",{get:function(){return this}})};function P(t,e,n,r,o){var u;void 0===r&&(r=!1),void 0===o&&(o=!1);var f=((u={})[r?"get":"value"]=function(){return s(e,Object.assign({},n),o).def(r?t.defaults[e]:void 0)},u);return i(t,e,f)}var _=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var n=this;if(f(e))return e.forEach(function(t){return n.extend(t)}),this;var r=e.validate,o=e.getter,u=void 0!==o&&o,i=e.type,s=void 0===i?null:i;return P(this,e.name,{type:t.isPlainObject(s)&&s.type?null:s},u,!!r)},n(e,null,[{key:"any",get:function(){return a()}},{key:"func",get:function(){return c().def(this.defaults.func)}},{key:"bool",get:function(){return l().def(this.defaults.bool)}},{key:"string",get:function(){return p().def(this.defaults.string)}},{key:"number",get:function(){return y().def(this.defaults.number)}},{key:"array",get:function(){return d().def(this.defaults.array)}},{key:"object",get:function(){return b().def(this.defaults.object)}},{key:"symbol",get:function(){return v()}},{key:"integer",get:function(){return g().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=u,e.oneOf=O,e.custom=h,e.instanceOf=j,e.oneOfType=x,e.arrayOf=m,e.objectOf=k,e.shape=T,e.utils={toType:s,validate:function(){return!![].slice.call(arguments)}},e}();function w(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function o(){return e.apply(this,arguments)||this}return r(o,e),n(o,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),o}(_),e.defaults=Object.assign({},t),e}"production"!==process.env.NODE_ENV&&!1===u.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");var A=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(w());Object.defineProperty(exports,"__esModule",{value:!0}),exports.any=a,exports.array=d,exports.arrayOf=m,exports.bool=l,exports.config=u,exports.createTypes=w,exports.custom=h,exports.default=A,exports.fromType=function(t,e,n){void 0===n&&(n={});var r=s(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r},exports.func=c,exports.instanceOf=j,exports.integer=g,exports.nullable=function(){return{type:null}},exports.number=y,exports.object=b,exports.objectOf=k,exports.oneOf=O,exports.oneOfType=x,exports.shape=T,exports.string=p,exports.symbol=v,exports.toType=function(t,e){return s(t,e)},exports.toValidableType=function(t,e){return s(t,e,!0)},exports.validateType=function(t,e,n){return!0};
var t=require("is-plain-object");function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(o=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?o:String(o),r)}var o}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}var u={silent:!1,logLevel:"warn"},i=Object.defineProperty,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function a(e,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var o={_vueTypes_name:{value:e,writable:!0},def:{value:function(e){return void 0===e?("default"in this&&delete this.default,this):(this.default=f(e)?function(){return[].concat(e)}:t.isPlainObject(e)?function(){return Object.assign({},e)}:e,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(o.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,o)}var s=function(){return a("any",{},!0)},c=function(){return a("func",{type:Function},!0)},l=function(){return a("bool",{type:Boolean},!0)},p=function(){return a("string",{type:String},!0)},y=function(){return a("number",{type:Number},!0)},d=function(){return a("array",{type:Array},!0)},b=function(){return a("object",{type:Object},!0)},v=function(){return a("symbol")},g=function(){return a("integer",{type:Number})},O=function(t){return a("oneOf")},h=function(t){return a("custom")},j=function(t){return a("instanceOf",{type:t})},m=function(t){return a("oneOfType")},x=function(t){return a("arrayOf",{type:Array})},k=function(t){return a("objectOf",{type:Object})},T=function(t){return i(a("shape",{type:Object}),"loose",{get:function(){return this}})};function P(t,e,n,r,o){var u;void 0===r&&(r=!1),void 0===o&&(o=!1);var f=((u={})[r?"get":"value"]=function(){return a(e,Object.assign({},n),o).def(r?t.defaults[e]:void 0)},u);return i(t,e,f)}var w=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var n=this;if(f(e))return e.forEach(function(t){return n.extend(t)}),this;var r=e.validate,o=e.getter,u=void 0!==o&&o,i=e.type,a=void 0===i?null:i;return P(this,e.name,{type:t.isPlainObject(a)&&a.type?null:a},u,!!r)},n(e,null,[{key:"any",get:function(){return s()}},{key:"func",get:function(){return c().def(this.defaults.func)}},{key:"bool",get:function(){return l().def(this.defaults.bool)}},{key:"string",get:function(){return p().def(this.defaults.string)}},{key:"number",get:function(){return y().def(this.defaults.number)}},{key:"array",get:function(){return d().def(this.defaults.array)}},{key:"object",get:function(){return b().def(this.defaults.object)}},{key:"symbol",get:function(){return v()}},{key:"integer",get:function(){return g().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=u,e.oneOf=O,e.custom=h,e.instanceOf=j,e.oneOfType=m,e.arrayOf=x,e.objectOf=k,e.shape=T,e.utils={toType:a,validate:function(){return!![].slice.call(arguments)}},e}();function _(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function o(){return e.apply(this,arguments)||this}return r(o,e),n(o,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),o}(w),e.defaults=Object.assign({},t),e}"production"!==process.env.NODE_ENV&&!1===u.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");var A=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(_());Object.defineProperty(exports,"__esModule",{value:!0}),exports.any=s,exports.array=d,exports.arrayOf=x,exports.bool=l,exports.config=u,exports.createTypes=_,exports.custom=h,exports.default=A,exports.fromType=function(t,e,n){void 0===n&&(n={});var r=a(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r},exports.func=c,exports.instanceOf=j,exports.integer=g,exports.nullable=function(){return{type:null}},exports.number=y,exports.object=b,exports.objectOf=k,exports.oneOf=O,exports.oneOfType=m,exports.shape=T,exports.string=p,exports.symbol=v,exports.toType=function(t,e){return a(t,e)},exports.toValidableType=function(t,e){return a(t,e,!0)},exports.validateType=function(t,e,n){return!0};

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

import{isPlainObject as t}from"is-plain-object";function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}var i={silent:!1,logLevel:"warn"},o=Object.defineProperty,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function c(e,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var u={_vueTypes_name:{value:e,writable:!0},def:{value:function(e){return void 0===e?("default"in this&&delete this.default,this):(this.default=f(e)?function(){return[].concat(e)}:t(e)?function(){return Object.assign({},e)}:e,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(u.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,u)}var a=function(){return c("any",{},!0)},s=function(){return c("func",{type:Function},!0)},l=function(){return c("bool",{type:Boolean},!0)},d=function(){return c("string",{type:String},!0)},y=function(){return c("number",{type:Number},!0)},p=function(){return c("array",{type:Array},!0)},b=function(){return c("object",{type:Object},!0)},v=function(){return c("symbol")},g=function(){return c("integer",{type:Number})},h=function(t){return c("oneOf")},O=function(t){return c("custom")},j=function(t){return c("instanceOf",{type:t})},m=function(t){return c("oneOfType")},k=function(t){return c("arrayOf",{type:Array})},w=function(t){return c("objectOf",{type:Object})},_=function(t){return o(c("shape",{type:Object}),"loose",{get:function(){return this}})},P=function(){return{type:null}};function T(t,e,n,r,u){var i;void 0===r&&(r=!1),void 0===u&&(u=!1);var f=((i={})[r?"get":"value"]=function(){return c(e,Object.assign({},n),u).def(r?t.defaults[e]:void 0)},i);return o(t,e,f)}function A(t,e,n){void 0===n&&(n={});var r=c(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r}var N=function(t,e){return c(t,e,!0)},x=function(t,e){return c(t,e)},D=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var n=this;if(f(e))return e.forEach(function(t){return n.extend(t)}),this;var r=e.validate,u=e.getter,i=void 0!==u&&u,o=e.type,c=void 0===o?null:o;return T(this,e.name,{type:t(c)&&c.type?null:c},i,!!r)},n(e,null,[{key:"any",get:function(){return a()}},{key:"func",get:function(){return s().def(this.defaults.func)}},{key:"bool",get:function(){return l().def(this.defaults.bool)}},{key:"string",get:function(){return d().def(this.defaults.string)}},{key:"number",get:function(){return y().def(this.defaults.number)}},{key:"array",get:function(){return p().def(this.defaults.array)}},{key:"object",get:function(){return b().def(this.defaults.object)}},{key:"symbol",get:function(){return v()}},{key:"integer",get:function(){return g().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=i,e.oneOf=h,e.custom=O,e.instanceOf=j,e.oneOfType=m,e.arrayOf=k,e.objectOf=w,e.shape=_,e.utils={toType:c,validate:function(){return!![].slice.call(arguments)}},e}();function E(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function u(){return e.apply(this,arguments)||this}return r(u,e),n(u,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),u}(D),e.defaults=Object.assign({},t),e}function V(t,e,n){return!0}"production"!==process.env.NODE_ENV&&!1===i.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");var q=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(E());export{a as any,p as array,k as arrayOf,l as bool,i as config,E as createTypes,O as custom,q as default,A as fromType,s as func,j as instanceOf,g as integer,P as nullable,y as number,b as object,w as objectOf,h as oneOf,m as oneOfType,_ as shape,d as string,v as symbol,x as toType,N as toValidableType,V as validateType};
import{isPlainObject as t}from"is-plain-object";function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(u=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?u:String(u),r)}var u}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}var i={silent:!1,logLevel:"warn"},o=Object.defineProperty,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function c(e,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var u={_vueTypes_name:{value:e,writable:!0},def:{value:function(e){return void 0===e?("default"in this&&delete this.default,this):(this.default=f(e)?function(){return[].concat(e)}:t(e)?function(){return Object.assign({},e)}:e,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(u.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,u)}var a=function(){return c("any",{},!0)},s=function(){return c("func",{type:Function},!0)},l=function(){return c("bool",{type:Boolean},!0)},y=function(){return c("string",{type:String},!0)},d=function(){return c("number",{type:Number},!0)},p=function(){return c("array",{type:Array},!0)},b=function(){return c("object",{type:Object},!0)},v=function(){return c("symbol")},g=function(){return c("integer",{type:Number})},h=function(t){return c("oneOf")},O=function(t){return c("custom")},j=function(t){return c("instanceOf",{type:t})},m=function(t){return c("oneOfType")},k=function(t){return c("arrayOf",{type:Array})},w=function(t){return c("objectOf",{type:Object})},P=function(t){return o(c("shape",{type:Object}),"loose",{get:function(){return this}})},T=function(){return{type:null}};function _(t,e,n,r,u){var i;void 0===r&&(r=!1),void 0===u&&(u=!1);var f=((i={})[r?"get":"value"]=function(){return c(e,Object.assign({},n),u).def(r?t.defaults[e]:void 0)},i);return o(t,e,f)}function A(t,e,n){void 0===n&&(n={});var r=c(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r}var S=function(t,e){return c(t,e,!0)},E=function(t,e){return c(t,e)},N=/*#__PURE__*/function(){var e;return e=/*#__PURE__*/function(){function e(){}return e.extend=function(e){var n=this;if(f(e))return e.forEach(function(t){return n.extend(t)}),this;var r=e.validate,u=e.getter,i=void 0!==u&&u,o=e.type,c=void 0===o?null:o;return _(this,e.name,{type:t(c)&&c.type?null:c},i,!!r)},n(e,null,[{key:"any",get:function(){return a()}},{key:"func",get:function(){return s().def(this.defaults.func)}},{key:"bool",get:function(){return l().def(this.defaults.bool)}},{key:"string",get:function(){return y().def(this.defaults.string)}},{key:"number",get:function(){return d().def(this.defaults.number)}},{key:"array",get:function(){return p().def(this.defaults.array)}},{key:"object",get:function(){return b().def(this.defaults.object)}},{key:"symbol",get:function(){return v()}},{key:"integer",get:function(){return g().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),e}(),e.defaults={},e.sensibleDefaults=void 0,e.config=i,e.oneOf=h,e.custom=O,e.instanceOf=j,e.oneOfType=m,e.arrayOf=k,e.objectOf=w,e.shape=P,e.utils={toType:c,validate:function(){return!![].slice.call(arguments)}},e}();function x(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function u(){return e.apply(this,arguments)||this}return r(u,e),n(u,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),u}(N),e.defaults=Object.assign({},t),e}function D(t,e,n){return!0}"production"!==process.env.NODE_ENV&&!1===i.silent&&console.warn("You are using the production shimmed version of VueTypes in a development build. Refer to https://dwightjack.github.io/vue-types/guide/installation.html#production-build to learn how to configure VueTypes for usage in multiple environments.");var V=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e}(x());export{a as any,p as array,k as arrayOf,l as bool,i as config,x as createTypes,O as custom,V as default,A as fromType,s as func,j as instanceOf,g as integer,T as nullable,d as number,b as object,w as objectOf,h as oneOf,m as oneOfType,P as shape,y as string,v as symbol,E as toType,S as toValidableType,D as validateType};

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("is-plain-object")):"function"==typeof define&&define.amd?define(["exports","is-plain-object"],e):e((t||self).VueTypes={},t.isPlainObject)}(this,function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o={silent:!1,logLevel:"warn"},f=Object.defineProperty,c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function a(t,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var u={_vueTypes_name:{value:t,writable:!0},def:{value:function(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=c(t)?function(){return[].concat(t)}:e.isPlainObject(t)?function(){return Object.assign({},t)}:t,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(u.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,u)}var l=function(){return a("any",{},!0)},s=function(){return a("func",{type:Function},!0)},y=function(){return a("bool",{type:Boolean},!0)},d=function(){return a("string",{type:String},!0)},b=function(){return a("number",{type:Number},!0)},p=function(){return a("array",{type:Array},!0)},v=function(){return a("object",{type:Object},!0)},g=function(){return a("symbol")},O=function(){return a("integer",{type:Number})},j=function(t){return a("oneOf")},h=function(t){return a("custom")},m=function(t){return a("instanceOf",{type:t})},T=function(t){return a("oneOfType")},k=function(t){return a("arrayOf",{type:Array})},P=function(t){return a("objectOf",{type:Object})},_=function(t){return f(a("shape",{type:Object}),"loose",{get:function(){return this}})};function x(t,e,n,r,u){var i;void 0===r&&(r=!1),void 0===u&&(u=!1);var o=((i={})[r?"get":"value"]=function(){return a(e,Object.assign({},n),u).def(r?t.defaults[e]:void 0)},i);return f(t,e,o)}var A=/*#__PURE__*/function(){var t;return t=/*#__PURE__*/function(){function t(){}return t.extend=function(t){var n=this;if(c(t))return t.forEach(function(t){return n.extend(t)}),this;var r=t.validate,u=t.getter,i=void 0!==u&&u,o=t.type,f=void 0===o?null:o;return x(this,t.name,{type:e.isPlainObject(f)&&f.type?null:f},i,!!r)},r(t,null,[{key:"any",get:function(){return l()}},{key:"func",get:function(){return s().def(this.defaults.func)}},{key:"bool",get:function(){return y().def(this.defaults.bool)}},{key:"string",get:function(){return d().def(this.defaults.string)}},{key:"number",get:function(){return b().def(this.defaults.number)}},{key:"array",get:function(){return p().def(this.defaults.array)}},{key:"object",get:function(){return v().def(this.defaults.object)}},{key:"symbol",get:function(){return g()}},{key:"integer",get:function(){return O().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),t}(),t.defaults={},t.sensibleDefaults=void 0,t.config=o,t.oneOf=j,t.custom=h,t.instanceOf=m,t.oneOfType=T,t.arrayOf=k,t.objectOf=P,t.shape=_,t.utils={toType:a,validate:function(){return!![].slice.call(arguments)}},t}();function w(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return u(n,e),r(n,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),n}(A),e.defaults=Object.assign({},t),e}var q=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return u(e,t),e}(w());Object.defineProperty(t,"__esModule",{value:!0}),t.any=l,t.array=p,t.arrayOf=k,t.bool=y,t.config=o,t.createTypes=w,t.custom=h,t.default=q,t.fromType=function(t,e,n){void 0===n&&(n={});var r=a(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r},t.func=s,t.instanceOf=m,t.integer=O,t.nullable=function(){return{type:null}},t.number=b,t.object=v,t.objectOf=P,t.oneOf=j,t.oneOfType=T,t.shape=_,t.string=d,t.symbol=g,t.toType=function(t,e){return a(t,e)},t.toValidableType=function(t,e){return a(t,e,!0)},t.validateType=function(t,e,n){return!0}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("is-plain-object")):"function"==typeof define&&define.amd?define(["exports","is-plain-object"],e):e((t||self).VueTypes={},t.isPlainObject)}(this,function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?i:String(i),r)}var i}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,u(t,e)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}var o={silent:!1,logLevel:"warn"},f=Object.defineProperty,a=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function c(t,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var i={_vueTypes_name:{value:t,writable:!0},def:{value:function(t){return void 0===t?("default"in this&&delete this.default,this):(this.default=a(t)?function(){return[].concat(t)}:e.isPlainObject(t)?function(){return Object.assign({},t)}:t,this)}},isRequired:{get:function(){return this.required=!0,this}}};return r&&(i.validate={value:function(){}}),n.validator||(n.validator=function(){return!0}),Object.defineProperties(n,i)}var l=function(){return c("any",{},!0)},s=function(){return c("func",{type:Function},!0)},y=function(){return c("bool",{type:Boolean},!0)},d=function(){return c("string",{type:String},!0)},p=function(){return c("number",{type:Number},!0)},b=function(){return c("array",{type:Array},!0)},v=function(){return c("object",{type:Object},!0)},g=function(){return c("symbol")},O=function(){return c("integer",{type:Number})},j=function(t){return c("oneOf")},h=function(t){return c("custom")},m=function(t){return c("instanceOf",{type:t})},T=function(t){return c("oneOfType")},k=function(t){return c("arrayOf",{type:Array})},P=function(t){return c("objectOf",{type:Object})},_=function(t){return f(c("shape",{type:Object}),"loose",{get:function(){return this}})};function w(t,e,n,r,i){var u;void 0===r&&(r=!1),void 0===i&&(i=!1);var o=((u={})[r?"get":"value"]=function(){return c(e,Object.assign({},n),i).def(r?t.defaults[e]:void 0)},u);return f(t,e,o)}var x=/*#__PURE__*/function(){var t;return t=/*#__PURE__*/function(){function t(){}return t.extend=function(t){var n=this;if(a(t))return t.forEach(function(t){return n.extend(t)}),this;var r=t.validate,i=t.getter,u=void 0!==i&&i,o=t.type,f=void 0===o?null:o;return w(this,t.name,{type:e.isPlainObject(f)&&f.type?null:f},u,!!r)},r(t,null,[{key:"any",get:function(){return l()}},{key:"func",get:function(){return s().def(this.defaults.func)}},{key:"bool",get:function(){return y().def(this.defaults.bool)}},{key:"string",get:function(){return d().def(this.defaults.string)}},{key:"number",get:function(){return p().def(this.defaults.number)}},{key:"array",get:function(){return b().def(this.defaults.array)}},{key:"object",get:function(){return v().def(this.defaults.object)}},{key:"symbol",get:function(){return g()}},{key:"integer",get:function(){return O().def(this.defaults.integer)}},{key:"nullable",get:function(){return{type:null}}}]),t}(),t.defaults={},t.sensibleDefaults=void 0,t.config=o,t.oneOf=j,t.custom=h,t.instanceOf=m,t.oneOfType=T,t.arrayOf=k,t.objectOf=P,t.shape=_,t.utils={toType:c,validate:function(){return!![].slice.call(arguments)}},t}();function A(t){var e;return void 0===t&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),e=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return i(n,e),r(n,null,[{key:"sensibleDefaults",get:function(){return Object.assign({},this.defaults)},set:function(e){this.defaults=!1!==e?Object.assign({},!0!==e?e:t):{}}}]),n}(x),e.defaults=Object.assign({},t),e}var S=/*#__PURE__*/function(t){function e(){return t.apply(this,arguments)||this}return i(e,t),e}(A());Object.defineProperty(t,"__esModule",{value:!0}),t.any=l,t.array=b,t.arrayOf=k,t.bool=y,t.config=o,t.createTypes=A,t.custom=h,t.default=S,t.fromType=function(t,e,n){void 0===n&&(n={});var r=c(t,Object.assign({},e,n),!!e.validable);return r.validator&&delete r.validator,r},t.func=s,t.instanceOf=m,t.integer=O,t.nullable=function(){return{type:null}},t.number=p,t.object=v,t.objectOf=P,t.oneOf=j,t.oneOfType=T,t.shape=_,t.string=d,t.symbol=g,t.toType=function(t,e){return c(t,e)},t.toValidableType=function(t,e){return c(t,e,!0)},t.validateType=function(t,e,n){return!0}});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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