"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=eventsMixin,exports.getDefaultEvents=void 0;var getDefaultEvents=exports.getDefaultEvents=function(){return{onChange:function(){}}};function eventsMixin(){var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).defaultEvents,e=void 0===t?getDefaultEvents():t;return Behavior({lifetimes:{created:function(){this._oriTriggerEvent=this.triggerEvent,this.triggerEvent=this._triggerEvent}},properties:{events:{type:Object,value:e}},data:{inputEvents:e},definitionFilter:function(t){Object.assign(t.data=t.data||{},{inputEvents:Object.assign({},e,t.inputEvents)}),Object.assign(t.methods=t.methods||{},{_triggerEvent:function(t,e){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],i=3<arguments.length?arguments[3]:void 0,s=this.data.inputEvents["on".concat(t[0].toUpperCase()).concat(t.slice(1))];n&&"function"==typeof s&&s.call(this,e),this._oriTriggerEvent(t,e,i)}}),Object.assign(t.observers=t.observers||{},{events:function(t){this.setData({inputEvents:Object.assign({},e,this.data.inputEvents,t)})}})}})}