piral-configs 0.15.0-alpha.4355 → 0.15.0-alpha.4409
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/package.json +3 -3
- package/piral-configs.min.js +3 -3
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.4409",
|
|
4
4
|
"description": "Plugin for dynamic configurations of pilets in Piral.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"url": "^0.11.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"piral-core": "0.15.0-alpha.
|
|
67
|
+
"piral-core": "0.15.0-alpha.4409"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"piral-core": "0.14.x || 0.15.x"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "f5a0a4bb26fa2074af90776fa4a8b85a3eb8369a"
|
|
73
73
|
}
|
package/piral-configs.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var piralConfigs=(()=>{var gr=Object.create;var pe=Object.defineProperty,Ar=Object.defineProperties,
|
|
2
|
-
`," "],
|
|
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{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[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A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\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*,\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;})();
|
|
1
|
+
var piralConfigs=(()=>{var gr=Object.create;var pe=Object.defineProperty,Ar=Object.defineProperties,Fr=Object.getOwnPropertyDescriptor,br=Object.getOwnPropertyDescriptors,wr=Object.getOwnPropertyNames,Ie=Object.getOwnPropertySymbols,xr=Object.getPrototypeOf,Ve=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable;var Ne=(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={}))Ve.call(r,e)&&Ne(t,e,r[e]);if(Ie)for(var e of Ie(r))Er.call(r,e)&&Ne(t,e,r[e]);return t},Se=(t,r)=>Ar(t,br(r)),Te=t=>pe(t,"__esModule",{value:!0});var D=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),Sr=(t,r)=>{Te(t);for(var e in r)pe(t,e,{get:r[e],enumerable:!0})},zr=(t,r,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of wr(r))!Ve.call(t,i)&&i!=="default"&&pe(t,i,{get:()=>r[i],enumerable:!(e=Fr(r,i))||e.enumerable});return t},Zr=t=>zr(Te(pe(t!=null?gr(xr(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="-",E=/^xn--/,Q=/[^\x20-\x7E]/,Z=/[\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,F=Math.floor,O=String.fromCharCode,$;function x(d){throw RangeError(ee[d])}function ne(d,m){for(var g=d.length,b=[];g--;)b[g]=m(d[g]);return b}function V(d,m){var g=d.split("@"),b="";g.length>1&&(b=g[0]+"@",d=g[1]),d=d.replace(Z,".");var w=d.split("."),C=ne(w,m).join(".");return b+C}function j(d){for(var m=[],g=0,b=d.length,w,C;g<b;)w=d.charCodeAt(g++),w>=55296&&w<=56319&&g<b?(C=d.charCodeAt(g++),(C&64512)==56320?m.push(((w&1023)<<10)+(C&1023)+65536):(m.push(w),g--)):m.push(w);return m}function k(d){return ne(d,function(m){var g="";return m>65535&&(m-=65536,g+=O(m>>>10&1023|55296),m=56320|m&1023),g+=O(m),g}).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 W(d,m,g){var b=0;for(d=g?F(d/l):d>>1,d+=F(d/m);d>p*f>>1;b+=s)d=F(d/p);return F(b+(p+1)*d/(d+u))}function ae(d){var m=[],g=d.length,b,w=0,C=h,z=A,M,N,L,G,P,q,T,X,re;for(M=d.lastIndexOf(c),M<0&&(M=0),N=0;N<M;++N)d.charCodeAt(N)>=128&&x("not-basic"),m.push(d.charCodeAt(N));for(L=M>0?M+1:0;L<g;){for(G=w,P=1,q=s;L>=g&&x("invalid-input"),T=de(d.charCodeAt(L++)),(T>=s||T>F((a-w)/P))&&x("overflow"),w+=T*P,X=q<=z?o:q>=z+f?f:q-z,!(T<X);q+=s)re=s-X,P>F(a/re)&&x("overflow"),P*=re;b=m.length+1,z=W(w-G,b,G==0),F(w/b)>a-C&&x("overflow"),C+=F(w/b),w%=b,m.splice(w++,0,C)}return k(m)}function oe(d){var m,g,b,w,C,z,M,N,L,G,P,q=[],T,X,re,Ee;for(d=j(d),T=d.length,m=h,g=0,C=A,z=0;z<T;++z)P=d[z],P<128&&q.push(O(P));for(b=w=q.length,w&&q.push(c);b<T;){for(M=a,z=0;z<T;++z)P=d[z],P>=m&&P<M&&(M=P);for(X=b+1,M-m>F((a-g)/X)&&x("overflow"),g+=(M-m)*X,m=M,z=0;z<T;++z)if(P=d[z],P<m&&++g>a&&x("overflow"),P==m){for(N=g,L=s;G=L<=C?o:L>=C+f?f:L-C,!(N<G);L+=s)Ee=N-G,re=s-G,q.push(O(Ae(G+Ee%re,0))),N=F(Ee/re);q.push(O(Ae(N,0))),C=W(g,X,b==w),g=0,++b}++g,++m}return q.join("")}function se(d){return V(d,function(m){return E.test(m)?ae(m.slice(4).toLowerCase()):m})}function xe(d){return V(d,function(m){return Q.test(m)?"xn--"+oe(m):m})}if(n={version:"1.3.2",ucs2:{decode:j,encode:k},decode:ae,encode:oe,toASCII:xe,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($ in n)n.hasOwnProperty($)&&(r[$]=n[$]);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 Or(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,E;l>=0?(A=u.substr(0,l),h=u.substr(l+1)):(A=u,h=""),c=decodeURIComponent(A),E=decodeURIComponent(h),Or(n,c)?Array.isArray(n[c])?n[c].push(E):n[c]=[n[c],E]:n[c]=E}return n}});var Ge=D((rt,ke)=>{"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""}};ke.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=Ge()});var Fe=D(he=>{"use strict";var $r=De(),B=Le();he.parse=ye;he.resolve=Nr;he.resolveObject=Tr;he.format=Vr;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 Pr=/^([a-z0-9.+-]+:)/i,Cr=/:[0-9]*$/,jr=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Mr=["<",">",'"',"`"," ","\r",`
|
|
2
|
+
`," "],Rr=["{","}","|","\\","^","`"].concat(Mr),ze=["'"].concat(Rr),We=["%","/","?",";","#"].concat(ze),Xe=["/","?","#"],_r=255,Ye=/^[+a-z0-9A-Z_-]{0,63}$/,qr=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ir={javascript:!0,"javascript:":!0},Ze={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},Oe=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=jr.exec(o);if(f)return this.path=o,this.href=o,this.pathname=f[1],f[2]?(this.search=f[2],r?this.query=Oe.parse(this.search.substr(1)):this.query=this.search.substr(1)):r&&(this.search="",this.query={}),this}var u=Pr.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&&Ze[u])&&(o=o.substr(2),this.slashes=!0)}if(!Ze[u]&&(A||u&&!le[u])){for(var h=-1,c=0;c<Xe.length;c++){var E=o.indexOf(Xe[c]);E!==-1&&(h===-1||E<h)&&(h=E)}var Q,Z;h===-1?Z=o.lastIndexOf("@"):Z=o.lastIndexOf("@",h),Z!==-1&&(Q=o.slice(0,Z),o=o.slice(Z+1),this.auth=decodeURIComponent(Q)),h=-1;for(var c=0;c<We.length;c++){var E=o.indexOf(We[c]);E!==-1&&(h===-1||E<h)&&(h=E)}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,F=p.length;c<F;c++){var O=p[c];if(!!O&&!O.match(Ye)){for(var $="",x=0,ne=O.length;x<ne;x++)O.charCodeAt(x)>127?$+="x":$+=O[x];if(!$.match(Ye)){var V=p.slice(0,c),j=p.slice(c+1),k=O.match(qr);k&&(V.push(k[1]),j.unshift(k[2])),j.length&&(o="/"+j.join(".")+o),this.hostname=V.join(".");break}}}this.hostname.length>_r?this.hostname="":this.hostname=this.hostname.toLowerCase(),ee||(this.hostname=$r.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(!Ir[l])for(var c=0,F=ze.length;c<F;c++){var W=ze[c];if(o.indexOf(W)!==-1){var ae=encodeURIComponent(W);ae===W&&(ae=escape(W)),o=o.split(W).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=Oe.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||"",xe=this.search||"";this.path=de+xe}return this.href=this.format(),this};function Vr(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=Oe.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 Nr(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&&!Ze[t.protocol]){for(var F=(t.pathname||"").split("/");F.length&&!(t.host=F.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),F[0]!==""&&F.unshift(""),F.length<2&&F.unshift(""),e.pathname=F.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 E=e.pathname&&e.pathname.charAt(0)==="/",Q=t.host||t.pathname&&t.pathname.charAt(0)==="/",Z=Q||E||e.host&&t.pathname,ee=Z,p=e.pathname&&e.pathname.split("/")||[],F=t.pathname&&t.pathname.split("/")||[],O=e.protocol&&!le[e.protocol];if(O&&(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&&(F[0]===""?F[0]=t.host:F.unshift(t.host)),t.host=null),Z=Z&&(F[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=F;else if(F.length)p||(p=[]),p.pop(),p=p.concat(F),e.search=t.search,e.query=t.query;else if(!B.isNullOrUndefined(t.search)){if(O){e.hostname=e.host=p.shift();var $=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;$&&(e.auth=$.shift(),e.host=e.hostname=$.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 x=p.slice(-1)[0],ne=(e.host||t.host||p.length>1)&&(x==="."||x==="..")||x==="",V=0,j=p.length;j>=0;j--)x=p[j],x==="."?p.splice(j,1):x===".."?(p.splice(j,1),V++):V&&(p.splice(j,1),V--);if(!Z&&!ee)for(;V--;V)p.unshift("..");Z&&p[0]!==""&&(!p[0]||p[0].charAt(0)!=="/")&&p.unshift(""),ne&&p.join("/").substr(-1)!=="/"&&p.push("");var k=p[0]===""||p[0]&&p[0].charAt(0)==="/";if(O){e.hostname=e.host=k?"":p.length?p.shift():"";var $=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;$&&(e.auth=$.shift(),e.host=e.hostname=$.shift())}return Z=Z||e.host&&p.length,Z&&!k&&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=Cr.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((R,je)=>{"use strict";var He=Fe(),$e=R.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()};$e.prototype.toString=function(){return this.property+" "+this.message};var be=R.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};be.prototype.addError=function(r){var e;if(typeof r=="string")e=new $e(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 $e(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};be.prototype.importErrors=function(r){typeof r=="string"||r&&r.validatorType?this.addError(r):r&&r.errors&&(this.errors=this.errors.concat(r.errors))};function Dr(t,r){return r+": "+t.toString()+`
|
|
3
|
+
`}be.prototype.toString=function(r){return this.errors.map(Dr).join("")};Object.defineProperty(be.prototype,"valid",{get:function(){return!this.errors.length}});je.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=R.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 Pe=R.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};Pe.prototype.resolve=function(r){return He.resolve(this.base,r)};Pe.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 Pe(r,this.options,i,a,Object.create(this.schemas));return n&&!s.schemas[a]&&(s.schemas[a]=r),s};var U=R.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?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*\.?$/,"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])?)*\.?$/,"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:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\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*,\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*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};U.regexp=U.regex;U.pattern=U.regex;U.ipv4=U["ip-address"];R.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=R.makeSuffix=function(r){return r=r.toString(),!r.match(/[.\s\[\]]/)&&!r.match(/^[\d]/)?"."+r:r.match(/^\d+$/)?"["+r+"]":"["+JSON.stringify(r)+"]"};R.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]=Ce(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]=Ce(t[i],r[i]):e[i]=r[i]}function Ce(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}je.exports.deepMerge=Ce;R.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")}R.encodePath=function(r){return r.map(Jr).join("")};R.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};R.isSchema=function(r){return typeof r=="object"&&r||typeof r=="boolean"}});var nr=D((nt,ir)=>{"use strict";var _=Y(),v=_.ValidatorResult,H=_.SchemaError,Me={};Me.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var y=Me.validators={};y.type=function(r,e,i,n){if(r===void 0)return null;var a=new v(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 Re(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}y.anyOf=function(r,e,i,n){if(r===void 0)return null;var a=new v(r,e,i,n),s=new v(r,e,i,n);if(!Array.isArray(e.anyOf))throw new H("anyOf must be an array");if(!e.anyOf.some(Re.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};y.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 v(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};y.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 v(r,e,i,n),s=new v(r,e,i,n),o=e.oneOf.filter(Re.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};y.if=function(r,e,i,n){if(r===void 0)return null;if(!_.isSchema(e.if))throw new Error('Expected "if" keyword to be a schema');var a=Re.call(this,r,i,n,null,e.if),s=new v(r,e,i,n),o;if(a){if(e.then===void 0)return;if(!_.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(!_.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 _e(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]}}y.propertyNames=function(r,e,i,n){if(!!this.types.object(r)){var a=new v(r,e,i,n),s=e.propertyNames!==void 0?e.propertyNames:{};if(!_.isSchema(s))throw new H('Expected "propertyNames" to be a schema (object or boolean)');for(var o in r)if(_e(r,o)!==void 0){var f=this.validateSchema(o,s,i,n.makeChild(s));a.importErrors(f)}return a}};y.properties=function(r,e,i,n){if(!!this.types.object(r)){var a=new v(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=_e(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)}}y.patternProperties=function(r,e,i,n){if(!!this.types.object(r)){var a=new v(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}};y.additionalProperties=function(r,e,i,n){if(!!this.types.object(r)){if(e.patternProperties)return null;var a=new v(r,e,i,n);for(var s in r)rr.call(this,r,e,i,n,s,a);return a}};y.minProperties=function(r,e,i,n){if(!!this.types.object(r)){var a=new v(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}};y.maxProperties=function(r,e,i,n){if(!!this.types.object(r)){var a=new v(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}};y.items=function(r,e,i,n){var a=this;if(!!this.types.array(r)&&e.items!==void 0){var s=new v(r,e,i,n);return r.every(function(o,f){if(Array.isArray(e.items))var u=e.items[f]===void 0?e.additionalItems:e.items[f];else var u=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}};y.contains=function(r,e,i,n){var a=this;if(!!this.types.array(r)&&e.contains!==void 0){if(!_.isSchema(e.contains))throw new Error('Expected "contains" keyword to be a schema');var s=new v(r,e,i,n),o=r.some(function(f,u){var l=a.validateSchema(f,e.contains,i,n.makeChild(e.contains,u));return l.errors.length===0});return o===!1&&s.addError({name:"contains",argument:e.contains,message:"must contain an item matching given schema"}),s}};y.minimum=function(r,e,i,n){if(!!this.types.number(r)){var a=new v(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}};y.maximum=function(r,e,i,n){if(!!this.types.number(r)){var a=new v(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}};y.exclusiveMinimum=function(r,e,i,n){if(typeof e.exclusiveMinimum!="boolean"&&!!this.types.number(r)){var a=new v(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}};y.exclusiveMaximum=function(r,e,i,n){if(typeof e.exclusiveMaximum!="boolean"&&!!this.types.number(r)){var a=new v(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 v(r,e,i,n),u=_.getDecimalPlaces(r),l=_.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}};y.multipleOf=function(r,e,i,n){return tr.call(this,r,e,i,n,"multipleOf","is not a multiple of (divisible by) ")};y.divisibleBy=function(r,e,i,n){return tr.call(this,r,e,i,n,"divisibleBy","is not divisible by (multiple of) ")};y.required=function(r,e,i,n){var a=new v(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){_e(r,s)===void 0&&a.addError({name:"required",argument:s,message:"requires property "+JSON.stringify(s)})}),a};y.pattern=function(r,e,i,n){if(!!this.types.string(r)){var a=new v(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}};y.format=function(r,e,i,n){if(r!==void 0){var a=new v(r,e,i,n);return!a.disableFormat&&!_.isFormat(r,e.format,this)&&a.addError({name:"format",argument:e.format,message:"does not conform to the "+JSON.stringify(e.format)+" format"}),a}};y.minLength=function(r,e,i,n){if(!!this.types.string(r)){var a=new v(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}};y.maxLength=function(r,e,i,n){if(!!this.types.string(r)){var a=new v(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}};y.minItems=function(r,e,i,n){if(!!this.types.array(r)){var a=new v(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}};y.maxItems=function(r,e,i,n){if(!!this.types.array(r)){var a=new v(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 kr(t,r,e){var i,n=e.length;for(i=r+1,n;i<n;i++)if(_.deepCompareStrict(t,e[i]))return!1;return!0}y.uniqueItems=function(r,e,i,n){if(e.uniqueItems===!0&&!!this.types.array(r)){var a=new v(r,e,i,n);return r.every(kr)||a.addError({name:"uniqueItems",message:"contains duplicate item"}),a}};y.dependencies=function(r,e,i,n){if(!!this.types.object(r)){var a=new v(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}};y.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 v(r,e,i,n);return e.enum.some(_.deepCompareStrict.bind(null,r))||a.addError({name:"enum",argument:e.enum,message:"is not one of enum values: "+e.enum.map(String).join(",")}),a};y.const=function(r,e,i,n){if(r===void 0)return null;var a=new v(r,e,i,n);return _.deepCompareStrict(e.const,r)||a.addError({name:"const",argument:e.const,message:"does not exactly match expected constant: "+e.const}),a};y.not=y.disallow=function(r,e,i,n){var a=this;if(r===void 0)return null;var s=new v(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=Me});var we=D((at,qe)=>{"use strict";var ar=Fe(),Gr=Y();qe.exports.SchemaScanResult=or;function or(t,r){this.id=t,this.ref=r}qe.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(!Gr.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=Fe(),ur=nr(),ie=Y(),fr=we().scan,lr=ie.ValidatorResult,Kr=ie.ValidatorResultError,ge=ie.SchemaError,hr=ie.SchemaContext,dr="/",S=function t(){this.customFormats=Object.create(t.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(J),this.attributes=Object.create(ur.validators)};S.prototype.customFormats={};S.prototype.schemas=null;S.prototype.types=null;S.prototype.attributes=null;S.prototype.unresolvedRefs=null;S.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]};S.prototype.addSubSchemaArray=function(r,e){if(!!Array.isArray(e))for(var i=0;i<e.length;i++)this.addSubSchema(r,e[i])};S.prototype.addSubSchemaObject=function(r,e){if(!(!e||typeof e!="object"))for(var i in e)this.addSubSchema(r,e[i])};S.prototype.setSchemas=function(r){this.schemas=r};S.prototype.getSchema=function(r){return this.schemas[r]};S.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}S.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 E=i.rewrite.call(this,r,e,i,n);a.instance=E}return a};S.prototype.schemaTraverser=function(r,e){r.schema=ie.deepMerge(r.schema,this.superResolve(e,r.ctx))};S.prototype.superResolve=function(r,e){var i=pr(r);return i?this.resolve(r,i,e).subschema:r};S.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}};S.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=S.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=S});var vr=D((st,K)=>{"use strict";var Wr=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=we().SchemaScanResult;K.exports.scan=we().scan;K.exports.validate=function(t,r,e){var i=new Wr;return i.validate(t,r,e)}});var Yr={};Sr(Yr,{createConfigsApi:()=>Xr});var yr=Zr(vr());function Xr(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=>Se(me({},l),{configs:Se(me({},l.configs),{[a.name]:u})})),u},getCurrentConfig(){var s;return(s=i.readState(o=>o.configs[a.name]))!=null?s:{}}})}return Yr;})();
|
|
4
4
|
/*! https://mths.be/punycode v1.3.2 by @mathias */
|