var ctEvents;!function(){"use strict";var e={};function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);const o=function(e,t){return"string"!=typeof e?e:e.replace(/\s\s+/g," ").trim().split(" ").reduce((function(e,r){return n(n({},e),{},{[r]:t})}),{})},c=new class{constructor(){r(this,"_events",{})}on(e,t){var r=this;const c=o(e,t);return Object.keys(c).map((function(e){return r._events=n(n({},r._events),{},{[e]:[...r._events[e]||[],c[e]]})})),this}off(e,t){var n=this;const r=o(e,t);return Object.keys(r).map((function(e){n._events[e]&&(r[e]?n._events[e].splice(n._events[e].indexOf(t)>>>0,1):n._events[e]=[])})),this}trigger(e,t){var n=this;const r=o(e),c=function(e){return e&&e.call(window,t)};return Object.keys(r).map((function(e){try{(n._events[e]||[]).map(c),(n._events.all||[]).map(c)}catch(e){if(console.log("%c [Events] Exception raised.","color: red; font-weight: bold;"),"undefined"==typeof console)throw e;console.error(e)}})),this}};window.ctEvents=c,e.default=c,ctEvents=e}();
//# sourceMappingURL=events.js.map