(()=>{function r(u){var i=",",o=/^[/\d\-+ ]*$/;return{require:"ngModel",link:function(r,n,e,t){t.$validators.internationalPhoneNumber=_.curry(a)(r,n,e),t.$formatters.push(_.curry(l)(r,e))}};function a(r,n,e,t,i){return c(i,r,e).every(function(n){try{var r=u.phoneUtils.parsePhoneNumberFromString(n),e=o.test(n)&&r.isValid()}catch(r){e=!n}return e})}function c(r,n,e){var t=[];return t=r&&(t=[r],n.$eval(e.c8yPhoneNumberAllowMultiple))?(r||"").split(i):t}function l(r,n,e){return c(e,r,n).map(function(r){return u.phoneUtils.formatE164(r)}).join(",")}}r.$inject=["$window"],angular.module("c8y.ui").directive("c8yPhoneNumber",r)})();