Skip to content

Add onBlur event#444

Closed
megantfanning wants to merge 23 commits intorjsf-team:masterfrom
eeinowski:onBlurEvent
Closed

Add onBlur event#444
megantfanning wants to merge 23 commits intorjsf-team:masterfrom
eeinowski:onBlurEvent

Conversation

@megantfanning
Copy link
Copy Markdown

@megantfanning megantfanning commented Jan 18, 2017

Reasons for making this change

Fixes issue #364. Adds onBlur functionality to react json schema form allowing user to trigger validation or saving on field focus changes.

Note: There is an additional pull request #431, which provides similar functionality but additionally returns the id of the field which triggered the onBlur event. We have figured we would defer to the maintainers preferences on how to implement the onBlur event and submit in addition.

Checklist

  • I'm updating documentation
    • I've checked the rendering of the Markdown text I've added
    • If I'm adding a new section, I've updated the Table of Content
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

Copy link
Copy Markdown
Collaborator

@n1k0 n1k0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This is an early review with some questions to be answered, and a few issues to address.

I'll do another pass with a lighter diff ;)

});var i=Object.assign||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},u=r(2),s=n(u),l=r(4);a.defaultProps={uiSchema:{},registry:(0,l.getDefaultRegistry)(),disabled:!1,readonly:!1,autofocus:!1},t.default=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.id,r=e.description;return r?"string"==typeof r?i.default.createElement("p",{id:t,className:"field-description"},r):i.default.createElement("div",{id:t,className:"field-description"},r):i.default.createElement("div",null)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=n(a);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.registry.fields.StringField;return u.default.createElement(t,a({},e,{onChange:function(t){return e.onChange((0,s.asNumber)(t))}}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||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},i=r(2),u=n(i),s=r(4);o.defaultProps={uiSchema:{}},t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var r=Object.keys(e),n=Object.keys(t);return r.length<n.length||!(0,d.deepEquals)(r.sort(),n.sort())}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r(2),f=n(c),d=r(4),p=function(e){function t(e){a(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.onPropertyChange=function(e){return function(t,n){r.asyncSetState(o({},e,t),n)}},r.state=r.getStateFromProps(e),r}return u(t,e),l(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.getStateFromProps(e),r=e.formData;r&&s(r,this.state)?(this.state=t,this.forceUpdate()):this.setState(t)}},{key:"getStateFromProps",value:function(e){var t=e.schema,r=e.formData,n=e.registry;return(0,d.getDefaultFormState)(t,r,n.definitions)||{}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,d.shouldRender)(this,e,t)}},{key:"isRequired",value:function(e){var t=this.props.schema;return Array.isArray(t.required)&&t.required.indexOf(e)!==-1}},{key:"asyncSetState",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{validate:!1};(0,d.setState)(this,e,function(){t.props.onChange(t.state,r)})}},{key:"render",value:function(){var e=this,t=this.props,r=t.uiSchema,n=t.errorSchema,o=t.idSchema,a=t.name,i=t.required,u=t.disabled,s=t.readonly,l=this.props.registry,c=l.definitions,p=l.fields,m=l.formContext,h=p.SchemaField,y=p.TitleField,v=p.DescriptionField,g=(0,d.retrieveSchema)(this.props.schema,c),b=void 0===g.title?a:g.title,S=void 0;try{var w=Object.keys(g.properties);S=(0,d.orderProperties)(w,r["ui:order"])}catch(e){return f.default.createElement("div",null,f.default.createElement("p",{className:"config-error",style:{color:"red"}},"Invalid ",a||"root"," object field configuration:",f.default.createElement("em",null,e.message),"."),f.default.createElement("pre",null,JSON.stringify(g)))}return f.default.createElement("fieldset",null,b?f.default.createElement(y,{id:o.$id+"__title",title:b,required:i,formContext:m}):null,g.description?f.default.createElement(v,{id:o.$id+"__description",description:g.description,formContext:m}):null,S.map(function(t,a){return f.default.createElement(h,{key:a,name:t,required:e.isRequired(t),schema:g.properties[t],uiSchema:r[t],errorSchema:n[t],idSchema:o[t],formData:e.state[t],onChange:e.onPropertyChange(t),onBlur:e.props.onBlur,registry:e.props.registry,disabled:u,readonly:s})}))}}]),t}(c.Component);p.defaultProps={uiSchema:{},errorSchema:{},idSchema:{},registry:(0,d.getDefaultRegistry)(),required:!1,disabled:!1,readonly:!1},t.default=p},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t,r){var n=t["ui:field"];if("function"==typeof n)return n;if("string"==typeof n&&n in r)return r[n];var o=g[e.type];return o in r?r[o]:y.default}function i(e){var t=e.label,r=e.required,n=e.id;return t?p.default.createElement("label",{className:"control-label",htmlFor:n},r?t+v:t):p.default.createElement("div",null)}function u(e){var t=e.help;return t?"string"==typeof t?p.default.createElement("p",{className:"help-block"},t):p.default.createElement("div",{className:"help-block"},t):p.default.createElement("div",null)}function s(e){var t=e.errors,r=void 0===t?[]:t;return 0===r.length?p.default.createElement("div",null):p.default.createElement("div",null,p.default.createElement("p",null),p.default.createElement("ul",{className:"error-detail bs-callout bs-callout-info"},r.map(function(e,t){return p.default.createElement("li",{className:"text-danger",key:t},e)})))}function l(e){var t=e.id,r=e.classNames,n=e.label,o=e.children,a=e.errors,u=e.help,s=e.description,l=e.hidden,c=e.required,f=e.displayLabel;return l?o:p.default.createElement("div",{className:r},f?p.default.createElement(i,{label:n,required:c,id:t}):null,f&&s?s:null,o,a,u)}function c(e){var t=e.uiSchema,r=e.errorSchema,n=e.idSchema,i=e.name,c=e.required,d=e.registry,h=d.definitions,y=d.fields,v=d.formContext,g=d.FieldTemplate,b=void 0===g?l:g,S=(0,m.retrieveSchema)(e.schema,h),w=a(S,t,y),O=y.DescriptionField,_=Boolean(e.disabled||t["ui:disabled"]),E=Boolean(e.readonly||t["ui:readonly"]),j=Boolean(e.autofocus||t["ui:autofocus"]);if(0===Object.keys(S).length)return p.default.createElement("div",null);var x=!0;"array"===S.type&&(x=(0,m.isMultiSelect)(S)||(0,m.isFilesArray)(S,t)),"object"===S.type&&(x=!1),"boolean"!==S.type||t["ui:widget"]||(x=!1),t["ui:field"]&&(x=!1);var P=r.__errors,A=o(r,["__errors"]),C=p.default.createElement(w,f({},e,{schema:S,disabled:_,readonly:E,autofocus:j,errorSchema:A,formContext:v})),k=S.type,F=n.$id,T=e.schema.title||S.title||i,M=e.schema.description||S.description,I=P,N=t["ui:help"],R="hidden"===t["ui:widget"],D=["form-group","field","field-"+k,I&&I.length>0?"field-error has-error":"",t.classNames].join(" ").trim(),q={description:p.default.createElement(O,{id:F+"__description",description:M,formContext:v}),rawDescription:M,help:p.default.createElement(u,{help:N}),rawHelp:"string"==typeof N?N:void 0,errors:p.default.createElement(s,{errors:I}),rawErrors:I,id:F,label:T,hidden:R,required:c,readonly:E,displayLabel:x,classNames:D,formContext:v,fields:y,schema:S,uiSchema:t};return p.default.createElement(b,q,C)}Object.defineProperty(t,"__esModule",{value:!0});var f=Object.assign||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},d=r(2),p=n(d),m=r(4),h=r(16),y=n(h),v="*",g={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField"};l.defaultProps={hidden:!1,readonly:!1,required:!1,displayLabel:!0},c.defaultProps={uiSchema:{},errorSchema:{},idSchema:{},registry:(0,m.getDefaultRegistry)(),disabled:!1,readonly:!1,autofocus:!1},t.default=c},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.schema;return i.default.createElement("div",{className:"unsupported-field"},"Unsupported field schema ",JSON.stringify(t,null,2),".")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=r(2),i=n(a)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){var t=e.schema,r=e.name,n=e.uiSchema,a=e.idSchema,u=e.formData,c=e.required,f=e.disabled,d=e.readonly,p=e.autofocus,m=e.registry,h=e.onChange,y=e.onBlur,v=t.title,g=t.format,b=m.widgets,S=m.formContext,w=Array.isArray(t.enum)&&(0,l.optionsList)(t),O=g||(w?"select":"text"),_=(0,l.getUiOptions)(n),E=_.widget,j=void 0===E?O:E,x=_.placeholder,P=void 0===x?"":x,A=o(_,["widget","placeholder"]),C=(0,l.getWidget)(t,j,b);return s.default.createElement(C,{options:i({},A,{enumOptions:w}),schema:t,id:a&&a.$id,label:void 0===v?r:v,value:(0,l.defaultFieldValue)(u,t),onChange:h,onBlur:y,required:c,disabled:f,readonly:d,formContext:S,autofocus:p,registry:m,placeholder:P})}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||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},u=r(2),s=n(u),l=r(4);a.defaultProps={uiSchema:{},registry:(0,l.getDefaultRegistry)(),disabled:!1,readonly:!1,autofocus:!1},t.default=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.id,r=e.title,n=e.required,o=n?r+u:r;return i.default.createElement("legend",{id:t},o)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=n(a),u="*";t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(20),a=n(o),i=r(21),u=n(i),s=r(22),l=n(s),c=r(23),f=n(c),d=r(24),p=n(d),m=r(26),h=n(m),y=r(27),v=n(y),g=r(28),b=n(g),S=r(29),w=n(S),O=r(30),_=n(O),E=r(31),j=n(E),x=r(32),P=n(x),A=r(33),C=n(A),k=r(34),F=n(k),T=r(35),M=n(T),I=r(36),N=n(I),R=r(37),D=n(R),q=r(38),W=n(q);t.default={PasswordWidget:j.default,RadioWidget:P.default,UpDownWidget:W.default,RangeWidget:C.default,SelectWidget:F.default,TextWidget:N.default,DateWidget:h.default,DateTimeWidget:v.default,AltDateWidget:a.default,AltDateTimeWidget:u.default,EmailWidget:b.default,URLWidget:D.default,TextareaWidget:M.default,HiddenWidget:_.default,ColorWidget:p.default,FileWidget:w.default,CheckboxWidget:l.default,CheckboxesWidget:f.default}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t,r){for(var n=[{value:-1,label:e}],o=t;o<=r;o++)n.push({value:o,label:(0,h.pad)(o,2)});return n}function l(e){return Object.keys(e).every(function(t){return e[t]!==-1})}function c(e){var t=e.type,r=e.range,n=e.value,o=e.select,a=e.rootId,i=e.disabled,u=e.readonly,l=e.autofocus,c=e.registry,f=a+"_"+t,d=c.widgets.SelectWidget;return m.default.createElement(d,{schema:{type:"integer"},id:f,className:"form-control",options:{enumOptions:s(t,r[0],r[1])},value:n,disabled:i,readonly:u,autofocus:l,onChange:function(e){return o(t,e)}})}Object.defineProperty(t,"__esModule",{value:!0});var f=Object.assign||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},d=function(){function e(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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),p=r(2),m=n(p),h=r(4),y=function(e){function t(e){a(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.onChange=function(e,t){r.setState(o({},e,t),function(){l(r.state)&&r.props.onChange((0,h.toDateString)(r.state,r.props.time))})},r.onBlur=function(){r.props.onBlur&&r.props.onBlur((0,h.toDateString)(r.state,r.props.time))},r.setNow=function(e){e.preventDefault();var t=r.props,n=t.time,o=t.disabled,a=t.readonly,i=t.onChange;if(!o&&!a){var u=(0,h.parseDateString)((new Date).toJSON(),n);r.setState(u,function(){return i((0,h.toDateString)(r.state,n))})}},r.clear=function(e){e.preventDefault();var t=r.props,n=t.time,o=t.disabled,a=t.readonly,i=t.onChange;o||a||r.setState((0,h.parseDateString)("",n),function(){return i(void 0)})},r.state=(0,h.parseDateString)(e.value,e.time),r}return u(t,e),d(t,[{key:"componentWillReceiveProps",value:function(e){this.setState((0,h.parseDateString)(e.value,e.time))}},{key:"shouldComponentUpdate",value:function(e,t){return(0,h.shouldRender)(this,e,t)}},{key:"render",value:function(){var e=this,t=this.props,r=t.id,n=t.disabled,o=t.readonly,a=t.autofocus,i=t.registry;return m.default.createElement("ul",{className:"list-inline"},this.dateElementProps.map(function(t,u){return m.default.createElement("li",{key:u},m.default.createElement(c,f({rootId:r,select:e.onChange},t,{disabled:n,readonly:o,registry:i,autofocus:a&&0===u})))}),m.default.createElement("li",null,m.default.createElement("a",{href:"#",className:"btn btn-info btn-now",onClick:this.setNow},"Now")),m.default.createElement("li",null,m.default.createElement("a",{href:"#",className:"btn btn-warning btn-clear",onClick:this.clear},"Clear")))}},{key:"dateElementProps",get:function(){var e=this.props.time,t=this.state,r=t.year,n=t.month,o=t.day,a=t.hour,i=t.minute,u=t.second,s=[{type:"year",range:[1900,2020],value:r},{type:"month",range:[1,12],value:n},{type:"day",range:[1,31],value:o}];return e&&s.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:i},{type:"second",range:[0,59],value:u}),s}}]),t}(p.Component);y.defaultProps={time:!1,disabled:!1,readonly:!1,autofocus:!1},t.default=y},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.registry.widgets.AltDateWidget;return u.default.createElement(t,a({time:!0},e))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||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},i=r(2),u=n(i);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(e.schema,e.id),r=e.value,n=e.required,o=e.disabled,a=e.label,u=e.autofocus,s=e.onChange,l=e.onBlur;return i.default.createElement("div",{className:"checkbox "+(o?"disabled":"")},i.default.createElement("label",null,i.default.createElement("input",{type:"checkbox",id:t,checked:"undefined"!=typeof r&&r,required:n,disabled:o,autoFocus:u,onChange:function(e){return s(e.target.checked)},onBlur:function(e){return l(e.target.checked)}}),i.default.createElement("span",null,a)))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=n(a);o.defaultProps={autofocus:!1},t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){var n=r.indexOf(e),o=t.slice(0,n).concat(e,t.slice(n));return o.sort(function(e,t){return r.indexOf(e)>r.indexOf(t)})}function a(e,t){return t.filter(function(t){return t!==e})}function i(e){var t=this,r=e.id,n=e.disabled,i=e.options,u=e.value,l=e.autofocus,c=e.onChange,f=e.onBlur,d=i.enumOptions,p=i.inline;return s.default.createElement("div",{className:"checkboxes",id:r},d.map(function(e,i){var m=u.indexOf(e.value)!==-1,h=n?"disabled":"",y=s.default.createElement("span",null,s.default.createElement("input",{type:"checkbox",id:r+"_"+i,checked:m,disabled:n,autoFocus:l&&0===i,onChange:function(t){var r=d.map(function(e){var t=e.value;return t});c(t.target.checked?o(e.value,u,r):a(e.value,u))},onBlur:function(e){f&&t.props.onBlur(e)}}),s.default.createElement("span",null,e.label));return p?s.default.createElement("label",{key:i,className:"checkbox-inline "+h},y):s.default.createElement("div",{key:i,className:"checkbox "+h},s.default.createElement("label",null,y))}))}Object.defineProperty(t,"__esModule",{value:!0});var u=r(2),s=n(u);i.defaultProps={autofocus:!1,options:{inline:!1}},t.default=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return u.default.createElement(l.default,a({type:"color"},e))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||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},i=r(2),u=n(i),s=r(25),l=n(s);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){var t=e.value,r=e.readonly,n=e.autofocus,a=e.onChange,u=e.onBlur,l=(e.options,e.schema,e.formContext,e.registry,o(e,["value","readonly","autofocus","onChange","onBlur","options","schema","formContext","registry"]));return s.default.createElement("input",i({},l,{className:"form-control",readOnly:r,autoFocus:n,value:"undefined"==typeof t?"":t,onChange:function(e){return a(e.target.value)},onBlur:function(e){if(u)return u(e.target.id)}}))}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||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},u=r(2),s=n(u);a.defaultProps={type:"text",required:!1,disabled:!1,readonly:!1,autofocus:!1},t.default=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.onChange,r=e.onBlur;return u.default.createElement(l.default,a({type:"date"},e,{onChange:function(e){return t(e||void 0)},onBlur:function(e){return r(e||void 0)}}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||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},i=r(2),u=n(i),s=r(25),l=n(s);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return e?e.slice(0,19):""}function a(e){if(e)return new Date(e).toJSON()}function i(e){var t=e.value,r=e.onChange,n=e.onBlur;return l.default.createElement(f.default,u({type:"datetime-local"},e,{value:o(t),onChange:function(e){return r(a(e))},onBlur:function(e){return n(a(e))}}))}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||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},s=r(2),l=n(s),c=r(25),f=n(c);t.default=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return u.default.createElement(l.default,a({type:"email"},e))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||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},i=r(2),u=n(i),s=r(25),l=n(s);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t){return e.replace(";base64",";name="+t+";base64")}function s(e){var t=e.name,r=e.size,n=e.type;return new Promise(function(o,a){var i=new window.FileReader;i.onload=function(e){o({dataURL:u(e.target.result,t),name:t,size:r,type:n})},i.readAsDataURL(e)})}function l(e){return Promise.all([].map.call(e,s))}function c(e){var t=e.filesInfo;return 0===t.length?null:m.default.createElement("ul",{className:"file-info"},t.map(function(e,t){var r=e.name,n=e.size,o=e.type;return m.default.createElement("li",{key:t},m.default.createElement("strong",null,r)," (",o,", ",n," bytes)")}))}function f(e){return e.filter(function(e){return"undefined"!=typeof e}).map(function(e){var t=(0,h.dataURItoBlob)(e),r=t.blob,n=t.name;return{name:n,size:r.size,type:r.type}})}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),p=r(2),m=n(p),h=r(4),y=function(e){function t(e){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));r.defaultProps={multiple:!1},r.onChange=function(e){var t=r.props,n=t.multiple,o=t.onChange;l(e.target.files).then(function(e){var t={values:e.map(function(e){return e.dataURL}),filesInfo:e};(0,h.setState)(r,t,function(){o(n?t.values:t.values[0])})})},r.onBlur=function(e){r.props.onBlur&&r.props.onBlur(e)};var n=e.value,i=Array.isArray(n)?n:[n];return r.state={values:i,filesInfo:f(i)},r}return i(t,e),d(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,h.shouldRender)(this,e,t)}},{key:"render",value:function(){var e=this,t=this.props,r=t.multiple,n=t.id,o=t.readonly,a=t.disabled,i=t.autofocus,u=this.state.filesInfo;return m.default.createElement("div",null,m.default.createElement("p",null,m.default.createElement("input",{ref:function(t){return e.inputRef=t},id:n,type:"file",disabled:o||a,onChange:this.onChange,onBlur:this.onBlur,defaultValue:"",autoFocus:i,multiple:r})),m.default.createElement(c,{filesInfo:u}))}}]),t}(p.Component);y.defaultProps={autofocus:!1},t.default=y},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.id,r=e.value;return i.default.createElement("input",{type:"hidden",id:t,value:"undefined"==typeof r?"":r})}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=n(a);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return u.default.createElement(l.default,a({type:"password"},e))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||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},i=r(2),u=n(i),s=r(25),l=n(s);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(e.schema,e.options),r=e.value,n=(e.required,e.disabled),o=e.autofocus,a=e.onChange,u=e.onBlur,s=Math.random().toString(),l=t.enumOptions,c=t.inline;return i.default.createElement("div",{className:"field-radio-group"},l.map(function(e,t){var l=e.value===r,f=n?"disabled":"",d=i.default.createElement("span",null,i.default.createElement("input",{type:"radio",checked:l,name:s,value:e.value,disabled:n,autoFocus:o&&0===t,onChange:function(t){return a(e.value)},onBlur:function(t){return u(e.value)}}),i.default.createElement("span",null,e.label));return c?i.default.createElement("label",{key:t,className:"radio-inline "+f},d):i.default.createElement("div",{key:t,className:"radio "+f},i.default.createElement("label",null,d))}))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=n(a);o.defaultProps={autofocus:!1},t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.schema,r=e.value;return u.default.createElement("div",{className:"field-range-wrapper"},u.default.createElement(c.default,a({type:"range"},e,(0,s.rangeSpec)(t))),u.default.createElement("span",{className:"range-view"},r))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||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},i=r(2),u=n(i),s=r(4),l=r(25),c=n(l);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var r=e.type,n=e.items;return"array"===r&&n&&["number","integer"].includes(n.type)?t.map(s.asNumber):"boolean"===r?"true"===t:"number"===r?(0,s.asNumber)(t):t}function a(e){var t=e.schema,r=e.id,n=e.options,a=e.value,i=e.required,s=e.disabled,l=e.readonly,c=e.multiple,f=e.autofocus,d=e.onChange,p=e.onBlur,m=n.enumOptions;return u.default.createElement("select",{id:r,multiple:c,className:"form-control",value:a,required:i,disabled:s,readOnly:l,autoFocus:f,onChange:function(e){var r=void 0;r=c?[].filter.call(e.target.options,function(e){return e.selected}).map(function(e){return e.value}):e.target.value,d(o(t,r))},onBlur:function(e){return p(e)}},m.map(function(e,t){var r=e.value,n=e.label;return u.default.createElement("option",{key:t,value:r},n)}))}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),u=n(i),s=r(4);a.defaultProps={autofocus:!1},t.default=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,o=e.required,a=e.disabled,u=e.readonly,s=e.autofocus,l=e.onChange,c=e.onBlur;return i.default.createElement("textarea",{id:t,className:"form-control",value:"undefined"==typeof n?"":n,placeholder:r,required:o,disabled:a,readOnly:u,autoFocus:s,onChange:function(e){return l(e.target.value)},onBlur:function(e){c&&c(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=n(a);o.defaultProps={autofocus:!1},t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return i.default.createElement(s.default,e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=n(a),u=r(25),s=n(u);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return u.default.createElement(l.default,a({type:"url"},e))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||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},i=r(2),u=n(i),s=r(25),l=n(s);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return u.default.createElement(c.default,a({type:"number"},e,(0,s.rangeSpec)(e.schema)))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||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},i=r(2),u=n(i),s=r(4),l=r(25),c=n(l);t.default=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){return e.length?e.reduce(function(e,t){var r=t.property,n=t.message,o=(0,d.default)(r),a=e,i=!0,u=!1,s=void 0;try{for(var l,c=o.slice(1)[Symbol.iterator]();!(i=(l=c.next()).done);i=!0){var f=l.value;f in a||(a[f]={}),a=a[f]}}catch(e){u=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(u)throw s}}return Array.isArray(a.__errors)?a.__errors=a.__errors.concat(n):a.__errors=[n],e},{}):{}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"root",r=[];return"__errors"in e&&(r=r.concat(e.__errors.map(function(e){return{stack:t+": "+e}}))),Object.keys(e).reduce(function(t,r){return"__errors"!==r&&(t=t.concat(i(e[r],r))),t},r)}function u(e){var t={__errors:[],addError:function(e){this.__errors.push(e)}};return(0,m.isObject)(e)?Object.keys(e).reduce(function(t,r){return c({},t,o({},r,u(e[r])))},t):t}function s(e){return Object.keys(e).reduce(function(t,r){return"addError"===r?t:"__errors"===r?c({},t,o({},r,e[r])):c({},t,o({},r,s(e[r])))},{})}function l(e,t,r){var n=(0,p.validate)(e,t),o=n.errors,l=a(o);if("function"!=typeof r)return{errors:o,errorSchema:l};var c=r(e,u(e)),f=s(c),d=(0,m.mergeObjects)(l,f,!0),h=i(d);return{errors:h,errorSchema:d}}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||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};t.toErrorList=i,t.default=l;var f=r(40),d=n(f),p=r(41),m=r(4)},function(e,t){(function(t){"use strict";function r(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function n(e,t){return null==e?void 0:e[t]}function o(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function a(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function i(){this.__data__=me?me(null):{}}function u(e){return this.has(e)&&delete this.__data__[e]}function s(e){var t=this.__data__;if(me){var r=t[e];return r===L?void 0:r}return se.call(t,e)?t[e]:void 0}function l(e){var t=this.__data__;return me?void 0!==t[e]:se.call(t,e)}function c(e,t){var r=this.__data__;return r[e]=me&&void 0===t?L:t,this}function f(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function d(){this.__data__=[]}function p(e){var t=this.__data__,r=_(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():de.call(t,r,1),!0}function m(e){var t=this.__data__,r=_(t,e);return r<0?void 0:t[r][1]}function h(e){return _(this.__data__,e)>-1}function y(e,t){var r=this.__data__,n=_(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}function v(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function g(){this.__data__={hash:new a,map:new(pe||f),string:new a}}function b(e){return P(this,e).delete(e)}function S(e){return P(this,e).get(e)}function w(e){return P(this,e).has(e)}function O(e,t){return P(this,e).set(e,t),this}function _(e,t){for(var r=e.length;r--;)if(I(e[r][0],t))return r;return-1}function E(e){if(!R(e)||k(e))return!1;var t=N(e)||o(e)?ce:Y;return t.test(T(e))}function j(e){if("string"==typeof e)return e;if(q(e))return ye?ye.call(e):"";var t=e+"";return"0"==t&&1/e==-z?"-0":t}function x(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function P(e,t){var r=e.__data__;return C(t)?r["string"==typeof t?"string":"hash"]:r.map}function A(e,t){var r=n(e,t);return E(r)?r:void 0}function C(e){var t="undefined"==typeof e?"undefined":U(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function k(e){return!!ie&&ie in e}function F(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-z?"-0":t}function T(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function M(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(B);var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i),i};return r.cache=new(M.Cache||v),
r}function I(e,t){return e===t||e!==e&&t!==t}function N(e){var t=R(e)?le.call(e):"";return t==Z||t==V}function R(e){var t="undefined"==typeof e?"undefined":U(e);return!!e&&("object"==t||"function"==t)}function D(e){return!!e&&"object"==("undefined"==typeof e?"undefined":U(e))}function q(e){return"symbol"==("undefined"==typeof e?"undefined":U(e))||D(e)&&le.call(e)==J}function W(e){return null==e?"":j(e)}function $(e){return ge(e)?r(e,F):q(e)?[e]:x(ve(e))}var U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B="Expected a function",L="__lodash_hash_undefined__",z=1/0,Z="[object Function]",V="[object GeneratorFunction]",J="[object Symbol]",H=/^\./,G=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K=/[\\^$.*+?()[\]{}|]/g,X=/\\(\\)?/g,Y=/^\[object .+?Constructor\]$/,Q="object"==("undefined"==typeof t?"undefined":U(t))&&t&&t.Object===Object&&t,ee="object"==("undefined"==typeof self?"undefined":U(self))&&self&&self.Object===Object&&self,te=Q||ee||Function("return this")(),re=Array.prototype,ne=Function.prototype,oe=Object.prototype,ae=te["__core-js_shared__"],ie=function(){var e=/[^.]+$/.exec(ae&&ae.keys&&ae.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ue=ne.toString,se=oe.hasOwnProperty,le=oe.toString,ce=RegExp("^"+ue.call(se).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fe=te.Symbol,de=re.splice,pe=A(te,"Map"),me=A(Object,"create"),he=fe?fe.prototype:void 0,ye=he?he.toString:void 0;a.prototype.clear=i,a.prototype.delete=u,a.prototype.get=s,a.prototype.has=l,a.prototype.set=c,f.prototype.clear=d,f.prototype.delete=p,f.prototype.get=m,f.prototype.has=h,f.prototype.set=y,v.prototype.clear=g,v.prototype.delete=b,v.prototype.get=S,v.prototype.has=w,v.prototype.set=O;var ve=M(function(e){e=W(e);var t=[];return H.test(e)&&t.push(""),e.replace(G,function(e,r,n,o){t.push(n?o.replace(X,"$1"):r||e)}),t});M.Cache=v;var ge=Array.isArray;e.exports=$}).call(t,function(){return this}())},function(e,t,r){"use strict";var n=e.exports.Validator=r(42);e.exports.ValidatorResult=r(51).ValidatorResult,e.exports.ValidationError=r(51).ValidationError,e.exports.SchemaError=r(51).SchemaError,e.exports.validate=function(e,t,r){var o=new n;return o.validate(e,t,r)}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=r(43),a=r(50),i=r(51),u=i.ValidatorResult,s=i.SchemaError,l=i.SchemaContext,c=function e(){this.customFormats=Object.create(e.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(f),this.attributes=Object.create(a.validators)};c.prototype.customFormats={},c.prototype.schemas=null,c.prototype.types=null,c.prototype.attributes=null,c.prototype.unresolvedRefs=null,c.prototype.addSchema=function(e,t){if(!e)return null;var r=t||e.id;return this.addSubSchema(r,e),r&&(this.schemas[r]=e),this.schemas[r]},c.prototype.addSubSchema=function(e,t){if(t&&"object"==("undefined"==typeof t?"undefined":n(t))){if(t.$ref){var r=o.resolve(e,t.$ref);return void(void 0===this.schemas[r]&&(this.schemas[r]=null,this.unresolvedRefs.push(r)))}var a=t.id&&o.resolve(e,t.id),u=a||e;if(a){if(this.schemas[a]){if(!i.deepCompareStrict(this.schemas[a],t))throw new Error("Schema <"+t+"> already exists with different definition");return this.schemas[a]}this.schemas[a]=t;var s=a.replace(/^([^#]*)#$/,"$1");this.schemas[s]=t}return this.addSubSchemaArray(u,t.items instanceof Array?t.items:[t.items]),this.addSubSchemaArray(u,t.extends instanceof Array?t.extends:[t.extends]),this.addSubSchema(u,t.additionalItems),this.addSubSchemaObject(u,t.properties),this.addSubSchema(u,t.additionalProperties),this.addSubSchemaObject(u,t.definitions),this.addSubSchemaObject(u,t.patternProperties),this.addSubSchemaObject(u,t.dependencies),this.addSubSchemaArray(u,t.disallow),this.addSubSchemaArray(u,t.allOf),this.addSubSchemaArray(u,t.anyOf),this.addSubSchemaArray(u,t.oneOf),this.addSubSchema(u,t.not),this.schemas[a]}},c.prototype.addSubSchemaArray=function(e,t){if(t instanceof Array)for(var r=0;r<t.length;r++)this.addSubSchema(e,t[r])},c.prototype.addSubSchemaObject=function(e,t){if(t&&"object"==("undefined"==typeof t?"undefined":n(t)))for(var r in t)this.addSubSchema(e,t[r])},c.prototype.setSchemas=function(e){this.schemas=e},c.prototype.getSchema=function(e){return this.schemas[e]},c.prototype.validate=function(e,t,r,n){r||(r={});var a=r.propertyName||"instance",i=o.resolve(r.base||"/",t.id||"");if(n||(n=new l(t,r,a,i,Object.create(this.schemas)),n.schemas[i]||(n.schemas[i]=t)),t){var u=this.validateSchema(e,t,r,n);if(!u)throw new Error("Result undefined");return u}throw new s("no schema specified",t)},c.prototype.validateSchema=function(e,t,r,n){function o(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t&&t}function c(e,t){var r;return(r=o(e))?f.resolve(e,r,t).subschema:e}var f=this,d=new u(e,t,r,n);if(!t)throw new Error("schema is undefined");t.extends&&(t.extends instanceof Array?t.extends.forEach(function(e){t=i.deepMerge(t,c(e,n))}):t=i.deepMerge(t,c(t.extends,n)));var p;if(p=o(t)){var m=this.resolve(t,p,n),h=new l(m.subschema,r,n.propertyPath,m.switchSchema,n.schemas);return this.validateSchema(e,m.subschema,r,h)}var y=r&&r.skipAttributes||[];for(var v in t)if(!a.ignoreProperties[v]&&y.indexOf(v)<0){var g=null,b=f.attributes[v];if(b)g=b.call(f,e,t,r,n);else if(r.allowUnknownAttributes===!1)throw new s("Unsupported attribute: "+v,t);g&&d.importErrors(g)}if("function"==typeof r.rewrite){var S=r.rewrite.call(this,e,t,r,n);d.instance=S}return d},c.prototype.resolve=function(e,t,r){if(t=r.resolve(t),r.schemas[t])return{subschema:r.schemas[t],switchSchema:t};var n=o.parse(t),a=n&&n.hash,u=a&&a.length&&t.substr(0,t.length-a.length);if(!u||!r.schemas[u])throw new s("no such schema <"+t+">",e);var l=i.objectGetPath(r.schemas[u],a.substr(1));if(void 0===l)throw new s("no such schema "+a+" located in <"+u+">",e);return{subschema:l,switchSchema:t}},c.prototype.testType=function(e,t,r,o,a){if("function"==typeof this.types[a])return this.types[a].call(this,e);if(a&&"object"==("undefined"==typeof a?"undefined":n(a))){var i=this.validateSchema(e,a,r,o);return void 0===i||!(i&&i.errors.length)}return!0};var f=c.prototype.types={};f.string=function(e){return"string"==typeof e},f.number=function(e){return"number"==typeof e&&isFinite(e)},f.integer=function(e){return"number"==typeof e&&e%1===0},f.boolean=function(e){return"boolean"==typeof e},f.array=function(e){return e instanceof Array},f.null=function(e){return null===e},f.date=function(e){return e instanceof Date},f.any=function(e){return!0},f.object=function(e){return e&&"object"===("undefined"==typeof e?"undefined":n(e))&&!(e instanceof Array)&&!(e instanceof Date)},e.exports=c},function(e,t,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(e,t,r){if(e&&l(e)&&e instanceof n)return e;var o=new n;return o.parse(e,t,r),o}function a(e){return s(e)&&(e=o(e)),e instanceof n?e.format():n.prototype.format.call(e)}function i(e,t){return o(e,!1,!0).resolve(t)}function u(e,t){return e?o(e,!1,!0).resolveObject(t):t}function s(e){return"string"==typeof e}function l(e){return"object"===("undefined"==typeof e?"undefined":d(e))&&null!==e}function c(e){return null===e}function f(e){return null==e}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=r(44);t.parse=o,t.resolve=i,t.resolveObject=u,t.format=a,t.Url=n;var m=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,y=["<",">",'"',"`"," ","\r","\n","\t"],v=["{","}","|","\\","^","`"].concat(y),g=["'"].concat(v),b=["%","/","?",";","#"].concat(g),S=["/","?","#"],w=255,O=/^[a-z0-9A-Z_-]{0,63}$/,_=/^([a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},j={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=r(47);n.prototype.parse=function(e,t,r){if(!s(e))throw new TypeError("Parameter 'url' must be a string, not "+("undefined"==typeof e?"undefined":d(e)));var n=e;n=n.trim();var o=m.exec(n);if(o){o=o[0];var a=o.toLowerCase();this.protocol=a,n=n.substr(o.length)}if(r||o||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var i="//"===n.substr(0,2);!i||o&&j[o]||(n=n.substr(2),this.slashes=!0)}if(!j[o]&&(i||o&&!x[o])){for(var u=-1,l=0;l<S.length;l++){var c=n.indexOf(S[l]);c!==-1&&(u===-1||c<u)&&(u=c)}var f,h;h=u===-1?n.lastIndexOf("@"):n.lastIndexOf("@",u),h!==-1&&(f=n.slice(0,h),n=n.slice(h+1),this.auth=decodeURIComponent(f)),u=-1;for(var l=0;l<b.length;l++){var c=n.indexOf(b[l]);c!==-1&&(u===-1||c<u)&&(u=c)}u===-1&&(u=n.length),this.host=n.slice(0,u),n=n.slice(u),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var v=this.hostname.split(/\./),l=0,A=v.length;l<A;l++){var C=v[l];if(C&&!C.match(O)){for(var k="",F=0,T=C.length;F<T;F++)k+=C.charCodeAt(F)>127?"x":C[F];if(!k.match(O)){var M=v.slice(0,l),I=v.slice(l+1),N=C.match(_);N&&(M.push(N[1]),I.unshift(N[2])),I.length&&(n="/"+I.join(".")+n),this.hostname=M.join(".");break}}}if(this.hostname.length>w?this.hostname="":this.hostname=this.hostname.toLowerCase(),!y){for(var R=this.hostname.split("."),D=[],l=0;l<R.length;++l){var q=R[l];D.push(q.match(/[^A-Za-z0-9_-]/)?"xn--"+p.encode(q):q)}this.hostname=D.join(".")}var W=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+W,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!E[a])for(var l=0,A=g.length;l<A;l++){var U=g[l],B=encodeURIComponent(U);B===U&&(B=escape(U)),n=n.split(U).join(B)}var L=n.indexOf("#");L!==-1&&(this.hash=n.substr(L),n=n.slice(0,L));var z=n.indexOf("?");if(z!==-1?(this.search=n.substr(z),this.query=n.substr(z+1),t&&(this.query=P.parse(this.query)),n=n.slice(0,z)):t&&(this.search="",this.query={}),n&&(this.pathname=n),x[a]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var W=this.pathname||"",q=this.search||"";this.path=W+q}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&l(this.query)&&Object.keys(this.query).length&&(a=P.stringify(this.query));var i=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||x[t])&&o!==!1?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),i&&"?"!==i.charAt(0)&&(i="?"+i),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),i=i.replace("#","%23"),t+o+r+i+n},n.prototype.resolve=function(e){return this.resolveObject(o(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(s(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),x[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!x[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||j[e.protocol])r.pathname=e.pathname;else{for(var o=(e.pathname||"").split("/");o.length&&!(e.host=o.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),r.pathname=o.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var a=r.pathname||"",i=r.search||"";r.path=a+i}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var u=r.pathname&&"/"===r.pathname.charAt(0),l=e.host||e.pathname&&"/"===e.pathname.charAt(0),d=l||u||r.host&&e.pathname,p=d,m=r.pathname&&r.pathname.split("/")||[],o=e.pathname&&e.pathname.split("/")||[],h=r.protocol&&!x[r.protocol];if(h&&(r.hostname="",r.port=null,r.host&&(""===m[0]?m[0]=r.host:m.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===o[0]?o[0]=e.host:o.unshift(e.host)),e.host=null),d=d&&(""===o[0]||""===m[0])),l)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,m=o;else if(o.length)m||(m=[]),m.pop(),m=m.concat(o),r.search=e.search,r.query=e.query;else if(!f(e.search)){if(h){r.hostname=r.host=m.shift();var y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return r.search=e.search,r.query=e.query,c(r.pathname)&&c(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!m.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var v=m.slice(-1)[0],g=(r.host||e.host)&&("."===v||".."===v)||""===v,b=0,S=m.length;S>=0;S--)v=m[S],"."==v?m.splice(S,1):".."===v?(m.splice(S,1),b++):b&&(m.splice(S,1),b--);if(!d&&!p)for(;b--;b)m.unshift("..");!d||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),g&&"/"!==m.join("/").substr(-1)&&m.push("");var w=""===m[0]||m[0]&&"/"===m[0].charAt(0);if(h){r.hostname=r.host=w?"":m.length?m.shift():"";var y=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return d=d||r.host&&m.length,d&&!w&&m.unshift(""),m.length?r.pathname=m.join("/"):(r.pathname=null,r.path=null),c(r.pathname)&&c(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=h.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n;(function(e,o){"use strict";var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(i){function u(e){throw RangeError(R[e])}function s(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function l(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(N,".");var o=e.split("."),a=s(o,t).join(".");return n+a}function c(e){for(var t,r,n=[],o=0,a=e.length;o<a;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<a?(r=e.charCodeAt(o++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--)):n.push(t);return n}function f(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=W(e>>>10&1023|55296),e=56320|1023&e),t+=W(e)}).join("")}function d(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:j}function p(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function m(e,t,r){var n=0;for(e=r?q(e/C):e>>1,e+=q(e/t);e>D*P>>1;n+=j)e=q(e/D);return q(n+(D+1)*e/(e+A))}function h(e){var t,r,n,o,a,i,s,l,c,p,h=[],y=e.length,v=0,g=F,b=k;for(r=e.lastIndexOf(T),r<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&u("not-basic"),h.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<y;){for(a=v,i=1,s=j;o>=y&&u("invalid-input"),l=d(e.charCodeAt(o++)),(l>=j||l>q((E-v)/i))&&u("overflow"),v+=l*i,c=s<=b?x:s>=b+P?P:s-b,!(l<c);s+=j)p=j-c,i>q(E/p)&&u("overflow"),i*=p;t=h.length+1,b=m(v-a,t,0==a),q(v/t)>E-g&&u("overflow"),g+=q(v/t),v%=t,h.splice(v++,0,g)}return f(h)}function y(e){var t,r,n,o,a,i,s,l,f,d,h,y,v,g,b,S=[];for(e=c(e),y=e.length,t=F,r=0,a=k,i=0;i<y;++i)h=e[i],h<128&&S.push(W(h));for(n=o=S.length,o&&S.push(T);n<y;){for(s=E,i=0;i<y;++i)h=e[i],h>=t&&h<s&&(s=h);for(v=n+1,s-t>q((E-r)/v)&&u("overflow"),r+=(s-t)*v,t=s,i=0;i<y;++i)if(h=e[i],h<t&&++r>E&&u("overflow"),h==t){for(l=r,f=j;d=f<=a?x:f>=a+P?P:f-a,!(l<d);f+=j)b=l-d,g=j-d,S.push(W(p(d+b%g,0))),l=q(b/g);S.push(W(p(l,0))),a=m(r,v,n==o),r=0,++n}++r,++t}return S.join("")}function v(e){return l(e,function(e){return M.test(e)?h(e.slice(4).toLowerCase()):e})}function g(e){return l(e,function(e){return I.test(e)?"xn--"+y(e):e})}var b="object"==a(t)&&t&&!t.nodeType&&t,S="object"==a(e)&&e&&!e.nodeType&&e,w="object"==("undefined"==typeof o?"undefined":a(o))&&o;w.global!==w&&w.window!==w&&w.self!==w||(i=w);var O,_,E=2147483647,j=36,x=1,P=26,A=38,C=700,k=72,F=128,T="-",M=/^xn--/,I=/[^\x20-\x7E]/,N=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=j-x,q=Math.floor,W=String.fromCharCode;if(O={version:"1.3.2",ucs2:{decode:c,encode:f},decode:h,encode:y,toASCII:g,toUnicode:v},"object"==a(r(46))&&r(46))n=function(){return O}.call(t,r,t,e),!(void 0!==n&&(e.exports=n));else if(b&&S)if(e.exports==b)S.exports=O;else for(_ in O)O.hasOwnProperty(_)&&(b[_]=O[_]);else i.punycode=O}(void 0)}).call(t,r(45)(e),function(){return this}())},function(e,t){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,r){"use strict";t.decode=t.parse=r(48),t.encode=t.stringify=r(49)},function(e,t){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var i=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var s=e.length;u>0&&s>u&&(s=u);for(var l=0;l<s;++l){var c,f,d,p,m=e[l].replace(i,"%20"),h=m.indexOf(n);h>=0?(c=m.substr(0,h),f=m.substr(h+1)):(c=m,f=""),d=decodeURIComponent(c),p=decodeURIComponent(f),r(a,d)?Array.isArray(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a}},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(e){switch("undefined"==typeof e?"undefined":r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,o,a){return t=t||"&",o=o||"=",null===e&&(e=void 0),"object"===("undefined"==typeof e?"undefined":r(e))?Object.keys(e).map(function(r){var a=encodeURIComponent(n(r))+o;return Array.isArray(e[r])?e[r].map(function(e){return a+encodeURIComponent(n(e))}).join(t):a+encodeURIComponent(n(e[r]))}).join(t):a?encodeURIComponent(n(a))+o+encodeURIComponent(n(e)):""}},function(e,t,r){"use strict";function n(e,t,r,n){return this.validateSchema(e,n,t,r).valid}function o(e,t,r,n,o,a){if(!t.properties||void 0===t.properties[o])if(t.additionalProperties===!1)a.addError({name:"additionalProperties",argument:o,message:"additionalProperty "+JSON.stringify(o)+" exists in instance when not allowed"});else{var i=t.additionalProperties||{},u=this.validateSchema(e[o],i,r,n.makeChild(i,o));u.instance!==a.instance[o]&&(a.instance[o]=u.instance),a.importErrors(u)}}function a(e,t,r){var n,o=r.length;for(n=t+1,o;n<o;n++)if(u.deepCompareStrict(e,r[n]))return!1;return!0}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=r(51),s=u.ValidatorResult,l=u.SchemaError,c={};c.ignoreProperties={id:!0,default:!0,description:!0,title:!0,exclusiveMinimum:!0,exclusiveMaximum:!0,additionalItems:!0,$schema:!0,$ref:!0,extends:!0};var f=c.validators={};f.type=function(e,t,r,n){if(void 0===e)return null;var o=new s(e,t,r,n),a=t.type instanceof Array?t.type:[t.type];if(!a.some(this.testType.bind(this,e,t,r,n))){var i=a.map(function(e){return e.id&&"<"+e.id+">"||e+""});o.addError({name:"type",argument:i,message:"is not of a type(s) "+i})}return o},f.anyOf=function(e,t,r,o){if(void 0===e)return null;var a=new s(e,t,r,o);if(!(t.anyOf instanceof Array))throw new l("anyOf must be an array");if(!t.anyOf.some(n.bind(this,e,r,o))){var i=t.anyOf.map(function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});a.addError({name:"anyOf",argument:i,message:"is not any of "+i.join(",")})}return a},f.allOf=function(e,t,r,n){if(void 0===e)return null;if(!(t.allOf instanceof Array))throw new l("allOf must be an array");var o=new s(e,t,r,n),a=this;return t.allOf.forEach(function(t,i){var u=a.validateSchema(e,t,r,n);if(!u.valid){var s=t.id&&"<"+t.id+">"||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+i+"]";o.addError({name:"allOf",argument:{id:s,length:u.errors.length,valid:u},message:"does not match allOf schema "+s+" with "+u.errors.length+" error[s]:"}),o.importErrors(u)}}),o},f.oneOf=function(e,t,r,o){if(void 0===e)return null;if(!(t.oneOf instanceof Array))throw new l("oneOf must be an array");var a=new s(e,t,r,o),i=t.oneOf.filter(n.bind(this,e,r,o)).length,u=t.oneOf.map(function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});return 1!==i&&a.addError({name:"oneOf",argument:u,message:"is not exactly one from "+u.join(",")}),a},f.properties=function(e,t,r,n){if(void 0!==e&&e instanceof Object){var o=new s(e,t,r,n),a=t.properties||{};for(var i in a){var u=(e||void 0)&&e[i],l=this.validateSchema(u,a[i],r,n.makeChild(a[i],i));l.instance!==o.instance[i]&&(o.instance[i]=l.instance),o.importErrors(l)}return o}},f.patternProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){var a=new s(e,t,r,n),i=t.patternProperties||{};for(var u in e){var l=!0;for(var c in i){var f=new RegExp(c);if(f.test(u)){l=!1;var d=this.validateSchema(e[u],i[c],r,n.makeChild(i[c],u));d.instance!==a.instance[u]&&(a.instance[u]=d.instance),a.importErrors(d)}}l&&o.call(this,e,t,r,n,u,a)}return a}},f.additionalProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){if(t.patternProperties)return null;var a=new s(e,t,r,n);for(var i in e)o.call(this,e,t,r,n,i,a);return a}},f.minProperties=function(e,t,r,n){if(!e||"object"!==("undefined"==typeof e?"undefined":i(e)))return null;var o=new s(e,t,r,n),a=Object.keys(e);return a.length>=t.minProperties||o.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),o},f.maxProperties=function(e,t,r,n){if(!e||"object"!==("undefined"==typeof e?"undefined":i(e)))return null;var o=new s(e,t,r,n),a=Object.keys(e);return a.length<=t.maxProperties||o.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),o},f.items=function(e,t,r,n){if(!(e instanceof Array))return null;var o=this,a=new s(e,t,r,n);return void 0!==e&&t.items?(e.every(function(e,i){var u=t.items instanceof Array?t.items[i]||t.additionalItems:t.items;if(void 0===u)return!0;if(u===!1)return a.addError({name:"items",message:"additionalItems not permitted"}),!1;var s=o.validateSchema(e,u,r,n.makeChild(u,i));return s.instance!==a.instance[i]&&(a.instance[i]=s.instance),a.importErrors(s),!0}),a):a},f.minimum=function(e,t,r,n){if("number"!=typeof e)return null;var o=new s(e,t,r,n),a=!0;return a=t.exclusiveMinimum&&t.exclusiveMinimum===!0?e>t.minimum:e>=t.minimum,a||o.addError({name:"minimum",argument:t.minimum,message:"must have a minimum value of "+t.minimum}),o},f.maximum=function(e,t,r,n){if("number"!=typeof e)return null;var o,a=new s(e,t,r,n);return o=t.exclusiveMaximum&&t.exclusiveMaximum===!0?e<t.maximum:e<=t.maximum,o||a.addError({name:"maximum",argument:t.maximum,message:"must have a maximum value of "+t.maximum}),a},f.divisibleBy=function(e,t,r,n){if("number"!=typeof e)return null;if(0==t.divisibleBy)throw new l("divisibleBy cannot be zero");var o=new s(e,t,r,n);return e/t.divisibleBy%1&&o.addError({name:"divisibleBy",argument:t.divisibleBy,message:"is not divisible by (multiple of) "+JSON.stringify(t.divisibleBy)}),o},f.multipleOf=function(e,t,r,n){if("number"!=typeof e)return null;if(0==t.multipleOf)throw new l("multipleOf cannot be zero");var o=new s(e,t,r,n);return e/t.multipleOf%1&&o.addError({name:"multipleOf",argument:t.multipleOf,message:"is not a multiple of (divisible by) "+JSON.stringify(t.multipleOf)}),o},f.required=function(e,t,r,n){var o=new s(e,t,r,n);return void 0===e&&t.required===!0?o.addError({name:"required",message:"is required"}):e&&"object"===("undefined"==typeof e?"undefined":i(e))&&Array.isArray(t.required)&&t.required.forEach(function(t){void 0===e[t]&&o.addError({name:"required",argument:t,message:"requires property "+JSON.stringify(t)})}),o},f.pattern=function(e,t,r,n){if("string"!=typeof e)return null;var o=new s(e,t,r,n);return e.match(t.pattern)||o.addError({name:"pattern",argument:t.pattern,message:"does not match pattern "+JSON.stringify(t.pattern)}),o},f.format=function(e,t,r,n){var o=new s(e,t,r,n);return o.disableFormat||u.isFormat(e,t.format,this)||o.addError({name:"format",argument:t.format,message:"does not conform to the "+JSON.stringify(t.format)+" format"}),o},f.minLength=function(e,t,r,n){if("string"!=typeof e)return null;var o=new s(e,t,r,n);return e.length>=t.minLength||o.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),o},f.maxLength=function(e,t,r,n){if("string"!=typeof e)return null;var o=new s(e,t,r,n);return e.length<=t.maxLength||o.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),o},f.minItems=function(e,t,r,n){if(!(e instanceof Array))return null;var o=new s(e,t,r,n);return e.length>=t.minItems||o.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),o},f.maxItems=function(e,t,r,n){if(!(e instanceof Array))return null;var o=new s(e,t,r,n);return e.length<=t.maxItems||o.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),o},f.uniqueItems=function(e,t,r,n){function o(e,t,r){for(var n=t+1;n<r.length;n++)if(u.deepCompareStrict(e,r[n]))return!1;return!0}var a=new s(e,t,r,n);return e instanceof Array?(e.every(o)||a.addError({name:"uniqueItems",message:"contains duplicate item"}),a):a},f.uniqueItems=function(e,t,r,n){if(!(e instanceof Array))return null;var o=new s(e,t,r,n);return e.every(a)||o.addError({name:"uniqueItems",message:"contains duplicate item"}),o},f.dependencies=function(e,t,r,n){if(!e||"object"!=("undefined"==typeof e?"undefined":i(e)))return null;var o=new s(e,t,r,n);for(var a in t.dependencies)if(void 0!==e[a]){var u=t.dependencies[a],l=n.makeChild(u,a);if("string"==typeof u&&(u=[u]),u instanceof Array)u.forEach(function(t){void 0===e[t]&&o.addError({name:"dependencies",argument:l.propertyPath,message:"property "+t+" not found, required by "+l.propertyPath})});else{var c=this.validateSchema(e,u,r,l);o.instance!==c.instance&&(o.instance=c.instance),c&&c.errors.length&&(o.addError({name:"dependencies",argument:l.propertyPath,message:"does not meet dependency required by "+l.propertyPath}),o.importErrors(c))}}return o},f.enum=function(e,t,r,n){if(!(t.enum instanceof Array))throw new l("enum expects an array",t);if(void 0===e)return null;var o=new s(e,t,r,n);return t.enum.some(u.deepCompareStrict.bind(null,e))||o.addError({name:"enum",argument:t.enum,message:"is not one of enum values: "+t.enum.join(",")}),o},f.not=f.disallow=function(e,t,r,n){var o=this;if(void 0===e)return null;var a=new s(e,t,r,n),i=t.not||t.disallow;return i?(i instanceof Array||(i=[i]),i.forEach(function(i){if(o.testType(e,t,r,n,i)){var u=i&&i.id&&"<"+i.id+">"||i;a.addError({name:"not",argument:u,message:"is of prohibited type "+u})}}),a):null},e.exports=c},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=r(43),a=t.ValidationError=function(e,t,r,n,o,a){n&&(this.property=n),e&&(this.message=e),r&&(r.id?this.schema=r.id:this.schema=r),t&&(this.instance=t),this.name=o,this.argument=a,this.stack=this.toString()};a.prototype.toString=function(){return this.property+" "+this.message};var i=t.ValidatorResult=function(e,t,r,n){this.instance=e,this.schema=t,this.propertyPath=n.propertyPath,this.errors=[],this.throwError=r&&r.throwError,this.disableFormat=r&&r.disableFormat===!0};i.prototype.addError=function(e){var t;if("string"==typeof e)t=new a(e,this.instance,this.schema,this.propertyPath);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new a(e.message,this.instance,this.schema,this.propertyPath,e.name,e.argument)}if(this.throwError)throw t;return this.errors.push(t),t},i.prototype.importErrors=function(e){if("string"==typeof e||e&&e.validatorType)this.addError(e);else if(e&&e.errors){var t=this.errors;e.errors.forEach(function(e){t.push(e)})}},i.prototype.toString=function(e){return this.errors.map(function(e,t){return t+": "+e.toString()+"\n"}).join("")},Object.defineProperty(i.prototype,"valid",{get:function(){return!this.errors.length}});var u=t.SchemaError=function e(t,r){this.message=t,this.schema=r,Error.call(this,t),Error.captureStackTrace(this,e)};u.prototype=Object.create(Error.prototype,{constructor:{value:u,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var s=t.SchemaContext=function(e,t,r,n,o){this.schema=e,this.options=t,this.propertyPath=r,this.base=n,this.schemas=o};s.prototype.resolve=function(e){return o.resolve(this.base,e)},s.prototype.makeChild=function(e,t){var r=void 0===t?this.propertyPath:this.propertyPath+c(t),n=o.resolve(this.base,e.id||""),a=new s(e,this.options,r,n,Object.create(this.schemas));return e.id&&!a.schemas[n]&&(a.schemas[n]=e),a};var l=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,
uri:/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(e){t=!1}return t},style:/\s*(.+?):\s*([^;]+);?/g,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],t.isFormat=function(e,t,r){if("string"==typeof e&&void 0!==l[t]){if(l[t]instanceof RegExp)return l[t].test(e);if("function"==typeof l[t])return l[t](e)}else if(r&&r.customFormats&&"function"==typeof r.customFormats[t])return r.customFormats[t](e);return!0};var c=t.makeSuffix=function(e){return e=e.toString(),e.match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};t.deepCompareStrict=function e(t,r){if(("undefined"==typeof t?"undefined":n(t))!==("undefined"==typeof r?"undefined":n(r)))return!1;if(t instanceof Array)return r instanceof Array&&(t.length===r.length&&t.every(function(n,o){return e(t[o],r[o])}));if("object"===("undefined"==typeof t?"undefined":n(t))){if(!t||!r)return t===r;var o=Object.keys(t),a=Object.keys(r);return o.length===a.length&&o.every(function(n){return e(t[n],r[n])})}return t===r},e.exports.deepMerge=function e(t,r){var o=Array.isArray(r),a=o&&[]||{};return o?(t=t||[],a=a.concat(t),r.forEach(function(r,o){"object"===("undefined"==typeof r?"undefined":n(r))?a[o]=e(t[o],r):t.indexOf(r)===-1&&a.push(r)})):(t&&"object"===("undefined"==typeof t?"undefined":n(t))&&Object.keys(t).forEach(function(e){a[e]=t[e]}),Object.keys(r).forEach(function(o){"object"===n(r[o])&&r[o]&&t[o]?a[o]=e(t[o],r[o]):a[o]=r[o]})),a},t.objectGetPath=function(e,t){for(var r,n=t.split("/").slice(1);"string"==typeof(r=n.shift());){var o=decodeURIComponent(r.replace(/~0/,"~").replace(/~1/g,"/"));if(!(o in e))return;e=e[o]}return e},t.encodePath=function(e){return e.map(function(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}).join("")}}])});
//# sourceMappingURL=react-jsonschema-form.js.map No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dist files should not be versioned in this repository. They're generated locally before being published to npm.

})
)
);
} No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for lib files, they're generated locally then published to npm, and should therefore not be versioned in this repository.

formData={liveValidate}
onChange={this.setLiveValidate}><div/></Form>
onChange={this.setLiveValidate}
onBlur={(event)=> console.log("onBlur:", event)}><div/></Form>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably remove this.

uiSchema={uiSchema}
formData={formData}
onChange={this.onFormDataChange}
onBlur={x => console.log("onBlur", x)}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

encType={enctype}
acceptCharset={acceptcharset}
onSubmit={this.onSubmit}>
id={id}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep indentation the way it is.


function DateElement(props) {
const {type, range, value, select, rootId, disabled, readonly, autofocus, registry} = props;
const {type, range, value, select, rootId, disabled, readonly, autofocus, registry,onBlur} = props;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: missing space after comma.

if (this.props.onBlur){
this.props.onBlur(toDateString(this.state, this.props.time));
}
};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to trigger the event when data are consistent, the same way it's done in onChange?

dist
lib

.idea
Copy link
Copy Markdown
Collaborator

@n1k0 n1k0 Jan 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be added by IntelliJ users in their own global ~/.gitignore file. Also please readd ignore rules for dist and lib (see contextual comments above).

onChange={(event) => onChange(event.target.value)}
onBlur={(event) => {
if (onBlur) {
return onBlur(event.target.id);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we pass the value to the event handler here?

@jbalboni
Copy link
Copy Markdown
Contributor

It's ultimately not up to me, obviously, but there aren't really substantial functional differences between my other PR for this and this one. Any changes you wanted could have been been brought up comments and I would have been happy to follow whatever path @n1k0 thought was best. It would have made the review process less intensive, since the diff for my PR is less noisy.

@n1k0
Copy link
Copy Markdown
Collaborator

n1k0 commented Jan 21, 2017

I agree, I'd love seeing efforts federated for this feature 👍

@n1k0 n1k0 mentioned this pull request Jan 23, 2017
8 tasks
@n1k0
Copy link
Copy Markdown
Collaborator

n1k0 commented Jan 23, 2017

Closing in favor of #431. Please reopen if you have strong arguments against this decision.

@n1k0 n1k0 closed this Jan 23, 2017
@eeinowski eeinowski deleted the onBlurEvent branch March 23, 2017 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants