text: define(["exports"], function (_exports) {
    "use strict";
  
    Object.defineProperty(_exports, "__esModule", {
      value: true
    });
    _exports.UserActionBroker = void 0;
  
    /**
     * Broker user actions in a normalized way which is abstracted from xAPI
     * but yet mirrors much of that structure and data needs.
     */
    var UserActionBroker =
    /*#__PURE__*/
    function () {
      /**
       * @todo ensure a singleton design pattern
       */
      function UserActionBroker() {
        babelHelpers.classCallCheck(this, UserActionBroker);
        // set the built in events w/ support for others
        this.eventList = {
          click: "click",
          mousedown: "mousedown",
          mouseup: "mouseup",
          visibility: "visibility",
          keypress: "keypress",
          keydown: "keydown",
          keyup: "keyup"
        };
        this.eventname = "user-engagement";
      }
      /**
       * See if this is a valid event
       */
  
  
      babelHelpers.createClass(UserActionBroker, [{
        key: "valid",
        value: function valid(event) {
          if (this.eventList[event]) {
            return true;
          }
  
          return false;
        }
        /**
         * Fire the action for the user engagement broker.
         */
  
      }, {
        key: "fireAction",
        value: function fireAction(eventType, details, context) {
          details.eventType = eventType;
          context.dispatchEvent(new CustomEvent(this.eventname, {
            bubbles: true,
            composed: true,
            cancelable: false,
            detail: details
          }));
        }
      }]);
      return UserActionBroker;
    }();
  
    _exports.UserActionBroker = UserActionBroker;
  });