(()=>{function e(r){var t,p=this,e=r.Types,n=r.Validations;function i(e){return!!_.includes(p.schemaPropertyType.validations,e)}function o(o){return _.reduce(n.values(),function(e,r){var t=i(r),p=!_.isUndefined(o.schema[r.value]);return e[r.value]=t&&p,e},{})}_.assign(p,{Types:e,Validations:n,isValidationSupported:i,$onChanges:function(e){e._property&&(p.property=_.cloneDeep(p._property),p.schemaPropertyType=r.getType(p.property),p.validationsApplied=o(p.property))},$doCheck:function(){var e=(()=>{var t={key:p.property.key,schema:p.property.schema};return _.forEach(p.validationsApplied,function(e,r){e||"required"===r||_.unset(t,["schema",r])}),t})();(e=>{var r=!_.isEqual(e,t);return t=_.cloneDeep(e),r})(e)&&p.onChange({property:e,originalProperty:p._property})},setType:function(){r.setType(p.property,p.schemaPropertyType),p.validationsApplied=o(p.property)},updateRequiredValidationApplied:function(){p.property.schema.required||_.unset(p.property.schema,"required")}})}e.$inject=["SchemaPropertiesSvc"],angular.module("c8y.ui").component("c8ySchemaPropertyEditor",{bindings:{_property:"<property",onChange:"&"},templateUrl:":::PLUGIN_PATH:::/ui/schemaForm/schemaPropertyEditor.html",controller:e,controllerAs:"vm"})})();