Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.115/designer/js/definition-builder/util/EventObserver",["module","exports","require"],(function(e,s,r){window;{Object.defineProperty(s,"__esModule",{value:!0}),s.default=s.singleEventObserver=void 0;class EventObserver{constructor(){this.subscribes={}}subscribe(e,s){Array.isArray(this.subscribes[e])||(this.subscribes[e]=[]);return{event:e,index:this.subscribes[e].push(s)-1}}length(e){return this.subscribes[e]?this.subscribes[e].filter((e=>!!e)).length:0}notify(e,s){if(Array.isArray(this.subscribes[e])&&this.subscribes[e].length)try{this.subscribes[e].map((e=>e&&e(s)))}catch(e){}}unsubscribe({event:e,index:s}){this.subscribes[e]&&this.subscribes[e][s]&&delete this.subscribes[e][s]}}const e=new EventObserver;s.singleEventObserver=e;var i=EventObserver;s.default=i}}));
//# sourceMappingURL=EventObserver.js.map