code: function _resolveMouseInputConflicts(tool, element, options) {
    const mouseButtonMask = _getNormalizedOptions(options).mouseButtonMask;
    const hasMouseButtonMask =
      Array.isArray(mouseButtonMask) && mouseButtonMask.length > 0;
  
    if (!hasMouseButtonMask) {
      return;
    }
  
    const activeToolWithMatchingMouseButtonMask = store.state.tools.find(
      t =>
        t.element === element &&
        t.mode === 'active' &&
        t.options.isMouseActive === true &&
        Array.isArray(t.options.mouseButtonMask) &&
        t.options.mouseButtonMask.some(v => mouseButtonMask.includes(v))
    );
  
    if (activeToolWithMatchingMouseButtonMask) {
      // Remove collissions
      activeToolWithMatchingMouseButtonMask.options.mouseButtonMask = activeToolWithMatchingMouseButtonMask.options.mouseButtonMask.filter(
        mask => !mouseButtonMask.includes(mask)
      );
  
      // If no remaining bindings, set inactive
      if (
        activeToolWithMatchingMouseButtonMask.options.mouseButtonMask.length === 0
      ) {
        activeToolWithMatchingMouseButtonMask.options.isMouseActive = false;
      }
    }
  }
docs: Resolves conflicting active tools when activating a tool for mouse interaction
  @private
  @function _resolveMouseInputConflicts
  
  @param {Object} tool
  @param {HTMLElement} element
  @param {(Object|number)} options
  @returns {undefined}