/** * Minified by jsDelivr using Terser v5.13.1. * Original file: /npm/uevent@2.2.0/browser.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ /*! * uevent (v2.2.0) * @copyright 2015-2022 Damien "Mistic" Sorel * @licence MIT */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).uEvent={})}(this,(function(e){"use strict";var t=function(){return!0},n=function(){return!1},i=function(){function e(e,t,i){Object.defineProperties(this,{target:{get:function(){return e},set:function(){},enumerable:!0},type:{get:function(){return t},set:function(){},enumerable:!0},args:{get:function(){return i},set:function(){},enumerable:!0}}),this.isDefaultPrevented=n,this.isPropagationStopped=n}var i=e.prototype;return i.preventDefault=function(){this.isDefaultPrevented=t},i.stopPropagation=function(){this.isPropagationStopped=t},e}(),o=function(){function e(){}var t=e.prototype;return t.on=function(e,t){var n=this;if(this.__events=this.__events||{},"object"==typeof e)for(var i in e)e.hasOwnProperty(i)&&(this.__events[i]=this.__events[i]||[],this.__events[i].push(e[i]));else e.split(" ").forEach((function(e){n.__events[e]=n.__events[e]||[],n.__events[e].push(t)}));return this},t.off=function(e,t){var n=this;if("object"==typeof e){for(var i in e)if(e.hasOwnProperty(i)){if(this.__events&&i in this.__events){var o=this.__events[i].indexOf(e[i]);-1!==o&&this.__events[i].splice(o,1)}if(this.__once&&i in this.__once){var s=this.__once[i].indexOf(e[i]);-1!==s&&this.__once[i].splice(s,1)}}}else e?e.split(" ").forEach((function(e){if(n.__events&&e in n.__events)if(t){var i=n.__events[e].indexOf(t);-1!==i&&n.__events[e].splice(i,1)}else n.__events[e].length=0;if(n.__once&&e in n.__once)if(t){var o=n.__once[e].indexOf(t);-1!==o&&n.__once[e].splice(o,1)}else n.__once[e].length=0})):(this.__events={},this.__once={});return this},t.once=function(e,t){var n=this;if(this.__once=this.__once||{},"object"==typeof e)for(var i in e)e.hasOwnProperty(i)&&(this.__once[i]=this.__once[i]||[],this.__once[i].push(e[i]));else e.split(" ").forEach((function(e){n.__once[e]=n.__once[e]||[],n.__once[e].push(t)}));return this},t.trigger=function(e){var t=Array.prototype.slice.call(arguments,1),n=new i(this,e,t);if(this.__events&&e in this.__events)for(var o=0,s=this.__events[e].length;o