function _regenerator(){var d,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var o,i,a,c,f,u,g,l,s,t=t&&t.prototype instanceof _?t:_,t=Object.create(t.prototype);return _regeneratorDefine2(t,"_invoke",(o=e,i=n,g=r||[],l=!1,s={p:u=0,n:0,v:d,a:p,f:p.bind(d,4),d:function(e,t){return a=e,c=0,f=d,s.n=t,y}},function(e,t,n){if(1<u)throw TypeError("Generator is already running");for(l&&1===t&&p(t,n),c=t,f=n;(v=c<2?d:f)||!l;){a||(c?c<3?(1<c&&(s.n=-1),p(c,f)):s.n=f:s.v=f);try{if(u=2,a){if(v=a[e=c?e:"next"]){if(!(v=v.call(a,f)))throw TypeError("iterator result is not an object");if(!v.done)return v;f=v.value,c<2&&(c=0)}else 1===c&&(v=a.return)&&v.call(a),c<2&&(f=TypeError("The iterator does not provide a '"+e+"' method"),c=1);a=d}else if((v=(l=s.n<0)?f:o.call(i,s))!==y)break}catch(e){a=d,c=1,f=e}finally{u=1}}return{value:v,done:l}}),!0),t;function p(e,t){for(c=e,f=t,v=0;!l&&u&&!n&&v<g.length;v++){var n,r=g[v],o=s.p,i=r[2];3<e?(n=i===t)&&(f=r[(c=r[4])?5:c=3],r[4]=r[5]=d):r[0]<=o&&((n=e<2&&o<r[1])?(c=0,s.v=t,s.n=r[1]):o<i&&(n=e<3||r[0]>t||i<t)&&(r[4]=e,r[5]=t,s.n=i,c=0))}if(n||1<e)return y;throw l=!0,t}}var y={};function _(){}function o(){}function i(){}var v=Object.getPrototypeOf,e=[][t]?v(v([][t]())):(_regeneratorDefine2(v={},t,function(){return this}),v),a=i.prototype=_.prototype=Object.create(e);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,_regeneratorDefine2(e,n,"GeneratorFunction")),e.prototype=Object.create(a),e}return _regeneratorDefine2(a,"constructor",o.prototype=i),_regeneratorDefine2(i,"constructor",o),_regeneratorDefine2(i,n,o.displayName="GeneratorFunction"),_regeneratorDefine2(a),_regeneratorDefine2(a,n,"Generator"),_regeneratorDefine2(a,t,function(){return this}),_regeneratorDefine2(a,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:r,m:c}})()}function _regeneratorDefine2(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(_regeneratorDefine2=function(e,t,n,r){function o(t,n){_regeneratorDefine2(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))})(e,t,n,r)}function asyncGeneratorStep(e,t,n,r,o,i,a){try{var c=e[i](a),f=c.value}catch(e){return void n(e)}c.done?t(f):Promise.resolve(f).then(r,o)}function _asyncToGenerator(c){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=c.apply(e,a);function o(e){asyncGeneratorStep(r,t,n,o,i,"next",e)}function i(e){asyncGeneratorStep(r,t,n,o,i,"throw",e)}o(void 0)})}}(()=>{function e(t,n){var e,r,o=this;function i(){return(i=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n.getConfigModel(o.config);case 1:o.categoriesConfig=e.v,t.$apply();case 2:return e.a(2)}},e)}))).apply(this,arguments)}_.assign(o,{$doCheck:function(){_.isEqual(e,o.config.device)||(e=o.config.device,function(){i.apply(this,arguments)}());_.isEqual(r,o.categoriesConfig)||(r=_.cloneDeep(o.categoriesConfig),(()=>{var e;if(r)return e=n.isAtLeastOneElementSelected(r),o.modbusWidgetConfigForm.modbusWidgetValidation.$setValidity("at-least-one-field-selected",e),o.atLeastOneElementSelected=e})()&&n.updateConfigModel(o.config,r))}})}e.$inject=["$rootScope","modbusWidgetSvc"],angular.module("c8y.modbusWidget4").component("c8yModbusWidgetConfig",{templateUrl:":::PLUGIN_PATH:::/widget-config.html",bindings:{config:"<"},controllerAs:"vm",controller:e})})();