function _slicedToArray(r,n){return _arrayWithHoles(r)||_iterableToArrayLimit(r,n)||_unsupportedIterableToArray(r,n)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,n){var t;if(r)return"string"==typeof r?_arrayLikeToArray(r,n):"Map"===(t="Object"===(t={}.toString.call(r).slice(8,-1))&&r.constructor?r.constructor.name:t)||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,n):void 0}function _arrayLikeToArray(r,n){(null==n||n>r.length)&&(n=r.length);for(var t=0,o=Array(n);t<n;t++)o[t]=r[t];return o}function _iterableToArrayLimit(r,n){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var o,i,e,a,s=[],c=!0,u=!1;try{if(e=(t=t.call(r)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(o=e.call(t)).done)&&(s.push(o.value),s.length!==n);c=!0);}catch(r){u=!0,i=r}finally{try{if(!c&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function _arrayWithHoles(r){if(Array.isArray(r))return r}(()=>{function r(r){var t=this;_.assign(t,{$onInit:function(){t.control=r.getForNg1({pollingInterval:15e3,onPendingSubscriptions:function(r){t.pendingSubscriptions=r},onExistingSubscriptions:function(r){t.subscriptions=r},onMoUpdate:function(r){var n=_slicedToArray(r,1)[0],r=t.subscriptions.find(function(r){return r.id===n.id});r&&Object.assign(r,n)}}),t.control.init()},$onDestroy:function(){t.control.destroy()},reload:function(){t.control.reload()},subscriptions:[],pendingSubscriptions:[],toggleAddNewSubscriptionForm:function(r){t.isShownAddNewSubscription=!r},isShownAddNewSubscription:!1,isSubscriptionsListEmpty:function(){return t.subscriptions.length<1&&t.pendingSubscriptions.length<1&&!t.isShownAddNewSubscription}})}r.$inject=["c8yDataBrokerSubscriptionsService"],angular.module("c8y.dataBroker").component("c8yDataBrokerSubscriptions",{templateUrl:":::PLUGIN_PATH:::/subscriptions/subscriptions.html",controller:r,controllerAs:"vm"})})();