@rjsf/utils
Advanced tools
Comparing version 5.3.1 to 5.4.0
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("lodash/isEqualWith"),r=require("lodash/get"),t=require("lodash/isEmpty"),n=require("jsonpointer"),i=require("lodash/omit"),o=require("lodash/has"),a=require("lodash/isObject"),u=require("lodash/isString"),s=require("lodash/reduce"),f=require("lodash/times"),d=require("lodash/set"),l=require("json-schema-merge-allof"),c=require("lodash/union"),p=require("lodash/isEqual"),v=require("lodash/cloneDeep"),m=require("react/jsx-runtime"),y=require("react"),h=require("react-is");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=g(e),O=g(r),x=g(t),A=g(n),S=g(i),E=g(o),I=g(a),w=g(u),_=g(s),j=g(f),T=g(d),D=g(l),W=g(c),P=g(p),N=g(v),F=g(h);function U(e){return!("undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Date&&e instanceof Date||"object"!=typeof e||null===e||Array.isArray(e))}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},C.apply(this,arguments)}function R(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function q(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r.indexOf(t=o[n])>=0||(i[t]=e[t]);return i}function $(e,r){return void 0===e&&(e={}),void 0===r&&(r={}),Object.keys(e).filter((function(e){return 0===e.indexOf("ui:")})).reduce((function(r,t){var n,i=e[t];return"ui:widget"===t&&U(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):"ui:options"===t&&U(i)?C({},r,i):C({},r,((n={})[t.substring(3)]=i,n))}),C({},r))}function k(e,r){return b.default(e,r,(function(e,r){if("function"==typeof e&&"function"==typeof r)return!0}))}function L(e,r){var t=r[e];return[S.default(r,[e]),t]}function M(e,r){void 0===r&&(r={});var t=e||"";if(!t.startsWith("#"))throw new Error("Could not find a definition for "+e+".");t=decodeURIComponent(t.substring(1));var n=A.default.get(r,t);if(void 0===n)throw new Error("Could not find a definition for "+e+".");if(n.$ref){var i=L("$ref",n),o=i[0],a=M(i[1],r);return Object.keys(o).length>0?C({},o,a):a}return n}function Y(e,r,t,n){if(void 0===r)return 0;for(var i=0;i<t.length;i++){var o=t[i];if(o.properties){var a={anyOf:Object.keys(o.properties).map((function(e){return{required:[e]}}))},u=void 0;if(o.anyOf){var s=C({},(R(o),o));s.allOf=s.allOf?s.allOf.slice():[],s.allOf.push(a),u=s}else u=Object.assign({},o,a);if(delete u.required,e.isValid(u,r,n))return i}else if(e.isValid(o,r,n))return i}return 0}function K(e,r,t,n){return Y(e,r,t,n)}function B(e){return Array.isArray(e)?"array":"string"==typeof e?"string":null==e?"null":"boolean"==typeof e?"boolean":isNaN(e)?"object"==typeof e?"object":"string":"number"}function V(e){var r=e.type;return!r&&e.const?B(e.const):!r&&e.enum?"string":r||!e.properties&&!e.additionalProperties?(Array.isArray(r)&&2===r.length&&r.includes("null")&&(r=r.find((function(e){return"null"!==e}))),r):"object"}function H(e,r){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,n){var i=e?e[n]:{},o=r[n];return t[n]=e&&n in e&&U(o)?H(i,o):e&&r&&("object"===V(e)||"object"===V(r))&&"required"===n&&Array.isArray(i)&&Array.isArray(o)?W.default(i,o):o,t}),t)}var G=["if","then","else"],z=["$ref"],J=["allOf"],Q=["dependencies"],X=["oneOf"];function Z(e,r,t,n){return ee(e,C({},M(r.$ref,t),q(r,z)),t,n)}function ee(e,r,t,n){if(void 0===t&&(t={}),!U(r))return{};var i=function(e,r,t,n){if(void 0===t&&(t={}),"$ref"in r)return Z(e,r,t,n);if("dependencies"in r){var i=re(e,r,t,n);return ee(e,i,t,n)}return"allOf"in r?C({},r,{allOf:r.allOf.map((function(r){return ee(e,r,t,n)}))}):r}(e,r,t,n);if("if"in r)return function(e,r,t,n){var i=r.if,o=r.then,a=r.else,u=q(r,G),s=e.isValid(i,n,t)?o:a;return ee(e,s&&"boolean"!=typeof s?H(u,ee(e,s,t,n)):u,t,n)}(e,r,t,n);var o=n||{};if("allOf"in r)try{i=D.default(i,{deep:!1})}catch(e){return console.warn("could not merge subschemas in allOf:\n"+e),q(i,J)}return"additionalProperties"in i&&!1!==i.additionalProperties?function(e,r,t,n){var i=C({},r,{properties:C({},r.properties)}),o=n&&U(n)?n:{};return Object.keys(o).forEach((function(r){var n;r in i.properties||(n="boolean"!=typeof i.additionalProperties?"$ref"in i.additionalProperties?ee(e,{$ref:O.default(i.additionalProperties,["$ref"])},t,o):"type"in i.additionalProperties?C({},i.additionalProperties):"anyOf"in i.additionalProperties||"oneOf"in i.additionalProperties?C({type:"object"},i.additionalProperties):{type:B(O.default(o,[r]))}:{type:B(O.default(o,[r]))},i.properties[r]=n,T.default(i.properties,[r,"__additional_property"],!0))})),i}(e,i,t,o):i}function re(e,r,t,n){var i=r.dependencies,o=q(r,Q);return Array.isArray(o.oneOf)?o=o.oneOf[K(e,n,o.oneOf,t)]:Array.isArray(o.anyOf)&&(o=o.anyOf[K(e,n,o.anyOf,t)]),te(e,i,o,t,n)}function te(e,r,t,n,i){var o=t;for(var a in r)if(void 0!==O.default(i,[a])&&(!o.properties||a in o.properties)){var u=L(a,r),s=u[0],f=u[1];return Array.isArray(f)?o=ne(o,f):U(f)&&(o=ie(e,o,n,a,f,i)),te(e,s,o,n,i)}return o}function ne(e,r){return r?C({},e,{required:Array.isArray(e.required)?Array.from(new Set([].concat(e.required,r))):r}):e}function ie(e,r,t,n,i,o){var a=ee(e,i,t,o),u=a.oneOf;if(r=H(r,q(a,X)),void 0===u)return r;var s=u.map((function(r){return"boolean"!=typeof r&&"$ref"in r?Z(e,r,t,o):r}));return function(e,r,t,n,i,o){var a=i.filter((function(r){if("boolean"==typeof r||!r||!r.properties)return!1;var t=r.properties[n];if(t){var i,a={type:"object",properties:(i={},i[n]=t,i)};return 0===e.validateFormData(o,a).errors.length}return!1}));if(1!==a.length)return console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),r;var u=a[0],s=C({},u,{properties:L(n,u.properties)[0]});return H(r,ee(e,s,t,o))}(e,r,t,n,s,o)}var oe,ae={type:"object",properties:{__not_really_there__:{type:"number"}}};function ue(e,r,t,n){void 0===n&&(n={});var i=0;return t&&(I.default(t.properties)?i+=_.default(t.properties,(function(t,i,o){var a=O.default(n,o);if("boolean"==typeof i)return t;if(E.default(i,"$ref")){var u=ee(e,i,r,a);return t+ue(e,r,u,a||{})}if(E.default(i,"oneOf")&&a)return t+se(e,r,a,O.default(i,"oneOf"));if("object"===i.type)return t+ue(e,r,i,a||{});if(i.type===B(a)){var s=t+1;return i.default?s+=a===i.default?1:-1:i.const&&(s+=a===i.const?1:-1),s}return t}),0):w.default(t.type)&&t.type===B(n)&&(i+=1)),i}function se(e,r,t,n,i){void 0===i&&(i=-1);var o=n.reduce((function(n,i,o){return 1===K(e,t,[ae,i],r)&&n.push(o),n}),[]);return 1===o.length?o[0]:(o.length||j.default(n.length,(function(e){return o.push(e)})),o.reduce((function(i,o){var a=i.bestScore,u=n[o];E.default(u,"$ref")&&(u=ee(e,u,r,t));var s=ue(e,r,u,t);return s>a?{bestIndex:o,bestScore:s}:i}),{bestIndex:i,bestScore:0}).bestIndex)}function fe(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return U(e)}))}function de(e,r){if(Array.isArray(r)){var t=Array.isArray(e)?e:[];return r.map((function(e,r){return t[r]?de(t[r],e):e}))}if(U(r)){var n=Object.assign({},e);return Object.keys(r).reduce((function(t,n){return t[n]=de(e?O.default(e,n):{},O.default(r,n)),t}),n)}return r}function le(e,r,t){return void 0===t&&(t=!1),Object.keys(r).reduce((function(n,i){var o=e?e[i]:{},a=r[i];if(e&&i in e&&U(a))n[i]=le(o,a,t);else if(t&&Array.isArray(o)&&Array.isArray(a)){var u=a;"preventDuplicates"===t&&(u=a.reduce((function(e,r){return o.includes(r)||e.push(r),e}),[])),n[i]=o.concat(u)}else n[i]=a;return n}),Object.assign({},e))}function ce(e){return Array.isArray(e.enum)&&1===e.enum.length||"const"in e}function pe(e,r,t){void 0===t&&(t={});var n=ee(e,r,t,void 0),i=n.oneOf||n.anyOf;return!!Array.isArray(n.enum)||!!Array.isArray(i)&&i.every((function(e){return"boolean"!=typeof e&&ce(e)}))}function ve(e,r,t){return!(!r.uniqueItems||!r.items||"boolean"==typeof r.items)&&pe(e,r.items,t)}function me(e,r,t){if(void 0===r&&(r=oe.Ignore),void 0===t&&(t=-1),t>=0){if(Array.isArray(e.items)&&t<e.items.length){var n=e.items[t];if("boolean"!=typeof n)return n}}else if(e.items&&!Array.isArray(e.items)&&"boolean"!=typeof e.items)return e.items;return r!==oe.Ignore&&U(e.additionalItems)?e.additionalItems:{}}function ye(e,r,t,n,i){void 0===i&&(i=[]),n?e[r]=t:U(t)?x.default(t)&&!i.includes(r)||(e[r]=t):void 0!==t&&(e[r]=t)}function he(e,r,t,n,i,o){void 0===n&&(n={}),void 0===o&&(o=!1);var a=U(i)?i:{},u=U(r)?r:{},s=t;if(U(s)&&U(u.default))s=le(s,u.default);else if("default"in u)s=u.default;else{if("$ref"in u){var f=M(u.$ref,n);return he(e,f,s,n,a,o)}if("dependencies"in u){var d=re(e,u,n,a);return he(e,d,s,n,a,o)}if(fe(u))s=u.items.map((function(r,i){return he(e,r,Array.isArray(t)?t[i]:void 0,n,a,o)}));else if("oneOf"in u){if(0===u.oneOf.length)return;u=u.oneOf[se(e,n,x.default(a)?void 0:a,u.oneOf,0)]}else if("anyOf"in u){if(0===u.anyOf.length)return;u=u.anyOf[se(e,n,x.default(a)?void 0:a,u.anyOf,0)]}}switch(void 0===s&&(s=u.default),V(u)){case"object":var l=Object.keys(u.properties||{}).reduce((function(r,t){return ye(r,t,he(e,O.default(u,["properties",t]),O.default(s,[t]),n,O.default(a,[t]),!0===o),o,u.required),r}),{});if(u.additionalProperties&&U(s)){var c=U(u.additionalProperties)?u.additionalProperties:{};Object.keys(s).filter((function(e){return!u.properties||!u.properties[e]})).forEach((function(r){var t=he(e,c,O.default(s,[r]),n,O.default(a,[r]),!0===o);ye(l,r,t,o)}))}return l;case"array":if(Array.isArray(s)&&(s=s.map((function(r,t){var i=me(u,oe.Fallback,t);return he(e,i,r,n)}))),Array.isArray(i)){var p=me(u);s=i.map((function(r,t){return he(e,p,O.default(s,[t]),n,r)}))}if(u.minItems){if(!ve(e,u,n)){var v=Array.isArray(s)?s.length:0;if(u.minItems>v){var m=s||[],y=me(u,oe.Invert),h=y.default,g=new Array(u.minItems-v).fill(he(e,y,h,n));return m.concat(g)}}return s||[]}}return s}function ge(e,r,t,n,i){if(void 0===i&&(i=!1),!U(r))throw new Error("Invalid schema: "+r);var o=he(e,ee(e,r,n,t),void 0,n,t,i);return null==t||"number"==typeof t&&isNaN(t)?o:U(t)||Array.isArray(t)?de(o,t):t}function be(e){return void 0===e&&(e={}),"widget"in $(e)&&"hidden"!==$(e).widget}function Oe(e,r,t,n){if(void 0===t&&(t={}),"files"===t["ui:widget"])return!0;if(r.items){var i=ee(e,r.items,n);return"string"===i.type&&"data-url"===i.format}return!1}function xe(e,r,t,n,i){void 0===t&&(t={});var o=$(t,i).label,a=!(void 0!==o&&!o),u=V(r);return"array"===u&&(a=ve(e,r,n)||Oe(e,r,t,n)||be(t)),"object"===u&&(a=!1),"boolean"!==u||t["ui:widget"]||(a=!1),t["ui:field"]&&(a=!1),a}function Ae(e,r,t){if(!t)return r;var n=r.errors,i=r.errorSchema,o=e.toErrorList(t),a=t;return x.default(i)||(a=le(i,t,!0),o=[].concat(n).concat(o)),{errorSchema:a,errors:o}}!function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"}(oe||(oe={}));var Se=Symbol("no Value");function Ee(e,r,t,n,i){var o;if(void 0===i&&(i={}),E.default(t,"properties")){var a={};if(E.default(n,"properties")){var u=O.default(n,"properties",{});Object.keys(u).forEach((function(e){E.default(i,e)&&(a[e]=void 0)}))}var s=Object.keys(O.default(t,"properties",{})),f={};s.forEach((function(o){var u=O.default(i,o),s=O.default(n,["properties",o],{}),d=O.default(t,["properties",o],{});E.default(s,"$ref")&&(s=ee(e,s,r,u)),E.default(d,"$ref")&&(d=ee(e,d,r,u));var l=O.default(s,"type"),c=O.default(d,"type");if(!l||l===c)if(E.default(a,o)&&delete a[o],"object"===c||"array"===c&&Array.isArray(u)){var p=Ee(e,r,d,s,u);void 0===p&&"array"!==c||(f[o]=p)}else{var v=O.default(d,"default",Se),m=O.default(s,"default",Se);v!==Se&&v!==u&&(m===u?a[o]=v:!0===O.default(d,"readOnly")&&(a[o]=void 0));var y=O.default(d,"const",Se),h=O.default(s,"const",Se);y!==Se&&y!==u&&(a[o]=h===u?y:void 0)}})),o=C({},i,a,f)}else if("array"===O.default(n,"type")&&"array"===O.default(t,"type")&&Array.isArray(i)){var d=O.default(n,"items"),l=O.default(t,"items");if("object"!=typeof d||"object"!=typeof l||Array.isArray(d)||Array.isArray(l))"boolean"==typeof d&&"boolean"==typeof l&&d===l&&(o=i);else{E.default(d,"$ref")&&(d=ee(e,d,r,i)),E.default(l,"$ref")&&(l=ee(e,l,r,i));var c=O.default(d,"type"),p=O.default(l,"type");if(!c||c===p){var v=O.default(t,"maxItems",-1);o="object"===p?i.reduce((function(t,n){var i=Ee(e,r,l,d,n);return void 0!==i&&(v<0||t.length<v)&&t.push(i),t}),[]):v>0&&i.length>v?i.slice(0,v):i}}}return o}function Ie(e,r,t,n,i,o,a){if(void 0===o&&(o="root"),void 0===a&&(a="_"),"$ref"in r||"dependencies"in r||"allOf"in r)return Ie(e,ee(e,r,n,i),t,n,i,o,a);if("items"in r&&!O.default(r,["items","$ref"]))return Ie(e,O.default(r,"items"),t,n,i,o,a);var u={$id:t||o};if("object"===r.type&&"properties"in r)for(var s in r.properties){var f=O.default(r,["properties",s]),d=u.$id+a+s;u[s]=Ie(e,U(f)?f:{},d,n,O.default(i,[s]),o,a)}return u}function we(e,r,t,n,i){var o;if(void 0===t&&(t=""),"$ref"in r||"dependencies"in r||"allOf"in r){var a=ee(e,r,n,i);return we(e,a,t,n,i)}var u=((o={}).$name=t.replace(/^\./,""),o);if("oneOf"in r){var s=se(e,n,i,r.oneOf,0);return we(e,r.oneOf[s],t,n,i)}if("anyOf"in r){var f=se(e,n,i,r.anyOf,0);return we(e,r.anyOf[f],t,n,i)}if("additionalProperties"in r&&!1!==r.additionalProperties&&T.default(u,"__rjsf_additionalProperties",!0),"items"in r&&Array.isArray(i))i.forEach((function(i,o){u[o]=we(e,r.items,t+"."+o,n,i)}));else if("properties"in r)for(var d in r.properties){var l=O.default(r,["properties",d]);u[d]=we(e,l,t+"."+d,n,O.default(i,[d]))}return u}var _e=function(){function e(e,r){this.rootSchema=void 0,this.validator=void 0,this.rootSchema=r,this.validator=e}var r=e.prototype;return r.getValidator=function(){return this.validator},r.doesSchemaUtilsDiffer=function(e,r){return!(!e||!r||this.validator===e&&k(this.rootSchema,r))},r.getDefaultFormState=function(e,r,t){return void 0===t&&(t=!1),ge(this.validator,e,r,this.rootSchema,t)},r.getDisplayLabel=function(e,r,t){return xe(this.validator,e,r,this.rootSchema,t)},r.getClosestMatchingOption=function(e,r,t){return se(this.validator,this.rootSchema,e,r,t)},r.getFirstMatchingOption=function(e,r){return K(this.validator,e,r,this.rootSchema)},r.getMatchingOption=function(e,r){return Y(this.validator,e,r,this.rootSchema)},r.isFilesArray=function(e,r){return Oe(this.validator,e,r,this.rootSchema)},r.isMultiSelect=function(e){return ve(this.validator,e,this.rootSchema)},r.isSelect=function(e){return pe(this.validator,e,this.rootSchema)},r.mergeValidationData=function(e,r){return Ae(this.validator,e,r)},r.retrieveSchema=function(e,r){return ee(this.validator,e,this.rootSchema,r)},r.sanitizeDataForNewSchema=function(e,r,t){return Ee(this.validator,this.rootSchema,e,r,t)},r.toIdSchema=function(e,r,t,n,i){return void 0===n&&(n="root"),void 0===i&&(i="_"),Ie(this.validator,e,r,this.rootSchema,t,n,i)},r.toPathSchema=function(e,r,t){return we(this.validator,e,r,this.rootSchema,t)},e}();function je(e,r){var t=e;if(Array.isArray(r)){var n=t.split(/(%\d)/);r.forEach((function(e,r){var t=n.findIndex((function(e){return e==="%"+(r+1)}));t>=0&&(n[t]=e)})),t=n.join("")}return t}function Te(e,r,t){if(void 0===r&&(r=[]),Array.isArray(e))return e.map((function(e){return Te(e,r)})).filter((function(e){return e}));var n=""===e||null===e?-1:Number(e),i=r[n];return i?i.value:t}function De(e,r){return Array.isArray(r)?r.some((function(r){return P.default(r,e)})):P.default(r,e)}var We=function(){function e(e){this.errorSchema={},this.resetAllErrors(e)}var r,t,n=e.prototype;return n.getOrCreateErrorBlock=function(e){var r=Array.isArray(e)&&e.length>0||"string"==typeof e?O.default(this.errorSchema,e):this.errorSchema;return!r&&e&&T.default(this.errorSchema,e,r={}),r},n.resetAllErrors=function(e){return this.errorSchema=e?N.default(e):{},this},n.addErrors=function(e,r){var t,n=this.getOrCreateErrorBlock(r),i=O.default(n,"__errors");return Array.isArray(i)||(n.__errors=i=[]),Array.isArray(e)?(t=i).push.apply(t,e):i.push(e),this},n.setErrors=function(e,r){var t=this.getOrCreateErrorBlock(r),n=Array.isArray(e)?[].concat(e):[e];return T.default(t,"__errors",n),this},n.clearErrors=function(e){var r=this.getOrCreateErrorBlock(e);return T.default(r,"__errors",[]),this},r=e,(t=[{key:"ErrorSchema",get:function(){return this.errorSchema}}])&&function(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key))?i:String(i),n)}var i}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),e}();function Pe(e){var r={};return e.multipleOf&&(r.step=e.multipleOf),(e.minimum||0===e.minimum)&&(r.min=e.minimum),(e.maximum||0===e.maximum)&&(r.max=e.maximum),r}var Ne,Fe={props:{disabled:!1},submitText:"Submit",norender:!1},Ue=["options"],Ce={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function Re(e,r,t){void 0===t&&(t={});var n=V(e);if("function"==typeof r||r&&F.default.isForwardRef(y.createElement(r))||F.default.isMemo(r))return function(e){var r=O.default(e,"MergedWidget");if(!r){var t=e.defaultProps&&e.defaultProps.options||{};T.default(e,"MergedWidget",r=function(r){var n=r.options,i=q(r,Ue);return m.jsx(e,C({options:C({},t,n)},i))})}return r}(r);if("string"!=typeof r)throw new Error("Unsupported widget definition: "+typeof r);if(r in t)return Re(e,t[r],t);if("string"==typeof n){if(!(n in Ce))throw new Error("No widget for type '"+n+"'");if(r in Ce[n])return Re(e,t[Ce[n][r]],t)}throw new Error("No widget '"+r+"' for type '"+n+"'")}function qe(e,r){return(w.default(e)?e:e.$id)+"__"+r}function $e(e){return qe(e,"description")}function ke(e){return qe(e,"error")}function Le(e){return qe(e,"examples")}function Me(e){return qe(e,"help")}function Ye(e){if("enum"in e&&Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if("const"in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Ke(e,r){for(var t=String(e);t.length<r;)t="0"+t;return t}exports.TranslatableString=void 0,(Ne=exports.TranslatableString||(exports.TranslatableString={})).ArrayItemTitle="Item",Ne.MissingItems="Missing items definition",Ne.YesLabel="Yes",Ne.NoLabel="No",Ne.CloseLabel="Close",Ne.ErrorsLabel="Errors",Ne.NewStringDefault="New Value",Ne.AddButton="Add",Ne.AddItemButton="Add Item",Ne.CopyButton="Copy",Ne.MoveDownButton="Move down",Ne.MoveUpButton="Move up",Ne.RemoveButton="Remove",Ne.NowLabel="Now",Ne.ClearLabel="Clear",Ne.AriaDateLabel="Select a date",Ne.DecrementAriaLabel="Decrease value by 1",Ne.IncrementAriaLabel="Increase value by 1",Ne.UnknownFieldType="Unknown field type %1",Ne.OptionPrefix="Option %1",Ne.TitleOptionPrefix="%1 option %2",Ne.KeyLabel="%1 Key",Ne.InvalidObjectField='Invalid "%1" object field configuration: <em>%2</em>.',Ne.UnsupportedField="Unsupported field schema.",Ne.UnsupportedFieldWithId="Unsupported field schema for field <code>%1</code>.",Ne.UnsupportedFieldWithReason="Unsupported field schema: <em>%1</em>.",Ne.UnsupportedFieldWithIdAndReason="Unsupported field schema for field <code>%1</code>: <em>%2</em>.",Ne.FilesInfo="<strong>%1</strong> (%2, %3 bytes)",exports.ADDITIONAL_PROPERTIES_KEY="additionalProperties",exports.ADDITIONAL_PROPERTY_FLAG="__additional_property",exports.ALL_OF_KEY="allOf",exports.ANY_OF_KEY="anyOf",exports.CONST_KEY="const",exports.DEFAULT_KEY="default",exports.DEFINITIONS_KEY="definitions",exports.DEPENDENCIES_KEY="dependencies",exports.ENUM_KEY="enum",exports.ERRORS_KEY="__errors",exports.ErrorSchemaBuilder=We,exports.ID_KEY="$id",exports.ITEMS_KEY="items",exports.NAME_KEY="$name",exports.ONE_OF_KEY="oneOf",exports.PROPERTIES_KEY="properties",exports.REF_KEY="$ref",exports.REQUIRED_KEY="required",exports.RJSF_ADDITONAL_PROPERTIES_FLAG="__rjsf_additionalProperties",exports.SUBMIT_BTN_OPTIONS_KEY="submitButtonOptions",exports.UI_FIELD_KEY="ui:field",exports.UI_GLOBAL_OPTIONS_KEY="ui:globalOptions",exports.UI_OPTIONS_KEY="ui:options",exports.UI_WIDGET_KEY="ui:widget",exports.allowAdditionalItems=function(e){return!0===e.additionalItems&&console.warn("additionalItems=true is currently not supported"),U(e.additionalItems)},exports.ariaDescribedByIds=function(e,r){void 0===r&&(r=!1);var t=r?" "+Le(e):"";return ke(e)+" "+$e(e)+" "+Me(e)+t},exports.asNumber=function(e){if(""!==e){if(null===e)return null;if(/\.$/.test(e))return e;if(/\.0$/.test(e))return e;if(/\.\d*0$/.test(e))return e;var r=Number(e);return"number"!=typeof r||Number.isNaN(r)?e:r}},exports.canExpand=function(e,r,t){if(void 0===r&&(r={}),!e.additionalProperties)return!1;var n=$(r).expandable,i=void 0===n||n;return!1===i?i:void 0===e.maxProperties||!t||Object.keys(t).length<e.maxProperties},exports.createSchemaUtils=function(e,r){return new _e(e,r)},exports.dataURItoBlob=function(e){var r,t=e.split(","),n=t[0].split(";"),i=n[0].replace("data:",""),o=n.filter((function(e){return"name"===e.split("=")[0]}));r=1!==o.length?"unknown":decodeURI(o[0].split("=")[1]);try{for(var a=atob(t[1]),u=[],s=0;s<a.length;s++)u.push(a.charCodeAt(s));return{blob:new window.Blob([new Uint8Array(u)],{type:i}),name:r}}catch(r){return{blob:{size:0,type:r.message},name:e}}},exports.deepEquals=k,exports.descriptionId=$e,exports.englishStringTranslator=function(e,r){return je(e,r)},exports.enumOptionsDeselectValue=function(e,r,t){void 0===t&&(t=[]);var n=Te(e,t);return Array.isArray(r)?r.filter((function(e){return!P.default(e,n)})):P.default(n,r)?void 0:r},exports.enumOptionsIndexForValue=function(e,r,t){void 0===r&&(r=[]),void 0===t&&(t=!1);var n=r.map((function(r,t){return De(r.value,e)?String(t):void 0})).filter((function(e){return void 0!==e}));return t?n:n[0]},exports.enumOptionsIsSelected=De,exports.enumOptionsSelectValue=function(e,r,t){void 0===t&&(t=[]);var n=Te(e,t);if(n){var i=t.findIndex((function(e){return n===e.value})),o=t.map((function(e){return e.value}));return r.slice(0,i).concat(n,r.slice(i)).sort((function(e,r){return Number(o.indexOf(e)>o.indexOf(r))}))}return r},exports.enumOptionsValueForIndex=Te,exports.errorId=ke,exports.examplesId=Le,exports.findSchemaDefinition=M,exports.getClosestMatchingOption=se,exports.getDefaultFormState=ge,exports.getDisplayLabel=xe,exports.getFirstMatchingOption=K,exports.getInputProps=function(e,r,t,n){void 0===t&&(t={}),void 0===n&&(n=!0);var i=C({type:r||"text"},Pe(e));return t.inputType?i.type=t.inputType:r||("number"===e.type?(i.type="number",n&&void 0===i.step&&(i.step="any")):"integer"===e.type&&(i.type="number",void 0===i.step&&(i.step=1))),t.autocomplete&&(i.autoComplete=t.autocomplete),i},exports.getMatchingOption=Y,exports.getSchemaType=V,exports.getSubmitButtonOptions=function(e){void 0===e&&(e={});var r=$(e);return r&&r.submitButtonOptions?C({},Fe,r.submitButtonOptions):Fe},exports.getTemplate=function(e,r,t){void 0===t&&(t={});var n=r.templates;return"ButtonTemplates"===e?n[e]:t[e]||n[e]},exports.getUiOptions=$,exports.getWidget=Re,exports.guessType=B,exports.hasWidget=function(e,r,t){void 0===t&&(t={});try{return Re(e,r,t),!0}catch(e){var n=e;if(n.message&&(n.message.startsWith("No widget")||n.message.startsWith("Unsupported widget")))return!1;throw e}},exports.helpId=Me,exports.isConstant=ce,exports.isCustomWidget=be,exports.isFilesArray=Oe,exports.isFixedItems=fe,exports.isMultiSelect=ve,exports.isObject=U,exports.isSelect=pe,exports.localToUTC=function(e){return e?new Date(e).toJSON():void 0},exports.mergeDefaultsWithFormData=de,exports.mergeObjects=le,exports.mergeSchemas=H,exports.mergeValidationData=Ae,exports.optionId=function(e,r){return e+"-"+r},exports.optionsList=function(e){var r=e;if(e.enum)return e.enum.map((function(e,t){return{label:r.enumNames&&r.enumNames[t]||String(e),value:e}}));var t=e.oneOf||e.anyOf;return t&&t.map((function(e){var r=e,t=Ye(r);return{schema:r,label:r.title||String(t),value:t}}))},exports.orderProperties=function(e,r){if(!Array.isArray(r))return e;var t,n=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},i=n(e),o=r.filter((function(e){return"*"===e||i[e]})),a=n(o),u=e.filter((function(e){return!a[e]})),s=o.indexOf("*");if(-1===s){if(u.length)throw new Error("uiSchema order list does not contain "+((t=u).length>1?"properties '"+t.join("', '")+"'":"property '"+t[0]+"'"));return o}if(s!==o.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var f=[].concat(o);return f.splice.apply(f,[s,1].concat(u)),f},exports.pad=Ke,exports.parseDateString=function(e,r){if(void 0===r&&(r=!0),!e)return{year:-1,month:-1,day:-1,hour:r?-1:0,minute:r?-1:0,second:r?-1:0};var t=new Date(e);if(Number.isNaN(t.getTime()))throw new Error("Unable to parse date "+e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:r?t.getUTCHours():0,minute:r?t.getUTCMinutes():0,second:r?t.getUTCSeconds():0}},exports.rangeSpec=Pe,exports.replaceStringParameters=je,exports.retrieveSchema=ee,exports.sanitizeDataForNewSchema=Ee,exports.schemaRequiresTrueValue=function e(r){return!!r.const||!(!r.enum||1!==r.enum.length||!0!==r.enum[0])||(r.anyOf&&1===r.anyOf.length?e(r.anyOf[0]):r.oneOf&&1===r.oneOf.length?e(r.oneOf[0]):!!r.allOf&&r.allOf.some((function(r){return e(r)})))},exports.shouldRender=function(e,r,t){var n=e.state;return!k(e.props,r)||!k(n,t)},exports.titleId=function(e){return qe(e,"title")},exports.toConstant=Ye,exports.toDateString=function(e,r){void 0===r&&(r=!0);var t=e.hour,n=e.minute,i=e.second,o=Date.UTC(e.year,e.month-1,e.day,void 0===t?0:t,void 0===n?0:n,void 0===i?0:i),a=new Date(o).toJSON();return r?a:a.slice(0,10)},exports.toIdSchema=Ie,exports.toPathSchema=we,exports.utcToLocal=function(e){if(!e)return"";var r=new Date(e);return Ke(r.getFullYear(),4)+"-"+Ke(r.getMonth()+1,2)+"-"+Ke(r.getDate(),2)+"T"+Ke(r.getHours(),2)+":"+Ke(r.getMinutes(),2)+":"+Ke(r.getSeconds(),2)+"."+Ke(r.getMilliseconds(),3)}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("lodash/isEqualWith"),r=require("lodash/get"),t=require("lodash/isEmpty"),n=require("jsonpointer"),i=require("lodash/omit"),o=require("lodash/has"),a=require("lodash/isObject"),u=require("lodash/isString"),s=require("lodash/reduce"),f=require("lodash/times"),d=require("lodash/set"),l=require("json-schema-merge-allof"),c=require("lodash/union"),p=require("lodash/isEqual"),v=require("lodash/cloneDeep"),m=require("react/jsx-runtime"),y=require("react"),h=require("react-is");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=g(e),O=g(r),x=g(t),A=g(n),S=g(i),E=g(o),I=g(a),w=g(u),_=g(s),j=g(f),T=g(d),D=g(l),W=g(c),P=g(p),N=g(v),F=g(h);function U(e){return!("undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Date&&e instanceof Date||"object"!=typeof e||null===e||Array.isArray(e))}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},C.apply(this,arguments)}function R(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function q(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r.indexOf(t=o[n])>=0||(i[t]=e[t]);return i}function $(e,r){return void 0===e&&(e={}),void 0===r&&(r={}),Object.keys(e).filter((function(e){return 0===e.indexOf("ui:")})).reduce((function(r,t){var n,i=e[t];return"ui:widget"===t&&U(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):"ui:options"===t&&U(i)?C({},r,i):C({},r,((n={})[t.substring(3)]=i,n))}),C({},r))}function k(e,r){return b.default(e,r,(function(e,r){if("function"==typeof e&&"function"==typeof r)return!0}))}function L(e,r){var t=r[e];return[S.default(r,[e]),t]}function M(e,r){void 0===r&&(r={});var t=e||"";if(!t.startsWith("#"))throw new Error("Could not find a definition for "+e+".");t=decodeURIComponent(t.substring(1));var n=A.default.get(r,t);if(void 0===n)throw new Error("Could not find a definition for "+e+".");if(n.$ref){var i=L("$ref",n),o=i[0],a=M(i[1],r);return Object.keys(o).length>0?C({},o,a):a}return n}function Y(e,r,t,n){if(void 0===r)return 0;for(var i=0;i<t.length;i++){var o=t[i];if(o.properties){var a={anyOf:Object.keys(o.properties).map((function(e){return{required:[e]}}))},u=void 0;if(o.anyOf){var s=C({},(R(o),o));s.allOf=s.allOf?s.allOf.slice():[],s.allOf.push(a),u=s}else u=Object.assign({},o,a);if(delete u.required,e.isValid(u,r,n))return i}else if(e.isValid(o,r,n))return i}return 0}function K(e,r,t,n){return Y(e,r,t,n)}function B(e){return Array.isArray(e)?"array":"string"==typeof e?"string":null==e?"null":"boolean"==typeof e?"boolean":isNaN(e)?"object"==typeof e?"object":"string":"number"}function V(e){var r=e.type;return!r&&e.const?B(e.const):!r&&e.enum?"string":r||!e.properties&&!e.additionalProperties?(Array.isArray(r)&&2===r.length&&r.includes("null")&&(r=r.find((function(e){return"null"!==e}))),r):"object"}function H(e,r){var t=Object.assign({},e);return Object.keys(r).reduce((function(t,n){var i=e?e[n]:{},o=r[n];return t[n]=e&&n in e&&U(o)?H(i,o):e&&r&&("object"===V(e)||"object"===V(r))&&"required"===n&&Array.isArray(i)&&Array.isArray(o)?W.default(i,o):o,t}),t)}var G=["if","then","else"],z=["$ref"],J=["allOf"],Q=["dependencies"],X=["oneOf"];function Z(e,r,t,n){return ee(e,C({},M(r.$ref,t),q(r,z)),t,n)}function ee(e,r,t,n){if(void 0===t&&(t={}),!U(r))return{};var i=function(e,r,t,n){if(void 0===t&&(t={}),"$ref"in r)return Z(e,r,t,n);if("dependencies"in r){var i=re(e,r,t,n);return ee(e,i,t,n)}return"allOf"in r?C({},r,{allOf:r.allOf.map((function(r){return ee(e,r,t,n)}))}):r}(e,r,t,n);if("if"in r)return function(e,r,t,n){var i=r.if,o=r.then,a=r.else,u=q(r,G),s=e.isValid(i,n,t)?o:a;return ee(e,s&&"boolean"!=typeof s?H(u,ee(e,s,t,n)):u,t,n)}(e,r,t,n);var o=n||{};if("allOf"in r)try{i=D.default(i,{deep:!1})}catch(e){return console.warn("could not merge subschemas in allOf:\n"+e),q(i,J)}return"additionalProperties"in i&&!1!==i.additionalProperties?function(e,r,t,n){var i=C({},r,{properties:C({},r.properties)}),o=n&&U(n)?n:{};return Object.keys(o).forEach((function(r){var n;r in i.properties||(n="boolean"!=typeof i.additionalProperties?"$ref"in i.additionalProperties?ee(e,{$ref:O.default(i.additionalProperties,["$ref"])},t,o):"type"in i.additionalProperties?C({},i.additionalProperties):"anyOf"in i.additionalProperties||"oneOf"in i.additionalProperties?C({type:"object"},i.additionalProperties):{type:B(O.default(o,[r]))}:{type:B(O.default(o,[r]))},i.properties[r]=n,T.default(i.properties,[r,"__additional_property"],!0))})),i}(e,i,t,o):i}function re(e,r,t,n){var i=r.dependencies,o=q(r,Q);return Array.isArray(o.oneOf)?o=o.oneOf[K(e,n,o.oneOf,t)]:Array.isArray(o.anyOf)&&(o=o.anyOf[K(e,n,o.anyOf,t)]),te(e,i,o,t,n)}function te(e,r,t,n,i){var o=t;for(var a in r)if(void 0!==O.default(i,[a])&&(!o.properties||a in o.properties)){var u=L(a,r),s=u[0],f=u[1];return Array.isArray(f)?o=ne(o,f):U(f)&&(o=ie(e,o,n,a,f,i)),te(e,s,o,n,i)}return o}function ne(e,r){return r?C({},e,{required:Array.isArray(e.required)?Array.from(new Set([].concat(e.required,r))):r}):e}function ie(e,r,t,n,i,o){var a=ee(e,i,t,o),u=a.oneOf;if(r=H(r,q(a,X)),void 0===u)return r;var s=u.map((function(r){return"boolean"!=typeof r&&"$ref"in r?Z(e,r,t,o):r}));return function(e,r,t,n,i,o){var a=i.filter((function(r){if("boolean"==typeof r||!r||!r.properties)return!1;var t=r.properties[n];if(t){var i,a={type:"object",properties:(i={},i[n]=t,i)};return 0===e.validateFormData(o,a).errors.length}return!1}));if(1!==a.length)return console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),r;var u=a[0],s=C({},u,{properties:L(n,u.properties)[0]});return H(r,ee(e,s,t,o))}(e,r,t,n,s,o)}var oe,ae={type:"object",properties:{__not_really_there__:{type:"number"}}};function ue(e,r,t,n){void 0===n&&(n={});var i=0;return t&&(I.default(t.properties)?i+=_.default(t.properties,(function(t,i,o){var a=O.default(n,o);if("boolean"==typeof i)return t;if(E.default(i,"$ref")){var u=ee(e,i,r,a);return t+ue(e,r,u,a||{})}if(E.default(i,"oneOf")&&a)return t+se(e,r,a,O.default(i,"oneOf"));if("object"===i.type)return t+ue(e,r,i,a||{});if(i.type===B(a)){var s=t+1;return i.default?s+=a===i.default?1:-1:i.const&&(s+=a===i.const?1:-1),s}return t}),0):w.default(t.type)&&t.type===B(n)&&(i+=1)),i}function se(e,r,t,n,i){void 0===i&&(i=-1);var o=n.reduce((function(n,i,o){return 1===K(e,t,[ae,i],r)&&n.push(o),n}),[]);return 1===o.length?o[0]:(o.length||j.default(n.length,(function(e){return o.push(e)})),o.reduce((function(i,o){var a=i.bestScore,u=n[o];E.default(u,"$ref")&&(u=ee(e,u,r,t));var s=ue(e,r,u,t);return s>a?{bestIndex:o,bestScore:s}:i}),{bestIndex:i,bestScore:0}).bestIndex)}function fe(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return U(e)}))}function de(e,r){if(Array.isArray(r)){var t=Array.isArray(e)?e:[];return r.map((function(e,r){return t[r]?de(t[r],e):e}))}if(U(r)){var n=Object.assign({},e);return Object.keys(r).reduce((function(t,n){return t[n]=de(e?O.default(e,n):{},O.default(r,n)),t}),n)}return r}function le(e,r,t){return void 0===t&&(t=!1),Object.keys(r).reduce((function(n,i){var o=e?e[i]:{},a=r[i];if(e&&i in e&&U(a))n[i]=le(o,a,t);else if(t&&Array.isArray(o)&&Array.isArray(a)){var u=a;"preventDuplicates"===t&&(u=a.reduce((function(e,r){return o.includes(r)||e.push(r),e}),[])),n[i]=o.concat(u)}else n[i]=a;return n}),Object.assign({},e))}function ce(e){return Array.isArray(e.enum)&&1===e.enum.length||"const"in e}function pe(e,r,t){void 0===t&&(t={});var n=ee(e,r,t,void 0),i=n.oneOf||n.anyOf;return!!Array.isArray(n.enum)||!!Array.isArray(i)&&i.every((function(e){return"boolean"!=typeof e&&ce(e)}))}function ve(e,r,t){return!(!r.uniqueItems||!r.items||"boolean"==typeof r.items)&&pe(e,r.items,t)}function me(e,r,t){if(void 0===r&&(r=oe.Ignore),void 0===t&&(t=-1),t>=0){if(Array.isArray(e.items)&&t<e.items.length){var n=e.items[t];if("boolean"!=typeof n)return n}}else if(e.items&&!Array.isArray(e.items)&&"boolean"!=typeof e.items)return e.items;return r!==oe.Ignore&&U(e.additionalItems)?e.additionalItems:{}}function ye(e,r,t,n,i){void 0===i&&(i=[]),n?e[r]=t:U(t)?x.default(t)&&!i.includes(r)||(e[r]=t):void 0!==t&&(e[r]=t)}function he(e,r,t,n,i,o){void 0===n&&(n={}),void 0===o&&(o=!1);var a=U(i)?i:{},u=U(r)?r:{},s=t;if(U(s)&&U(u.default))s=le(s,u.default);else if("default"in u)s=u.default;else{if("$ref"in u){var f=M(u.$ref,n);return he(e,f,s,n,a,o)}if("dependencies"in u){var d=re(e,u,n,a);return he(e,d,s,n,a,o)}if(fe(u))s=u.items.map((function(r,i){return he(e,r,Array.isArray(t)?t[i]:void 0,n,a,o)}));else if("oneOf"in u){if(0===u.oneOf.length)return;u=u.oneOf[se(e,n,x.default(a)?void 0:a,u.oneOf,0)]}else if("anyOf"in u){if(0===u.anyOf.length)return;u=u.anyOf[se(e,n,x.default(a)?void 0:a,u.anyOf,0)]}}switch(void 0===s&&(s=u.default),V(u)){case"object":var l=Object.keys(u.properties||{}).reduce((function(r,t){return ye(r,t,he(e,O.default(u,["properties",t]),O.default(s,[t]),n,O.default(a,[t]),!0===o),o,u.required),r}),{});if(u.additionalProperties&&U(s)){var c=U(u.additionalProperties)?u.additionalProperties:{};Object.keys(s).filter((function(e){return!u.properties||!u.properties[e]})).forEach((function(r){var t=he(e,c,O.default(s,[r]),n,O.default(a,[r]),!0===o);ye(l,r,t,o)}))}return l;case"array":if(Array.isArray(s)&&(s=s.map((function(r,t){var i=me(u,oe.Fallback,t);return he(e,i,r,n)}))),Array.isArray(i)){var p=me(u);s=i.map((function(r,t){return he(e,p,O.default(s,[t]),n,r)}))}if(u.minItems){if(!ve(e,u,n)){var v=Array.isArray(s)?s.length:0;if(u.minItems>v){var m=s||[],y=me(u,oe.Invert),h=y.default,g=new Array(u.minItems-v).fill(he(e,y,h,n));return m.concat(g)}}return s||[]}}return s}function ge(e,r,t,n,i){if(void 0===i&&(i=!1),!U(r))throw new Error("Invalid schema: "+r);var o=he(e,ee(e,r,n,t),void 0,n,t,i);return null==t||"number"==typeof t&&isNaN(t)?o:U(t)||Array.isArray(t)?de(o,t):t}function be(e){return void 0===e&&(e={}),"widget"in $(e)&&"hidden"!==$(e).widget}function Oe(e,r,t,n){if(void 0===t&&(t={}),"files"===t["ui:widget"])return!0;if(r.items){var i=ee(e,r.items,n);return"string"===i.type&&"data-url"===i.format}return!1}function xe(e,r,t,n,i){void 0===t&&(t={});var o=$(t,i).label,a=!(void 0!==o&&!o),u=V(r);return"array"===u&&(a=ve(e,r,n)||Oe(e,r,t,n)||be(t)),"object"===u&&(a=!1),"boolean"!==u||t["ui:widget"]||(a=!1),t["ui:field"]&&(a=!1),a}function Ae(e,r,t){if(!t)return r;var n=r.errors,i=r.errorSchema,o=e.toErrorList(t),a=t;return x.default(i)||(a=le(i,t,!0),o=[].concat(n).concat(o)),{errorSchema:a,errors:o}}!function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"}(oe||(oe={}));var Se=Symbol("no Value");function Ee(e,r,t,n,i){var o;if(void 0===i&&(i={}),E.default(t,"properties")){var a={};if(E.default(n,"properties")){var u=O.default(n,"properties",{});Object.keys(u).forEach((function(e){E.default(i,e)&&(a[e]=void 0)}))}var s=Object.keys(O.default(t,"properties",{})),f={};s.forEach((function(o){var u=O.default(i,o),s=O.default(n,["properties",o],{}),d=O.default(t,["properties",o],{});E.default(s,"$ref")&&(s=ee(e,s,r,u)),E.default(d,"$ref")&&(d=ee(e,d,r,u));var l=O.default(s,"type"),c=O.default(d,"type");if(!l||l===c)if(E.default(a,o)&&delete a[o],"object"===c||"array"===c&&Array.isArray(u)){var p=Ee(e,r,d,s,u);void 0===p&&"array"!==c||(f[o]=p)}else{var v=O.default(d,"default",Se),m=O.default(s,"default",Se);v!==Se&&v!==u&&(m===u?a[o]=v:!0===O.default(d,"readOnly")&&(a[o]=void 0));var y=O.default(d,"const",Se),h=O.default(s,"const",Se);y!==Se&&y!==u&&(a[o]=h===u?y:void 0)}})),o=C({},i,a,f)}else if("array"===O.default(n,"type")&&"array"===O.default(t,"type")&&Array.isArray(i)){var d=O.default(n,"items"),l=O.default(t,"items");if("object"!=typeof d||"object"!=typeof l||Array.isArray(d)||Array.isArray(l))"boolean"==typeof d&&"boolean"==typeof l&&d===l&&(o=i);else{E.default(d,"$ref")&&(d=ee(e,d,r,i)),E.default(l,"$ref")&&(l=ee(e,l,r,i));var c=O.default(d,"type"),p=O.default(l,"type");if(!c||c===p){var v=O.default(t,"maxItems",-1);o="object"===p?i.reduce((function(t,n){var i=Ee(e,r,l,d,n);return void 0!==i&&(v<0||t.length<v)&&t.push(i),t}),[]):v>0&&i.length>v?i.slice(0,v):i}}}return o}function Ie(e,r,t,n,i,o,a){if(void 0===o&&(o="root"),void 0===a&&(a="_"),"$ref"in r||"dependencies"in r||"allOf"in r)return Ie(e,ee(e,r,n,i),t,n,i,o,a);if("items"in r&&!O.default(r,["items","$ref"]))return Ie(e,O.default(r,"items"),t,n,i,o,a);var u={$id:t||o};if("object"===r.type&&"properties"in r)for(var s in r.properties){var f=O.default(r,["properties",s]),d=u.$id+a+s;u[s]=Ie(e,U(f)?f:{},d,n,O.default(i,[s]),o,a)}return u}function we(e,r,t,n,i){var o;if(void 0===t&&(t=""),"$ref"in r||"dependencies"in r||"allOf"in r){var a=ee(e,r,n,i);return we(e,a,t,n,i)}var u=((o={}).$name=t.replace(/^\./,""),o);if("oneOf"in r){var s=se(e,n,i,r.oneOf,0);return we(e,r.oneOf[s],t,n,i)}if("anyOf"in r){var f=se(e,n,i,r.anyOf,0);return we(e,r.anyOf[f],t,n,i)}if("additionalProperties"in r&&!1!==r.additionalProperties&&T.default(u,"__rjsf_additionalProperties",!0),"items"in r&&Array.isArray(i))i.forEach((function(i,o){u[o]=we(e,r.items,t+"."+o,n,i)}));else if("properties"in r)for(var d in r.properties){var l=O.default(r,["properties",d]);u[d]=we(e,l,t+"."+d,n,O.default(i,[d]))}return u}var _e=function(){function e(e,r){this.rootSchema=void 0,this.validator=void 0,this.rootSchema=r,this.validator=e}var r=e.prototype;return r.getValidator=function(){return this.validator},r.doesSchemaUtilsDiffer=function(e,r){return!(!e||!r||this.validator===e&&k(this.rootSchema,r))},r.getDefaultFormState=function(e,r,t){return void 0===t&&(t=!1),ge(this.validator,e,r,this.rootSchema,t)},r.getDisplayLabel=function(e,r,t){return xe(this.validator,e,r,this.rootSchema,t)},r.getClosestMatchingOption=function(e,r,t){return se(this.validator,this.rootSchema,e,r,t)},r.getFirstMatchingOption=function(e,r){return K(this.validator,e,r,this.rootSchema)},r.getMatchingOption=function(e,r){return Y(this.validator,e,r,this.rootSchema)},r.isFilesArray=function(e,r){return Oe(this.validator,e,r,this.rootSchema)},r.isMultiSelect=function(e){return ve(this.validator,e,this.rootSchema)},r.isSelect=function(e){return pe(this.validator,e,this.rootSchema)},r.mergeValidationData=function(e,r){return Ae(this.validator,e,r)},r.retrieveSchema=function(e,r){return ee(this.validator,e,this.rootSchema,r)},r.sanitizeDataForNewSchema=function(e,r,t){return Ee(this.validator,this.rootSchema,e,r,t)},r.toIdSchema=function(e,r,t,n,i){return void 0===n&&(n="root"),void 0===i&&(i="_"),Ie(this.validator,e,r,this.rootSchema,t,n,i)},r.toPathSchema=function(e,r,t){return we(this.validator,e,r,this.rootSchema,t)},e}();function je(e,r){var t=e;if(Array.isArray(r)){var n=t.split(/(%\d)/);r.forEach((function(e,r){var t=n.findIndex((function(e){return e==="%"+(r+1)}));t>=0&&(n[t]=e)})),t=n.join("")}return t}function Te(e,r,t){if(void 0===r&&(r=[]),Array.isArray(e))return e.map((function(e){return Te(e,r)})).filter((function(e){return e}));var n=""===e||null===e?-1:Number(e),i=r[n];return i?i.value:t}function De(e,r){return Array.isArray(r)?r.some((function(r){return P.default(r,e)})):P.default(r,e)}var We=function(){function e(e){this.errorSchema={},this.resetAllErrors(e)}var r,t,n=e.prototype;return n.getOrCreateErrorBlock=function(e){var r=Array.isArray(e)&&e.length>0||"string"==typeof e?O.default(this.errorSchema,e):this.errorSchema;return!r&&e&&T.default(this.errorSchema,e,r={}),r},n.resetAllErrors=function(e){return this.errorSchema=e?N.default(e):{},this},n.addErrors=function(e,r){var t,n=this.getOrCreateErrorBlock(r),i=O.default(n,"__errors");return Array.isArray(i)||(n.__errors=i=[]),Array.isArray(e)?(t=i).push.apply(t,e):i.push(e),this},n.setErrors=function(e,r){var t=this.getOrCreateErrorBlock(r),n=Array.isArray(e)?[].concat(e):[e];return T.default(t,"__errors",n),this},n.clearErrors=function(e){var r=this.getOrCreateErrorBlock(e);return T.default(r,"__errors",[]),this},r=e,(t=[{key:"ErrorSchema",get:function(){return this.errorSchema}}])&&function(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key))?i:String(i),n)}var i}(r.prototype,t),Object.defineProperty(r,"prototype",{writable:!1}),e}();function Pe(e){var r={};return e.multipleOf&&(r.step=e.multipleOf),(e.minimum||0===e.minimum)&&(r.min=e.minimum),(e.maximum||0===e.maximum)&&(r.max=e.maximum),r}var Ne,Fe={props:{disabled:!1},submitText:"Submit",norender:!1},Ue=["options"],Ce={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function Re(e,r,t){void 0===t&&(t={});var n=V(e);if("function"==typeof r||r&&F.default.isForwardRef(y.createElement(r))||F.default.isMemo(r))return function(e){var r=O.default(e,"MergedWidget");if(!r){var t=e.defaultProps&&e.defaultProps.options||{};T.default(e,"MergedWidget",r=function(r){var n=r.options,i=q(r,Ue);return m.jsx(e,C({options:C({},t,n)},i))})}return r}(r);if("string"!=typeof r)throw new Error("Unsupported widget definition: "+typeof r);if(r in t)return Re(e,t[r],t);if("string"==typeof n){if(!(n in Ce))throw new Error("No widget for type '"+n+"'");if(r in Ce[n])return Re(e,t[Ce[n][r]],t)}throw new Error("No widget '"+r+"' for type '"+n+"'")}function qe(e,r){return(w.default(e)?e:e.$id)+"__"+r}function $e(e){return qe(e,"description")}function ke(e){return qe(e,"error")}function Le(e){return qe(e,"examples")}function Me(e){return qe(e,"help")}function Ye(e){if("enum"in e&&Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if("const"in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Ke(e,r){for(var t=String(e);t.length<r;)t="0"+t;return t}exports.TranslatableString=void 0,(Ne=exports.TranslatableString||(exports.TranslatableString={})).ArrayItemTitle="Item",Ne.MissingItems="Missing items definition",Ne.YesLabel="Yes",Ne.NoLabel="No",Ne.CloseLabel="Close",Ne.ErrorsLabel="Errors",Ne.NewStringDefault="New Value",Ne.AddButton="Add",Ne.AddItemButton="Add Item",Ne.CopyButton="Copy",Ne.MoveDownButton="Move down",Ne.MoveUpButton="Move up",Ne.RemoveButton="Remove",Ne.NowLabel="Now",Ne.ClearLabel="Clear",Ne.AriaDateLabel="Select a date",Ne.PreviewLabel="Preview",Ne.DecrementAriaLabel="Decrease value by 1",Ne.IncrementAriaLabel="Increase value by 1",Ne.UnknownFieldType="Unknown field type %1",Ne.OptionPrefix="Option %1",Ne.TitleOptionPrefix="%1 option %2",Ne.KeyLabel="%1 Key",Ne.InvalidObjectField='Invalid "%1" object field configuration: <em>%2</em>.',Ne.UnsupportedField="Unsupported field schema.",Ne.UnsupportedFieldWithId="Unsupported field schema for field <code>%1</code>.",Ne.UnsupportedFieldWithReason="Unsupported field schema: <em>%1</em>.",Ne.UnsupportedFieldWithIdAndReason="Unsupported field schema for field <code>%1</code>: <em>%2</em>.",Ne.FilesInfo="<strong>%1</strong> (%2, %3 bytes)",exports.ADDITIONAL_PROPERTIES_KEY="additionalProperties",exports.ADDITIONAL_PROPERTY_FLAG="__additional_property",exports.ALL_OF_KEY="allOf",exports.ANY_OF_KEY="anyOf",exports.CONST_KEY="const",exports.DEFAULT_KEY="default",exports.DEFINITIONS_KEY="definitions",exports.DEPENDENCIES_KEY="dependencies",exports.ENUM_KEY="enum",exports.ERRORS_KEY="__errors",exports.ErrorSchemaBuilder=We,exports.ID_KEY="$id",exports.ITEMS_KEY="items",exports.NAME_KEY="$name",exports.ONE_OF_KEY="oneOf",exports.PROPERTIES_KEY="properties",exports.REF_KEY="$ref",exports.REQUIRED_KEY="required",exports.RJSF_ADDITONAL_PROPERTIES_FLAG="__rjsf_additionalProperties",exports.SUBMIT_BTN_OPTIONS_KEY="submitButtonOptions",exports.UI_FIELD_KEY="ui:field",exports.UI_GLOBAL_OPTIONS_KEY="ui:globalOptions",exports.UI_OPTIONS_KEY="ui:options",exports.UI_WIDGET_KEY="ui:widget",exports.allowAdditionalItems=function(e){return!0===e.additionalItems&&console.warn("additionalItems=true is currently not supported"),U(e.additionalItems)},exports.ariaDescribedByIds=function(e,r){void 0===r&&(r=!1);var t=r?" "+Le(e):"";return ke(e)+" "+$e(e)+" "+Me(e)+t},exports.asNumber=function(e){if(""!==e){if(null===e)return null;if(/\.$/.test(e))return e;if(/\.0$/.test(e))return e;if(/\.\d*0$/.test(e))return e;var r=Number(e);return"number"!=typeof r||Number.isNaN(r)?e:r}},exports.canExpand=function(e,r,t){if(void 0===r&&(r={}),!e.additionalProperties)return!1;var n=$(r).expandable,i=void 0===n||n;return!1===i?i:void 0===e.maxProperties||!t||Object.keys(t).length<e.maxProperties},exports.createSchemaUtils=function(e,r){return new _e(e,r)},exports.dataURItoBlob=function(e){var r,t=e.split(","),n=t[0].split(";"),i=n[0].replace("data:",""),o=n.filter((function(e){return"name"===e.split("=")[0]}));r=1!==o.length?"unknown":decodeURI(o[0].split("=")[1]);try{for(var a=atob(t[1]),u=[],s=0;s<a.length;s++)u.push(a.charCodeAt(s));return{blob:new window.Blob([new Uint8Array(u)],{type:i}),name:r}}catch(r){return{blob:{size:0,type:r.message},name:e}}},exports.deepEquals=k,exports.descriptionId=$e,exports.englishStringTranslator=function(e,r){return je(e,r)},exports.enumOptionsDeselectValue=function(e,r,t){void 0===t&&(t=[]);var n=Te(e,t);return Array.isArray(r)?r.filter((function(e){return!P.default(e,n)})):P.default(n,r)?void 0:r},exports.enumOptionsIndexForValue=function(e,r,t){void 0===r&&(r=[]),void 0===t&&(t=!1);var n=r.map((function(r,t){return De(r.value,e)?String(t):void 0})).filter((function(e){return void 0!==e}));return t?n:n[0]},exports.enumOptionsIsSelected=De,exports.enumOptionsSelectValue=function(e,r,t){void 0===t&&(t=[]);var n=Te(e,t);if(n){var i=t.findIndex((function(e){return n===e.value})),o=t.map((function(e){return e.value}));return r.slice(0,i).concat(n,r.slice(i)).sort((function(e,r){return Number(o.indexOf(e)>o.indexOf(r))}))}return r},exports.enumOptionsValueForIndex=Te,exports.errorId=ke,exports.examplesId=Le,exports.findSchemaDefinition=M,exports.getClosestMatchingOption=se,exports.getDefaultFormState=ge,exports.getDisplayLabel=xe,exports.getFirstMatchingOption=K,exports.getInputProps=function(e,r,t,n){void 0===t&&(t={}),void 0===n&&(n=!0);var i=C({type:r||"text"},Pe(e));return t.inputType?i.type=t.inputType:r||("number"===e.type?(i.type="number",n&&void 0===i.step&&(i.step="any")):"integer"===e.type&&(i.type="number",void 0===i.step&&(i.step=1))),t.autocomplete&&(i.autoComplete=t.autocomplete),i},exports.getMatchingOption=Y,exports.getSchemaType=V,exports.getSubmitButtonOptions=function(e){void 0===e&&(e={});var r=$(e);return r&&r.submitButtonOptions?C({},Fe,r.submitButtonOptions):Fe},exports.getTemplate=function(e,r,t){void 0===t&&(t={});var n=r.templates;return"ButtonTemplates"===e?n[e]:t[e]||n[e]},exports.getUiOptions=$,exports.getWidget=Re,exports.guessType=B,exports.hasWidget=function(e,r,t){void 0===t&&(t={});try{return Re(e,r,t),!0}catch(e){var n=e;if(n.message&&(n.message.startsWith("No widget")||n.message.startsWith("Unsupported widget")))return!1;throw e}},exports.helpId=Me,exports.isConstant=ce,exports.isCustomWidget=be,exports.isFilesArray=Oe,exports.isFixedItems=fe,exports.isMultiSelect=ve,exports.isObject=U,exports.isSelect=pe,exports.labelValue=function(e,r,t){return r?t:e},exports.localToUTC=function(e){return e?new Date(e).toJSON():void 0},exports.mergeDefaultsWithFormData=de,exports.mergeObjects=le,exports.mergeSchemas=H,exports.mergeValidationData=Ae,exports.optionId=function(e,r){return e+"-"+r},exports.optionsList=function(e){var r=e;if(e.enum)return e.enum.map((function(e,t){return{label:r.enumNames&&r.enumNames[t]||String(e),value:e}}));var t=e.oneOf||e.anyOf;return t&&t.map((function(e){var r=e,t=Ye(r);return{schema:r,label:r.title||String(t),value:t}}))},exports.orderProperties=function(e,r){if(!Array.isArray(r))return e;var t,n=function(e){return e.reduce((function(e,r){return e[r]=!0,e}),{})},i=n(e),o=r.filter((function(e){return"*"===e||i[e]})),a=n(o),u=e.filter((function(e){return!a[e]})),s=o.indexOf("*");if(-1===s){if(u.length)throw new Error("uiSchema order list does not contain "+((t=u).length>1?"properties '"+t.join("', '")+"'":"property '"+t[0]+"'"));return o}if(s!==o.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var f=[].concat(o);return f.splice.apply(f,[s,1].concat(u)),f},exports.pad=Ke,exports.parseDateString=function(e,r){if(void 0===r&&(r=!0),!e)return{year:-1,month:-1,day:-1,hour:r?-1:0,minute:r?-1:0,second:r?-1:0};var t=new Date(e);if(Number.isNaN(t.getTime()))throw new Error("Unable to parse date "+e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:r?t.getUTCHours():0,minute:r?t.getUTCMinutes():0,second:r?t.getUTCSeconds():0}},exports.rangeSpec=Pe,exports.replaceStringParameters=je,exports.retrieveSchema=ee,exports.sanitizeDataForNewSchema=Ee,exports.schemaRequiresTrueValue=function e(r){return!!r.const||!(!r.enum||1!==r.enum.length||!0!==r.enum[0])||(r.anyOf&&1===r.anyOf.length?e(r.anyOf[0]):r.oneOf&&1===r.oneOf.length?e(r.oneOf[0]):!!r.allOf&&r.allOf.some((function(r){return e(r)})))},exports.shouldRender=function(e,r,t){var n=e.state;return!k(e.props,r)||!k(n,t)},exports.titleId=function(e){return qe(e,"title")},exports.toConstant=Ye,exports.toDateString=function(e,r){void 0===r&&(r=!0);var t=e.hour,n=e.minute,i=e.second,o=Date.UTC(e.year,e.month-1,e.day,void 0===t?0:t,void 0===n?0:n,void 0===i?0:i),a=new Date(o).toJSON();return r?a:a.slice(0,10)},exports.toIdSchema=Ie,exports.toPathSchema=we,exports.utcToLocal=function(e){if(!e)return"";var r=new Date(e);return Ke(r.getFullYear(),4)+"-"+Ke(r.getMonth()+1,2)+"-"+Ke(r.getDate(),2)+"T"+Ke(r.getHours(),2)+":"+Ke(r.getMinutes(),2)+":"+Ke(r.getSeconds(),2)+"."+Ke(r.getMilliseconds(),3)}; | ||
//# sourceMappingURL=utils.cjs.production.min.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash-es/isEqualWith"),require("lodash-es/get"),require("lodash-es/isEmpty"),require("jsonpointer"),require("lodash-es/omit"),require("lodash-es/has"),require("lodash-es/isObject"),require("lodash-es/isString"),require("lodash-es/reduce"),require("lodash-es/times"),require("lodash-es/set"),require("json-schema-merge-allof"),require("lodash-es/union"),require("lodash-es/isEqual"),require("lodash-es/cloneDeep"),require("react/jsx-runtime"),require("react"),require("react-is")):"function"==typeof define&&define.amd?define(["exports","lodash-es/isEqualWith","lodash-es/get","lodash-es/isEmpty","jsonpointer","lodash-es/omit","lodash-es/has","lodash-es/isObject","lodash-es/isString","lodash-es/reduce","lodash-es/times","lodash-es/set","json-schema-merge-allof","lodash-es/union","lodash-es/isEqual","lodash-es/cloneDeep","react/jsx-runtime","react","react-is"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@rjsf/utils"]={},e.isEqualWith,e.get,e.isEmpty,e.jsonpointer,e.omit,e.has,e.isObject$1,e.isString,e.reduce,e.times,e.set,e.mergeAllOf,e.union,e.isEqual,e.cloneDeep,e.jsxRuntime,e.React,e.ReactIs)}(this,(function(e,t,r,n,i,o,a,u,s,d,f,l,c,p,m,v,y,h,g){"use strict";function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var O=b(t),A=b(r),S=b(n),E=b(i),I=b(o),w=b(a),j=b(u),T=b(s),_=b(d),D=b(f),W=b(l),x=b(c),P=b(p),N=b(m),F=b(v),U=b(g);function R(e){return!("undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Date&&e instanceof Date||"object"!=typeof e||null===e||Array.isArray(e))}function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},q.apply(this,arguments)}function C(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function k(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}var L="__additional_property",M="additionalProperties",Y="allOf",K="anyOf",B="const",$="default",V="dependencies",H="enum",G="__errors",z="items",J="oneOf",Q="properties",X="required",Z="$ref",ee="__rjsf_additionalProperties",te="ui:widget",re="ui:options";function ne(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(e).filter((function(e){return 0===e.indexOf("ui:")})).reduce((function(t,r){var n,i=e[r];return r===te&&R(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),t):r===re&&R(i)?q({},t,i):q({},t,((n={})[r.substring(3)]=i,n))}),q({},t))}function ie(e,t){return O.default(e,t,(function(e,t){if("function"==typeof e&&"function"==typeof t)return!0}))}function oe(e,t){var r=t[e];return[I.default(t,[e]),r]}function ae(e,t){void 0===t&&(t={});var r=e||"";if(!r.startsWith("#"))throw new Error("Could not find a definition for "+e+".");r=decodeURIComponent(r.substring(1));var n=E.default.get(t,r);if(void 0===n)throw new Error("Could not find a definition for "+e+".");if(n.$ref){var i=oe(Z,n),o=i[0],a=ae(i[1],t);return Object.keys(o).length>0?q({},o,a):a}return n}function ue(e,t,r,n){if(void 0===t)return 0;for(var i=0;i<r.length;i++){var o=r[i];if(o.properties){var a={anyOf:Object.keys(o.properties).map((function(e){return{required:[e]}}))},u=void 0;if(o.anyOf){var s=q({},(C(o),o));s.allOf=s.allOf?s.allOf.slice():[],s.allOf.push(a),u=s}else u=Object.assign({},o,a);if(delete u.required,e.isValid(u,t,n))return i}else if(e.isValid(o,t,n))return i}return 0}function se(e,t,r,n){return ue(e,t,r,n)}function de(e){return Array.isArray(e)?"array":"string"==typeof e?"string":null==e?"null":"boolean"==typeof e?"boolean":isNaN(e)?"object"==typeof e?"object":"string":"number"}function fe(e){var t=e.type;return!t&&e.const?de(e.const):!t&&e.enum?"string":t||!e.properties&&!e.additionalProperties?(Array.isArray(t)&&2===t.length&&t.includes("null")&&(t=t.find((function(e){return"null"!==e}))),t):"object"}function le(e,t){var r=Object.assign({},e);return Object.keys(t).reduce((function(r,n){var i=e?e[n]:{},o=t[n];return r[n]=e&&n in e&&R(o)?le(i,o):e&&t&&("object"===fe(e)||"object"===fe(t))&&n===X&&Array.isArray(i)&&Array.isArray(o)?P.default(i,o):o,r}),r)}var ce=["if","then","else"],pe=["$ref"],me=["allOf"],ve=["dependencies"],ye=["oneOf"];function he(e,t,r,n){return ge(e,q({},ae(t.$ref,r),k(t,pe)),r,n)}function ge(e,t,r,n){if(void 0===r&&(r={}),!R(t))return{};var i=function(e,t,r,n){if(void 0===r&&(r={}),Z in t)return he(e,t,r,n);if(V in t){var i=be(e,t,r,n);return ge(e,i,r,n)}return Y in t?q({},t,{allOf:t.allOf.map((function(t){return ge(e,t,r,n)}))}):t}(e,t,r,n);if("if"in t)return function(e,t,r,n){var i=t.if,o=t.then,a=t.else,u=k(t,ce),s=e.isValid(i,n,r)?o:a;return ge(e,s&&"boolean"!=typeof s?le(u,ge(e,s,r,n)):u,r,n)}(e,t,r,n);var o=n||{};if(Y in t)try{i=x.default(i,{deep:!1})}catch(e){return console.warn("could not merge subschemas in allOf:\n"+e),k(i,me)}return M in i&&!1!==i.additionalProperties?function(e,t,r,n){var i=q({},t,{properties:q({},t.properties)}),o=n&&R(n)?n:{};return Object.keys(o).forEach((function(t){var n;t in i.properties||(n="boolean"!=typeof i.additionalProperties?Z in i.additionalProperties?ge(e,{$ref:A.default(i.additionalProperties,[Z])},r,o):"type"in i.additionalProperties?q({},i.additionalProperties):K in i.additionalProperties||J in i.additionalProperties?q({type:"object"},i.additionalProperties):{type:de(A.default(o,[t]))}:{type:de(A.default(o,[t]))},i.properties[t]=n,W.default(i.properties,[t,L],!0))})),i}(e,i,r,o):i}function be(e,t,r,n){var i=t.dependencies,o=k(t,ve);return Array.isArray(o.oneOf)?o=o.oneOf[se(e,n,o.oneOf,r)]:Array.isArray(o.anyOf)&&(o=o.anyOf[se(e,n,o.anyOf,r)]),Oe(e,i,o,r,n)}function Oe(e,t,r,n,i){var o=r;for(var a in t)if(void 0!==A.default(i,[a])&&(!o.properties||a in o.properties)){var u=oe(a,t),s=u[0],d=u[1];return Array.isArray(d)?o=Ae(o,d):R(d)&&(o=Se(e,o,n,a,d,i)),Oe(e,s,o,n,i)}return o}function Ae(e,t){return t?q({},e,{required:Array.isArray(e.required)?Array.from(new Set([].concat(e.required,t))):t}):e}function Se(e,t,r,n,i,o){var a=ge(e,i,r,o),u=a.oneOf;if(t=le(t,k(a,ye)),void 0===u)return t;var s=u.map((function(t){return"boolean"!=typeof t&&Z in t?he(e,t,r,o):t}));return function(e,t,r,n,i,o){var a=i.filter((function(t){if("boolean"==typeof t||!t||!t.properties)return!1;var r=t.properties[n];if(r){var i,a={type:"object",properties:(i={},i[n]=r,i)};return 0===e.validateFormData(o,a).errors.length}return!1}));if(1!==a.length)return console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),t;var u=a[0],s=q({},u,{properties:oe(n,u.properties)[0]});return le(t,ge(e,s,r,o))}(e,t,r,n,s,o)}var Ee,Ie={type:"object",properties:{__not_really_there__:{type:"number"}}};function we(e,t,r,n){void 0===n&&(n={});var i=0;return r&&(j.default(r.properties)?i+=_.default(r.properties,(function(r,i,o){var a=A.default(n,o);if("boolean"==typeof i)return r;if(w.default(i,Z)){var u=ge(e,i,t,a);return r+we(e,t,u,a||{})}if(w.default(i,J)&&a)return r+je(e,t,a,A.default(i,J));if("object"===i.type)return r+we(e,t,i,a||{});if(i.type===de(a)){var s=r+1;return i.default?s+=a===i.default?1:-1:i.const&&(s+=a===i.const?1:-1),s}return r}),0):T.default(r.type)&&r.type===de(n)&&(i+=1)),i}function je(e,t,r,n,i){void 0===i&&(i=-1);var o=n.reduce((function(n,i,o){return 1===se(e,r,[Ie,i],t)&&n.push(o),n}),[]);return 1===o.length?o[0]:(o.length||D.default(n.length,(function(e){return o.push(e)})),o.reduce((function(i,o){var a=i.bestScore,u=n[o];w.default(u,Z)&&(u=ge(e,u,t,r));var s=we(e,t,u,r);return s>a?{bestIndex:o,bestScore:s}:i}),{bestIndex:i,bestScore:0}).bestIndex)}function Te(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return R(e)}))}function _e(e,t){if(Array.isArray(t)){var r=Array.isArray(e)?e:[];return t.map((function(e,t){return r[t]?_e(r[t],e):e}))}if(R(t)){var n=Object.assign({},e);return Object.keys(t).reduce((function(r,n){return r[n]=_e(e?A.default(e,n):{},A.default(t,n)),r}),n)}return t}function De(e,t,r){return void 0===r&&(r=!1),Object.keys(t).reduce((function(n,i){var o=e?e[i]:{},a=t[i];if(e&&i in e&&R(a))n[i]=De(o,a,r);else if(r&&Array.isArray(o)&&Array.isArray(a)){var u=a;"preventDuplicates"===r&&(u=a.reduce((function(e,t){return o.includes(t)||e.push(t),e}),[])),n[i]=o.concat(u)}else n[i]=a;return n}),Object.assign({},e))}function We(e){return Array.isArray(e.enum)&&1===e.enum.length||B in e}function xe(e,t,r){void 0===r&&(r={});var n=ge(e,t,r,void 0),i=n.oneOf||n.anyOf;return!!Array.isArray(n.enum)||!!Array.isArray(i)&&i.every((function(e){return"boolean"!=typeof e&&We(e)}))}function Pe(e,t,r){return!(!t.uniqueItems||!t.items||"boolean"==typeof t.items)&&xe(e,t.items,r)}function Ne(e,t,r){if(void 0===t&&(t=Ee.Ignore),void 0===r&&(r=-1),r>=0){if(Array.isArray(e.items)&&r<e.items.length){var n=e.items[r];if("boolean"!=typeof n)return n}}else if(e.items&&!Array.isArray(e.items)&&"boolean"!=typeof e.items)return e.items;return t!==Ee.Ignore&&R(e.additionalItems)?e.additionalItems:{}}function Fe(e,t,r,n,i){void 0===i&&(i=[]),n?e[t]=r:R(r)?S.default(r)&&!i.includes(t)||(e[t]=r):void 0!==r&&(e[t]=r)}function Ue(e,t,r,n,i,o){void 0===n&&(n={}),void 0===o&&(o=!1);var a=R(i)?i:{},u=R(t)?t:{},s=r;if(R(s)&&R(u.default))s=De(s,u.default);else if($ in u)s=u.default;else{if(Z in u){var d=ae(u.$ref,n);return Ue(e,d,s,n,a,o)}if(V in u){var f=be(e,u,n,a);return Ue(e,f,s,n,a,o)}if(Te(u))s=u.items.map((function(t,i){return Ue(e,t,Array.isArray(r)?r[i]:void 0,n,a,o)}));else if(J in u){if(0===u.oneOf.length)return;u=u.oneOf[je(e,n,S.default(a)?void 0:a,u.oneOf,0)]}else if(K in u){if(0===u.anyOf.length)return;u=u.anyOf[je(e,n,S.default(a)?void 0:a,u.anyOf,0)]}}switch(void 0===s&&(s=u.default),fe(u)){case"object":var l=Object.keys(u.properties||{}).reduce((function(t,r){return Fe(t,r,Ue(e,A.default(u,[Q,r]),A.default(s,[r]),n,A.default(a,[r]),!0===o),o,u.required),t}),{});if(u.additionalProperties&&R(s)){var c=R(u.additionalProperties)?u.additionalProperties:{};Object.keys(s).filter((function(e){return!u.properties||!u.properties[e]})).forEach((function(t){var r=Ue(e,c,A.default(s,[t]),n,A.default(a,[t]),!0===o);Fe(l,t,r,o)}))}return l;case"array":if(Array.isArray(s)&&(s=s.map((function(t,r){var i=Ne(u,Ee.Fallback,r);return Ue(e,i,t,n)}))),Array.isArray(i)){var p=Ne(u);s=i.map((function(t,r){return Ue(e,p,A.default(s,[r]),n,t)}))}if(u.minItems){if(!Pe(e,u,n)){var m=Array.isArray(s)?s.length:0;if(u.minItems>m){var v=s||[],y=Ne(u,Ee.Invert),h=y.default,g=new Array(u.minItems-m).fill(Ue(e,y,h,n));return v.concat(g)}}return s||[]}}return s}function Re(e,t,r,n,i){if(void 0===i&&(i=!1),!R(t))throw new Error("Invalid schema: "+t);var o=Ue(e,ge(e,t,n,r),void 0,n,r,i);return null==r||"number"==typeof r&&isNaN(r)?o:R(r)||Array.isArray(r)?_e(o,r):r}function qe(e){return void 0===e&&(e={}),"widget"in ne(e)&&"hidden"!==ne(e).widget}function Ce(e,t,r,n){if(void 0===r&&(r={}),"files"===r["ui:widget"])return!0;if(t.items){var i=ge(e,t.items,n);return"string"===i.type&&"data-url"===i.format}return!1}function ke(e,t,r,n,i){void 0===r&&(r={});var o=ne(r,i).label,a=!(void 0!==o&&!o),u=fe(t);return"array"===u&&(a=Pe(e,t,n)||Ce(e,t,r,n)||qe(r)),"object"===u&&(a=!1),"boolean"!==u||r["ui:widget"]||(a=!1),r["ui:field"]&&(a=!1),a}function Le(e,t,r){if(!r)return t;var n=t.errors,i=t.errorSchema,o=e.toErrorList(r),a=r;return S.default(i)||(a=De(i,r,!0),o=[].concat(n).concat(o)),{errorSchema:a,errors:o}}!function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"}(Ee||(Ee={}));var Me=Symbol("no Value");function Ye(e,t,r,n,i){var o;if(void 0===i&&(i={}),w.default(r,Q)){var a={};if(w.default(n,Q)){var u=A.default(n,Q,{});Object.keys(u).forEach((function(e){w.default(i,e)&&(a[e]=void 0)}))}var s=Object.keys(A.default(r,Q,{})),d={};s.forEach((function(o){var u=A.default(i,o),s=A.default(n,[Q,o],{}),f=A.default(r,[Q,o],{});w.default(s,Z)&&(s=ge(e,s,t,u)),w.default(f,Z)&&(f=ge(e,f,t,u));var l=A.default(s,"type"),c=A.default(f,"type");if(!l||l===c)if(w.default(a,o)&&delete a[o],"object"===c||"array"===c&&Array.isArray(u)){var p=Ye(e,t,f,s,u);void 0===p&&"array"!==c||(d[o]=p)}else{var m=A.default(f,"default",Me),v=A.default(s,"default",Me);m!==Me&&m!==u&&(v===u?a[o]=m:!0===A.default(f,"readOnly")&&(a[o]=void 0));var y=A.default(f,"const",Me),h=A.default(s,"const",Me);y!==Me&&y!==u&&(a[o]=h===u?y:void 0)}})),o=q({},i,a,d)}else if("array"===A.default(n,"type")&&"array"===A.default(r,"type")&&Array.isArray(i)){var f=A.default(n,"items"),l=A.default(r,"items");if("object"!=typeof f||"object"!=typeof l||Array.isArray(f)||Array.isArray(l))"boolean"==typeof f&&"boolean"==typeof l&&f===l&&(o=i);else{w.default(f,Z)&&(f=ge(e,f,t,i)),w.default(l,Z)&&(l=ge(e,l,t,i));var c=A.default(f,"type"),p=A.default(l,"type");if(!c||c===p){var m=A.default(r,"maxItems",-1);o="object"===p?i.reduce((function(r,n){var i=Ye(e,t,l,f,n);return void 0!==i&&(m<0||r.length<m)&&r.push(i),r}),[]):m>0&&i.length>m?i.slice(0,m):i}}}return o}function Ke(e,t,r,n,i,o,a){if(void 0===o&&(o="root"),void 0===a&&(a="_"),Z in t||V in t||Y in t)return Ke(e,ge(e,t,n,i),r,n,i,o,a);if(z in t&&!A.default(t,[z,Z]))return Ke(e,A.default(t,z),r,n,i,o,a);var u={$id:r||o};if("object"===t.type&&Q in t)for(var s in t.properties){var d=A.default(t,[Q,s]),f=u.$id+a+s;u[s]=Ke(e,R(d)?d:{},f,n,A.default(i,[s]),o,a)}return u}function Be(e,t,r,n,i){var o;if(void 0===r&&(r=""),Z in t||V in t||Y in t){var a=ge(e,t,n,i);return Be(e,a,r,n,i)}var u=((o={}).$name=r.replace(/^\./,""),o);if(J in t){var s=je(e,n,i,t.oneOf,0);return Be(e,t.oneOf[s],r,n,i)}if(K in t){var d=je(e,n,i,t.anyOf,0);return Be(e,t.anyOf[d],r,n,i)}if(M in t&&!1!==t.additionalProperties&&W.default(u,ee,!0),z in t&&Array.isArray(i))i.forEach((function(i,o){u[o]=Be(e,t.items,r+"."+o,n,i)}));else if(Q in t)for(var f in t.properties){var l=A.default(t,[Q,f]);u[f]=Be(e,l,r+"."+f,n,A.default(i,[f]))}return u}var $e=function(){function e(e,t){this.rootSchema=void 0,this.validator=void 0,this.rootSchema=t,this.validator=e}var t=e.prototype;return t.getValidator=function(){return this.validator},t.doesSchemaUtilsDiffer=function(e,t){return!(!e||!t||this.validator===e&&ie(this.rootSchema,t))},t.getDefaultFormState=function(e,t,r){return void 0===r&&(r=!1),Re(this.validator,e,t,this.rootSchema,r)},t.getDisplayLabel=function(e,t,r){return ke(this.validator,e,t,this.rootSchema,r)},t.getClosestMatchingOption=function(e,t,r){return je(this.validator,this.rootSchema,e,t,r)},t.getFirstMatchingOption=function(e,t){return se(this.validator,e,t,this.rootSchema)},t.getMatchingOption=function(e,t){return ue(this.validator,e,t,this.rootSchema)},t.isFilesArray=function(e,t){return Ce(this.validator,e,t,this.rootSchema)},t.isMultiSelect=function(e){return Pe(this.validator,e,this.rootSchema)},t.isSelect=function(e){return xe(this.validator,e,this.rootSchema)},t.mergeValidationData=function(e,t){return Le(this.validator,e,t)},t.retrieveSchema=function(e,t){return ge(this.validator,e,this.rootSchema,t)},t.sanitizeDataForNewSchema=function(e,t,r){return Ye(this.validator,this.rootSchema,e,t,r)},t.toIdSchema=function(e,t,r,n,i){return void 0===n&&(n="root"),void 0===i&&(i="_"),Ke(this.validator,e,t,this.rootSchema,r,n,i)},t.toPathSchema=function(e,t,r){return Be(this.validator,e,t,this.rootSchema,r)},e}();function Ve(e,t){var r=e;if(Array.isArray(t)){var n=r.split(/(%\d)/);t.forEach((function(e,t){var r=n.findIndex((function(e){return e==="%"+(t+1)}));r>=0&&(n[r]=e)})),r=n.join("")}return r}function He(e,t,r){if(void 0===t&&(t=[]),Array.isArray(e))return e.map((function(e){return He(e,t)})).filter((function(e){return e}));var n=""===e||null===e?-1:Number(e),i=t[n];return i?i.value:r}function Ge(e,t){return Array.isArray(t)?t.some((function(t){return N.default(t,e)})):N.default(t,e)}var ze=function(){function e(e){this.errorSchema={},this.resetAllErrors(e)}var t,r,n=e.prototype;return n.getOrCreateErrorBlock=function(e){var t=Array.isArray(e)&&e.length>0||"string"==typeof e?A.default(this.errorSchema,e):this.errorSchema;return!t&&e&&W.default(this.errorSchema,e,t={}),t},n.resetAllErrors=function(e){return this.errorSchema=e?F.default(e):{},this},n.addErrors=function(e,t){var r,n=this.getOrCreateErrorBlock(t),i=A.default(n,G);return Array.isArray(i)||(n.__errors=i=[]),Array.isArray(e)?(r=i).push.apply(r,e):i.push(e),this},n.setErrors=function(e,t){var r=this.getOrCreateErrorBlock(t),n=Array.isArray(e)?[].concat(e):[e];return W.default(r,G,n),this},n.clearErrors=function(e){var t=this.getOrCreateErrorBlock(e);return W.default(t,G,[]),this},t=e,(r=[{key:"ErrorSchema",get:function(){return this.errorSchema}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key))?i:String(i),n)}var i}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Je(e){var t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||0===e.minimum)&&(t.min=e.minimum),(e.maximum||0===e.maximum)&&(t.max=e.maximum),t}var Qe,Xe={props:{disabled:!1},submitText:"Submit",norender:!1},Ze=["options"],et={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function tt(e,t,r){void 0===r&&(r={});var n=fe(e);if("function"==typeof t||t&&U.default.isForwardRef(h.createElement(t))||U.default.isMemo(t))return function(e){var t=A.default(e,"MergedWidget");if(!t){var r=e.defaultProps&&e.defaultProps.options||{};W.default(e,"MergedWidget",t=function(t){var n=t.options,i=k(t,Ze);return y.jsx(e,q({options:q({},r,n)},i))})}return t}(t);if("string"!=typeof t)throw new Error("Unsupported widget definition: "+typeof t);if(t in r)return tt(e,r[t],r);if("string"==typeof n){if(!(n in et))throw new Error("No widget for type '"+n+"'");if(t in et[n])return tt(e,r[et[n][t]],r)}throw new Error("No widget '"+t+"' for type '"+n+"'")}function rt(e,t){return(T.default(e)?e:e.$id)+"__"+t}function nt(e){return rt(e,"description")}function it(e){return rt(e,"error")}function ot(e){return rt(e,"examples")}function at(e){return rt(e,"help")}function ut(e){if(H in e&&Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(B in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function st(e,t){for(var r=String(e);r.length<t;)r="0"+r;return r}e.TranslatableString=void 0,(Qe=e.TranslatableString||(e.TranslatableString={})).ArrayItemTitle="Item",Qe.MissingItems="Missing items definition",Qe.YesLabel="Yes",Qe.NoLabel="No",Qe.CloseLabel="Close",Qe.ErrorsLabel="Errors",Qe.NewStringDefault="New Value",Qe.AddButton="Add",Qe.AddItemButton="Add Item",Qe.CopyButton="Copy",Qe.MoveDownButton="Move down",Qe.MoveUpButton="Move up",Qe.RemoveButton="Remove",Qe.NowLabel="Now",Qe.ClearLabel="Clear",Qe.AriaDateLabel="Select a date",Qe.DecrementAriaLabel="Decrease value by 1",Qe.IncrementAriaLabel="Increase value by 1",Qe.UnknownFieldType="Unknown field type %1",Qe.OptionPrefix="Option %1",Qe.TitleOptionPrefix="%1 option %2",Qe.KeyLabel="%1 Key",Qe.InvalidObjectField='Invalid "%1" object field configuration: <em>%2</em>.',Qe.UnsupportedField="Unsupported field schema.",Qe.UnsupportedFieldWithId="Unsupported field schema for field <code>%1</code>.",Qe.UnsupportedFieldWithReason="Unsupported field schema: <em>%1</em>.",Qe.UnsupportedFieldWithIdAndReason="Unsupported field schema for field <code>%1</code>: <em>%2</em>.",Qe.FilesInfo="<strong>%1</strong> (%2, %3 bytes)",e.ADDITIONAL_PROPERTIES_KEY=M,e.ADDITIONAL_PROPERTY_FLAG=L,e.ALL_OF_KEY=Y,e.ANY_OF_KEY=K,e.CONST_KEY=B,e.DEFAULT_KEY=$,e.DEFINITIONS_KEY="definitions",e.DEPENDENCIES_KEY=V,e.ENUM_KEY=H,e.ERRORS_KEY=G,e.ErrorSchemaBuilder=ze,e.ID_KEY="$id",e.ITEMS_KEY=z,e.NAME_KEY="$name",e.ONE_OF_KEY=J,e.PROPERTIES_KEY=Q,e.REF_KEY=Z,e.REQUIRED_KEY=X,e.RJSF_ADDITONAL_PROPERTIES_FLAG=ee,e.SUBMIT_BTN_OPTIONS_KEY="submitButtonOptions",e.UI_FIELD_KEY="ui:field",e.UI_GLOBAL_OPTIONS_KEY="ui:globalOptions",e.UI_OPTIONS_KEY=re,e.UI_WIDGET_KEY=te,e.allowAdditionalItems=function(e){return!0===e.additionalItems&&console.warn("additionalItems=true is currently not supported"),R(e.additionalItems)},e.ariaDescribedByIds=function(e,t){void 0===t&&(t=!1);var r=t?" "+ot(e):"";return it(e)+" "+nt(e)+" "+at(e)+r},e.asNumber=function(e){if(""!==e){if(null===e)return null;if(/\.$/.test(e))return e;if(/\.0$/.test(e))return e;if(/\.\d*0$/.test(e))return e;var t=Number(e);return"number"!=typeof t||Number.isNaN(t)?e:t}},e.canExpand=function(e,t,r){if(void 0===t&&(t={}),!e.additionalProperties)return!1;var n=ne(t).expandable,i=void 0===n||n;return!1===i?i:void 0===e.maxProperties||!r||Object.keys(r).length<e.maxProperties},e.createSchemaUtils=function(e,t){return new $e(e,t)},e.dataURItoBlob=function(e){var t,r=e.split(","),n=r[0].split(";"),i=n[0].replace("data:",""),o=n.filter((function(e){return"name"===e.split("=")[0]}));t=1!==o.length?"unknown":decodeURI(o[0].split("=")[1]);try{for(var a=atob(r[1]),u=[],s=0;s<a.length;s++)u.push(a.charCodeAt(s));return{blob:new window.Blob([new Uint8Array(u)],{type:i}),name:t}}catch(t){return{blob:{size:0,type:t.message},name:e}}},e.deepEquals=ie,e.descriptionId=nt,e.englishStringTranslator=function(e,t){return Ve(e,t)},e.enumOptionsDeselectValue=function(e,t,r){void 0===r&&(r=[]);var n=He(e,r);return Array.isArray(t)?t.filter((function(e){return!N.default(e,n)})):N.default(n,t)?void 0:t},e.enumOptionsIndexForValue=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r=!1);var n=t.map((function(t,r){return Ge(t.value,e)?String(r):void 0})).filter((function(e){return void 0!==e}));return r?n:n[0]},e.enumOptionsIsSelected=Ge,e.enumOptionsSelectValue=function(e,t,r){void 0===r&&(r=[]);var n=He(e,r);if(n){var i=r.findIndex((function(e){return n===e.value})),o=r.map((function(e){return e.value}));return t.slice(0,i).concat(n,t.slice(i)).sort((function(e,t){return Number(o.indexOf(e)>o.indexOf(t))}))}return t},e.enumOptionsValueForIndex=He,e.errorId=it,e.examplesId=ot,e.findSchemaDefinition=ae,e.getClosestMatchingOption=je,e.getDefaultFormState=Re,e.getDisplayLabel=ke,e.getFirstMatchingOption=se,e.getInputProps=function(e,t,r,n){void 0===r&&(r={}),void 0===n&&(n=!0);var i=q({type:t||"text"},Je(e));return r.inputType?i.type=r.inputType:t||("number"===e.type?(i.type="number",n&&void 0===i.step&&(i.step="any")):"integer"===e.type&&(i.type="number",void 0===i.step&&(i.step=1))),r.autocomplete&&(i.autoComplete=r.autocomplete),i},e.getMatchingOption=ue,e.getSchemaType=fe,e.getSubmitButtonOptions=function(e){void 0===e&&(e={});var t=ne(e);return t&&t.submitButtonOptions?q({},Xe,t.submitButtonOptions):Xe},e.getTemplate=function(e,t,r){void 0===r&&(r={});var n=t.templates;return"ButtonTemplates"===e?n[e]:r[e]||n[e]},e.getUiOptions=ne,e.getWidget=tt,e.guessType=de,e.hasWidget=function(e,t,r){void 0===r&&(r={});try{return tt(e,t,r),!0}catch(e){var n=e;if(n.message&&(n.message.startsWith("No widget")||n.message.startsWith("Unsupported widget")))return!1;throw e}},e.helpId=at,e.isConstant=We,e.isCustomWidget=qe,e.isFilesArray=Ce,e.isFixedItems=Te,e.isMultiSelect=Pe,e.isObject=R,e.isSelect=xe,e.localToUTC=function(e){return e?new Date(e).toJSON():void 0},e.mergeDefaultsWithFormData=_e,e.mergeObjects=De,e.mergeSchemas=le,e.mergeValidationData=Le,e.optionId=function(e,t){return e+"-"+t},e.optionsList=function(e){var t=e;if(e.enum)return e.enum.map((function(e,r){return{label:t.enumNames&&t.enumNames[r]||String(e),value:e}}));var r=e.oneOf||e.anyOf;return r&&r.map((function(e){var t=e,r=ut(t);return{schema:t,label:t.title||String(r),value:r}}))},e.orderProperties=function(e,t){if(!Array.isArray(t))return e;var r,n=function(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})},i=n(e),o=t.filter((function(e){return"*"===e||i[e]})),a=n(o),u=e.filter((function(e){return!a[e]})),s=o.indexOf("*");if(-1===s){if(u.length)throw new Error("uiSchema order list does not contain "+((r=u).length>1?"properties '"+r.join("', '")+"'":"property '"+r[0]+"'"));return o}if(s!==o.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var d=[].concat(o);return d.splice.apply(d,[s,1].concat(u)),d},e.pad=st,e.parseDateString=function(e,t){if(void 0===t&&(t=!0),!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};var r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}},e.rangeSpec=Je,e.replaceStringParameters=Ve,e.retrieveSchema=ge,e.sanitizeDataForNewSchema=Ye,e.schemaRequiresTrueValue=function e(t){return!!t.const||!(!t.enum||1!==t.enum.length||!0!==t.enum[0])||(t.anyOf&&1===t.anyOf.length?e(t.anyOf[0]):t.oneOf&&1===t.oneOf.length?e(t.oneOf[0]):!!t.allOf&&t.allOf.some((function(t){return e(t)})))},e.shouldRender=function(e,t,r){var n=e.state;return!ie(e.props,t)||!ie(n,r)},e.titleId=function(e){return rt(e,"title")},e.toConstant=ut,e.toDateString=function(e,t){void 0===t&&(t=!0);var r=e.hour,n=e.minute,i=e.second,o=Date.UTC(e.year,e.month-1,e.day,void 0===r?0:r,void 0===n?0:n,void 0===i?0:i),a=new Date(o).toJSON();return t?a:a.slice(0,10)},e.toIdSchema=Ke,e.toPathSchema=Be,e.utcToLocal=function(e){if(!e)return"";var t=new Date(e);return st(t.getFullYear(),4)+"-"+st(t.getMonth()+1,2)+"-"+st(t.getDate(),2)+"T"+st(t.getHours(),2)+":"+st(t.getMinutes(),2)+":"+st(t.getSeconds(),2)+"."+st(t.getMilliseconds(),3)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash-es/isEqualWith"),require("lodash-es/get"),require("lodash-es/isEmpty"),require("jsonpointer"),require("lodash-es/omit"),require("lodash-es/has"),require("lodash-es/isObject"),require("lodash-es/isString"),require("lodash-es/reduce"),require("lodash-es/times"),require("lodash-es/set"),require("json-schema-merge-allof"),require("lodash-es/union"),require("lodash-es/isEqual"),require("lodash-es/cloneDeep"),require("react/jsx-runtime"),require("react"),require("react-is")):"function"==typeof define&&define.amd?define(["exports","lodash-es/isEqualWith","lodash-es/get","lodash-es/isEmpty","jsonpointer","lodash-es/omit","lodash-es/has","lodash-es/isObject","lodash-es/isString","lodash-es/reduce","lodash-es/times","lodash-es/set","json-schema-merge-allof","lodash-es/union","lodash-es/isEqual","lodash-es/cloneDeep","react/jsx-runtime","react","react-is"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@rjsf/utils"]={},e.isEqualWith,e.get,e.isEmpty,e.jsonpointer,e.omit,e.has,e.isObject$1,e.isString,e.reduce,e.times,e.set,e.mergeAllOf,e.union,e.isEqual,e.cloneDeep,e.jsxRuntime,e.React,e.ReactIs)}(this,(function(e,t,r,n,i,o,a,u,s,d,f,l,c,p,m,v,y,h,g){"use strict";function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var O=b(t),A=b(r),S=b(n),E=b(i),I=b(o),w=b(a),j=b(u),T=b(s),_=b(d),D=b(f),W=b(l),x=b(c),P=b(p),N=b(m),F=b(v),U=b(g);function R(e){return!("undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Date&&e instanceof Date||"object"!=typeof e||null===e||Array.isArray(e))}function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},q.apply(this,arguments)}function C(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function k(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}var L="__additional_property",M="additionalProperties",Y="allOf",K="anyOf",B="const",$="default",V="dependencies",H="enum",G="__errors",z="items",J="oneOf",Q="properties",X="required",Z="$ref",ee="__rjsf_additionalProperties",te="ui:widget",re="ui:options";function ne(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(e).filter((function(e){return 0===e.indexOf("ui:")})).reduce((function(t,r){var n,i=e[r];return r===te&&R(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),t):r===re&&R(i)?q({},t,i):q({},t,((n={})[r.substring(3)]=i,n))}),q({},t))}function ie(e,t){return O.default(e,t,(function(e,t){if("function"==typeof e&&"function"==typeof t)return!0}))}function oe(e,t){var r=t[e];return[I.default(t,[e]),r]}function ae(e,t){void 0===t&&(t={});var r=e||"";if(!r.startsWith("#"))throw new Error("Could not find a definition for "+e+".");r=decodeURIComponent(r.substring(1));var n=E.default.get(t,r);if(void 0===n)throw new Error("Could not find a definition for "+e+".");if(n.$ref){var i=oe(Z,n),o=i[0],a=ae(i[1],t);return Object.keys(o).length>0?q({},o,a):a}return n}function ue(e,t,r,n){if(void 0===t)return 0;for(var i=0;i<r.length;i++){var o=r[i];if(o.properties){var a={anyOf:Object.keys(o.properties).map((function(e){return{required:[e]}}))},u=void 0;if(o.anyOf){var s=q({},(C(o),o));s.allOf=s.allOf?s.allOf.slice():[],s.allOf.push(a),u=s}else u=Object.assign({},o,a);if(delete u.required,e.isValid(u,t,n))return i}else if(e.isValid(o,t,n))return i}return 0}function se(e,t,r,n){return ue(e,t,r,n)}function de(e){return Array.isArray(e)?"array":"string"==typeof e?"string":null==e?"null":"boolean"==typeof e?"boolean":isNaN(e)?"object"==typeof e?"object":"string":"number"}function fe(e){var t=e.type;return!t&&e.const?de(e.const):!t&&e.enum?"string":t||!e.properties&&!e.additionalProperties?(Array.isArray(t)&&2===t.length&&t.includes("null")&&(t=t.find((function(e){return"null"!==e}))),t):"object"}function le(e,t){var r=Object.assign({},e);return Object.keys(t).reduce((function(r,n){var i=e?e[n]:{},o=t[n];return r[n]=e&&n in e&&R(o)?le(i,o):e&&t&&("object"===fe(e)||"object"===fe(t))&&n===X&&Array.isArray(i)&&Array.isArray(o)?P.default(i,o):o,r}),r)}var ce=["if","then","else"],pe=["$ref"],me=["allOf"],ve=["dependencies"],ye=["oneOf"];function he(e,t,r,n){return ge(e,q({},ae(t.$ref,r),k(t,pe)),r,n)}function ge(e,t,r,n){if(void 0===r&&(r={}),!R(t))return{};var i=function(e,t,r,n){if(void 0===r&&(r={}),Z in t)return he(e,t,r,n);if(V in t){var i=be(e,t,r,n);return ge(e,i,r,n)}return Y in t?q({},t,{allOf:t.allOf.map((function(t){return ge(e,t,r,n)}))}):t}(e,t,r,n);if("if"in t)return function(e,t,r,n){var i=t.if,o=t.then,a=t.else,u=k(t,ce),s=e.isValid(i,n,r)?o:a;return ge(e,s&&"boolean"!=typeof s?le(u,ge(e,s,r,n)):u,r,n)}(e,t,r,n);var o=n||{};if(Y in t)try{i=x.default(i,{deep:!1})}catch(e){return console.warn("could not merge subschemas in allOf:\n"+e),k(i,me)}return M in i&&!1!==i.additionalProperties?function(e,t,r,n){var i=q({},t,{properties:q({},t.properties)}),o=n&&R(n)?n:{};return Object.keys(o).forEach((function(t){var n;t in i.properties||(n="boolean"!=typeof i.additionalProperties?Z in i.additionalProperties?ge(e,{$ref:A.default(i.additionalProperties,[Z])},r,o):"type"in i.additionalProperties?q({},i.additionalProperties):K in i.additionalProperties||J in i.additionalProperties?q({type:"object"},i.additionalProperties):{type:de(A.default(o,[t]))}:{type:de(A.default(o,[t]))},i.properties[t]=n,W.default(i.properties,[t,L],!0))})),i}(e,i,r,o):i}function be(e,t,r,n){var i=t.dependencies,o=k(t,ve);return Array.isArray(o.oneOf)?o=o.oneOf[se(e,n,o.oneOf,r)]:Array.isArray(o.anyOf)&&(o=o.anyOf[se(e,n,o.anyOf,r)]),Oe(e,i,o,r,n)}function Oe(e,t,r,n,i){var o=r;for(var a in t)if(void 0!==A.default(i,[a])&&(!o.properties||a in o.properties)){var u=oe(a,t),s=u[0],d=u[1];return Array.isArray(d)?o=Ae(o,d):R(d)&&(o=Se(e,o,n,a,d,i)),Oe(e,s,o,n,i)}return o}function Ae(e,t){return t?q({},e,{required:Array.isArray(e.required)?Array.from(new Set([].concat(e.required,t))):t}):e}function Se(e,t,r,n,i,o){var a=ge(e,i,r,o),u=a.oneOf;if(t=le(t,k(a,ye)),void 0===u)return t;var s=u.map((function(t){return"boolean"!=typeof t&&Z in t?he(e,t,r,o):t}));return function(e,t,r,n,i,o){var a=i.filter((function(t){if("boolean"==typeof t||!t||!t.properties)return!1;var r=t.properties[n];if(r){var i,a={type:"object",properties:(i={},i[n]=r,i)};return 0===e.validateFormData(o,a).errors.length}return!1}));if(1!==a.length)return console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),t;var u=a[0],s=q({},u,{properties:oe(n,u.properties)[0]});return le(t,ge(e,s,r,o))}(e,t,r,n,s,o)}var Ee,Ie={type:"object",properties:{__not_really_there__:{type:"number"}}};function we(e,t,r,n){void 0===n&&(n={});var i=0;return r&&(j.default(r.properties)?i+=_.default(r.properties,(function(r,i,o){var a=A.default(n,o);if("boolean"==typeof i)return r;if(w.default(i,Z)){var u=ge(e,i,t,a);return r+we(e,t,u,a||{})}if(w.default(i,J)&&a)return r+je(e,t,a,A.default(i,J));if("object"===i.type)return r+we(e,t,i,a||{});if(i.type===de(a)){var s=r+1;return i.default?s+=a===i.default?1:-1:i.const&&(s+=a===i.const?1:-1),s}return r}),0):T.default(r.type)&&r.type===de(n)&&(i+=1)),i}function je(e,t,r,n,i){void 0===i&&(i=-1);var o=n.reduce((function(n,i,o){return 1===se(e,r,[Ie,i],t)&&n.push(o),n}),[]);return 1===o.length?o[0]:(o.length||D.default(n.length,(function(e){return o.push(e)})),o.reduce((function(i,o){var a=i.bestScore,u=n[o];w.default(u,Z)&&(u=ge(e,u,t,r));var s=we(e,t,u,r);return s>a?{bestIndex:o,bestScore:s}:i}),{bestIndex:i,bestScore:0}).bestIndex)}function Te(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every((function(e){return R(e)}))}function _e(e,t){if(Array.isArray(t)){var r=Array.isArray(e)?e:[];return t.map((function(e,t){return r[t]?_e(r[t],e):e}))}if(R(t)){var n=Object.assign({},e);return Object.keys(t).reduce((function(r,n){return r[n]=_e(e?A.default(e,n):{},A.default(t,n)),r}),n)}return t}function De(e,t,r){return void 0===r&&(r=!1),Object.keys(t).reduce((function(n,i){var o=e?e[i]:{},a=t[i];if(e&&i in e&&R(a))n[i]=De(o,a,r);else if(r&&Array.isArray(o)&&Array.isArray(a)){var u=a;"preventDuplicates"===r&&(u=a.reduce((function(e,t){return o.includes(t)||e.push(t),e}),[])),n[i]=o.concat(u)}else n[i]=a;return n}),Object.assign({},e))}function We(e){return Array.isArray(e.enum)&&1===e.enum.length||B in e}function xe(e,t,r){void 0===r&&(r={});var n=ge(e,t,r,void 0),i=n.oneOf||n.anyOf;return!!Array.isArray(n.enum)||!!Array.isArray(i)&&i.every((function(e){return"boolean"!=typeof e&&We(e)}))}function Pe(e,t,r){return!(!t.uniqueItems||!t.items||"boolean"==typeof t.items)&&xe(e,t.items,r)}function Ne(e,t,r){if(void 0===t&&(t=Ee.Ignore),void 0===r&&(r=-1),r>=0){if(Array.isArray(e.items)&&r<e.items.length){var n=e.items[r];if("boolean"!=typeof n)return n}}else if(e.items&&!Array.isArray(e.items)&&"boolean"!=typeof e.items)return e.items;return t!==Ee.Ignore&&R(e.additionalItems)?e.additionalItems:{}}function Fe(e,t,r,n,i){void 0===i&&(i=[]),n?e[t]=r:R(r)?S.default(r)&&!i.includes(t)||(e[t]=r):void 0!==r&&(e[t]=r)}function Ue(e,t,r,n,i,o){void 0===n&&(n={}),void 0===o&&(o=!1);var a=R(i)?i:{},u=R(t)?t:{},s=r;if(R(s)&&R(u.default))s=De(s,u.default);else if($ in u)s=u.default;else{if(Z in u){var d=ae(u.$ref,n);return Ue(e,d,s,n,a,o)}if(V in u){var f=be(e,u,n,a);return Ue(e,f,s,n,a,o)}if(Te(u))s=u.items.map((function(t,i){return Ue(e,t,Array.isArray(r)?r[i]:void 0,n,a,o)}));else if(J in u){if(0===u.oneOf.length)return;u=u.oneOf[je(e,n,S.default(a)?void 0:a,u.oneOf,0)]}else if(K in u){if(0===u.anyOf.length)return;u=u.anyOf[je(e,n,S.default(a)?void 0:a,u.anyOf,0)]}}switch(void 0===s&&(s=u.default),fe(u)){case"object":var l=Object.keys(u.properties||{}).reduce((function(t,r){return Fe(t,r,Ue(e,A.default(u,[Q,r]),A.default(s,[r]),n,A.default(a,[r]),!0===o),o,u.required),t}),{});if(u.additionalProperties&&R(s)){var c=R(u.additionalProperties)?u.additionalProperties:{};Object.keys(s).filter((function(e){return!u.properties||!u.properties[e]})).forEach((function(t){var r=Ue(e,c,A.default(s,[t]),n,A.default(a,[t]),!0===o);Fe(l,t,r,o)}))}return l;case"array":if(Array.isArray(s)&&(s=s.map((function(t,r){var i=Ne(u,Ee.Fallback,r);return Ue(e,i,t,n)}))),Array.isArray(i)){var p=Ne(u);s=i.map((function(t,r){return Ue(e,p,A.default(s,[r]),n,t)}))}if(u.minItems){if(!Pe(e,u,n)){var m=Array.isArray(s)?s.length:0;if(u.minItems>m){var v=s||[],y=Ne(u,Ee.Invert),h=y.default,g=new Array(u.minItems-m).fill(Ue(e,y,h,n));return v.concat(g)}}return s||[]}}return s}function Re(e,t,r,n,i){if(void 0===i&&(i=!1),!R(t))throw new Error("Invalid schema: "+t);var o=Ue(e,ge(e,t,n,r),void 0,n,r,i);return null==r||"number"==typeof r&&isNaN(r)?o:R(r)||Array.isArray(r)?_e(o,r):r}function qe(e){return void 0===e&&(e={}),"widget"in ne(e)&&"hidden"!==ne(e).widget}function Ce(e,t,r,n){if(void 0===r&&(r={}),"files"===r["ui:widget"])return!0;if(t.items){var i=ge(e,t.items,n);return"string"===i.type&&"data-url"===i.format}return!1}function ke(e,t,r,n,i){void 0===r&&(r={});var o=ne(r,i).label,a=!(void 0!==o&&!o),u=fe(t);return"array"===u&&(a=Pe(e,t,n)||Ce(e,t,r,n)||qe(r)),"object"===u&&(a=!1),"boolean"!==u||r["ui:widget"]||(a=!1),r["ui:field"]&&(a=!1),a}function Le(e,t,r){if(!r)return t;var n=t.errors,i=t.errorSchema,o=e.toErrorList(r),a=r;return S.default(i)||(a=De(i,r,!0),o=[].concat(n).concat(o)),{errorSchema:a,errors:o}}!function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"}(Ee||(Ee={}));var Me=Symbol("no Value");function Ye(e,t,r,n,i){var o;if(void 0===i&&(i={}),w.default(r,Q)){var a={};if(w.default(n,Q)){var u=A.default(n,Q,{});Object.keys(u).forEach((function(e){w.default(i,e)&&(a[e]=void 0)}))}var s=Object.keys(A.default(r,Q,{})),d={};s.forEach((function(o){var u=A.default(i,o),s=A.default(n,[Q,o],{}),f=A.default(r,[Q,o],{});w.default(s,Z)&&(s=ge(e,s,t,u)),w.default(f,Z)&&(f=ge(e,f,t,u));var l=A.default(s,"type"),c=A.default(f,"type");if(!l||l===c)if(w.default(a,o)&&delete a[o],"object"===c||"array"===c&&Array.isArray(u)){var p=Ye(e,t,f,s,u);void 0===p&&"array"!==c||(d[o]=p)}else{var m=A.default(f,"default",Me),v=A.default(s,"default",Me);m!==Me&&m!==u&&(v===u?a[o]=m:!0===A.default(f,"readOnly")&&(a[o]=void 0));var y=A.default(f,"const",Me),h=A.default(s,"const",Me);y!==Me&&y!==u&&(a[o]=h===u?y:void 0)}})),o=q({},i,a,d)}else if("array"===A.default(n,"type")&&"array"===A.default(r,"type")&&Array.isArray(i)){var f=A.default(n,"items"),l=A.default(r,"items");if("object"!=typeof f||"object"!=typeof l||Array.isArray(f)||Array.isArray(l))"boolean"==typeof f&&"boolean"==typeof l&&f===l&&(o=i);else{w.default(f,Z)&&(f=ge(e,f,t,i)),w.default(l,Z)&&(l=ge(e,l,t,i));var c=A.default(f,"type"),p=A.default(l,"type");if(!c||c===p){var m=A.default(r,"maxItems",-1);o="object"===p?i.reduce((function(r,n){var i=Ye(e,t,l,f,n);return void 0!==i&&(m<0||r.length<m)&&r.push(i),r}),[]):m>0&&i.length>m?i.slice(0,m):i}}}return o}function Ke(e,t,r,n,i,o,a){if(void 0===o&&(o="root"),void 0===a&&(a="_"),Z in t||V in t||Y in t)return Ke(e,ge(e,t,n,i),r,n,i,o,a);if(z in t&&!A.default(t,[z,Z]))return Ke(e,A.default(t,z),r,n,i,o,a);var u={$id:r||o};if("object"===t.type&&Q in t)for(var s in t.properties){var d=A.default(t,[Q,s]),f=u.$id+a+s;u[s]=Ke(e,R(d)?d:{},f,n,A.default(i,[s]),o,a)}return u}function Be(e,t,r,n,i){var o;if(void 0===r&&(r=""),Z in t||V in t||Y in t){var a=ge(e,t,n,i);return Be(e,a,r,n,i)}var u=((o={}).$name=r.replace(/^\./,""),o);if(J in t){var s=je(e,n,i,t.oneOf,0);return Be(e,t.oneOf[s],r,n,i)}if(K in t){var d=je(e,n,i,t.anyOf,0);return Be(e,t.anyOf[d],r,n,i)}if(M in t&&!1!==t.additionalProperties&&W.default(u,ee,!0),z in t&&Array.isArray(i))i.forEach((function(i,o){u[o]=Be(e,t.items,r+"."+o,n,i)}));else if(Q in t)for(var f in t.properties){var l=A.default(t,[Q,f]);u[f]=Be(e,l,r+"."+f,n,A.default(i,[f]))}return u}var $e=function(){function e(e,t){this.rootSchema=void 0,this.validator=void 0,this.rootSchema=t,this.validator=e}var t=e.prototype;return t.getValidator=function(){return this.validator},t.doesSchemaUtilsDiffer=function(e,t){return!(!e||!t||this.validator===e&&ie(this.rootSchema,t))},t.getDefaultFormState=function(e,t,r){return void 0===r&&(r=!1),Re(this.validator,e,t,this.rootSchema,r)},t.getDisplayLabel=function(e,t,r){return ke(this.validator,e,t,this.rootSchema,r)},t.getClosestMatchingOption=function(e,t,r){return je(this.validator,this.rootSchema,e,t,r)},t.getFirstMatchingOption=function(e,t){return se(this.validator,e,t,this.rootSchema)},t.getMatchingOption=function(e,t){return ue(this.validator,e,t,this.rootSchema)},t.isFilesArray=function(e,t){return Ce(this.validator,e,t,this.rootSchema)},t.isMultiSelect=function(e){return Pe(this.validator,e,this.rootSchema)},t.isSelect=function(e){return xe(this.validator,e,this.rootSchema)},t.mergeValidationData=function(e,t){return Le(this.validator,e,t)},t.retrieveSchema=function(e,t){return ge(this.validator,e,this.rootSchema,t)},t.sanitizeDataForNewSchema=function(e,t,r){return Ye(this.validator,this.rootSchema,e,t,r)},t.toIdSchema=function(e,t,r,n,i){return void 0===n&&(n="root"),void 0===i&&(i="_"),Ke(this.validator,e,t,this.rootSchema,r,n,i)},t.toPathSchema=function(e,t,r){return Be(this.validator,e,t,this.rootSchema,r)},e}();function Ve(e,t){var r=e;if(Array.isArray(t)){var n=r.split(/(%\d)/);t.forEach((function(e,t){var r=n.findIndex((function(e){return e==="%"+(t+1)}));r>=0&&(n[r]=e)})),r=n.join("")}return r}function He(e,t,r){if(void 0===t&&(t=[]),Array.isArray(e))return e.map((function(e){return He(e,t)})).filter((function(e){return e}));var n=""===e||null===e?-1:Number(e),i=t[n];return i?i.value:r}function Ge(e,t){return Array.isArray(t)?t.some((function(t){return N.default(t,e)})):N.default(t,e)}var ze=function(){function e(e){this.errorSchema={},this.resetAllErrors(e)}var t,r,n=e.prototype;return n.getOrCreateErrorBlock=function(e){var t=Array.isArray(e)&&e.length>0||"string"==typeof e?A.default(this.errorSchema,e):this.errorSchema;return!t&&e&&W.default(this.errorSchema,e,t={}),t},n.resetAllErrors=function(e){return this.errorSchema=e?F.default(e):{},this},n.addErrors=function(e,t){var r,n=this.getOrCreateErrorBlock(t),i=A.default(n,G);return Array.isArray(i)||(n.__errors=i=[]),Array.isArray(e)?(r=i).push.apply(r,e):i.push(e),this},n.setErrors=function(e,t){var r=this.getOrCreateErrorBlock(t),n=Array.isArray(e)?[].concat(e):[e];return W.default(r,G,n),this},n.clearErrors=function(e){var t=this.getOrCreateErrorBlock(e);return W.default(t,G,[]),this},t=e,(r=[{key:"ErrorSchema",get:function(){return this.errorSchema}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key))?i:String(i),n)}var i}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Je(e){var t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||0===e.minimum)&&(t.min=e.minimum),(e.maximum||0===e.maximum)&&(t.max=e.maximum),t}var Qe,Xe={props:{disabled:!1},submitText:"Submit",norender:!1},Ze=["options"],et={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function tt(e,t,r){void 0===r&&(r={});var n=fe(e);if("function"==typeof t||t&&U.default.isForwardRef(h.createElement(t))||U.default.isMemo(t))return function(e){var t=A.default(e,"MergedWidget");if(!t){var r=e.defaultProps&&e.defaultProps.options||{};W.default(e,"MergedWidget",t=function(t){var n=t.options,i=k(t,Ze);return y.jsx(e,q({options:q({},r,n)},i))})}return t}(t);if("string"!=typeof t)throw new Error("Unsupported widget definition: "+typeof t);if(t in r)return tt(e,r[t],r);if("string"==typeof n){if(!(n in et))throw new Error("No widget for type '"+n+"'");if(t in et[n])return tt(e,r[et[n][t]],r)}throw new Error("No widget '"+t+"' for type '"+n+"'")}function rt(e,t){return(T.default(e)?e:e.$id)+"__"+t}function nt(e){return rt(e,"description")}function it(e){return rt(e,"error")}function ot(e){return rt(e,"examples")}function at(e){return rt(e,"help")}function ut(e){if(H in e&&Array.isArray(e.enum)&&1===e.enum.length)return e.enum[0];if(B in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function st(e,t){for(var r=String(e);r.length<t;)r="0"+r;return r}e.TranslatableString=void 0,(Qe=e.TranslatableString||(e.TranslatableString={})).ArrayItemTitle="Item",Qe.MissingItems="Missing items definition",Qe.YesLabel="Yes",Qe.NoLabel="No",Qe.CloseLabel="Close",Qe.ErrorsLabel="Errors",Qe.NewStringDefault="New Value",Qe.AddButton="Add",Qe.AddItemButton="Add Item",Qe.CopyButton="Copy",Qe.MoveDownButton="Move down",Qe.MoveUpButton="Move up",Qe.RemoveButton="Remove",Qe.NowLabel="Now",Qe.ClearLabel="Clear",Qe.AriaDateLabel="Select a date",Qe.PreviewLabel="Preview",Qe.DecrementAriaLabel="Decrease value by 1",Qe.IncrementAriaLabel="Increase value by 1",Qe.UnknownFieldType="Unknown field type %1",Qe.OptionPrefix="Option %1",Qe.TitleOptionPrefix="%1 option %2",Qe.KeyLabel="%1 Key",Qe.InvalidObjectField='Invalid "%1" object field configuration: <em>%2</em>.',Qe.UnsupportedField="Unsupported field schema.",Qe.UnsupportedFieldWithId="Unsupported field schema for field <code>%1</code>.",Qe.UnsupportedFieldWithReason="Unsupported field schema: <em>%1</em>.",Qe.UnsupportedFieldWithIdAndReason="Unsupported field schema for field <code>%1</code>: <em>%2</em>.",Qe.FilesInfo="<strong>%1</strong> (%2, %3 bytes)",e.ADDITIONAL_PROPERTIES_KEY=M,e.ADDITIONAL_PROPERTY_FLAG=L,e.ALL_OF_KEY=Y,e.ANY_OF_KEY=K,e.CONST_KEY=B,e.DEFAULT_KEY=$,e.DEFINITIONS_KEY="definitions",e.DEPENDENCIES_KEY=V,e.ENUM_KEY=H,e.ERRORS_KEY=G,e.ErrorSchemaBuilder=ze,e.ID_KEY="$id",e.ITEMS_KEY=z,e.NAME_KEY="$name",e.ONE_OF_KEY=J,e.PROPERTIES_KEY=Q,e.REF_KEY=Z,e.REQUIRED_KEY=X,e.RJSF_ADDITONAL_PROPERTIES_FLAG=ee,e.SUBMIT_BTN_OPTIONS_KEY="submitButtonOptions",e.UI_FIELD_KEY="ui:field",e.UI_GLOBAL_OPTIONS_KEY="ui:globalOptions",e.UI_OPTIONS_KEY=re,e.UI_WIDGET_KEY=te,e.allowAdditionalItems=function(e){return!0===e.additionalItems&&console.warn("additionalItems=true is currently not supported"),R(e.additionalItems)},e.ariaDescribedByIds=function(e,t){void 0===t&&(t=!1);var r=t?" "+ot(e):"";return it(e)+" "+nt(e)+" "+at(e)+r},e.asNumber=function(e){if(""!==e){if(null===e)return null;if(/\.$/.test(e))return e;if(/\.0$/.test(e))return e;if(/\.\d*0$/.test(e))return e;var t=Number(e);return"number"!=typeof t||Number.isNaN(t)?e:t}},e.canExpand=function(e,t,r){if(void 0===t&&(t={}),!e.additionalProperties)return!1;var n=ne(t).expandable,i=void 0===n||n;return!1===i?i:void 0===e.maxProperties||!r||Object.keys(r).length<e.maxProperties},e.createSchemaUtils=function(e,t){return new $e(e,t)},e.dataURItoBlob=function(e){var t,r=e.split(","),n=r[0].split(";"),i=n[0].replace("data:",""),o=n.filter((function(e){return"name"===e.split("=")[0]}));t=1!==o.length?"unknown":decodeURI(o[0].split("=")[1]);try{for(var a=atob(r[1]),u=[],s=0;s<a.length;s++)u.push(a.charCodeAt(s));return{blob:new window.Blob([new Uint8Array(u)],{type:i}),name:t}}catch(t){return{blob:{size:0,type:t.message},name:e}}},e.deepEquals=ie,e.descriptionId=nt,e.englishStringTranslator=function(e,t){return Ve(e,t)},e.enumOptionsDeselectValue=function(e,t,r){void 0===r&&(r=[]);var n=He(e,r);return Array.isArray(t)?t.filter((function(e){return!N.default(e,n)})):N.default(n,t)?void 0:t},e.enumOptionsIndexForValue=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r=!1);var n=t.map((function(t,r){return Ge(t.value,e)?String(r):void 0})).filter((function(e){return void 0!==e}));return r?n:n[0]},e.enumOptionsIsSelected=Ge,e.enumOptionsSelectValue=function(e,t,r){void 0===r&&(r=[]);var n=He(e,r);if(n){var i=r.findIndex((function(e){return n===e.value})),o=r.map((function(e){return e.value}));return t.slice(0,i).concat(n,t.slice(i)).sort((function(e,t){return Number(o.indexOf(e)>o.indexOf(t))}))}return t},e.enumOptionsValueForIndex=He,e.errorId=it,e.examplesId=ot,e.findSchemaDefinition=ae,e.getClosestMatchingOption=je,e.getDefaultFormState=Re,e.getDisplayLabel=ke,e.getFirstMatchingOption=se,e.getInputProps=function(e,t,r,n){void 0===r&&(r={}),void 0===n&&(n=!0);var i=q({type:t||"text"},Je(e));return r.inputType?i.type=r.inputType:t||("number"===e.type?(i.type="number",n&&void 0===i.step&&(i.step="any")):"integer"===e.type&&(i.type="number",void 0===i.step&&(i.step=1))),r.autocomplete&&(i.autoComplete=r.autocomplete),i},e.getMatchingOption=ue,e.getSchemaType=fe,e.getSubmitButtonOptions=function(e){void 0===e&&(e={});var t=ne(e);return t&&t.submitButtonOptions?q({},Xe,t.submitButtonOptions):Xe},e.getTemplate=function(e,t,r){void 0===r&&(r={});var n=t.templates;return"ButtonTemplates"===e?n[e]:r[e]||n[e]},e.getUiOptions=ne,e.getWidget=tt,e.guessType=de,e.hasWidget=function(e,t,r){void 0===r&&(r={});try{return tt(e,t,r),!0}catch(e){var n=e;if(n.message&&(n.message.startsWith("No widget")||n.message.startsWith("Unsupported widget")))return!1;throw e}},e.helpId=at,e.isConstant=We,e.isCustomWidget=qe,e.isFilesArray=Ce,e.isFixedItems=Te,e.isMultiSelect=Pe,e.isObject=R,e.isSelect=xe,e.labelValue=function(e,t,r){return t?r:e},e.localToUTC=function(e){return e?new Date(e).toJSON():void 0},e.mergeDefaultsWithFormData=_e,e.mergeObjects=De,e.mergeSchemas=le,e.mergeValidationData=Le,e.optionId=function(e,t){return e+"-"+t},e.optionsList=function(e){var t=e;if(e.enum)return e.enum.map((function(e,r){return{label:t.enumNames&&t.enumNames[r]||String(e),value:e}}));var r=e.oneOf||e.anyOf;return r&&r.map((function(e){var t=e,r=ut(t);return{schema:t,label:t.title||String(r),value:r}}))},e.orderProperties=function(e,t){if(!Array.isArray(t))return e;var r,n=function(e){return e.reduce((function(e,t){return e[t]=!0,e}),{})},i=n(e),o=t.filter((function(e){return"*"===e||i[e]})),a=n(o),u=e.filter((function(e){return!a[e]})),s=o.indexOf("*");if(-1===s){if(u.length)throw new Error("uiSchema order list does not contain "+((r=u).length>1?"properties '"+r.join("', '")+"'":"property '"+r[0]+"'"));return o}if(s!==o.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");var d=[].concat(o);return d.splice.apply(d,[s,1].concat(u)),d},e.pad=st,e.parseDateString=function(e,t){if(void 0===t&&(t=!0),!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};var r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}},e.rangeSpec=Je,e.replaceStringParameters=Ve,e.retrieveSchema=ge,e.sanitizeDataForNewSchema=Ye,e.schemaRequiresTrueValue=function e(t){return!!t.const||!(!t.enum||1!==t.enum.length||!0!==t.enum[0])||(t.anyOf&&1===t.anyOf.length?e(t.anyOf[0]):t.oneOf&&1===t.oneOf.length?e(t.oneOf[0]):!!t.allOf&&t.allOf.some((function(t){return e(t)})))},e.shouldRender=function(e,t,r){var n=e.state;return!ie(e.props,t)||!ie(n,r)},e.titleId=function(e){return rt(e,"title")},e.toConstant=ut,e.toDateString=function(e,t){void 0===t&&(t=!0);var r=e.hour,n=e.minute,i=e.second,o=Date.UTC(e.year,e.month-1,e.day,void 0===r?0:r,void 0===n?0:n,void 0===i?0:i),a=new Date(o).toJSON();return t?a:a.slice(0,10)},e.toIdSchema=Ke,e.toPathSchema=Be,e.utcToLocal=function(e){if(!e)return"";var t=new Date(e);return st(t.getFullYear(),4)+"-"+st(t.getMonth()+1,2)+"-"+st(t.getDate(),2)+"T"+st(t.getHours(),2)+":"+st(t.getMinutes(),2)+":"+st(t.getSeconds(),2)+"."+st(t.getMilliseconds(),3)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=utils.umd.production.min.js.map |
{ | ||
"name": "@rjsf/utils", | ||
"version": "5.3.1", | ||
"version": "5.4.0", | ||
"main": "dist/index.js", | ||
@@ -58,3 +58,3 @@ "module": "dist/utils.esm.js", | ||
"react-test-renderer": "^17.0.2", | ||
"rimraf": "^4.4.0" | ||
"rimraf": "^4.4.1" | ||
}, | ||
@@ -79,3 +79,3 @@ "publishConfig": { | ||
"license": "Apache-2.0", | ||
"gitHead": "6ecef3909bc93616b444176dcb734b761a1d5424" | ||
"gitHead": "61ac1121cd37442ec1ff339c33944c69b655d533" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1644243
10344