piral-configs 0.15.0-alpha.3549 → 0.15.0-alpha.3592
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/types.d.ts +2 -2
- package/lib/types.d.ts +2 -2
- package/package.json +7 -5
- package/piral-configs.min.js +4 -0
- package/src/types.ts +2 -2
package/esm/types.d.ts
CHANGED
package/lib/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-configs",
|
|
3
|
-
"version": "0.15.0-alpha.
|
|
3
|
+
"version": "0.15.0-alpha.3592",
|
|
4
4
|
"description": "Plugin for dynamic configurations of pilets in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"esm",
|
|
25
25
|
"lib",
|
|
26
|
-
"src"
|
|
26
|
+
"src",
|
|
27
|
+
"piral-configs.min.js"
|
|
27
28
|
],
|
|
28
29
|
"repository": {
|
|
29
30
|
"type": "git",
|
|
@@ -33,7 +34,8 @@
|
|
|
33
34
|
"url": "https://github.com/smapiot/piral/issues"
|
|
34
35
|
},
|
|
35
36
|
"scripts": {
|
|
36
|
-
"build": "yarn build:commonjs && yarn build:esnext",
|
|
37
|
+
"build": "yarn build:bundle && yarn build:commonjs && yarn build:esnext",
|
|
38
|
+
"build:bundle": "esbuild src/index.ts --outfile=piral-configs.min.js --bundle --external:piral-core --minify --global-name=piralConfigs",
|
|
37
39
|
"build:commonjs": "tsc --project tsconfig.json --outDir lib --module commonjs",
|
|
38
40
|
"build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext",
|
|
39
41
|
"typedoc": "typedoc --json ../../../docs/types/piral-configs.json src --exclude \"src/**/*.test.*\"",
|
|
@@ -44,10 +46,10 @@
|
|
|
44
46
|
"url": "^0.11.0"
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
47
|
-
"piral-core": "0.15.0-alpha.
|
|
49
|
+
"piral-core": "0.15.0-alpha.3592"
|
|
48
50
|
},
|
|
49
51
|
"peerDependencies": {
|
|
50
52
|
"piral-core": "0.14.x"
|
|
51
53
|
},
|
|
52
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "5537ccd39d275afdc53845ab8cb4868a8dbc8903"
|
|
53
55
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var piralConfigs=(()=>{var gr=Object.create;var pe=Object.defineProperty,Ar=Object.defineProperties,br=Object.getOwnPropertyDescriptor,wr=Object.getOwnPropertyDescriptors,xr=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,Er=Object.getPrototypeOf,Ne=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable;var _e=(t,r,e)=>r in t?pe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,me=(t,r)=>{for(var e in r||(r={}))Ne.call(r,e)&&_e(t,e,r[e]);if(Ve)for(var e of Ve(r))Sr.call(r,e)&&_e(t,e,r[e]);return t},Oe=(t,r)=>Ar(t,wr(r)),Te=t=>pe(t,"__esModule",{value:!0});var D=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),Or=(t,r)=>{Te(t);for(var e in r)pe(t,e,{get:r[e],enumerable:!0})},Fr=(t,r,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of xr(r))!Ne.call(t,i)&&i!=="default"&&pe(t,i,{get:()=>r[i],enumerable:!(e=br(r,i))||e.enumerable});return t},Pr=t=>Fr(Te(pe(t!=null?gr(Er(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var De=D((ue,fe)=>{(function(t){var r=typeof ue=="object"&&ue&&!ue.nodeType&&ue,e=typeof fe=="object"&&fe&&!fe.nodeType&&fe,i=typeof global=="object"&&global;(i.global===i||i.window===i||i.self===i)&&(t=i);var n,a=2147483647,s=36,o=1,f=26,u=38,l=700,A=72,h=128,c="-",S=/^xn--/,Q=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,ee={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=s-o,b=Math.floor,$=String.fromCharCode,C;function E(d){throw RangeError(ee[d])}function ne(d,m){for(var v=d.length,w=[];v--;)w[v]=m(d[v]);return w}function N(d,m){var v=d.split("@"),w="";v.length>1&&(w=v[0]+"@",d=v[1]),d=d.replace(P,".");var x=d.split("."),z=ne(x,m).join(".");return w+z}function Z(d){for(var m=[],v=0,w=d.length,x,z;v<w;)x=d.charCodeAt(v++),x>=55296&&x<=56319&&v<w?(z=d.charCodeAt(v++),(z&64512)==56320?m.push(((x&1023)<<10)+(z&1023)+65536):(m.push(x),v--)):m.push(x);return m}function G(d){return ne(d,function(m){var v="";return m>65535&&(m-=65536,v+=$(m>>>10&1023|55296),m=56320|m&1023),v+=$(m),v}).join("")}function de(d){return d-48<10?d-22:d-65<26?d-65:d-97<26?d-97:s}function Ae(d,m){return d+22+75*(d<26)-((m!=0)<<5)}function X(d,m,v){var w=0;for(d=v?b(d/l):d>>1,d+=b(d/m);d>p*f>>1;w+=s)d=b(d/p);return b(w+(p+1)*d/(d+u))}function ae(d){var m=[],v=d.length,w,x=0,z=h,F=A,R,_,L,k,j,M,T,W,re;for(R=d.lastIndexOf(c),R<0&&(R=0),_=0;_<R;++_)d.charCodeAt(_)>=128&&E("not-basic"),m.push(d.charCodeAt(_));for(L=R>0?R+1:0;L<v;){for(k=x,j=1,M=s;L>=v&&E("invalid-input"),T=de(d.charCodeAt(L++)),(T>=s||T>b((a-x)/j))&&E("overflow"),x+=T*j,W=M<=F?o:M>=F+f?f:M-F,!(T<W);M+=s)re=s-W,j>b(a/re)&&E("overflow"),j*=re;w=m.length+1,F=X(x-k,w,k==0),b(x/w)>a-z&&E("overflow"),z+=b(x/w),x%=w,m.splice(x++,0,z)}return G(m)}function oe(d){var m,v,w,x,z,F,R,_,L,k,j,M=[],T,W,re,Se;for(d=Z(d),T=d.length,m=h,v=0,z=A,F=0;F<T;++F)j=d[F],j<128&&M.push($(j));for(w=x=M.length,x&&M.push(c);w<T;){for(R=a,F=0;F<T;++F)j=d[F],j>=m&&j<R&&(R=j);for(W=w+1,R-m>b((a-v)/W)&&E("overflow"),v+=(R-m)*W,m=R,F=0;F<T;++F)if(j=d[F],j<m&&++v>a&&E("overflow"),j==m){for(_=v,L=s;k=L<=z?o:L>=z+f?f:L-z,!(_<k);L+=s)Se=_-k,re=s-k,M.push($(Ae(k+Se%re,0))),_=b(Se/re);M.push($(Ae(_,0))),z=X(v,W,w==x),v=0,++w}++v,++m}return M.join("")}function se(d){return N(d,function(m){return S.test(m)?ae(m.slice(4).toLowerCase()):m})}function Ee(d){return N(d,function(m){return Q.test(m)?"xn--"+oe(m):m})}if(n={version:"1.3.2",ucs2:{decode:Z,encode:G},decode:ae,encode:oe,toASCII:Ee,toUnicode:se},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return n});else if(r&&e)if(fe.exports==r)e.exports=n;else for(C in n)n.hasOwnProperty(C)&&(r[C]=n[C]);else t.punycode=n})(ue)});var Le=D((Qr,Ue)=>{"use strict";Ue.exports={isString:function(t){return typeof t=="string"},isObject:function(t){return typeof t=="object"&&t!==null},isNull:function(t){return t===null},isNullOrUndefined:function(t){return t==null}}});var Je=D((et,Be)=>{"use strict";function $r(t,r){return Object.prototype.hasOwnProperty.call(t,r)}Be.exports=function(t,r,e,i){r=r||"&",e=e||"=";var n={};if(typeof t!="string"||t.length===0)return n;var a=/\+/g;t=t.split(r);var s=1e3;i&&typeof i.maxKeys=="number"&&(s=i.maxKeys);var o=t.length;s>0&&o>s&&(o=s);for(var f=0;f<o;++f){var u=t[f].replace(a,"%20"),l=u.indexOf(e),A,h,c,S;l>=0?(A=u.substr(0,l),h=u.substr(l+1)):(A=u,h=""),c=decodeURIComponent(A),S=decodeURIComponent(h),$r(n,c)?Array.isArray(n[c])?n[c].push(S):n[c]=[n[c],S]:n[c]=S}return n}});var ke=D((rt,Ge)=>{"use strict";var ce=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};Ge.exports=function(t,r,e,i){return r=r||"&",e=e||"=",t===null&&(t=void 0),typeof t=="object"?Object.keys(t).map(function(n){var a=encodeURIComponent(ce(n))+e;return Array.isArray(t[n])?t[n].map(function(s){return a+encodeURIComponent(ce(s))}).join(r):a+encodeURIComponent(ce(t[n]))}).join(r):i?encodeURIComponent(ce(i))+e+encodeURIComponent(ce(t)):""}});var Ke=D(ve=>{"use strict";ve.decode=ve.parse=Je();ve.encode=ve.stringify=ke()});var be=D(he=>{"use strict";var Cr=De(),B=Le();he.parse=ye;he.resolve=_r;he.resolveObject=Tr;he.format=Nr;he.Url=I;function I(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var jr=/^([a-z0-9.+-]+:)/i,zr=/:[0-9]*$/,Zr=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Rr=["<",">",'"',"`"," ","\r",`
|
|
2
|
+
`," "],qr=["{","}","|","\\","^","`"].concat(Rr),Fe=["'"].concat(qr),Xe=["%","/","?",";","#"].concat(Fe),We=["/","?","#"],Mr=255,Ye=/^[+a-z0-9A-Z_-]{0,63}$/,Ir=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Vr={javascript:!0,"javascript:":!0},Pe={javascript:!0,"javascript:":!0},le={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},$e=Ke();function ye(t,r,e){if(t&&B.isObject(t)&&t instanceof I)return t;var i=new I;return i.parse(t,r,e),i}I.prototype.parse=function(t,r,e){if(!B.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),n=i!==-1&&i<t.indexOf("#")?"?":"#",a=t.split(n),s=/\\/g;a[0]=a[0].replace(s,"/"),t=a.join(n);var o=t;if(o=o.trim(),!e&&t.split("#").length===1){var f=Zr.exec(o);if(f)return this.path=o,this.href=o,this.pathname=f[1],f[2]?(this.search=f[2],r?this.query=$e.parse(this.search.substr(1)):this.query=this.search.substr(1)):r&&(this.search="",this.query={}),this}var u=jr.exec(o);if(u){u=u[0];var l=u.toLowerCase();this.protocol=l,o=o.substr(u.length)}if(e||u||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var A=o.substr(0,2)==="//";A&&!(u&&Pe[u])&&(o=o.substr(2),this.slashes=!0)}if(!Pe[u]&&(A||u&&!le[u])){for(var h=-1,c=0;c<We.length;c++){var S=o.indexOf(We[c]);S!==-1&&(h===-1||S<h)&&(h=S)}var Q,P;h===-1?P=o.lastIndexOf("@"):P=o.lastIndexOf("@",h),P!==-1&&(Q=o.slice(0,P),o=o.slice(P+1),this.auth=decodeURIComponent(Q)),h=-1;for(var c=0;c<Xe.length;c++){var S=o.indexOf(Xe[c]);S!==-1&&(h===-1||S<h)&&(h=S)}h===-1&&(h=o.length),this.host=o.slice(0,h),o=o.slice(h),this.parseHost(),this.hostname=this.hostname||"";var ee=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ee)for(var p=this.hostname.split(/\./),c=0,b=p.length;c<b;c++){var $=p[c];if(!!$&&!$.match(Ye)){for(var C="",E=0,ne=$.length;E<ne;E++)$.charCodeAt(E)>127?C+="x":C+=$[E];if(!C.match(Ye)){var N=p.slice(0,c),Z=p.slice(c+1),G=$.match(Ir);G&&(N.push(G[1]),Z.unshift(G[2])),Z.length&&(o="/"+Z.join(".")+o),this.hostname=N.join(".");break}}}this.hostname.length>Mr?this.hostname="":this.hostname=this.hostname.toLowerCase(),ee||(this.hostname=Cr.toASCII(this.hostname));var de=this.port?":"+this.port:"",Ae=this.hostname||"";this.host=Ae+de,this.href+=this.host,ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),o[0]!=="/"&&(o="/"+o))}if(!Vr[l])for(var c=0,b=Fe.length;c<b;c++){var X=Fe[c];if(o.indexOf(X)!==-1){var ae=encodeURIComponent(X);ae===X&&(ae=escape(X)),o=o.split(X).join(ae)}}var oe=o.indexOf("#");oe!==-1&&(this.hash=o.substr(oe),o=o.slice(0,oe));var se=o.indexOf("?");if(se!==-1?(this.search=o.substr(se),this.query=o.substr(se+1),r&&(this.query=$e.parse(this.query)),o=o.slice(0,se)):r&&(this.search="",this.query={}),o&&(this.pathname=o),le[l]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var de=this.pathname||"",Ee=this.search||"";this.path=de+Ee}return this.href=this.format(),this};function Nr(t){return B.isString(t)&&(t=ye(t)),t instanceof I?t.format():I.prototype.format.call(t)}I.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var r=this.protocol||"",e=this.pathname||"",i=this.hash||"",n=!1,a="";this.host?n=t+this.host:this.hostname&&(n=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&B.isObject(this.query)&&Object.keys(this.query).length&&(a=$e.stringify(this.query));var s=this.search||a&&"?"+a||"";return r&&r.substr(-1)!==":"&&(r+=":"),this.slashes||(!r||le[r])&&n!==!1?(n="//"+(n||""),e&&e.charAt(0)!=="/"&&(e="/"+e)):n||(n=""),i&&i.charAt(0)!=="#"&&(i="#"+i),s&&s.charAt(0)!=="?"&&(s="?"+s),e=e.replace(/[?#]/g,function(o){return encodeURIComponent(o)}),s=s.replace("#","%23"),r+n+e+s+i};function _r(t,r){return ye(t,!1,!0).resolve(r)}I.prototype.resolve=function(t){return this.resolveObject(ye(t,!1,!0)).format()};function Tr(t,r){return t?ye(t,!1,!0).resolveObject(r):r}I.prototype.resolveObject=function(t){if(B.isString(t)){var r=new I;r.parse(t,!1,!0),t=r}for(var e=new I,i=Object.keys(this),n=0;n<i.length;n++){var a=i[n];e[a]=this[a]}if(e.hash=t.hash,t.href==="")return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),o=0;o<s.length;o++){var f=s[o];f!=="protocol"&&(e[f]=t[f])}return le[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e}if(t.protocol&&t.protocol!==e.protocol){if(!le[t.protocol]){for(var u=Object.keys(t),l=0;l<u.length;l++){var A=u[l];e[A]=t[A]}return e.href=e.format(),e}if(e.protocol=t.protocol,!t.host&&!Pe[t.protocol]){for(var b=(t.pathname||"").split("/");b.length&&!(t.host=b.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),b[0]!==""&&b.unshift(""),b.length<2&&b.unshift(""),e.pathname=b.join("/")}else e.pathname=t.pathname;if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var h=e.pathname||"",c=e.search||"";e.path=h+c}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var S=e.pathname&&e.pathname.charAt(0)==="/",Q=t.host||t.pathname&&t.pathname.charAt(0)==="/",P=Q||S||e.host&&t.pathname,ee=P,p=e.pathname&&e.pathname.split("/")||[],b=t.pathname&&t.pathname.split("/")||[],$=e.protocol&&!le[e.protocol];if($&&(e.hostname="",e.port=null,e.host&&(p[0]===""?p[0]=e.host:p.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(b[0]===""?b[0]=t.host:b.unshift(t.host)),t.host=null),P=P&&(b[0]===""||p[0]==="")),Q)e.host=t.host||t.host===""?t.host:e.host,e.hostname=t.hostname||t.hostname===""?t.hostname:e.hostname,e.search=t.search,e.query=t.query,p=b;else if(b.length)p||(p=[]),p.pop(),p=p.concat(b),e.search=t.search,e.query=t.query;else if(!B.isNullOrUndefined(t.search)){if($){e.hostname=e.host=p.shift();var C=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;C&&(e.auth=C.shift(),e.host=e.hostname=C.shift())}return e.search=t.search,e.query=t.query,(!B.isNull(e.pathname)||!B.isNull(e.search))&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!p.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var E=p.slice(-1)[0],ne=(e.host||t.host||p.length>1)&&(E==="."||E==="..")||E==="",N=0,Z=p.length;Z>=0;Z--)E=p[Z],E==="."?p.splice(Z,1):E===".."?(p.splice(Z,1),N++):N&&(p.splice(Z,1),N--);if(!P&&!ee)for(;N--;N)p.unshift("..");P&&p[0]!==""&&(!p[0]||p[0].charAt(0)!=="/")&&p.unshift(""),ne&&p.join("/").substr(-1)!=="/"&&p.push("");var G=p[0]===""||p[0]&&p[0].charAt(0)==="/";if($){e.hostname=e.host=G?"":p.length?p.shift():"";var C=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;C&&(e.auth=C.shift(),e.host=e.hostname=C.shift())}return P=P||e.host&&p.length,P&&!G&&p.unshift(""),p.length?e.pathname=p.join("/"):(e.pathname=null,e.path=null),(!B.isNull(e.pathname)||!B.isNull(e.search))&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e};I.prototype.parseHost=function(){var t=this.host,r=zr.exec(t);r&&(r=r[0],r!==":"&&(this.port=r.substr(1)),t=t.substr(0,t.length-r.length)),t&&(this.hostname=t)}});var Y=D((q,Ze)=>{"use strict";var He=be(),Ce=q.ValidationError=function(r,e,i,n,a,s){if(Array.isArray(n)?(this.path=n,this.property=n.reduce(function(f,u){return f+er(u)},"instance")):n!==void 0&&(this.property=n),r&&(this.message=r),i){var o=i.$id||i.id;this.schema=o||i}e!==void 0&&(this.instance=e),this.name=a,this.argument=s,this.stack=this.toString()};Ce.prototype.toString=function(){return this.property+" "+this.message};var we=q.ValidatorResult=function(r,e,i,n){this.instance=r,this.schema=e,this.options=i,this.path=n.path,this.propertyPath=n.propertyPath,this.errors=[],this.throwError=i&&i.throwError,this.throwFirst=i&&i.throwFirst,this.throwAll=i&&i.throwAll,this.disableFormat=i&&i.disableFormat===!0};we.prototype.addError=function(r){var e;if(typeof r=="string")e=new Ce(r,this.instance,this.schema,this.path);else{if(!r)throw new Error("Missing error detail");if(!r.message)throw new Error("Missing error message");if(!r.name)throw new Error("Missing validator type");e=new Ce(r.message,this.instance,this.schema,this.path,r.name,r.argument)}if(this.errors.push(e),this.throwFirst)throw new te(this);if(this.throwError)throw e;return e};we.prototype.importErrors=function(r){typeof r=="string"||r&&r.validatorType?this.addError(r):r&&r.errors&&Array.prototype.push.apply(this.errors,r.errors)};function Dr(t,r){return r+": "+t.toString()+`
|
|
3
|
+
`}we.prototype.toString=function(r){return this.errors.map(Dr).join("")};Object.defineProperty(we.prototype,"valid",{get:function(){return!this.errors.length}});Ze.exports.ValidatorResultError=te;function te(t){Error.captureStackTrace&&Error.captureStackTrace(this,te),this.instance=t.instance,this.schema=t.schema,this.options=t.options,this.errors=t.errors}te.prototype=new Error;te.prototype.constructor=te;te.prototype.name="Validation Error";var Qe=q.SchemaError=function t(r,e){this.message=r,this.schema=e,Error.call(this,r),Error.captureStackTrace(this,t)};Qe.prototype=Object.create(Error.prototype,{constructor:{value:Qe,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var je=q.SchemaContext=function(r,e,i,n,a){this.schema=r,this.options=e,Array.isArray(i)?(this.path=i,this.propertyPath=i.reduce(function(s,o){return s+er(o)},"instance")):this.propertyPath=i,this.base=n,this.schemas=a};je.prototype.resolve=function(r){return He.resolve(this.base,r)};je.prototype.makeChild=function(r,e){var i=e===void 0?this.path:this.path.concat([e]),n=r.$id||r.id,a=He.resolve(this.base,n||""),s=new je(r,this.options,i,a,Object.create(this.schemas));return n&&!s.schemas[a]&&(s.schemas[a]=r),s};var U=q.FORMAT_REGEXPS={"date-time":/^\d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-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"utc-millisec":function(t){return typeof t=="string"&&parseFloat(t)===parseInt(t,10)&&!isNaN(t)},regex:function(t){var r=!0;try{new RegExp(t)}catch{r=!1}return r},style:/\s*(.+?):\s*([^;]+);?/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/};U.regexp=U.regex;U.pattern=U.regex;U.ipv4=U["ip-address"];q.isFormat=function(r,e,i){if(typeof r=="string"&&U[e]!==void 0){if(U[e]instanceof RegExp)return U[e].test(r);if(typeof U[e]=="function")return U[e](r)}else if(i&&i.customFormats&&typeof i.customFormats[e]=="function")return i.customFormats[e](r);return!0};var er=q.makeSuffix=function(r){return r=r.toString(),!r.match(/[.\s\[\]]/)&&!r.match(/^[\d]/)?"."+r:r.match(/^\d+$/)?"["+r+"]":"["+JSON.stringify(r)+"]"};q.deepCompareStrict=function t(r,e){if(typeof r!=typeof e)return!1;if(Array.isArray(r))return!Array.isArray(e)||r.length!==e.length?!1:r.every(function(a,s){return t(r[s],e[s])});if(typeof r=="object"){if(!r||!e)return r===e;var i=Object.keys(r),n=Object.keys(e);return i.length!==n.length?!1:i.every(function(a){return t(r[a],e[a])})}return r===e};function Ur(t,r,e,i){typeof e=="object"?r[i]=ze(t[i],e):t.indexOf(e)===-1&&r.push(e)}function Lr(t,r,e){r[e]=t[e]}function Br(t,r,e,i){typeof r[i]!="object"||!r[i]?e[i]=r[i]:t[i]?e[i]=ze(t[i],r[i]):e[i]=r[i]}function ze(t,r){var e=Array.isArray(r),i=e&&[]||{};return e?(t=t||[],i=i.concat(t),r.forEach(Ur.bind(null,t,i))):(t&&typeof t=="object"&&Object.keys(t).forEach(Lr.bind(null,t,i)),Object.keys(r).forEach(Br.bind(null,t,r,i))),i}Ze.exports.deepMerge=ze;q.objectGetPath=function(r,e){for(var i=e.split("/").slice(1),n;typeof(n=i.shift())=="string";){var a=decodeURIComponent(n.replace(/~0/,"~").replace(/~1/g,"/"));if(!(a in r))return;r=r[a]}return r};function Jr(t){return"/"+encodeURIComponent(t).replace(/~/g,"%7E")}q.encodePath=function(r){return r.map(Jr).join("")};q.getDecimalPlaces=function(r){var e=0;if(isNaN(r))return e;typeof r!="number"&&(r=Number(r));var i=r.toString().split("e");if(i.length===2){if(i[1][0]!=="-")return e;e=Number(i[1].slice(1))}var n=i[0].split(".");return n.length===2&&(e+=n[1].length),e};q.isSchema=function(r){return typeof r=="object"&&r||typeof r=="boolean"}});var nr=D((nt,ir)=>{"use strict";var V=Y(),y=V.ValidatorResult,H=V.SchemaError,Re={};Re.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var g=Re.validators={};g.type=function(r,e,i,n){if(r===void 0)return null;var a=new y(r,e,i,n),s=Array.isArray(e.type)?e.type:[e.type];if(!s.some(this.testType.bind(this,r,e,i,n))){var o=s.map(function(f){if(!!f){var u=f.$id||f.id;return u?"<"+u+">":f+""}});a.addError({name:"type",argument:o,message:"is not of a type(s) "+o})}return a};function qe(t,r,e,i,n){var a=r.throwError,s=r.throwAll;r.throwError=!1,r.throwAll=!1;var o=this.validateSchema(t,n,r,e);return r.throwError=a,r.throwAll=s,!o.valid&&i instanceof Function&&i(o),o.valid}g.anyOf=function(r,e,i,n){if(r===void 0)return null;var a=new y(r,e,i,n),s=new y(r,e,i,n);if(!Array.isArray(e.anyOf))throw new H("anyOf must be an array");if(!e.anyOf.some(qe.bind(this,r,i,n,function(f){s.importErrors(f)}))){var o=e.anyOf.map(function(f,u){var l=f.$id||f.id;return l?"<"+l+">":f.title&&JSON.stringify(f.title)||f.$ref&&"<"+f.$ref+">"||"[subschema "+u+"]"});i.nestedErrors&&a.importErrors(s),a.addError({name:"anyOf",argument:o,message:"is not any of "+o.join(",")})}return a};g.allOf=function(r,e,i,n){if(r===void 0)return null;if(!Array.isArray(e.allOf))throw new H("allOf must be an array");var a=new y(r,e,i,n),s=this;return e.allOf.forEach(function(o,f){var u=s.validateSchema(r,o,i,n);if(!u.valid){var l=o.$id||o.id,A=l||o.title&&JSON.stringify(o.title)||o.$ref&&"<"+o.$ref+">"||"[subschema "+f+"]";a.addError({name:"allOf",argument:{id:A,length:u.errors.length,valid:u},message:"does not match allOf schema "+A+" with "+u.errors.length+" error[s]:"}),a.importErrors(u)}}),a};g.oneOf=function(r,e,i,n){if(r===void 0)return null;if(!Array.isArray(e.oneOf))throw new H("oneOf must be an array");var a=new y(r,e,i,n),s=new y(r,e,i,n),o=e.oneOf.filter(qe.bind(this,r,i,n,function(u){s.importErrors(u)})).length,f=e.oneOf.map(function(u,l){var A=u.$id||u.id;return A||u.title&&JSON.stringify(u.title)||u.$ref&&"<"+u.$ref+">"||"[subschema "+l+"]"});return o!==1&&(i.nestedErrors&&a.importErrors(s),a.addError({name:"oneOf",argument:f,message:"is not exactly one from "+f.join(",")})),a};g.if=function(r,e,i,n){if(r===void 0)return null;if(!V.isSchema(e.if))throw new Error('Expected "if" keyword to be a schema');var a=qe.call(this,r,i,n,null,e.if),s=new y(r,e,i,n),o;if(a){if(e.then===void 0)return;if(!V.isSchema(e.then))throw new Error('Expected "then" keyword to be a schema');o=this.validateSchema(r,e.then,i,n.makeChild(e.then)),s.importErrors(o)}else{if(e.else===void 0)return;if(!V.isSchema(e.else))throw new Error('Expected "else" keyword to be a schema');o=this.validateSchema(r,e.else,i,n.makeChild(e.else)),s.importErrors(o)}return s};function Me(t,r){if(Object.hasOwnProperty.call(t,r))return t[r];if(r in t){for(;t=Object.getPrototypeOf(t);)if(Object.propertyIsEnumerable.call(t,r))return t[r]}}g.propertyNames=function(r,e,i,n){if(!!this.types.object(r)){var a=new y(r,e,i,n),s=e.propertyNames!==void 0?e.propertyNames:{};if(!V.isSchema(s))throw new H('Expected "propertyNames" to be a schema (object or boolean)');for(var o in r)if(Me(r,o)!==void 0){var f=this.validateSchema(o,s,i,n.makeChild(s));a.importErrors(f)}return a}};g.properties=function(r,e,i,n){if(!!this.types.object(r)){var a=new y(r,e,i,n),s=e.properties||{};for(var o in s){var f=s[o];if(f!==void 0){if(f===null)throw new H('Unexpected null, expected schema in "properties"');typeof i.preValidateProperty=="function"&&i.preValidateProperty(r,o,f,i,n);var u=Me(r,o),l=this.validateSchema(u,f,i,n.makeChild(f,o));l.instance!==a.instance[o]&&(a.instance[o]=l.instance),a.importErrors(l)}}return a}};function rr(t,r,e,i,n,a){if(!!this.types.object(t)&&!(r.properties&&r.properties[n]!==void 0))if(r.additionalProperties===!1)a.addError({name:"additionalProperties",argument:n,message:"is not allowed to have the additional property "+JSON.stringify(n)});else{var s=r.additionalProperties||{};typeof e.preValidateProperty=="function"&&e.preValidateProperty(t,n,s,e,i);var o=this.validateSchema(t[n],s,e,i.makeChild(s,n));o.instance!==a.instance[n]&&(a.instance[n]=o.instance),a.importErrors(o)}}g.patternProperties=function(r,e,i,n){if(!!this.types.object(r)){var a=new y(r,e,i,n),s=e.patternProperties||{};for(var o in r){var f=!0;for(var u in s){var l=s[u];if(l!==void 0){if(l===null)throw new H('Unexpected null, expected schema in "patternProperties"');try{var A=new RegExp(u,"u")}catch{A=new RegExp(u)}if(!!A.test(o)){f=!1,typeof i.preValidateProperty=="function"&&i.preValidateProperty(r,o,l,i,n);var h=this.validateSchema(r[o],l,i,n.makeChild(l,o));h.instance!==a.instance[o]&&(a.instance[o]=h.instance),a.importErrors(h)}}}f&&rr.call(this,r,e,i,n,o,a)}return a}};g.additionalProperties=function(r,e,i,n){if(!!this.types.object(r)){if(e.patternProperties)return null;var a=new y(r,e,i,n);for(var s in r)rr.call(this,r,e,i,n,s,a);return a}};g.minProperties=function(r,e,i,n){if(!!this.types.object(r)){var a=new y(r,e,i,n),s=Object.keys(r);return s.length>=e.minProperties||a.addError({name:"minProperties",argument:e.minProperties,message:"does not meet minimum property length of "+e.minProperties}),a}};g.maxProperties=function(r,e,i,n){if(!!this.types.object(r)){var a=new y(r,e,i,n),s=Object.keys(r);return s.length<=e.maxProperties||a.addError({name:"maxProperties",argument:e.maxProperties,message:"does not meet maximum property length of "+e.maxProperties}),a}};g.items=function(r,e,i,n){var a=this;if(!!this.types.array(r)&&!!e.items){var s=new y(r,e,i,n);return r.every(function(o,f){var u=Array.isArray(e.items)?e.items[f]||e.additionalItems:e.items;if(u===void 0)return!0;if(u===!1)return s.addError({name:"items",message:"additionalItems not permitted"}),!1;var l=a.validateSchema(o,u,i,n.makeChild(u,f));return l.instance!==s.instance[f]&&(s.instance[f]=l.instance),s.importErrors(l),!0}),s}};g.minimum=function(r,e,i,n){if(!!this.types.number(r)){var a=new y(r,e,i,n);return e.exclusiveMinimum&&e.exclusiveMinimum===!0?r>e.minimum||a.addError({name:"minimum",argument:e.minimum,message:"must be greater than "+e.minimum}):r>=e.minimum||a.addError({name:"minimum",argument:e.minimum,message:"must be greater than or equal to "+e.minimum}),a}};g.maximum=function(r,e,i,n){if(!!this.types.number(r)){var a=new y(r,e,i,n);return e.exclusiveMaximum&&e.exclusiveMaximum===!0?r<e.maximum||a.addError({name:"maximum",argument:e.maximum,message:"must be less than "+e.maximum}):r<=e.maximum||a.addError({name:"maximum",argument:e.maximum,message:"must be less than or equal to "+e.maximum}),a}};g.exclusiveMinimum=function(r,e,i,n){if(typeof e.exclusiveMaximum!="boolean"&&!!this.types.number(r)){var a=new y(r,e,i,n),s=r>e.exclusiveMinimum;return s||a.addError({name:"exclusiveMinimum",argument:e.exclusiveMinimum,message:"must be strictly greater than "+e.exclusiveMinimum}),a}};g.exclusiveMaximum=function(r,e,i,n){if(typeof e.exclusiveMaximum!="boolean"&&!!this.types.number(r)){var a=new y(r,e,i,n),s=r<e.exclusiveMaximum;return s||a.addError({name:"exclusiveMaximum",argument:e.exclusiveMaximum,message:"must be strictly less than "+e.exclusiveMaximum}),a}};var tr=function(r,e,i,n,a,s){if(!!this.types.number(r)){var o=e[a];if(o==0)throw new H(a+" cannot be zero");var f=new y(r,e,i,n),u=V.getDecimalPlaces(r),l=V.getDecimalPlaces(o),A=Math.max(u,l),h=Math.pow(10,A);return Math.round(r*h)%Math.round(o*h)!=0&&f.addError({name:a,argument:o,message:s+JSON.stringify(o)}),f}};g.multipleOf=function(r,e,i,n){return tr.call(this,r,e,i,n,"multipleOf","is not a multiple of (divisible by) ")};g.divisibleBy=function(r,e,i,n){return tr.call(this,r,e,i,n,"divisibleBy","is not divisible by (multiple of) ")};g.required=function(r,e,i,n){var a=new y(r,e,i,n);return r===void 0&&e.required===!0?a.addError({name:"required",message:"is required"}):this.types.object(r)&&Array.isArray(e.required)&&e.required.forEach(function(s){Me(r,s)===void 0&&a.addError({name:"required",argument:s,message:"requires property "+JSON.stringify(s)})}),a};g.pattern=function(r,e,i,n){if(!!this.types.string(r)){var a=new y(r,e,i,n),s=e.pattern;try{var o=new RegExp(s,"u")}catch{o=new RegExp(s)}return r.match(o)||a.addError({name:"pattern",argument:e.pattern,message:"does not match pattern "+JSON.stringify(e.pattern.toString())}),a}};g.format=function(r,e,i,n){if(r!==void 0){var a=new y(r,e,i,n);return!a.disableFormat&&!V.isFormat(r,e.format,this)&&a.addError({name:"format",argument:e.format,message:"does not conform to the "+JSON.stringify(e.format)+" format"}),a}};g.minLength=function(r,e,i,n){if(!!this.types.string(r)){var a=new y(r,e,i,n),s=r.match(/[\uDC00-\uDFFF]/g),o=r.length-(s?s.length:0);return o>=e.minLength||a.addError({name:"minLength",argument:e.minLength,message:"does not meet minimum length of "+e.minLength}),a}};g.maxLength=function(r,e,i,n){if(!!this.types.string(r)){var a=new y(r,e,i,n),s=r.match(/[\uDC00-\uDFFF]/g),o=r.length-(s?s.length:0);return o<=e.maxLength||a.addError({name:"maxLength",argument:e.maxLength,message:"does not meet maximum length of "+e.maxLength}),a}};g.minItems=function(r,e,i,n){if(!!this.types.array(r)){var a=new y(r,e,i,n);return r.length>=e.minItems||a.addError({name:"minItems",argument:e.minItems,message:"does not meet minimum length of "+e.minItems}),a}};g.maxItems=function(r,e,i,n){if(!!this.types.array(r)){var a=new y(r,e,i,n);return r.length<=e.maxItems||a.addError({name:"maxItems",argument:e.maxItems,message:"does not meet maximum length of "+e.maxItems}),a}};function Gr(t,r,e){var i,n=e.length;for(i=r+1,n;i<n;i++)if(V.deepCompareStrict(t,e[i]))return!1;return!0}g.uniqueItems=function(r,e,i,n){if(e.uniqueItems===!0&&!!this.types.array(r)){var a=new y(r,e,i,n);return r.every(Gr)||a.addError({name:"uniqueItems",message:"contains duplicate item"}),a}};g.dependencies=function(r,e,i,n){if(!!this.types.object(r)){var a=new y(r,e,i,n);for(var s in e.dependencies)if(r[s]!==void 0){var o=e.dependencies[s],f=n.makeChild(o,s);if(typeof o=="string"&&(o=[o]),Array.isArray(o))o.forEach(function(l){r[l]===void 0&&a.addError({name:"dependencies",argument:f.propertyPath,message:"property "+l+" not found, required by "+f.propertyPath})});else{var u=this.validateSchema(r,o,i,f);a.instance!==u.instance&&(a.instance=u.instance),u&&u.errors.length&&(a.addError({name:"dependencies",argument:f.propertyPath,message:"does not meet dependency required by "+f.propertyPath}),a.importErrors(u))}}return a}};g.enum=function(r,e,i,n){if(r===void 0)return null;if(!Array.isArray(e.enum))throw new H("enum expects an array",e);var a=new y(r,e,i,n);return e.enum.some(V.deepCompareStrict.bind(null,r))||a.addError({name:"enum",argument:e.enum,message:"is not one of enum values: "+e.enum.map(String).join(",")}),a};g.const=function(r,e,i,n){if(r===void 0)return null;var a=new y(r,e,i,n);return V.deepCompareStrict(e.const,r)||a.addError({name:"const",argument:e.const,message:"does not exactly match expected constant: "+e.const}),a};g.not=g.disallow=function(r,e,i,n){var a=this;if(r===void 0)return null;var s=new y(r,e,i,n),o=e.not||e.disallow;return o?(Array.isArray(o)||(o=[o]),o.forEach(function(f){if(a.testType(r,e,i,n,f)){var u=f&&(f.$id||f.id),l=u||f;s.addError({name:"not",argument:l,message:"is of prohibited type "+l})}}),s):null};ir.exports=Re});var xe=D((at,Ie)=>{"use strict";var ar=be(),kr=Y();Ie.exports.SchemaScanResult=or;function or(t,r){this.id=t,this.ref=r}Ie.exports.scan=function(r,e){function i(f,u){if(!(!u||typeof u!="object")){if(u.$ref){var l=ar.resolve(f,u.$ref);o[l]=o[l]?o[l]+1:0;return}var A=u.$id||u.id,h=A?ar.resolve(f,A):f;if(h){if(h.indexOf("#")<0&&(h+="#"),s[h]){if(!kr.deepCompareStrict(s[h],u))throw new Error("Schema <"+h+"> already exists with different definition");return s[h]}s[h]=u,h[h.length-1]=="#"&&(s[h.substring(0,h.length-1)]=u)}n(h+"/items",Array.isArray(u.items)?u.items:[u.items]),n(h+"/extends",Array.isArray(u.extends)?u.extends:[u.extends]),i(h+"/additionalItems",u.additionalItems),a(h+"/properties",u.properties),i(h+"/additionalProperties",u.additionalProperties),a(h+"/definitions",u.definitions),a(h+"/patternProperties",u.patternProperties),a(h+"/dependencies",u.dependencies),n(h+"/disallow",u.disallow),n(h+"/allOf",u.allOf),n(h+"/anyOf",u.anyOf),n(h+"/oneOf",u.oneOf),i(h+"/not",u.not)}}function n(f,u){if(!!Array.isArray(u))for(var l=0;l<u.length;l++)i(f+"/"+l,u[l])}function a(f,u){if(!(!u||typeof u!="object"))for(var l in u)i(f+"/"+l,u[l])}var s={},o={};return i(r,e),new or(s,o)}});var cr=D((ot,mr)=>{"use strict";var sr=be(),ur=nr(),ie=Y(),fr=xe().scan,lr=ie.ValidatorResult,Kr=ie.ValidatorResultError,ge=ie.SchemaError,hr=ie.SchemaContext,dr="/",O=function t(){this.customFormats=Object.create(t.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(J),this.attributes=Object.create(ur.validators)};O.prototype.customFormats={};O.prototype.schemas=null;O.prototype.types=null;O.prototype.attributes=null;O.prototype.unresolvedRefs=null;O.prototype.addSchema=function(r,e){var i=this;if(!r)return null;var n=fr(e||dr,r),a=e||r.$id||r.id;for(var s in n.id)this.schemas[s]=n.id[s];for(var s in n.ref)this.unresolvedRefs.push(s);return this.unresolvedRefs=this.unresolvedRefs.filter(function(o){return typeof i.schemas[o]=="undefined"}),this.schemas[a]};O.prototype.addSubSchemaArray=function(r,e){if(!!Array.isArray(e))for(var i=0;i<e.length;i++)this.addSubSchema(r,e[i])};O.prototype.addSubSchemaObject=function(r,e){if(!(!e||typeof e!="object"))for(var i in e)this.addSubSchema(r,e[i])};O.prototype.setSchemas=function(r){this.schemas=r};O.prototype.getSchema=function(r){return this.schemas[r]};O.prototype.validate=function(r,e,i,n){if(typeof e!="boolean"&&typeof e!="object"||e===null)throw new ge("Expected `schema` to be an object or boolean");i||(i={});var a=e.$id||e.id,s=sr.resolve(i.base||dr,a||"");if(!n){n=new hr(e,i,[],s,Object.create(this.schemas)),n.schemas[s]||(n.schemas[s]=e);var o=fr(s,e);for(var f in o.id){var u=o.id[f];n.schemas[f]=u}}if(i.required&&r===void 0){var l=new lr(r,e,i,n);return l.addError("is required, but is undefined"),l}var l=this.validateSchema(r,e,i,n);if(l){if(i.throwAll&&l.errors.length)throw new Kr(l)}else throw new Error("Result undefined");return l};function pr(t){var r=typeof t=="string"?t:t.$ref;return typeof r=="string"?r:!1}O.prototype.validateSchema=function(r,e,i,n){var a=new lr(r,e,i,n);if(typeof e=="boolean")e===!0?e={}:e===!1&&(e={type:[]});else if(!e)throw new Error("schema is undefined");if(e.extends)if(Array.isArray(e.extends)){var s={schema:e,ctx:n};e.extends.forEach(this.schemaTraverser.bind(this,s)),e=s.schema,s.schema=null,s.ctx=null,s=null}else e=ie.deepMerge(e,this.superResolve(e.extends,n));var o=pr(e);if(o){var f=this.resolve(e,o,n),u=new hr(f.subschema,i,n.path,f.switchSchema,n.schemas);return this.validateSchema(r,f.subschema,i,u)}var l=i&&i.skipAttributes||[];for(var A in e)if(!ur.ignoreProperties[A]&&l.indexOf(A)<0){var h=null,c=this.attributes[A];if(c)h=c.call(this,r,e,i,n);else if(i.allowUnknownAttributes===!1)throw new ge("Unsupported attribute: "+A,e);h&&a.importErrors(h)}if(typeof i.rewrite=="function"){var S=i.rewrite.call(this,r,e,i,n);a.instance=S}return a};O.prototype.schemaTraverser=function(r,e){r.schema=ie.deepMerge(r.schema,this.superResolve(e,r.ctx))};O.prototype.superResolve=function(r,e){var i=pr(r);return i?this.resolve(r,i,e).subschema:r};O.prototype.resolve=function(r,e,i){if(e=i.resolve(e),i.schemas[e])return{subschema:i.schemas[e],switchSchema:e};var n=sr.parse(e),a=n&&n.hash,s=a&&a.length&&e.substr(0,e.length-a.length);if(!s||!i.schemas[s])throw new ge("no such schema <"+e+">",r);var o=ie.objectGetPath(i.schemas[s],a.substr(1));if(o===void 0)throw new ge("no such schema "+a+" located in <"+s+">",r);return{subschema:o,switchSchema:e}};O.prototype.testType=function(r,e,i,n,a){if(a!==void 0){if(a===null)throw new ge('Unexpected null in "type" keyword');if(typeof this.types[a]=="function")return this.types[a].call(this,r);if(a&&typeof a=="object"){var s=this.validateSchema(r,a,i,n);return s===void 0||!(s&&s.errors.length)}return!0}};var J=O.prototype.types={};J.string=function(r){return typeof r=="string"};J.number=function(r){return typeof r=="number"&&isFinite(r)};J.integer=function(r){return typeof r=="number"&&r%1==0};J.boolean=function(r){return typeof r=="boolean"};J.array=function(r){return Array.isArray(r)};J.null=function(r){return r===null};J.date=function(r){return r instanceof Date};J.any=function(r){return!0};J.object=function(r){return r&&typeof r=="object"&&!Array.isArray(r)&&!(r instanceof Date)};mr.exports=O});var vr=D((st,K)=>{"use strict";var Xr=K.exports.Validator=cr();K.exports.ValidatorResult=Y().ValidatorResult;K.exports.ValidatorResultError=Y().ValidatorResultError;K.exports.ValidationError=Y().ValidationError;K.exports.SchemaError=Y().SchemaError;K.exports.SchemaScanResult=xe().SchemaScanResult;K.exports.scan=xe().scan;K.exports.validate=function(t,r,e){var i=new Xr;return i.validate(t,r,e)}});var Yr={};Or(Yr,{createConfigsApi:()=>Wr});var yr=Pr(vr());function Wr(t={}){let r=(i,n)=>{var o;let a=`config-${i}`,s=(o=t.retrieve)==null?void 0:o.call(t,a);return typeof s=="object"?me(me({},n),s):typeof s!="undefined"?s:void 0},e=(i,n,a)=>{let o=new yr.Validator().validate(n,i);return o.valid?n:(console.warn("The given configuration does not match the provided schema. Taking the default configuration.",n,o),a)};return i=>(n,a)=>({defineConfigSchema(s,o){let f=r(a.name,o),u=f?e(s,f,o):o;return i.dispatch(l=>Oe(me({},l),{configs:Oe(me({},l.configs),{[a.name]:u})})),u},getCurrentConfig(){var s;return(s=i.readState(o=>o.configs[a.name]))!=null?s:{}}})}return Yr;})();
|
|
4
|
+
/*! https://mths.be/punycode v1.3.2 by @mathias */
|
package/src/types.ts
CHANGED