(()=>{function e(n){return{restrict:"A",require:"ngModel",scope:{requestTemplate:"=c8ySmartRestValidateCustomFieldKeyInRequestTemplate"},link:function(r,e,t,a){a.$validators.customFieldKey=function(e,t){var a,e=e||t||"",t=(e=>(e=e.mandatoryValues,_.map(e,function(e){return e.path.replace(/^\$\./,"")})))(r.requestTemplate);return a=e,!_.some(t,function(e){return a.match((e=e,t=n.escapeForRegex,new RegExp("^(".concat(t("$."),"){0,1}").concat(t(e),"$"),"i")));var t})}}}}e.$inject=["c8yUiUtil"],angular.module("c8y.smartRestEditor").directive("c8ySmartRestValidateCustomFieldKeyInRequestTemplate",e)})();