@transferwise/neptune-validation
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -1,1 +0,1 @@ | ||
import"core-js/modules/es.array.index-of";import{isArray}from"../type-validators";import{keyMap}from"../common/keyMap";var isKey=function(a){var b=a.keyType,c=a.event;if(!b||!c)return!1;var d=b.toUpperCase(),e=keyMap[d];if(!e)return!1;var f=c.key,g=c.keyCode;return f?isArray(e.key)?-1<e.key.indexOf(f):f===e.key:g===e.keyCode};export default isKey; | ||
import{isArray}from"../type-validators";import{keyMap}from"../common/keyMap";var isKey=function(a){var b=a.keyType,c=a.event;if(!b||!c)return!1;var d=b.toUpperCase(),e=keyMap[d];if(!e)return!1;var f=c.key,g=c.keyCode;return f?isArray(e.key)?-1<e.key.indexOf(f):f===e.key:g===e.keyCode};export default isKey; |
@@ -1,1 +0,1 @@ | ||
export*from"./rule-validators";export*from"./type-validators";export*from"./value-validators";export{default as isKey}from"./event-validators"; | ||
export*from"./rule-validators";export*from"./type-validators";export*from"./value-validators";export*from"./jsonSchemaForm/schema-validators";export*from"./jsonSchemaForm/valid-model";export*from"./jsonSchemaForm/validation-failures";export{default as isKey}from"./event-validators"; |
@@ -1,1 +0,1 @@ | ||
import"core-js/modules/es.regexp.constructor";import"core-js/modules/es.regexp.exec";import"core-js/modules/es.regexp.to-string";import{isString,isNumber,isArray,isUndefined}from"../type-validators";function isValidRequired(a,b){return!b||!isUndefined(a)}function isValidMinLength(a,b){return!isNumber(b)||isString(a)&&a.length>=b}function isValidMaxLength(a,b){return!isNumber(b)||isString(a)&&a.length<=b}function isValidPattern(a,b){try{var c=new RegExp(b);return"undefined"!=typeof a&&!!c.test(a)}catch(a){return!0}}function isValidMaximum(a,b){return!isNumber(b)&&!isString(b)||(isNumber(a)||isString(a))&&a<=b}function isValidMinimum(a,b){return!isNumber(b)&&!isString(b)||(isNumber(a)||isString(a))&&a>=b}function isValidMinItems(a,b){return!isNumber(b)||isArray(a)&&a.length>=b}function isValidMaxItems(a,b){return!isNumber(b)||isArray(a)&&a.length<=b}export{isValidRequired,isValidMinLength,isValidMaxLength,isValidPattern,isValidMaximum,isValidMinimum,isValidMinItems,isValidMaxItems}; | ||
import"core-js/modules/es.regexp.constructor.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.regexp.to-string.js";import{isString,isNumber,isArray,isUndefined}from"../type-validators";function isValidRequired(a,b){return!b||!isUndefined(a)}function isValidMinLength(a,b){return!isNumber(b)||isString(a)&&a.length>=b}function isValidMaxLength(a,b){return!isNumber(b)||isString(a)&&a.length<=b}function isValidPattern(a,b){try{var c=new RegExp(b);return"undefined"!=typeof a&&!!c.test(a)}catch(a){return!0}}function isValidMaximum(a,b){return!isNumber(b)&&!isString(b)||(isNumber(a)||isString(a))&&a<=b}function isValidMinimum(a,b){return!isNumber(b)&&!isString(b)||(isNumber(a)||isString(a))&&a>=b}function isValidMinItems(a,b){return!isNumber(b)||isArray(a)&&a.length>=b}function isValidMaxItems(a,b){return!isNumber(b)||isArray(a)&&a.length<=b}export{isValidRequired,isValidMinLength,isValidMaxLength,isValidPattern,isValidMaximum,isValidMinimum,isValidMinItems,isValidMaxItems}; |
@@ -1,1 +0,1 @@ | ||
import"core-js/modules/es.number.constructor";import"core-js/modules/es.number.is-nan";var isString=function(a){return"string"==typeof a},isNumber=function(a){return"number"==typeof a&&!Number.isNaN(a)},isInteger=function(a){return isNumber(a)&&Math.floor(a)===a},isBoolean=function(a){return"boolean"==typeof a},isObject=function(a){return!isNull(a)&&!isUndefined(a)&&a.constructor===Object},isArray=function(a){return Array.isArray(a)},isNull=function(a){return null===a},isUndefined=function(a){return"undefined"==typeof a};export{isString,isNumber,isInteger,isBoolean,isObject,isArray,isNull,isUndefined}; | ||
import"core-js/modules/es.number.is-nan.js";import"core-js/modules/es.number.constructor.js";var isString=function(a){return"string"==typeof a},isNumber=function(a){return"number"==typeof a&&!Number.isNaN(a)},isInteger=function(a){return isNumber(a)&&Math.floor(a)===a},isBoolean=function(a){return"boolean"==typeof a},isObject=function(a){return!isNull(a)&&!isUndefined(a)&&a.constructor===Object},isArray=function(a){return Array.isArray(a)},isNull=function(a){return null===a},isUndefined=function(a){return"undefined"==typeof a};export{isString,isNumber,isInteger,isBoolean,isObject,isArray,isNull,isUndefined}; |
@@ -1,4 +0,4 @@ | ||
import"core-js/modules/es.object.keys";import{isString,isObject,isArray}from"../type-validators";/** | ||
import"core-js/modules/es.object.keys.js";import{isString,isObject,isArray}from"../type-validators";/** | ||
* Checks empty values for arrays,objects and strings. | ||
* @param {object|array|string} value | ||
*/var isEmpty=function(a){return isString(a)&&0===a.length||(isObject(a)||isArray(a))&&0===Object.keys(a).length};export{isEmpty}; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@transferwise/neptune-validation"]={})}(this,function(t){"use strict";function u(t){try{return!!t()}catch(t){return!0}}var c=!u(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,e){return t(e={exports:{}},e.exports),e.exports}function f(t){return"object"==typeof t?null!==t:"function"==typeof t}function a(t){if(!f(t))throw TypeError(String(t)+" is not an object");return t}function l(t,e,n){var r,o;return R&&"function"==typeof(r=e.constructor)&&r!==n&&f(o=r.prototype)&&o!==n.prototype&&R(t,o),t}function r(t){return T?P.createElement(t):{}}function s(t,e){if(!f(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!f(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!f(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!f(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}function p(t,e){return M.call(t,e)}function y(t){return F.call(t).slice(8,-1)}function o(t){if(null==t)throw TypeError("Can't call method on "+t);return t}function d(t){return L(o(t))}function g(t){return isNaN(t=+t)?0:(0<t?D:U)(t)}function i(t,e){var n,r=d(t),o=0,i=[];for(n in r)!p(z,n)&&p(r,n)&&i.push(n);for(;e.length>o;)p(r,n=e[o++])&&(~X(i,n)||i.push(n));return i}function h(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}function b(e,n){try{J(x,e,n)}catch(t){x[e]=n}return n}function v(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++et+nt).toString(36)}function m(){var t=a(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}var O=function(t){return t&&t.Math==Math&&t},x=O("object"==typeof globalThis&&globalThis)||O("object"==typeof window&&window)||O("object"==typeof self&&self)||O("object"==typeof e&&e)||function(){return this}()||Function("return this")(),E=/#|\.prototype\./,S=function(t,e){t=I[w(t)];return t==N||t!=j&&("function"==typeof e?u(e):!!e)},w=S.normalize=function(t){return String(t).replace(E,".").toLowerCase()},I=S.data={},j=S.NATIVE="N",N=S.POLYFILL="P",_=S,R=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,t={};try{(n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(t,[]),r=t instanceof Array}catch(t){}return function(t,e){return a(t),function(t){if(!f(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(e),r?n.call(t,e):t.__proto__=e,t}}():void 0),P=x.document,T=f(P)&&f(P.createElement),k=!c&&!u(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}),A=Object.defineProperty,C={f:c?A:function(t,e,n){if(a(t),e=s(e,!0),a(n),k)try{return A(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},M={}.hasOwnProperty,F={}.toString,V="".split,L=u(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==y(t)?V.call(t,""):Object(t)}:Object,U=Math.ceil,D=Math.floor,Y=Math.min,G=Math.max,B=Math.min,K=function(c){return function(t,e,n){var r,o=d(t),i=0<(t=o.length)?Y(g(t),9007199254740991):0,u=function(t,e){t=g(t);return t<0?G(t+e,0):B(t,e)}(n,i);if(c&&e!=e){for(;u<i;)if((r=o[u++])!=r)return!0}else for(;u<i;u++)if((c||u in o)&&o[u]===e)return c||u||0;return!c&&-1}},W={includes:K(!0),indexOf:K(!1)},z={},X=W.indexOf,q=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$=q.concat("length","prototype"),H={f:Object.getOwnPropertyNames||function(t){return i(t,$)}},J=c?function(t,e,n){return C.f(t,e,h(1,n))}:function(t,e,n){return t[e]=n,t},Q="__core-js_shared__",Z=x[Q]||b(Q,{}),tt=n(function(t){(t.exports=function(t,e){return Z[t]||(Z[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.8.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})}),et=0,nt=Math.random(),rt=!!Object.getOwnPropertySymbols&&!u(function(){return!String(Symbol())}),O=rt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ot=tt("wks"),it=x.Symbol,ut=O?it:it&&it.withoutSetter||v,e=function(t){return p(ot,t)||(rt&&p(it,t)?ot[t]=it[t]:ot[t]=ut("Symbol."+t)),ot[t]},ct=e("match");function ft(t,e){return RegExp(t,e)}var S={UNSUPPORTED_Y:u(function(){var t=ft("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),BROKEN_CARET:u(function(){var t=ft("^r","gy");return t.lastIndex=2,null!=t.exec("str")})},at=Function.toString;"function"!=typeof Z.inspectSource&&(Z.inspectSource=function(t){return at.call(t)});var lt,st,pt,yt,dt,gt,ht,bt,vt=Z.inspectSource,K=x.WeakMap,Q="function"==typeof K&&/native code/.test(vt(K)),mt=tt("keys"),O=function(t){return mt[t]||(mt[t]=v(t))},K=x.WeakMap;ht=Q?(lt=Z.state||(Z.state=new K),st=lt.get,pt=lt.has,yt=lt.set,dt=function(t,e){return e.facade=t,yt.call(lt,t,e),e},gt=function(t){return st.call(lt,t)||{}},function(t){return pt.call(lt,t)}):(bt=O("state"),z[bt]=!0,dt=function(t,e){return e.facade=t,J(t,bt,e),e},gt=function(t){return p(t,bt)?t[bt]:{}},function(t){return p(t,bt)});function Ot(t){return"function"==typeof t?t:void 0}function xt(t,e){return arguments.length<2?Ot(jt[t])||Ot(x[t]):jt[t]&&jt[t][e]||x[t]&&x[t][e]}var Et,St,wt={set:dt,get:gt,has:ht,enforce:function(t){return ht(t)?gt(t):dt(t,{})},getterFor:function(n){return function(t){var e;if(!f(t)||(e=gt(t)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return e}}},It=n(function(t){var e=wt.get,c=wt.enforce,f=String(String).split("String");(t.exports=function(t,e,n,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,u=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||p(n,"name")||J(n,"name",e),(r=c(n)).source||(r.source=f.join("string"==typeof e?e:""))),t!==x?(o?!u&&t[e]&&(i=!0):delete t[e],i?t[e]=n:J(t,e,n)):i?t[e]=n:b(e,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||vt(this)})}),jt=x,Nt=e("species"),_t=C.f,tt=H.f,Rt=wt.set,Pt=e("match"),Tt=x.RegExp,kt=Tt.prototype,At=/a/g,Ct=/a/g,Mt=new Tt(At)!==At,Ft=S.UNSUPPORTED_Y;if(c&&_("RegExp",!Mt||Ft||u(function(){return Ct[Pt]=!1,Tt(At)!=At||Tt(Ct)==Ct||"/a/i"!=Tt(At,"i")}))){for(var Vt=function(t,e){var n,r,o=this instanceof Vt,n=f(i=t)&&(void 0!==(n=i[ct])?!!n:"RegExp"==y(i)),i=void 0===e;if(!o&&n&&t.constructor===Vt&&i)return t;Mt?n&&!i&&(t=t.source):t instanceof Vt&&(i&&(e=m.call(t)),t=t.source),Ft&&(r=!!e&&-1<e.indexOf("y"))&&(e=e.replace(/y/g,""));o=l(Mt?new Tt(t,e):Tt(t,e),o?this:kt,Vt);return Ft&&r&&Rt(o,{sticky:r}),o},Lt=tt(Tt),Ut=0;Lt.length>Ut;)!function(e){e in Vt||_t(Vt,e,{configurable:!0,get:function(){return Tt[e]},set:function(t){Tt[e]=t}})}(Lt[Ut++]);(kt.constructor=Vt).prototype=kt,It(x,"RegExp",Vt)}St=xt(Et="RegExp"),Et=C.f,c&&St&&!St[Nt]&&Et(St,Nt,{configurable:!0,get:function(){return this}});var Q={}.propertyIsEnumerable,Dt=Object.getOwnPropertyDescriptor,Yt={f:Dt&&!Q.call({1:2},1)?function(t){t=Dt(this,t);return!!t&&t.enumerable}:Q},Gt=Object.getOwnPropertyDescriptor,Bt={f:c?Gt:function(t,e){if(t=d(t),e=s(e,!0),k)try{return Gt(t,e)}catch(t){}if(p(t,e))return h(!Yt.f.call(t,e),t[e])}},Kt={f:Object.getOwnPropertySymbols},Wt=xt("Reflect","ownKeys")||function(t){var e=H.f(a(t)),n=Kt.f;return n?e.concat(n(t)):e},zt=Bt.f,K=function(t,e){var n,r,o,i=t.target,u=t.global,c=t.stat,f=u?x:c?x[i]||b(i,{}):(x[i]||{}).prototype;if(f)for(n in e){if(r=e[n],o=t.noTargetGet?(o=zt(f,n))&&o.value:f[n],!_(u?n:i+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof r==typeof o)continue;!function(t,e){for(var n=Wt(e),r=C.f,o=Bt.f,i=0;i<n.length;i++){var u=n[i];p(t,u)||r(t,u,o(e,u))}}(r,o)}(t.sham||o&&o.sham)&&J(r,"sham",!0),It(f,n,r,t)}},Xt=RegExp.prototype.exec,qt=String.prototype.replace,e=Xt,$t=(tt=/a/,Q=/b*/g,Xt.call(tt,"a"),Xt.call(Q,"a"),0!==tt.lastIndex||0!==Q.lastIndex),Ht=S.UNSUPPORTED_Y||S.BROKEN_CARET,Jt=void 0!==/()??/.exec("")[1];($t||Jt||Ht)&&(e=function(t){var e,n,r,o,i=this,u=Ht&&i.sticky,c=m.call(i),f=i.source,a=0,l=t;return u&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),l=String(t).slice(i.lastIndex),0<i.lastIndex&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(f="(?: "+f+")",l=" "+l,a++),n=new RegExp("^(?:"+f+")",c)),Jt&&(n=new RegExp("^"+f+"$(?!\\s)",c)),$t&&(e=i.lastIndex),r=Xt.call(u?n:i,l),u?r?(r.input=r.input.slice(a),r[0]=r[0].slice(a),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:$t&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),Jt&&r&&1<r.length&&qt.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),K({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e});var Q="toString",Qt=RegExp.prototype,Zt=Qt[Q],S=u(function(){return"/a/b"!=Zt.call({source:"a",flags:"b"})}),e=Zt.name!=Q;(S||e)&&It(RegExp.prototype,Q,function(){var t=a(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in Qt)?m.call(t):n)},{unsafe:!0});function te(){}function ee(t){return"<script>"+t+"</"+ce+">"}var ne,re=Object.keys||function(t){return i(t,q)},oe=c?Object.defineProperties:function(t,e){a(t);for(var n,r=re(e),o=r.length,i=0;i<o;)C.f(t,n=r[i++],e[n]);return t},ie=xt("document","documentElement"),ue="prototype",ce="script",fe=O("IE_PROTO"),ae=function(){try{ne=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t;ae=ne?function(t){t.write(ee("")),t.close();var e=t.parentWindow.Object;return t=null,e}(ne):((t=r("iframe")).style.display="none",ie.appendChild(t),t.src=String("javascript:"),(t=t.contentWindow.document).open(),t.write(ee("document.F=Object")),t.close(),t.F);for(var e=q.length;e--;)delete ae[ue][q[e]];return ae()};z[fe]=!0;function le(t){var e,n,r,o,i,u,c,f=s(t,!1);if("string"==typeof f&&2<f.length)if(43===(e=(f=ge(f)).charCodeAt(0))||45===e){if(88===(t=f.charCodeAt(2))||120===t)return NaN}else if(48===e){switch(f.charCodeAt(1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+f}for(i=(o=f.slice(2)).length,u=0;u<i;u++)if((c=o.charCodeAt(u))<48||r<c)return NaN;return parseInt(o,n)}return+f}var e=Object.create||function(t,e){var n;return null!==t?(te[ue]=a(t),n=new te,te[ue]=null,n[fe]=t):n=ae(),void 0===e?n:oe(n,e)},Q="[\t\n\v\f\r \u2028\u2029\ufeff]",se=RegExp("^"+Q+Q+"*"),pe=RegExp(Q+Q+"*$"),O=function(e){return function(t){t=String(o(t));return 1&e&&(t=t.replace(se,"")),2&e&&(t=t.replace(pe,"")),t}},Q={start:O(1),end:O(2),trim:O(3)},O=H.f,ye=Bt.f,de=C.f,ge=Q.trim,he="Number",be=x[he],ve=be.prototype,me=y(e(ve))==he;if(_(he,!be(" 0o1")||!be("0b1")||be("+0x1"))){for(var Oe,xe=function(t){var t=arguments.length<1?0:t,e=this;return e instanceof xe&&(me?u(function(){ve.valueOf.call(e)}):y(e)!=he)?l(new be(le(t)),e,xe):le(t)},Ee=c?O(be):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),Se=0;Ee.length>Se;Se++)p(be,Oe=Ee[Se])&&!p(xe,Oe)&&de(xe,Oe,ye(be,Oe));(xe.prototype=ve).constructor=xe,It(x,he,xe)}K({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});function we(t){return"string"==typeof t}function Ie(t){return"number"==typeof t&&!Number.isNaN(t)}function je(t){return!_e(t)&&!Re(t)&&t.constructor===Object}function Ne(t){return Array.isArray(t)}var _e=function(t){return null===t},Re=function(t){return void 0===t};K({target:"Object",stat:!0,forced:u(function(){re(1)})},{keys:function(t){return re(Object(o(t)))}});function Pe(t){throw t}var Te,ke,Ae=Object.defineProperty,Ce={},Me=W.indexOf,Fe=[].indexOf,Ve=!!Fe&&1/[1].indexOf(1,-0)<0,O=!!(ke=[]["indexOf"])&&u(function(){ke.call(null,Te||function(){throw 1},1)}),W=function(t,e){if(p(Ce,t))return Ce[t];var n=[][t],r=!!p(e=e||{},"ACCESSORS")&&e.ACCESSORS,o=p(e,0)?e[0]:Pe,i=p(e,1)?e[1]:void 0;return Ce[t]=!!n&&!u(function(){if(r&&!c)return 1;var t={length:-1};r?Ae(t,1,{enumerable:!0,get:Pe}):t[1]=1,n.call(t,o,i)})}("indexOf",{ACCESSORS:!0,1:0});K({target:"Array",proto:!0,forced:Ve||!O||!W},{indexOf:function(t,e){return Ve?Fe.apply(this,arguments)||0:Me(this,t,1<arguments.length?e:void 0)}});var Le={SPACE:{key:[" ","Spacebar"],keyCode:32},ENTER:{key:"Enter",keyCode:13},TAB:{key:"Tab",keyCode:9},ESCAPE:{key:"Escape",keyCode:27}};t.isArray=Ne,t.isBoolean=function(t){return"boolean"==typeof t},t.isEmpty=function(t){return we(t)&&0===t.length||(je(t)||Ne(t))&&0===Object.keys(t).length},t.isInteger=function(t){return Ie(t)&&Math.floor(t)===t},t.isKey=function(t){var e=t.keyType,n=t.event;if(!e||!n)return!1;t=e.toUpperCase(),e=Le[t];if(!e)return!1;t=n.key,n=n.keyCode;return t?Ne(e.key)?-1<e.key.indexOf(t):t===e.key:n===e.keyCode},t.isNull=_e,t.isNumber=Ie,t.isObject=je,t.isString=we,t.isUndefined=Re,t.isValidMaxItems=function(t,e){return!Ie(e)||Ne(t)&&t.length<=e},t.isValidMaxLength=function(t,e){return!Ie(e)||we(t)&&t.length<=e},t.isValidMaximum=function(t,e){return!Ie(e)&&!we(e)||(Ie(t)||we(t))&&t<=e},t.isValidMinItems=function(t,e){return!Ie(e)||Ne(t)&&t.length>=e},t.isValidMinLength=function(t,e){return!Ie(e)||we(t)&&t.length>=e},t.isValidMinimum=function(t,e){return!Ie(e)&&!we(e)||(Ie(t)||we(t))&&e<=t},t.isValidPattern=function(t,e){try{var n=new RegExp(e);return void 0!==t&&!!n.test(t)}catch(t){return!0}},t.isValidRequired=function(t,e){return!e||!Re(t)},Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@transferwise/neptune-validation"]={})}(this,function(t){"use strict";function n(t){try{return!!t()}catch(t){return!0}}var o=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function i(t,e){return t(e={exports:{}},e.exports),e.exports}function u(t){return"object"==typeof t?null!==t:"function"==typeof t}function c(t){if(!u(t))throw TypeError(String(t)+" is not an object");return t}function f(t,e,r){var n,o;return k&&"function"==typeof(n=e.constructor)&&n!==r&&u(o=n.prototype)&&o!==r.prototype&&k(t,o),t}function a(t){return M?A.createElement(t):{}}function s(t,e){if(!u(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!u(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!u(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!u(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")}function l(t){if(null==t)throw TypeError("Can't call method on "+t);return t}function O(t){return Object(l(t))}function p(t){return q.call(t).slice(8,-1)}function y(t){return U(l(t))}function g(t){return isNaN(t=+t)?0:(0<t?Y:B)(t)}function S(t){return 0<t?W(g(t),9007199254740991):0}function d(t,e){var r,n=y(t),o=0,i=[];for(r in n)!D(J,r)&&D(n,r)&&i.push(r);for(;e.length>o;)D(n,r=e[o++])&&(~$(i,r)||i.push(r));return i}function h(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}function m(e,r){try{et(E,e,r)}catch(t){E[e]=r}return r}function b(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++it+ut).toString(36)}function v(t){return"function"==typeof t?t:void 0}function w(t,e){return arguments.length<2?v(ct[t])||v(E[t]):ct[t]&&ct[t][e]||E[t]&&E[t][e]}var x=function(t){return t&&t.Math==Math&&t},E=x("object"==typeof globalThis&&globalThis)||x("object"==typeof window&&window)||x("object"==typeof self&&self)||x("object"==typeof e&&e)||function(){return this}()||Function("return this")(),j=/#|\.prototype\./,P=function(t,e){t=I[T(t)];return t==_||t!=N&&("function"==typeof e?n(e):!!e)},T=P.normalize=function(t){return String(t).replace(j,".").toLowerCase()},I=P.data={},N=P.NATIVE="N",_=P.POLYFILL="P",L=P,k=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,t={};try{(r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(t,[]),n=t instanceof Array}catch(t){}return function(t,e){return c(t),function(t){if(!u(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(e),n?r.call(t,e):t.__proto__=e,t}}():void 0),A=E.document,M=u(A)&&u(A.createElement),R=!o&&!n(function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}),C=Object.defineProperty,V={f:o?C:function(t,e,r){if(c(t),e=s(e,!0),c(r),R)try{return C(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},F={}.hasOwnProperty,D=Object.hasOwn||function(t,e){return F.call(O(t),e)},q={}.toString,G="".split,U=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==p(t)?G.call(t,""):Object(t)}:Object,B=Math.ceil,Y=Math.floor,W=Math.min,z=Math.max,H=Math.min,K=function(c){return function(t,e,r){var n,o=y(t),i=S(o.length),u=function(t,e){t=g(t);return t<0?z(t+e,0):H(t,e)}(r,i);if(c&&e!=e){for(;u<i;)if((n=o[u++])!=n)return!0}else for(;u<i;u++)if((c||u in o)&&o[u]===e)return c||u||0;return!c&&-1}},X={includes:K(!0),indexOf:K(!1)},J={},$=X.indexOf,Q=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Z=Q.concat("length","prototype"),tt={f:Object.getOwnPropertyNames||function(t){return d(t,Z)}},et=o?function(t,e,r){return V.f(t,e,h(1,r))}:function(t,e,r){return t[e]=r,t},rt="__core-js_shared__",nt=E[rt]||m(rt,{}),ot=i(function(t){(t.exports=function(t,e){return nt[t]||(nt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.14.0",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),it=0,ut=Math.random(),ct=E,x=w("navigator","userAgent")||"",e=E.process,P=e&&e.versions,K=P&&P.v8;K?Ht=(It=K.split("."))[0]<4?1:It[0]+It[1]:x&&(!(It=x.match(/Edge\/(\d+)/))||74<=It[1])&&(It=x.match(/Chrome\/(\d+)/))&&(Ht=It[1]);function ft(t){return D(pt,t)&&(lt||"string"==typeof pt[t])||(lt&&D(yt,t)?pt[t]=yt[t]:pt[t]=gt("Symbol."+t)),pt[t]}function at(){var t=c(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}var st=Ht&&+Ht,lt=!!Object.getOwnPropertySymbols&&!n(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&st&&st<41}),X=lt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,pt=ot("wks"),yt=E.Symbol,gt=X?yt:yt&&yt.withoutSetter||b,dt=ft("match");function ht(t,e){return RegExp(t,e)}var rt={UNSUPPORTED_Y:n(function(){var t=ht("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),BROKEN_CARET:n(function(){var t=ht("^r","gy");return t.lastIndex=2,null!=t.exec("str")})},mt=Function.toString;"function"!=typeof nt.inspectSource&&(nt.inspectSource=function(t){return mt.call(t)});var bt,vt,Ot,St,wt,xt,Et,jt,Pt=nt.inspectSource,e=E.WeakMap,P="function"==typeof e&&/native code/.test(Pt(e)),Tt=ot("keys"),It=function(t){return Tt[t]||(Tt[t]=b(t))},Nt="Object already initialized",K=E.WeakMap;Et=P||nt.state?(bt=nt.state||(nt.state=new K),vt=bt.get,Ot=bt.has,St=bt.set,wt=function(t,e){if(Ot.call(bt,t))throw new TypeError(Nt);return e.facade=t,St.call(bt,t,e),e},xt=function(t){return vt.call(bt,t)||{}},function(t){return Ot.call(bt,t)}):(jt=It("state"),J[jt]=!0,wt=function(t,e){if(D(t,jt))throw new TypeError(Nt);return e.facade=t,et(t,jt,e),e},xt=function(t){return D(t,jt)?t[jt]:{}},function(t){return D(t,jt)});var _t,Lt,kt={set:wt,get:xt,has:Et,enforce:function(t){return Et(t)?xt(t):wt(t,{})},getterFor:function(r){return function(t){var e;if(!u(t)||(e=xt(t)).type!==r)throw TypeError("Incompatible receiver, "+r+" required");return e}}},At=i(function(t){var e=kt.get,c=kt.enforce,f=String(String).split("String");(t.exports=function(t,e,r,n){var o=!!n&&!!n.unsafe,i=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof r&&("string"!=typeof e||D(r,"name")||et(r,"name",e),(n=c(r)).source||(n.source=f.join("string"==typeof e?e:""))),t!==E?(o?!u&&t[e]&&(i=!0):delete t[e],i?t[e]=r:et(t,e,r)):i?t[e]=r:m(e,r)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||Pt(this)})}),Mt=ft("species"),Rt=V.f,x=tt.f,Ct=kt.enforce,Vt=ft("match"),Ft=E.RegExp,Dt=Ft.prototype,qt=/a/g,Gt=/a/g,Ut=new Ft(qt)!==qt,Bt=rt.UNSUPPORTED_Y;if(o&&L("RegExp",!Ut||Bt||n(function(){return Gt[Vt]=!1,Ft(qt)!=qt||Ft(Gt)==Gt||"/a/i"!=Ft(qt,"i")}))){for(var Yt=function(t,e){var r,n,o=this instanceof Yt,r=u(i=t)&&(void 0!==(r=i[dt])?!!r:"RegExp"==p(i)),i=void 0===e;if(!o&&r&&t.constructor===Yt&&i)return t;Ut?r&&!i&&(t=t.source):t instanceof Yt&&(i&&(e=at.call(t)),t=t.source),Bt&&(n=!!e&&-1<e.indexOf("y"))&&(e=e.replace(/y/g,""));o=f(Ut?new Ft(t,e):Ft(t,e),o?this:Dt,Yt);return Bt&&n&&(Ct(o).sticky=!0),o},Wt=x(Ft),zt=0;Wt.length>zt;)!function(e){e in Yt||Rt(Yt,e,{configurable:!0,get:function(){return Ft[e]},set:function(t){Ft[e]=t}})}(Wt[zt++]);(Dt.constructor=Yt).prototype=Dt,At(E,"RegExp",Yt)}Lt=w(_t="RegExp"),_t=V.f,o&&Lt&&!Lt[Mt]&&_t(Lt,Mt,{configurable:!0,get:function(){return this}});var Ht={}.propertyIsEnumerable,Kt=Object.getOwnPropertyDescriptor,Xt={f:Kt&&!Ht.call({1:2},1)?function(t){t=Kt(this,t);return!!t&&t.enumerable}:Ht},Jt=Object.getOwnPropertyDescriptor,$t={f:o?Jt:function(t,e){if(t=y(t),e=s(e,!0),R)try{return Jt(t,e)}catch(t){}if(D(t,e))return h(!Xt.f.call(t,e),t[e])}},Qt={f:Object.getOwnPropertySymbols},Zt=w("Reflect","ownKeys")||function(t){var e=tt.f(c(t)),r=Qt.f;return r?e.concat(r(t)):e},te=$t.f,e=function(t,e){var r,n,o,i=t.target,u=t.global,c=t.stat,f=u?E:c?E[i]||m(i,{}):(E[i]||{}).prototype;if(f)for(r in e){if(n=e[r],o=t.noTargetGet?(o=te(f,r))&&o.value:f[r],!L(u?r:i+(c?".":"#")+r,t.forced)&&void 0!==o){if(typeof n==typeof o)continue;!function(t,e){for(var r=Zt(e),n=V.f,o=$t.f,i=0;i<r.length;i++){var u=r[i];D(t,u)||n(t,u,o(e,u))}}(n,o)}(t.sham||o&&o.sham)&&et(n,"sham",!0),At(f,r,n,t)}},ee=RegExp.prototype.exec,re=ot("native-string-replace",String.prototype.replace),P=ee,ne=(K=/a/,x=/b*/g,ee.call(K,"a"),ee.call(x,"a"),0!==K.lastIndex||0!==x.lastIndex),oe=rt.UNSUPPORTED_Y||rt.BROKEN_CARET,ie=void 0!==/()??/.exec("")[1],Ht=P=ne||ie||oe?function(t){var e,r,n,o,i=this,u=oe&&i.sticky,c=at.call(i),f=i.source,a=0,s=t;return u&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),s=String(t).slice(i.lastIndex),0<i.lastIndex&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(f="(?: "+f+")",s=" "+s,a++),r=new RegExp("^(?:"+f+")",c)),ie&&(r=new RegExp("^"+f+"$(?!\\s)",c)),ne&&(e=i.lastIndex),n=ee.call(u?r:i,s),u?n?(n.input=n.input.slice(a),n[0]=n[0].slice(a),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:ne&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),ie&&n&&1<n.length&&re.call(n[0],r,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)}),n}:P;e({target:"RegExp",proto:!0,forced:/./.exec!==Ht},{exec:Ht});var K="toString",ue=RegExp.prototype,ce=ue[K],x=n(function(){return"/a/b"!=ce.call({source:"a",flags:"b"})}),rt=ce.name!=K;(x||rt)&&At(RegExp.prototype,K,function(){var t=c(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in ue)?at.call(t):r)},{unsafe:!0}),e({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});function fe(){}function ae(t){return"<script>"+t+"</"+de+">"}var se,le=Object.keys||function(t){return d(t,Q)},pe=o?Object.defineProperties:function(t,e){c(t);for(var r,n=le(e),o=n.length,i=0;i<o;)V.f(t,r=n[i++],e[r]);return t},ye=w("document","documentElement"),ge="prototype",de="script",he=It("IE_PROTO"),me=function(){try{se=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t;me=se?function(t){t.write(ae("")),t.close();var e=t.parentWindow.Object;return t=null,e}(se):((t=a("iframe")).style.display="none",ye.appendChild(t),t.src=String("javascript:"),(t=t.contentWindow.document).open(),t.write(ae("document.F=Object")),t.close(),t.F);for(var e=Q.length;e--;)delete me[ge][Q[e]];return me()};J[he]=!0;function be(t){var e,r,n,o,i,u,c,f=s(t,!1);if("string"==typeof f&&2<f.length)if(43===(e=(f=Ee(f)).charCodeAt(0))||45===e){if(88===(t=f.charCodeAt(2))||120===t)return NaN}else if(48===e){switch(f.charCodeAt(1)){case 66:case 98:r=2,n=49;break;case 79:case 111:r=8,n=55;break;default:return+f}for(i=(o=f.slice(2)).length,u=0;u<i;u++)if((c=o.charCodeAt(u))<48||n<c)return NaN;return parseInt(o,r)}return+f}var ve=Object.create||function(t,e){var r;return null!==t?(fe[ge]=c(t),r=new fe,fe[ge]=null,r[he]=t):r=me(),void 0===e?r:pe(r,e)},P="[\t\n\v\f\r \u2028\u2029\ufeff]",Oe=RegExp("^"+P+P+"*"),Se=RegExp(P+P+"*$"),Ht=function(e){return function(t){t=String(l(t));return 1&e&&(t=t.replace(Oe,"")),t=2&e?t.replace(Se,""):t}},x={start:Ht(1),end:Ht(2),trim:Ht(3)},rt=tt.f,we=$t.f,xe=V.f,Ee=x.trim,je="Number",Pe=E[je],Te=Pe.prototype,Ie=p(ve(Te))==je;if(L(je,!Pe(" 0o1")||!Pe("0b1")||Pe("+0x1"))){for(var Ne,_e=function(t){var t=arguments.length<1?0:t,e=this;return e instanceof _e&&(Ie?n(function(){Te.valueOf.call(e)}):p(e)!=je)?f(new Pe(be(t)),e,_e):be(t)},Le=o?rt(Pe):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),ke=0;Le.length>ke;ke++)D(Pe,Ne=Le[ke])&&!D(_e,Ne)&&xe(_e,Ne,we(Pe,Ne));(_e.prototype=Te).constructor=_e,At(E,je,_e)}var Ae=function(t){return"string"==typeof t},Me=function(t){return"number"==typeof t&&!Number.isNaN(t)},Re=function(t){return Me(t)&&Math.floor(t)===t},Ce=function(t){return"boolean"==typeof t},Ve=function(t){return!De(t)&&!qe(t)&&t.constructor===Object},Fe=function(t){return Array.isArray(t)},De=function(t){return null===t},qe=function(t){return void 0===t};function Ge(t,e){return!e||!qe(t)}function Ue(t,e){return!Me(e)||Ae(t)&&t.length>=e}function Be(t,e){return!Me(e)||Ae(t)&&t.length<=e}function Ye(t,e){try{var r=new RegExp(e);return void 0!==t&&!!r.test(t)}catch(t){return!0}}function We(t,e){return!Me(e)&&!Ae(e)||(Me(t)||Ae(t))&&t<=e}function ze(t,e){return!Me(e)&&!Ae(e)||(Me(t)||Ae(t))&&e<=t}function He(t,e){return!Me(e)||Fe(t)&&t.length>=e}function Ke(t,e){return!Me(e)||Fe(t)&&t.length<=e}e({target:"Object",stat:!0,forced:n(function(){le(1)})},{keys:function(t){return le(O(t))}});function Xe(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}function Je(t,e){var r;return new(void 0===(r=Qe(t)&&("function"==typeof(r=t.constructor)&&(r===Array||Qe(r.prototype))||u(r)&&null===(r=r[Ze]))?void 0:r)?Array:r)(0===e?0:e)}var $e=function(t){return Ae(t)&&0===t.length||(Ve(t)||Fe(t))&&0===Object.keys(t).length},Qe=Array.isArray||function(t){return"Array"==p(t)},Ze=ft("species"),tr=[].push,K=function(p){var y=1==p,g=2==p,d=3==p,h=4==p,m=6==p,b=7==p,v=5==p||m;return function(t,e,r,n){for(var o,i,u=O(t),c=U(u),f=function(n,o,t){if(Xe(n),void 0===o)return n;switch(t){case 0:return function(){return n.call(o)};case 1:return function(t){return n.call(o,t)};case 2:return function(t,e){return n.call(o,t,e)};case 3:return function(t,e,r){return n.call(o,t,e,r)}}return function(){return n.apply(o,arguments)}}(e,r,3),a=S(c.length),s=0,n=n||Je,l=y?n(t,a):g||b?n(t,0):void 0;s<a;s++)if((v||s in c)&&(i=f(o=c[s],s,u),p))if(y)l[s]=i;else if(i)switch(p){case 3:return!0;case 5:return o;case 6:return s;case 2:tr.call(l,o)}else switch(p){case 4:return!1;case 7:tr.call(l,o)}return m?-1:d||h?h:l}},P={forEach:K(0),map:K(1),filter:K(2),some:K(3),every:K(4),find:K(5),findIndex:K(6),filterOut:K(7)},er=ft("species"),Ht=function(e){return 51<=st||!n(function(){var t=[];return(t.constructor={})[er]=function(){return{foo:1}},1!==t[e](Boolean).foo})},rr=P.map;e({target:"Array",proto:!0,forced:!Ht("map")},{map:function(t){return rr(this,t,1<arguments.length?arguments[1]:void 0)}});var x=function(a){return function(t,e,r,n){Xe(e);var o=O(t),i=U(o),u=S(o.length),c=a?u-1:0,f=a?-1:1;if(r<2)for(;;){if(c in i){n=i[c],c+=f;break}if(c+=f,a?c<0:u<=c)throw TypeError("Reduce of empty array with no initial value")}for(;a?0<=c:c<u;c+=f)c in i&&(n=e(n,i[c],c,o));return n}},rt={left:x(!1),right:x(!0)},K=function(t,e){var r=[][t];return!!r&&n(function(){r.call(null,e||function(){throw 1},1)})},x="process"==p(E.process),nr=rt.left;function or(t,e,r){if(!Ae(t)&&!De(t))return["type"];if(""===t&&r)return["required"];var n=[];return Ge(t,r)||n.push("required"),Ue(t,e.minLength)||n.push("minLength"),Be(t,e.maxLength)||n.push("maxLength"),Ye(t,e.pattern)||n.push("pattern"),ze(t,e.minimum)||n.push("minimum"),We(t,e.maximum)||n.push("maximum"),n}function ir(t,e,r){if(!Me(t)&&!De(t))return["type"];var n=[];return Ge(t,r)||n.push("required"),ze(t,e.minimum)||n.push("minimum"),We(t,e.maximum)||n.push("maximum"),n}function ur(t,e,r){return Re(t)?ir(t,e,r):["type"]}function cr(t,e,r){if(!Ce(t)&&!De(t))return["type"];var n=[];return Ge(t,r)||n.push("required"),n}function fr(t,e,r){return Ge(t,r)?De(t)||-1===e.enum.indexOf(t)?["enum"]:[]:["required"]}function ar(t,e,r){return Ge(t,r)?t!==e.const?["enum"]:[]:["required"]}function sr(t,e){if(!Fe(t)&&!De(t))return["type"];var r=[];return He(t,e.minItems)||r.push("minItems"),Ke(t,e.maxItems)||r.push("maxItems"),r}function lr(e,t){return Ve(e)||De(e)?!Fe(t.required)||t.required.map(function(t){return void 0!==e[t]}).reduce(function(t,e){return t&&e},!0)?[]:["required"]:["type"]}function pr(n,o){return!(!Ve(n)||"object"!==o.type||!Ve(o.properties))&&Object.keys(o.properties).map(function(t){return e=n[t],r=o.properties[t],t=o.required&&0<=o.required.indexOf(t),void 0!==e?yr(e,r):!t;var e,r}).every(function(t){return t})}function yr(t,e){if(e.oneOf)return r=t,!!Fe((o=e).oneOf)&&o.oneOf.some(function(t){return yr(r,t)});var r,n,o,i,u;if(e.allOf)return n=t,!!Fe((o=e).allOf)&&o.allOf.map(function(t){return yr(n,t)}).every(function(t){return t});if(e.enum)return!fr(t,e).length;if(e.const)return!ar(t,e).length;switch(e.type){case"string":return!or(t,e).length;case"number":return!ir(t,e).length;case"integer":return!ur(t,e).length;case"boolean":return!cr(t).length;case"array":return i=t,!("array"!==(u=e).type||!Ve(u.items))&&(!sr(i,u).length&&i.map(function(t){return yr(t,u.items)}).every(function(t){return t}));case"object":return pr(t,e);default:return!1}}e({target:"Array",proto:!0,forced:!K("reduce")||!x&&79<st&&st<83},{reduce:function(t){return nr(this,t,arguments.length,1<arguments.length?arguments[1]:void 0)}});function gr(t,e){var r=Dr[t]=ve(Ar[Nr]);return _r(r,{type:Ir,tag:t,description:e}),o||(r.description=e),r}function dr(e,t){c(e);var r=y(t),t=le(r).concat(Kr(r));return Pr(t,function(t){o&&!Hr.call(r,t)||zr(e,t,r[t])}),e}var hr,mr,br,vr=tt.f,Or={}.toString,Sr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],rt={f:function(t){return Sr&&"[object Window]"==Or.call(t)?function(t){try{return vr(t)}catch(t){return Sr.slice()}}(t):vr(y(t))}},wr={f:ft},xr=V.f,Er=V.f,jr=ft("toStringTag"),Pr=P.forEach,Tr=It("hidden"),Ir="Symbol",Nr="prototype",x=ft("toPrimitive"),_r=kt.set,Lr=kt.getterFor(Ir),kr=Object[Nr],Ar=E.Symbol,Mr=w("JSON","stringify"),Rr=$t.f,Cr=V.f,Vr=rt.f,Fr=Xt.f,Dr=ot("symbols"),qr=ot("op-symbols"),Gr=ot("string-to-symbol-registry"),Ur=ot("symbol-to-string-registry"),It=ot("wks"),ot=E.QObject,Br=!ot||!ot[Nr]||!ot[Nr].findChild,Yr=o&&n(function(){return 7!=ve(Cr({},"a",{get:function(){return Cr(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=Rr(kr,e);n&&delete kr[e],Cr(t,e,r),n&&t!==kr&&Cr(kr,e,n)}:Cr,Wr=X?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Ar},zr=function(t,e,r){t===kr&&zr(qr,e,r),c(t);e=s(e,!0);return c(r),D(Dr,e)?(r.enumerable?(D(t,Tr)&&t[Tr][e]&&(t[Tr][e]=!1),r=ve(r,{enumerable:h(0,!1)})):(D(t,Tr)||Cr(t,Tr,h(1,{})),t[Tr][e]=!0),Yr(t,e,r)):Cr(t,e,r)},Hr=function(t){var e=s(t,!0),t=Fr.call(this,e);return!(this===kr&&D(Dr,e)&&!D(qr,e))&&(!(t||!D(this,e)||!D(Dr,e)||D(this,Tr)&&this[Tr][e])||t)},ot=function(t,e){var r=y(t),t=s(e,!0);if(r!==kr||!D(Dr,t)||D(qr,t)){e=Rr(r,t);return!e||!D(Dr,t)||D(r,Tr)&&r[Tr][t]||(e.enumerable=!0),e}},X=function(t){var t=Vr(y(t)),e=[];return Pr(t,function(t){D(Dr,t)||D(J,t)||e.push(t)}),e},Kr=function(t){var e=t===kr,t=Vr(e?qr:y(t)),r=[];return Pr(t,function(t){!D(Dr,t)||e&&!D(kr,t)||r.push(Dr[t])}),r};lt||(At((Ar=function(){if(this instanceof Ar)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=b(t),r=function(t){this===kr&&r.call(qr,t),D(this,Tr)&&D(this[Tr],e)&&(this[Tr][e]=!1),Yr(this,e,h(1,t))};return o&&Br&&Yr(kr,e,{configurable:!0,set:r}),gr(e,t)})[Nr],"toString",function(){return Lr(this).tag}),At(Ar,"withoutSetter",function(t){return gr(b(t),t)}),Xt.f=Hr,V.f=zr,$t.f=ot,tt.f=rt.f=X,Qt.f=Kr,wr.f=function(t){return gr(ft(t),t)},o&&(Cr(Ar[Nr],"description",{configurable:!0,get:function(){return Lr(this).description}}),At(kr,"propertyIsEnumerable",Hr,{unsafe:!0}))),e({global:!0,wrap:!0,forced:!lt,sham:!lt},{Symbol:Ar}),Pr(le(It),function(t){var e;e=t,t=ct.Symbol||(ct.Symbol={}),D(t,e)||xr(t,e,{value:wr.f(e)})}),e({target:Ir,stat:!0,forced:!lt},{for:function(t){var e=String(t);if(D(Gr,e))return Gr[e];t=Ar(e);return Gr[e]=t,Ur[t]=e,t},keyFor:function(t){if(!Wr(t))throw TypeError(t+" is not a symbol");if(D(Ur,t))return Ur[t]},useSetter:function(){Br=!0},useSimple:function(){Br=!1}}),e({target:"Object",stat:!0,forced:!lt,sham:!o},{create:function(t,e){return void 0===e?ve(t):dr(ve(t),e)},defineProperty:zr,defineProperties:dr,getOwnPropertyDescriptor:ot}),e({target:"Object",stat:!0,forced:!lt},{getOwnPropertyNames:X,getOwnPropertySymbols:Kr}),e({target:"Object",stat:!0,forced:n(function(){Qt.f(1)})},{getOwnPropertySymbols:function(t){return Qt.f(O(t))}}),Mr&&e({target:"JSON",stat:!0,forced:!lt||n(function(){var t=Ar();return"[null]"!=Mr([t])||"{}"!=Mr({a:t})||"{}"!=Mr(Object(t))})},{stringify:function(t,e,r){for(var n,o=[t],i=1;i<arguments.length;)o.push(arguments[i++]);if((u(n=e)||void 0!==t)&&!Wr(t))return Qe(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Wr(e))return e}),o[1]=e,Mr.apply(null,o)}}),Ar[Nr][x]||et(Ar[Nr],x,Ar[Nr].valueOf),mr=Ir,(hr=Ar)&&!D(hr=br?hr:hr.prototype,jr)&&Er(hr,jr,{configurable:!0,value:mr}),J[Tr]=!0;var Xr=P.filter;e({target:"Array",proto:!0,forced:!Ht("filter")},{filter:function(t){return Xr(this,t,1<arguments.length?arguments[1]:void 0)}});var Jr=$t.f,Ht=n(function(){Jr(1)});e({target:"Object",stat:!0,forced:!o||Ht,sham:!o},{getOwnPropertyDescriptor:function(t,e){return Jr(y(t),e)}});e({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,r,n=y(t),o=$t.f,i=Zt(n),u={},c=0;i.length>c;)void 0!==(r=o(n,e=i[c++]))&&function(t,e,r){e=s(e);e in t?V.f(t,e,h(0,r)):t[e]=r}(u,e,r);return u}});var $r,Qr=r(i(function(t){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0})),Zr=r(i(function(e){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(t){return typeof t}:e.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e.exports.default=e.exports,e.exports.__esModule=!0,r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0})),tn=P.forEach,en=K("forEach")?[].forEach:function(t){return tn(this,t,1<arguments.length?arguments[1]:void 0)};for($r in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var rn=E[$r],rn=rn&&rn.prototype;if(rn&&rn.forEach!==en)try{et(rn,"forEach",en)}catch(t){rn.forEach=en}}function nn(e,t){var r,n=Object.keys(e);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(e),t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)),n}function on(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(r),!0).forEach(function(t){Qr(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nn(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function un(t,e){if(e.allOf)return r=t,o={},e.allOf.forEach(function(t){n=un(r,t),"object"===Zr(n)&&(o=on(on({},o),n))}),o;var r,n,o,i,u,c,f;if(e.oneOf)return i=t,e.oneOf.map(function(t){return un(i,t)}).reduce(function(t,e){return De(t)?e:Ve(t)&&Ve(e)?function e(r,n){var o=on({},r);Object.keys(n).forEach(function(t){Ve(r[t])&&Ve(n[t])?o[t]=e(r[t],n[t]):o[t]=n[t]});return o}(t,e):De(e)?t:e},null);if(e.enum&&0<=e.enum.indexOf(t))return t;if(!qe(e.const)&&t===e.const)return t;if(e.type)switch(e.type){case"object":return u=t,c=e,f={},Object.keys(c.properties).forEach(function(t){var e;u&&!qe(u[t])&&(e=un(u[t],c.properties[t]),De(e)||(f[t]=e))}),f;case"array":return function(t,e){if(Fe(t))return t.map(function(t){return un(t,e)});return null}(t,e);case"string":return function(t){if(Ae(t))return $e(t)?null:t;return null}(t);case"number":return function(t){if(Me(t))return t;return null}(t);case"integer":return function(t){if(Re(t))return t;return null}(t);case"boolean":return function(t){if(Ce(t))return t;return null}(t);default:return null}return null}var cn={SPACE:{key:[" ","Spacebar"],keyCode:32},ENTER:{key:"Enter",keyCode:13},TAB:{key:"Tab",keyCode:9},ESCAPE:{key:"Escape",keyCode:27}};t.getArrayValidationFailures=sr,t.getBooleanValidationFailures=cr,t.getConstValidationFailures=ar,t.getEnumValidationFailures=fr,t.getIntegerValidationFailures=ur,t.getNumberValidationFailures=ir,t.getObjectValidationFailures=lr,t.getStringValidationFailures=or,t.getValidModelParts=un,t.getValidationFailures=function(t,e,r){if(e.enum)return fr(t,e,r);if(e.const)return ar(t,e,r);if(De(t))return r?["required"]:[];switch(e.type){case"string":return or(t,e,r);case"number":return ir(t,e,r);case"integer":return ur(t,e,r);case"boolean":return cr(t,0,r);case"array":return sr(t,e);case"object":return lr(t,e);default:return[]}},t.isArray=Fe,t.isBoolean=Ce,t.isEmpty=$e,t.isInteger=Re,t.isKey=function(t){var e=t.keyType,r=t.event;if(!e||!r)return!1;t=e.toUpperCase(),e=cn[t];if(!e)return!1;t=r.key,r=r.keyCode;return t?Fe(e.key)?-1<e.key.indexOf(t):t===e.key:r===e.keyCode},t.isNull=De,t.isNumber=Me,t.isObject=Ve,t.isString=Ae,t.isUndefined=qe,t.isValidMaxItems=Ke,t.isValidMaxLength=Be,t.isValidMaximum=We,t.isValidMinItems=He,t.isValidMinLength=Ue,t.isValidMinimum=ze,t.isValidPattern=Ye,t.isValidRequired=Ge,t.isValidSchema=yr,Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.1.3](https://github.com/transferwise/neptune-web/compare/@transferwise/neptune-validation@2.1.2...@transferwise/neptune-validation@2.1.3) (2021-06-16) | ||
**Note:** Version bump only for package @transferwise/neptune-validation | ||
## [2.1.2](https://github.com/transferwise/neptune-web/compare/@transferwise/neptune-validation@2.1.1...@transferwise/neptune-validation@2.1.2) (2021-06-11) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@transferwise/neptune-validation", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "Neptune Web validation", | ||
@@ -48,3 +48,3 @@ "license": "Apache-2.0", | ||
}, | ||
"gitHead": "5f40a37d60647f1dc2530acfd0007bd73efa0d12" | ||
"gitHead": "4e199b9ff47d44b9f7723f80a5b152368fb94579" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
69573
21
136
1