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