import "../styles/reset.css";
import "./message.less";
import { Fragment as __WEBPACK_EXTERNAL_MODULE_vue_Fragment__, Transition as __WEBPACK_EXTERNAL_MODULE_vue_Transition__, computed as __WEBPACK_EXTERNAL_MODULE_vue_computed__, createVNode as __WEBPACK_EXTERNAL_MODULE_vue_createVNode__, defineComponent as __WEBPACK_EXTERNAL_MODULE_vue_defineComponent__, isVNode as __WEBPACK_EXTERNAL_MODULE_vue_isVNode__, nextTick as __WEBPACK_EXTERNAL_MODULE_vue_nextTick__, onMounted as __WEBPACK_EXTERNAL_MODULE_vue_onMounted__, onUnmounted as __WEBPACK_EXTERNAL_MODULE_vue_onUnmounted__, reactive as __WEBPACK_EXTERNAL_MODULE_vue_reactive__, ref as __WEBPACK_EXTERNAL_MODULE_vue_ref__, render as __WEBPACK_EXTERNAL_MODULE_vue_render__, vShow as __WEBPACK_EXTERNAL_MODULE_vue_vShow__, watch as __WEBPACK_EXTERNAL_MODULE_vue_watch__, withDirectives as __WEBPACK_EXTERNAL_MODULE_vue_withDirectives__ } from "vue";
import { PropTypes as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__, bkZIndexManager as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_bkZIndexManager__, isElement as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_isElement__ } from "../shared";
import { toType as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_toType__ } from "vue-types";
import { useLocale as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_useLocale__, usePrefix as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__ } from "../config-provider";
import { AngleDoubleDownLine as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_AngleDoubleDownLine__, AngleDoubleUpLine as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_AngleDoubleUpLine__, Assistant as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Assistant__, Close as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Close__, CopyShape as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_CopyShape__, Error as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Error__, FixLine as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_FixLine__, FixShape as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_FixShape__, Info as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Info__, Success as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Success__, Warn as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Warn__ } from "../icon";
/******/ var __webpack_modules__ = ({

/***/ 3739
(module) {

/*!
 * clipboard.js v2.0.11
 * https://clipboardjs.com/
 *
 * Licensed MIT © Zeno Rocha
 */
(function webpackUniversalModuleDefinition(root, factory) {
	if(true)
		module.exports = factory();
	else // removed by dead control flow
{}
})(this, function() {
return /******/ (function() { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 686:
/***/ (function(__unused_webpack_module, __nested_webpack_exports__, __nested_webpack_require_623__) {

"use strict";

// EXPORTS
__nested_webpack_require_623__.d(__nested_webpack_exports__, {
  "default": function() { return /* binding */ clipboard; }
});

// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js
var tiny_emitter = __nested_webpack_require_623__(279);
var tiny_emitter_default = /*#__PURE__*/__nested_webpack_require_623__.n(tiny_emitter);
// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js
var listen = __nested_webpack_require_623__(370);
var listen_default = /*#__PURE__*/__nested_webpack_require_623__.n(listen);
// EXTERNAL MODULE: ./node_modules/select/src/select.js
var src_select = __nested_webpack_require_623__(817);
var select_default = /*#__PURE__*/__nested_webpack_require_623__.n(src_select);
;// CONCATENATED MODULE: ./src/common/command.js
/**
 * Executes a given operation type.
 * @param {String} type
 * @return {Boolean}
 */
function command(type) {
  try {
    return document.execCommand(type);
  } catch (err) {
    return false;
  }
}
;// CONCATENATED MODULE: ./src/actions/cut.js


/**
 * Cut action wrapper.
 * @param {String|HTMLElement} target
 * @return {String}
 */

var ClipboardActionCut = function ClipboardActionCut(target) {
  var selectedText = select_default()(target);
  command('cut');
  return selectedText;
};

/* harmony default export */ var actions_cut = (ClipboardActionCut);
;// CONCATENATED MODULE: ./src/common/create-fake-element.js
/**
 * Creates a fake textarea element with a value.
 * @param {String} value
 * @return {HTMLElement}
 */
function createFakeElement(value) {
  var isRTL = document.documentElement.getAttribute('dir') === 'rtl';
  var fakeElement = document.createElement('textarea'); // Prevent zooming on iOS

  fakeElement.style.fontSize = '12pt'; // Reset box model

  fakeElement.style.border = '0';
  fakeElement.style.padding = '0';
  fakeElement.style.margin = '0'; // Move element out of screen horizontally

  fakeElement.style.position = 'absolute';
  fakeElement.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically

  var yPosition = window.pageYOffset || document.documentElement.scrollTop;
  fakeElement.style.top = "".concat(yPosition, "px");
  fakeElement.setAttribute('readonly', '');
  fakeElement.value = value;
  return fakeElement;
}
;// CONCATENATED MODULE: ./src/actions/copy.js



/**
 * Create fake copy action wrapper using a fake element.
 * @param {String} target
 * @param {Object} options
 * @return {String}
 */

var fakeCopyAction = function fakeCopyAction(value, options) {
  var fakeElement = createFakeElement(value);
  options.container.appendChild(fakeElement);
  var selectedText = select_default()(fakeElement);
  command('copy');
  fakeElement.remove();
  return selectedText;
};
/**
 * Copy action wrapper.
 * @param {String|HTMLElement} target
 * @param {Object} options
 * @return {String}
 */


var ClipboardActionCopy = function ClipboardActionCopy(target) {
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
    container: document.body
  };
  var selectedText = '';

  if (typeof target === 'string') {
    selectedText = fakeCopyAction(target, options);
  } else if (target instanceof HTMLInputElement && !['text', 'search', 'url', 'tel', 'password'].includes(target === null || target === void 0 ? void 0 : target.type)) {
    // If input type doesn't support `setSelectionRange`. Simulate it. https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
    selectedText = fakeCopyAction(target.value, options);
  } else {
    selectedText = select_default()(target);
    command('copy');
  }

  return selectedText;
};

/* harmony default export */ var actions_copy = (ClipboardActionCopy);
;// CONCATENATED MODULE: ./src/actions/default.js
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }



/**
 * Inner function which performs selection from either `text` or `target`
 * properties and then executes copy or cut operations.
 * @param {Object} options
 */

var ClipboardActionDefault = function ClipboardActionDefault() {
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  // Defines base properties passed from constructor.
  var _options$action = options.action,
      action = _options$action === void 0 ? 'copy' : _options$action,
      container = options.container,
      target = options.target,
      text = options.text; // Sets the `action` to be performed which can be either 'copy' or 'cut'.

  if (action !== 'copy' && action !== 'cut') {
    throw new Error('Invalid "action" value, use either "copy" or "cut"');
  } // Sets the `target` property using an element that will be have its content copied.


  if (target !== undefined) {
    if (target && _typeof(target) === 'object' && target.nodeType === 1) {
      if (action === 'copy' && target.hasAttribute('disabled')) {
        throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
      }

      if (action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
        throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
      }
    } else {
      throw new Error('Invalid "target" value, use a valid Element');
    }
  } // Define selection strategy based on `text` property.


  if (text) {
    return actions_copy(text, {
      container: container
    });
  } // Defines which selection strategy based on `target` property.


  if (target) {
    return action === 'cut' ? actions_cut(target) : actions_copy(target, {
      container: container
    });
  }
};

/* harmony default export */ var actions_default = (ClipboardActionDefault);
;// CONCATENATED MODULE: ./src/clipboard.js
function clipboard_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { clipboard_typeof = function _typeof(obj) { return typeof obj; }; } else { clipboard_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return clipboard_typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (clipboard_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }






/**
 * Helper function to retrieve attribute value.
 * @param {String} suffix
 * @param {Element} element
 */

function getAttributeValue(suffix, element) {
  var attribute = "data-clipboard-".concat(suffix);

  if (!element.hasAttribute(attribute)) {
    return;
  }

  return element.getAttribute(attribute);
}
/**
 * Base class which takes one or more elements, adds event listeners to them,
 * and instantiates a new `ClipboardAction` on each click.
 */


var Clipboard = /*#__PURE__*/function (_Emitter) {
  _inherits(Clipboard, _Emitter);

  var _super = _createSuper(Clipboard);

  /**
   * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
   * @param {Object} options
   */
  function Clipboard(trigger, options) {
    var _this;

    _classCallCheck(this, Clipboard);

    _this = _super.call(this);

    _this.resolveOptions(options);

    _this.listenClick(trigger);

    return _this;
  }
  /**
   * Defines if attributes would be resolved using internal setter functions
   * or custom functions that were passed in the constructor.
   * @param {Object} options
   */


  _createClass(Clipboard, [{
    key: "resolveOptions",
    value: function resolveOptions() {
      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
      this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
      this.text = typeof options.text === 'function' ? options.text : this.defaultText;
      this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;
    }
    /**
     * Adds a click event listener to the passed trigger.
     * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
     */

  }, {
    key: "listenClick",
    value: function listenClick(trigger) {
      var _this2 = this;

      this.listener = listen_default()(trigger, 'click', function (e) {
        return _this2.onClick(e);
      });
    }
    /**
     * Defines a new `ClipboardAction` on each click event.
     * @param {Event} e
     */

  }, {
    key: "onClick",
    value: function onClick(e) {
      var trigger = e.delegateTarget || e.currentTarget;
      var action = this.action(trigger) || 'copy';
      var text = actions_default({
        action: action,
        container: this.container,
        target: this.target(trigger),
        text: this.text(trigger)
      }); // Fires an event based on the copy operation result.

      this.emit(text ? 'success' : 'error', {
        action: action,
        text: text,
        trigger: trigger,
        clearSelection: function clearSelection() {
          if (trigger) {
            trigger.focus();
          }

          window.getSelection().removeAllRanges();
        }
      });
    }
    /**
     * Default `action` lookup function.
     * @param {Element} trigger
     */

  }, {
    key: "defaultAction",
    value: function defaultAction(trigger) {
      return getAttributeValue('action', trigger);
    }
    /**
     * Default `target` lookup function.
     * @param {Element} trigger
     */

  }, {
    key: "defaultTarget",
    value: function defaultTarget(trigger) {
      var selector = getAttributeValue('target', trigger);

      if (selector) {
        return document.querySelector(selector);
      }
    }
    /**
     * Allow fire programmatically a copy action
     * @param {String|HTMLElement} target
     * @param {Object} options
     * @returns Text copied.
     */

  }, {
    key: "defaultText",

    /**
     * Default `text` lookup function.
     * @param {Element} trigger
     */
    value: function defaultText(trigger) {
      return getAttributeValue('text', trigger);
    }
    /**
     * Destroy lifecycle.
     */

  }, {
    key: "destroy",
    value: function destroy() {
      this.listener.destroy();
    }
  }], [{
    key: "copy",
    value: function copy(target) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
        container: document.body
      };
      return actions_copy(target, options);
    }
    /**
     * Allow fire programmatically a cut action
     * @param {String|HTMLElement} target
     * @returns Text cutted.
     */

  }, {
    key: "cut",
    value: function cut(target) {
      return actions_cut(target);
    }
    /**
     * Returns the support of the given action, or all actions if no action is
     * given.
     * @param {String} [action]
     */

  }, {
    key: "isSupported",
    value: function isSupported() {
      var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
      var actions = typeof action === 'string' ? [action] : action;
      var support = !!document.queryCommandSupported;
      actions.forEach(function (action) {
        support = support && !!document.queryCommandSupported(action);
      });
      return support;
    }
  }]);

  return Clipboard;
}((tiny_emitter_default()));

/* harmony default export */ var clipboard = (Clipboard);

/***/ }),

/***/ 828:
/***/ (function(module) {

var DOCUMENT_NODE_TYPE = 9;

/**
 * A polyfill for Element.matches()
 */
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
    var proto = Element.prototype;

    proto.matches = proto.matchesSelector ||
                    proto.mozMatchesSelector ||
                    proto.msMatchesSelector ||
                    proto.oMatchesSelector ||
                    proto.webkitMatchesSelector;
}

/**
 * Finds the closest parent that matches a selector.
 *
 * @param {Element} element
 * @param {String} selector
 * @return {Function}
 */
function closest (element, selector) {
    while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
        if (typeof element.matches === 'function' &&
            element.matches(selector)) {
          return element;
        }
        element = element.parentNode;
    }
}

module.exports = closest;


/***/ }),

/***/ 438:
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_15749__) {

var closest = __nested_webpack_require_15749__(828);

/**
 * Delegates event to a selector.
 *
 * @param {Element} element
 * @param {String} selector
 * @param {String} type
 * @param {Function} callback
 * @param {Boolean} useCapture
 * @return {Object}
 */
function _delegate(element, selector, type, callback, useCapture) {
    var listenerFn = listener.apply(this, arguments);

    element.addEventListener(type, listenerFn, useCapture);

    return {
        destroy: function() {
            element.removeEventListener(type, listenerFn, useCapture);
        }
    }
}

/**
 * Delegates event to a selector.
 *
 * @param {Element|String|Array} [elements]
 * @param {String} selector
 * @param {String} type
 * @param {Function} callback
 * @param {Boolean} useCapture
 * @return {Object}
 */
function delegate(elements, selector, type, callback, useCapture) {
    // Handle the regular Element usage
    if (typeof elements.addEventListener === 'function') {
        return _delegate.apply(null, arguments);
    }

    // Handle Element-less usage, it defaults to global delegation
    if (typeof type === 'function') {
        // Use `document` as the first parameter, then apply arguments
        // This is a short way to .unshift `arguments` without running into deoptimizations
        return _delegate.bind(null, document).apply(null, arguments);
    }

    // Handle Selector-based usage
    if (typeof elements === 'string') {
        elements = document.querySelectorAll(elements);
    }

    // Handle Array-like based usage
    return Array.prototype.map.call(elements, function (element) {
        return _delegate(element, selector, type, callback, useCapture);
    });
}

/**
 * Finds closest match and invokes callback.
 *
 * @param {Element} element
 * @param {String} selector
 * @param {String} type
 * @param {Function} callback
 * @return {Function}
 */
function listener(element, selector, type, callback) {
    return function(e) {
        e.delegateTarget = closest(e.target, selector);

        if (e.delegateTarget) {
            callback.call(element, e);
        }
    }
}

module.exports = delegate;


/***/ }),

/***/ 879:
/***/ (function(__unused_webpack_module, exports) {

/**
 * Check if argument is a HTML element.
 *
 * @param {Object} value
 * @return {Boolean}
 */
exports.node = function(value) {
    return value !== undefined
        && value instanceof HTMLElement
        && value.nodeType === 1;
};

/**
 * Check if argument is a list of HTML elements.
 *
 * @param {Object} value
 * @return {Boolean}
 */
exports.nodeList = function(value) {
    var type = Object.prototype.toString.call(value);

    return value !== undefined
        && (type === '[object NodeList]' || type === '[object HTMLCollection]')
        && ('length' in value)
        && (value.length === 0 || exports.node(value[0]));
};

/**
 * Check if argument is a string.
 *
 * @param {Object} value
 * @return {Boolean}
 */
exports.string = function(value) {
    return typeof value === 'string'
        || value instanceof String;
};

/**
 * Check if argument is a function.
 *
 * @param {Object} value
 * @return {Boolean}
 */
exports.fn = function(value) {
    var type = Object.prototype.toString.call(value);

    return type === '[object Function]';
};


/***/ }),

/***/ 370:
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_19113__) {

var is = __nested_webpack_require_19113__(879);
var delegate = __nested_webpack_require_19113__(438);

/**
 * Validates all params and calls the right
 * listener function based on its target type.
 *
 * @param {String|HTMLElement|HTMLCollection|NodeList} target
 * @param {String} type
 * @param {Function} callback
 * @return {Object}
 */
function listen(target, type, callback) {
    if (!target && !type && !callback) {
        throw new Error('Missing required arguments');
    }

    if (!is.string(type)) {
        throw new TypeError('Second argument must be a String');
    }

    if (!is.fn(callback)) {
        throw new TypeError('Third argument must be a Function');
    }

    if (is.node(target)) {
        return listenNode(target, type, callback);
    }
    else if (is.nodeList(target)) {
        return listenNodeList(target, type, callback);
    }
    else if (is.string(target)) {
        return listenSelector(target, type, callback);
    }
    else {
        throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
    }
}

/**
 * Adds an event listener to a HTML element
 * and returns a remove listener function.
 *
 * @param {HTMLElement} node
 * @param {String} type
 * @param {Function} callback
 * @return {Object}
 */
function listenNode(node, type, callback) {
    node.addEventListener(type, callback);

    return {
        destroy: function() {
            node.removeEventListener(type, callback);
        }
    }
}

/**
 * Add an event listener to a list of HTML elements
 * and returns a remove listener function.
 *
 * @param {NodeList|HTMLCollection} nodeList
 * @param {String} type
 * @param {Function} callback
 * @return {Object}
 */
function listenNodeList(nodeList, type, callback) {
    Array.prototype.forEach.call(nodeList, function(node) {
        node.addEventListener(type, callback);
    });

    return {
        destroy: function() {
            Array.prototype.forEach.call(nodeList, function(node) {
                node.removeEventListener(type, callback);
            });
        }
    }
}

/**
 * Add an event listener to a selector
 * and returns a remove listener function.
 *
 * @param {String} selector
 * @param {String} type
 * @param {Function} callback
 * @return {Object}
 */
function listenSelector(selector, type, callback) {
    return delegate(document.body, selector, type, callback);
}

module.exports = listen;


/***/ }),

/***/ 817:
/***/ (function(module) {

function select(element) {
    var selectedText;

    if (element.nodeName === 'SELECT') {
        element.focus();

        selectedText = element.value;
    }
    else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
        var isReadOnly = element.hasAttribute('readonly');

        if (!isReadOnly) {
            element.setAttribute('readonly', '');
        }

        element.select();
        element.setSelectionRange(0, element.value.length);

        if (!isReadOnly) {
            element.removeAttribute('readonly');
        }

        selectedText = element.value;
    }
    else {
        if (element.hasAttribute('contenteditable')) {
            element.focus();
        }

        var selection = window.getSelection();
        var range = document.createRange();

        range.selectNodeContents(element);
        selection.removeAllRanges();
        selection.addRange(range);

        selectedText = selection.toString();
    }

    return selectedText;
}

module.exports = select;


/***/ }),

/***/ 279:
/***/ (function(module) {

function E () {
  // Keep this empty so it's easier to inherit from
  // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
}

E.prototype = {
  on: function (name, callback, ctx) {
    var e = this.e || (this.e = {});

    (e[name] || (e[name] = [])).push({
      fn: callback,
      ctx: ctx
    });

    return this;
  },

  once: function (name, callback, ctx) {
    var self = this;
    function listener () {
      self.off(name, listener);
      callback.apply(ctx, arguments);
    };

    listener._ = callback
    return this.on(name, listener, ctx);
  },

  emit: function (name) {
    var data = [].slice.call(arguments, 1);
    var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
    var i = 0;
    var len = evtArr.length;

    for (i; i < len; i++) {
      evtArr[i].fn.apply(evtArr[i].ctx, data);
    }

    return this;
  },

  off: function (name, callback) {
    var e = this.e || (this.e = {});
    var evts = e[name];
    var liveEvents = [];

    if (evts && callback) {
      for (var i = 0, len = evts.length; i < len; i++) {
        if (evts[i].fn !== callback && evts[i].fn._ !== callback)
          liveEvents.push(evts[i]);
      }
    }

    // Remove event from queue to prevent memory leak
    // Suggested by https://github.com/lazd
    // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910

    (liveEvents.length)
      ? e[name] = liveEvents
      : delete e[name];

    return this;
  }
};

module.exports = E;
module.exports.TinyEmitter = E;


/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __nested_webpack_require_24495__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		if(__webpack_module_cache__[moduleId]) {
/******/ 			return __webpack_module_cache__[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_24495__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__nested_webpack_require_24495__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__nested_webpack_require_24495__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__nested_webpack_require_24495__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__nested_webpack_require_24495__.o(definition, key) && !__nested_webpack_require_24495__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__nested_webpack_require_24495__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/************************************************************************/
/******/ 	// module exports must be returned from runtime so entry inlining is disabled
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	return __nested_webpack_require_24495__(686);
/******/ })()
.default;
});

/***/ },

/***/ 5741
(module) {

!function(t,e){ true?module.exports=e():0}(this,(function(){"use strict";function t(t){return null===t?"null":typeof t}function e(t){return!!t&&"object"==typeof t}function r(t){if(void 0===t)return"";if(null===t)return"Object";if("object"==typeof t&&!t.constructor)return"Object";var e=/function ([^(]*)/.exec(t.constructor.toString());return e&&e.length>1?e[1]:""}function n(t,e,r){return"null"===t||"undefined"===t?t:("string"!==t&&"stringifiable"!==t||(r='"'+r.replace(/"/g,'\\"')+'"'),"function"===t?e.toString().replace(/[\r\n]/g,"").replace(/\{.*\}/,"")+"{…}":r)}function o(o){var i="";return e(o)?(i=r(o),Array.isArray(o)&&(i+="["+o.length+"]")):i=n(t(o),o,o),i}function i(t){return"json-formatter-"+t}function s(t,e,r){var n=document.createElement(t);return e&&n.classList.add(i(e)),void 0!==r&&(r instanceof Node?n.appendChild(r):n.appendChild(document.createTextNode(String(r)))),n}!function(t){if(t&&"undefined"!=typeof window){var e=document.createElement("style");e.setAttribute("media","screen"),e.innerHTML=t,document.head.appendChild(e)}}('.json-formatter-row {\n  font-family: monospace;\n}\n.json-formatter-row,\n.json-formatter-row a,\n.json-formatter-row a:hover {\n  color: black;\n  text-decoration: none;\n}\n.json-formatter-row .json-formatter-row {\n  margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty {\n  opacity: 0.5;\n  margin-left: 1rem;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n  display: none;\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n  content: "No properties";\n}\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n  content: "[]";\n}\n.json-formatter-row .json-formatter-string,\n.json-formatter-row .json-formatter-stringifiable {\n  color: green;\n  white-space: pre;\n  word-wrap: break-word;\n}\n.json-formatter-row .json-formatter-number {\n  color: blue;\n}\n.json-formatter-row .json-formatter-boolean {\n  color: red;\n}\n.json-formatter-row .json-formatter-null {\n  color: #855A00;\n}\n.json-formatter-row .json-formatter-undefined {\n  color: #ca0b69;\n}\n.json-formatter-row .json-formatter-function {\n  color: #FF20ED;\n}\n.json-formatter-row .json-formatter-date {\n  background-color: rgba(0, 0, 0, 0.05);\n}\n.json-formatter-row .json-formatter-url {\n  text-decoration: underline;\n  color: blue;\n  cursor: pointer;\n}\n.json-formatter-row .json-formatter-bracket {\n  color: blue;\n}\n.json-formatter-row .json-formatter-key {\n  color: #00008B;\n  padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler-link {\n  cursor: pointer;\n}\n.json-formatter-row .json-formatter-toggler {\n  line-height: 1.2rem;\n  font-size: 0.7rem;\n  vertical-align: middle;\n  opacity: 0.6;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-row .json-formatter-toggler:after {\n  display: inline-block;\n  transition: transform 100ms ease-in;\n  content: "►";\n}\n.json-formatter-row > a > .json-formatter-preview-text {\n  opacity: 0;\n  transition: opacity 0.15s ease-in;\n  font-style: italic;\n}\n.json-formatter-row:hover > a > .json-formatter-preview-text {\n  opacity: 0.6;\n}\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n  transform: rotate(90deg);\n}\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n  display: inline-block;\n}\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n  display: none;\n}\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n  display: block;\n}\n.json-formatter-dark.json-formatter-row {\n  font-family: monospace;\n}\n.json-formatter-dark.json-formatter-row,\n.json-formatter-dark.json-formatter-row a,\n.json-formatter-dark.json-formatter-row a:hover {\n  color: white;\n  text-decoration: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-row {\n  margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\n  opacity: 0.5;\n  margin-left: 1rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\n  display: none;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\n  content: "No properties";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\n  content: "[]";\n}\n.json-formatter-dark.json-formatter-row .json-formatter-string,\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\n  color: #31F031;\n  white-space: pre;\n  word-wrap: break-word;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-number {\n  color: #66C2FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\n  color: #EC4242;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-null {\n  color: #EEC97D;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\n  color: #ef8fbe;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-function {\n  color: #FD48CB;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-date {\n  background-color: rgba(255, 255, 255, 0.05);\n}\n.json-formatter-dark.json-formatter-row .json-formatter-url {\n  text-decoration: underline;\n  color: #027BFF;\n  cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\n  color: #9494FF;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-key {\n  color: #23A0DB;\n  padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\n  cursor: pointer;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\n  line-height: 1.2rem;\n  font-size: 0.7rem;\n  vertical-align: middle;\n  opacity: 0.6;\n  cursor: pointer;\n  padding-right: 0.2rem;\n}\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\n  display: inline-block;\n  transition: transform 100ms ease-in;\n  content: "►";\n}\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\n  opacity: 0;\n  transition: opacity 0.15s ease-in;\n  font-style: italic;\n}\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\n  opacity: 0.6;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\n  transform: rotate(90deg);\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\n  display: inline-block;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\n  display: none;\n}\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\n  display: block;\n}\n');var a=/(^\d{1,4}[\.|\\/|-]\d{1,2}[\.|\\/|-]\d{1,4})(\s*(?:0?[1-9]:[0-5]|1(?=[012])\d:[0-5])\d\s*[ap]m)?$/,f=/\d{2}:\d{2}:\d{2} GMT-\d{4}/,m=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/,l=window.requestAnimationFrame||function(t){return t(),0},d={hoverPreviewEnabled:!1,hoverPreviewArrayCount:100,hoverPreviewFieldCount:5,animateOpen:!0,animateClose:!0,theme:null,useToJSON:!0,sortPropertiesBy:null};return function(){function c(t,e,r,n){void 0===e&&(e=1),void 0===r&&(r=d),this.json=t,this.open=e,this.config=r,this.key=n,this._isOpen=null,void 0===this.config.hoverPreviewEnabled&&(this.config.hoverPreviewEnabled=d.hoverPreviewEnabled),void 0===this.config.hoverPreviewArrayCount&&(this.config.hoverPreviewArrayCount=d.hoverPreviewArrayCount),void 0===this.config.hoverPreviewFieldCount&&(this.config.hoverPreviewFieldCount=d.hoverPreviewFieldCount),void 0===this.config.useToJSON&&(this.config.useToJSON=d.useToJSON),""===this.key&&(this.key='""')}return Object.defineProperty(c.prototype,"isOpen",{get:function(){return null!==this._isOpen?this._isOpen:this.open>0},set:function(t){this._isOpen=t},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isDate",{get:function(){return this.json instanceof Date||"string"===this.type&&(a.test(this.json)||m.test(this.json)||f.test(this.json))},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isUrl",{get:function(){return"string"===this.type&&0===this.json.indexOf("http")},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isArray",{get:function(){return Array.isArray(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isObject",{get:function(){return e(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isEmptyObject",{get:function(){return!this.keys.length&&!this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isEmpty",{get:function(){return this.isEmptyObject||this.keys&&!this.keys.length&&this.isArray},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"useToJSON",{get:function(){return this.config.useToJSON&&"stringifiable"===this.type},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"hasKey",{get:function(){return void 0!==this.key},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"constructorName",{get:function(){return r(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"type",{get:function(){return this.config.useToJSON&&this.json&&this.json.toJSON?"stringifiable":t(this.json)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"keys",{get:function(){if(this.isObject){var t=Object.keys(this.json);return!this.isArray&&this.config.sortPropertiesBy?t.sort(this.config.sortPropertiesBy):t}return[]},enumerable:!0,configurable:!0}),c.prototype.toggleOpen=function(){this.isOpen=!this.isOpen,this.element&&(this.isOpen?this.appendChildren(this.config.animateOpen):this.removeChildren(this.config.animateClose),this.element.classList.toggle(i("open")))},c.prototype.openAtDepth=function(t){void 0===t&&(t=1),t<0||(this.open=t,this.isOpen=0!==t,this.element&&(this.removeChildren(!1),0===t?this.element.classList.remove(i("open")):(this.appendChildren(this.config.animateOpen),this.element.classList.add(i("open")))))},c.prototype.getInlinepreview=function(){var t=this;if(this.isArray)return this.json.length>this.config.hoverPreviewArrayCount?"Array["+this.json.length+"]":"["+this.json.map(o).join(", ")+"]";var e=this.keys,r=e.slice(0,this.config.hoverPreviewFieldCount).map((function(e){return e+":"+o(t.json[e])})),n=e.length>=this.config.hoverPreviewFieldCount?"…":"";return"{"+r.join(", ")+n+"}"},c.prototype.render=function(){this.element=s("div","row");var t=this.isObject?s("a","toggler-link"):s("span");if(this.isObject&&!this.useToJSON&&t.appendChild(s("span","toggler")),this.hasKey&&t.appendChild(s("span","key",this.key+":")),this.isObject&&!this.useToJSON){var e=s("span","value"),r=s("span"),o=s("span","constructor-name",this.constructorName);if(r.appendChild(o),this.isArray){var a=s("span");a.appendChild(s("span","bracket","[")),a.appendChild(s("span","number",this.json.length)),a.appendChild(s("span","bracket","]")),r.appendChild(a)}e.appendChild(r),t.appendChild(e)}else{(e=this.isUrl?s("a"):s("span")).classList.add(i(this.type)),this.isDate&&e.classList.add(i("date")),this.isUrl&&(e.classList.add(i("url")),e.setAttribute("href",this.json));var f=n(this.type,this.json,this.useToJSON?this.json.toJSON():this.json);e.appendChild(document.createTextNode(f)),t.appendChild(e)}if(this.isObject&&this.config.hoverPreviewEnabled){var m=s("span","preview-text");m.appendChild(document.createTextNode(this.getInlinepreview())),t.appendChild(m)}var l=s("div","children");return this.isObject&&l.classList.add(i("object")),this.isArray&&l.classList.add(i("array")),this.isEmpty&&l.classList.add(i("empty")),this.config&&this.config.theme&&this.element.classList.add(i(this.config.theme)),this.isOpen&&this.element.classList.add(i("open")),this.element.appendChild(t),this.element.appendChild(l),this.isObject&&this.isOpen&&this.appendChildren(),this.isObject&&!this.useToJSON&&t.addEventListener("click",this.toggleOpen.bind(this)),this.element},c.prototype.appendChildren=function(t){var e=this;void 0===t&&(t=!1);var r=this.element.querySelector("div."+i("children"));if(r&&!this.isEmpty)if(t){var n=0,o=function(){var t=e.keys[n],i=new c(e.json[t],e.open-1,e.config,t);r.appendChild(i.render()),(n+=1)<e.keys.length&&(n>10?o():l(o))};l(o)}else this.keys.forEach((function(t){var n=new c(e.json[t],e.open-1,e.config,t);r.appendChild(n.render())}))},c.prototype.removeChildren=function(t){void 0===t&&(t=!1);var e=this.element.querySelector("div."+i("children"));if(t){var r=0,n=function(){e&&e.children.length&&(e.removeChild(e.children[0]),(r+=1)>10?n():l(n))};l(n)}else e&&(e.innerHTML="")},c}()}));


/***/ }

/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/ 
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ 	// Check if module is in cache
/******/ 	var cachedModule = __webpack_module_cache__[moduleId];
/******/ 	if (cachedModule !== undefined) {
/******/ 		return cachedModule.exports;
/******/ 	}
/******/ 	// Create a new module (and put it into the cache)
/******/ 	var module = __webpack_module_cache__[moduleId] = {
/******/ 		// no module.id needed
/******/ 		// no module.loaded needed
/******/ 		exports: {}
/******/ 	};
/******/ 
/******/ 	// Execute the module function
/******/ 	__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 
/******/ 	// Return the exports of the module
/******/ 	return module.exports;
/******/ }
/******/ 
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = (module) => {
/******/ 		var getter = module && module.__esModule ?
/******/ 			() => (module['default']) :
/******/ 			() => (module);
/******/ 		__webpack_require__.d(getter, { a: getter });
/******/ 		return getter;
/******/ 	};
/******/ })();
/******/ 
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ 	// define getter functions for harmony exports
/******/ 	__webpack_require__.d = (exports, definition) => {
/******/ 		for(var key in definition) {
/******/ 			if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 				Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 			}
/******/ 		}
/******/ 	};
/******/ })();
/******/ 
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ 	__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/ 
/************************************************************************/

;// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(o) {
  "@babel/helpers - typeof";

  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
    return typeof o;
  } : function (o) {
    return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  }, _typeof(o);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js

function toPrimitive(t, r) {
  if ("object" != _typeof(t) || !t) return t;
  var e = t[Symbol.toPrimitive];
  if (void 0 !== e) {
    var i = e.call(t, r || "default");
    if ("object" != _typeof(i)) return i;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t);
}

;// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js


function toPropertyKey(t) {
  var i = toPrimitive(t, "string");
  return "symbol" == _typeof(i) ? i : i + "";
}

;// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js

function _defineProperty(e, r, t) {
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[r] = t, e;
}

;// external "vue"

;// external "../shared"

;// ../../packages/hooks/use-message.ts

function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */


var instances = {
  'top-left': [],
  'top-right': [],
  'bottom-left': [],
  'bottom-right': []
};
var seed = 1;
// 更新指定位置的所有 Message 实例的位置
var updateModalPosition = function updateModalPosition(position, spacing) {
  var initialOffset = 30;
  var offsetTop = initialOffset;
  instances[position].forEach(function (vm) {
    if (vm.el) {
      // 获取当前实例的实际高度（包括详情展开后的高度）
      var currentHeight = vm.el.offsetHeight || 0;
      // 直接更新 DOM 元素的 top 样式，确保位置立即生效
      vm.el.style.top = "".concat(offsetTop, "px");
      // 同时更新 props，保持数据一致性
      vm.props.offsetY = offsetTop;
      // 然后累加当前实例的高度和间距，用于计算下一个实例的位置
      offsetTop += currentHeight + spacing;
    }
  });
};
var Message = function Message(constructor, options) {
  var opts = options;
  var position = opts.position || 'top-right';
  if (typeof options === 'string') {
    opts = {
      message: options
    };
  }
  var userOnClose = options.onClose;
  var horizontalOffset = opts.offsetX || 10;
  var verticalOffset = opts.offsetY || 30;
  var _opts = opts,
    _opts$spacing = _opts.spacing,
    spacing = _opts$spacing === void 0 ? 10 : _opts$spacing;
  instances[position].forEach(function (vm) {
    verticalOffset += (vm.el.offsetHeight || 0) + spacing;
  });
  seed += 1;
  var id = "message_".concat(seed);
  opts = _objectSpread(_objectSpread({}, opts), {}, {
    offsetX: horizontalOffset,
    offsetY: verticalOffset,
    id: id,
    spacing: spacing
  });
  var container = document.createElement('div');
  var vm = __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(constructor, opts);
  vm.props.onDestroy = function (id) {
    use_message_close(id, position, spacing, userOnClose);
    __WEBPACK_EXTERNAL_MODULE_vue_render__(null, container);
  };
  vm.props.onDetail = function (_isShow, id) {
    instances[position].forEach(function (item) {
      if (item.props.id !== id) {
        var _item$component;
        // 关闭其他实例的详情时，传入 shouldEmit = false 避免触发无限循环
        (_item$component = item.component) === null || _item$component === void 0 || (_item$component = _item$component.exposed) === null || _item$component === void 0 || _item$component.setDetailsShow(null, false, false);
      }
    });
    // 等待 DOM 更新完成后再更新位置
    // 详情展开/收起时，DOM 高度会变化，需要等待渲染完成
    // 由于事件已经在详情内容渲染完成后才 emit，这里只需要等待 Vue 响应式更新和浏览器布局完成
    var currentSpacing = spacing || 10;
    __WEBPACK_EXTERNAL_MODULE_vue_nextTick__(function () {
      requestAnimationFrame(function () {
        updateModalPosition(position, currentSpacing);
      });
    });
  };
  __WEBPACK_EXTERNAL_MODULE_vue_render__(vm, container);
  instances[position].push(vm);
  var target;
  if (vm.props.getContainer && __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_isElement__(vm.props.getContainer)) {
    target = vm.props.getContainer;
  } else {
    target = document.body;
  }
  target.appendChild(container.firstElementChild);
};
function use_message_close(id, position, spacing, userOnClose) {
  userOnClose === null || userOnClose === void 0 || userOnClose();
  var instanceIndex = -1;
  instances[position].forEach(function (item, index) {
    if (item.props.id === id) {
      instanceIndex = index;
    }
  });
  if (instanceIndex === -1) {
    return;
  }
  // 移除实例
  instances[position].splice(instanceIndex, 1);
  // 重新计算所有剩余实例的位置
  // 使用传入的 spacing，如果没有则从第一个实例获取，或使用默认值 10
  var currentSpacing = spacing || (instances[position].length > 0 ? instances[position][0].props.spacing : 10) || 10;
  __WEBPACK_EXTERNAL_MODULE_vue_nextTick__(function () {
    updateModalPosition(position, currentSpacing);
  });
}
/* harmony default export */ const use_message = (Message);
;// ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function _arrayLikeToArray(r, a) {
  (null == a || a > r.length) && (a = r.length);
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  return n;
}

;// ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js

function _arrayWithoutHoles(r) {
  if (Array.isArray(r)) return _arrayLikeToArray(r);
}

;// ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
function _iterableToArray(r) {
  if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}

;// ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js

function _unsupportedIterableToArray(r, a) {
  if (r) {
    if ("string" == typeof r) return _arrayLikeToArray(r, a);
    var t = {}.toString.call(r).slice(8, -1);
    return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  }
}

;// ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}

;// ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js




function _toConsumableArray(r) {
  return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
}

;// external "vue-types"

;// external "../config-provider"

;// external "../icon"

// EXTERNAL MODULE: ../../node_modules/clipboard/dist/clipboard.js
var clipboard = __webpack_require__(3739);
var clipboard_default = /*#__PURE__*/__webpack_require__.n(clipboard);
// EXTERNAL MODULE: ../../node_modules/json-formatter-js/dist/json-formatter.umd.js
var json_formatter_umd = __webpack_require__(5741);
var json_formatter_umd_default = /*#__PURE__*/__webpack_require__.n(json_formatter_umd);
;// ../../packages/message/src/messageConstructor.tsx





function messageConstructor_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function messageConstructor_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? messageConstructor_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : messageConstructor_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */







var MessageThemeEnum;
(function (MessageThemeEnum) {
  MessageThemeEnum["ERROR"] = "error";
  MessageThemeEnum["PRIMARY"] = "primary";
  MessageThemeEnum["SUCCESS"] = "success";
  MessageThemeEnum["WARNING"] = "warning";
})(MessageThemeEnum || (MessageThemeEnum = {}));
var MessageContentType;
(function (MessageContentType) {
  MessageContentType["JSON"] = "json";
  MessageContentType["KEY_VALUE"] = "key-value";
})(MessageContentType || (MessageContentType = {}));
var IMessageActionType;
(function (IMessageActionType) {
  /**
   * 联系助手：默认直接拉起企业微信与助手的聊天，需要在 message.assistant 配置对应的企微群ID
   */
  IMessageActionType["ASSISTANT"] = "assistant";
  /**
   * 关闭：点击关闭，Message 消失
   */
  IMessageActionType["CLOSE"] = "close";
  /**
   * 展开详情：展开面向开发的详情
   */
  IMessageActionType["DETAILS"] = "details";
  /**
   * 图钉按钮：点击后，Message 不会自动消失
   */
  IMessageActionType["FIX"] = "fix";
})(IMessageActionType || (IMessageActionType = {}));
var messageProps = {
  id: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def(''),
  message: __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_toType__('IMessage', {}),
  theme: __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_toType__('messageTheme', {}).def(MessageThemeEnum.PRIMARY),
  delay: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number,
  dismissable: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.bool.def(true),
  offsetY: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(30),
  spacing: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number.def(10),
  extCls: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string.def(''),
  onClose: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.func,
  getContainer: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.instanceOf(HTMLElement),
  width: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string]),
  minWidth: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string]).def(100),
  maxWidth: __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.oneOfType([__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.number, __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_PropTypes__.string]).def('100%'),
  actions: __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a_toType__('IMessageAction', {})
};
/* harmony default export */ const messageConstructor = (__WEBPACK_EXTERNAL_MODULE_vue_defineComponent__({
  name: 'Message',
  props: messageProps,
  emits: ['destroy', 'detail'],
  setup: function setup(props, _ref) {
    var _this = this;
    var emit = _ref.emit,
      slots = _ref.slots,
      expose = _ref.expose;
    var t = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_useLocale__('message');
    var _usePrefix = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3_usePrefix__(),
      resolveClassName = _usePrefix.resolveClassName;
    var classNames = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return ["".concat(resolveClassName('message')), "".concat(resolveClassName("message-".concat(props.theme))), "".concat(props.extCls)];
    });
    var zIndex = __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_bkZIndexManager__.getMessageNextIndex();
    var singleLineWidth = 560;
    var advanceWidth = 800;
    var singleLineDelay = 3000;
    var advanceDelay = 8000;
    var timerDelay = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      if (/^\d+\.?\d*$/.test("".concat(props.delay))) {
        return props.delay;
      }
      if (_typeof(props.message) === 'object' && !__WEBPACK_EXTERNAL_MODULE_vue_isVNode__(props.message)) {
        return advanceDelay;
      }
      return singleLineDelay;
    });
    var getPropNumberAsStringValue = function getPropNumberAsStringValue(key) {
      return typeof props[key] === 'number' ? "".concat(props[key], "px") : props[key];
    };
    var contentWidth = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      var minMaxWidth = {
        maxWidth: getPropNumberAsStringValue('maxWidth'),
        minWidth: getPropNumberAsStringValue('minWidth')
      };
      var isAdvance = _typeof(props.message) === 'object' && !__WEBPACK_EXTERNAL_MODULE_vue_isVNode__(props.message);
      if (/%$/.test("".concat(props.width)) || /auto/gi.test("".concat(props.width))) {
        return messageConstructor_objectSpread({
          width: props.width
        }, minMaxWidth);
      }
      if (/^\d+/.test("".concat(props.width))) {
        return /^\d+\.?\d*$/.test("".concat(props.width)) ? messageConstructor_objectSpread({
          width: "".concat(props.width, "px")
        }, minMaxWidth) : messageConstructor_objectSpread({
          width: props.width
        }, minMaxWidth);
      }
      if (isAdvance) {
        return {
          width: "".concat(advanceWidth, "px")
        };
      }
      return {
        width: "".concat(singleLineWidth, "px")
      };
    });
    var isGetContainer = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return props.getContainer && __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03_isElement__(props.getContainer);
    });
    var styles = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return Object.assign({
        top: "".concat(props.offsetY, "px"),
        zIndex: zIndex,
        position: isGetContainer.value ? 'absolute' : 'fixed'
      }, contentWidth.value);
    });
    var refJsonContent = __WEBPACK_EXTERNAL_MODULE_vue_ref__(null);
    var refCopyStatus = __WEBPACK_EXTERNAL_MODULE_vue_ref__(null);
    var refCopyMsgDiv = __WEBPACK_EXTERNAL_MODULE_vue_ref__(null);
    var visible = __WEBPACK_EXTERNAL_MODULE_vue_ref__(false);
    var toolOperation = __WEBPACK_EXTERNAL_MODULE_vue_reactive__({
      isFix: false,
      isDetailShow: false
    });
    var timer = null;
    var startTimer = function startTimer() {
      timer = setTimeout(function () {
        if (toolOperation.isFix) {
          return;
        }
        visible.value = false;
      }, timerDelay.value);
    };
    var close = function close(e) {
      e.preventDefault();
      e.stopPropagation();
      visible.value = false;
    };
    var copyStatusTimer;
    var copyStatus = __WEBPACK_EXTERNAL_MODULE_vue_ref__(null);
    var parseToString = function parseToString(value) {
      var targetStr = value;
      if (_typeof(value) === 'object') {
        try {
          targetStr = JSON.stringify(value);
        } catch (e) {
          console.error("JSON.stringify Error: ".concat(e));
        }
      }
      return targetStr;
    };
    var copyMessage = function copyMessage() {
      var copyInstance = new (clipboard_default())(refCopyMsgDiv.value, {
        text: function text() {
          return parseToString(props.message.details);
        }
      });
      registerCopyCallback(copyInstance);
    };
    var registerCopyCallback = function registerCopyCallback(copyInstance, complete) {
      ['success', 'error'].forEach(function (theme) {
        copyInstance.on(theme, function (e) {
          var target = refCopyStatus.value;
          copyStatus.value = theme;
          if (target) {
            var _target$classList, _target$classList2;
            var _e$trigger = e.trigger,
              offsetLeft = _e$trigger.offsetLeft,
              offsetWidth = _e$trigger.offsetWidth,
              offsetTop = _e$trigger.offsetTop;
            var msgTree = e.trigger.closest('.message-tree');
            var msgTreeScrollTop = msgTree ? msgTree.scrollTop : 0;
            (_target$classList = target.classList).remove.apply(_target$classList, ['success', 'error', 'is-hidden']);
            (_target$classList2 = target.classList).add.apply(_target$classList2, [theme, 'is-show']);
            var transX = offsetLeft + offsetWidth / 2 - 41;
            var transY = offsetTop - msgTreeScrollTop - 40;
            target.style.setProperty('transform', "translate(".concat(transX, "px, ").concat(transY, "px"));
            copyStatusTimer && clearTimeout(copyStatusTimer);
            copyStatusTimer = setTimeout(function () {
              var _target$classList3, _target$classList4;
              (_target$classList3 = target.classList).remove.apply(_target$classList3, ['is-show']);
              (_target$classList4 = target.classList).add.apply(_target$classList4, ['is-hidden']);
            }, 2000);
          }
          if (typeof complete === 'function') {
            complete();
          }
        });
      });
    };
    var copyValueItem = function copyValueItem() {
      var copyInstance = new (clipboard_default())(refJsonContent.value.querySelectorAll('span.copy-value'), {
        text: function text(trigger) {
          return trigger.innerHTML;
        }
      });
      registerCopyCallback(copyInstance);
    };
    var parseToJson = function parseToJson(value) {
      var targetJson = value;
      if (typeof value === 'string') {
        try {
          targetJson = JSON.parse(value);
        } catch (e) {
          console.error("Format Json Error: ".concat(e));
        }
      }
      return targetJson;
    };
    var setDetailsShow = function setDetailsShow(e, isShow) {
      var shouldEmit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
      toolOperation.isDetailShow = isShow !== null && isShow !== void 0 ? isShow : !toolOperation.isDetailShow;
      fixMesage(e, toolOperation.isDetailShow);
      // 用于在详情内容渲染完成后 emit 事件的回调
      var emitAfterRender = function emitAfterRender() {
        if (shouldEmit && _typeof(props.message) === 'object' && !__WEBPACK_EXTERNAL_MODULE_vue_isVNode__(props.message)) {
          emit('detail', toolOperation.isDetailShow, props.id);
        }
      };
      if (toolOperation.isDetailShow && _typeof(props.message) === 'object' && !__WEBPACK_EXTERNAL_MODULE_vue_isVNode__(props.message)) {
        if (props.message.type === MessageContentType.JSON || !props.message.type) {
          var targetJson = parseToJson(props.message.details);
          var formatter = new (json_formatter_umd_default())(targetJson);
          setTimeout(function () {
            if (refJsonContent.value) {
              refJsonContent.value.innerHTML = '';
              refJsonContent.value.append(formatter.render());
            }
            copyMessage();
            // 详情内容渲染完成后，再 emit 事件以更新位置
            emitAfterRender();
          });
        } else if (props.message.type === MessageContentType.KEY_VALUE) {
          setTimeout(function () {
            copyMessage();
            copyValueItem();
            // 详情内容渲染完成后，再 emit 事件以更新位置
            emitAfterRender();
          });
        } else {
          // 如果没有详情内容需要渲染，立即 emit
          emitAfterRender();
        }
      } else {
        // 收起详情时，立即 emit 事件
        emitAfterRender();
      }
    };
    var fixMesage = function fixMesage(_e, isFix) {
      toolOperation.isFix = isFix !== null && isFix !== void 0 ? isFix : !toolOperation.isFix;
    };
    var addMouseKeyEvent = function addMouseKeyEvent() {
      var remove = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      var isAdvance = _typeof(props.message) === 'object' && !__WEBPACK_EXTERNAL_MODULE_vue_isVNode__(props.message);
      if (!isAdvance) {
        return;
      }
      if (remove) {
        document.removeEventListener('keydown', handleMouseKeyEvent);
        return;
      }
      document.addEventListener('keydown', handleMouseKeyEvent);
    };
    var handleMouseKeyEvent = function handleMouseKeyEvent(e) {
      if (e.altKey && e.keyCode === 80) {
        fixMesage(e);
      }
    };
    __WEBPACK_EXTERNAL_MODULE_vue_onMounted__(function () {
      timerDelay.value && startTimer();
      visible.value = true;
      addMouseKeyEvent();
    });
    __WEBPACK_EXTERNAL_MODULE_vue_onUnmounted__(function () {
      clearTimeout(timer);
      addMouseKeyEvent(true);
    });
    __WEBPACK_EXTERNAL_MODULE_vue_watch__(visible, function () {
      if (!visible.value) {
        emit('destroy', props.id);
      }
    });
    var handleMouseenter = function handleMouseenter(_e) {
      clearTimeout(timer);
    };
    var handleMouseleave = function handleMouseleave(_e) {
      timerDelay.value && startTimer();
    };
    var handleHeplerClick = function handleHeplerClick(_e) {
      if (props.message.assistant) {
        window.open(props.message.assistant, '_blank');
      }
    };
    var defActionList = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, IMessageActionType.ASSISTANT, {
        id: IMessageActionType.ASSISTANT,
        icon: function icon() {
          return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Assistant__, null, null);
        },
        text: function text() {
          return t.value.assistant;
        },
        onClick: function onClick(e) {
          return handleHeplerClick(e);
        }
      }), IMessageActionType.DETAILS, {
        id: IMessageActionType.DETAILS,
        icon: function icon() {
          return toolOperation.isDetailShow ? __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_AngleDoubleUpLine__, null, null) : __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_AngleDoubleDownLine__, null, null);
        },
        text: function text() {
          return t.value.details;
        },
        onClick: function onClick(e) {
          return setDetailsShow(e);
        }
      }), IMessageActionType.FIX, {
        id: IMessageActionType.FIX,
        icon: function icon() {
          return toolOperation.isFix ? __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_FixShape__, null, null) : __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_FixLine__, null, null);
        },
        classList: toolOperation.isFix ? 'fixed' : '',
        onClick: function onClick(e) {
          return fixMesage(e);
        }
      }), IMessageActionType.CLOSE, {
        id: IMessageActionType.CLOSE,
        classList: 'normal-color',
        icon: function icon() {
          return props.dismissable && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Error__, {
            "class": "".concat(resolveClassName('message-close')),
            "onClick": close
          }, null);
        },
        onClick: close
      });
    });
    var sortActionIdList = [IMessageActionType.ASSISTANT, IMessageActionType.DETAILS, IMessageActionType.FIX, IMessageActionType.CLOSE];
    var actionList = __WEBPACK_EXTERNAL_MODULE_vue_computed__(function () {
      var _props$actions;
      if (((_props$actions = props.actions) === null || _props$actions === void 0 ? void 0 : _props$actions.length) > 0) {
        var resultList = props.actions.map(function (action) {
          var id = action.id.toLocaleLowerCase();
          var defAction = defActionList.value[id];
          var defClickFn = defAction === null || defAction === void 0 ? void 0 : defAction.onClick;
          var target = Object.assign({}, defActionList.value[id] || {}, action);
          target.id = id;
          if (action.classList !== undefined) {
            var classList = Array.isArray(action.classList) ? action.classList : [action.classList];
            var defClassList = [];
            if (defAction.classList !== undefined) {
              defClassList = Array.isArray(defAction.classList) ? defAction.classList : [defAction.classList];
            }
            target.classList = [].concat(_toConsumableArray(defClassList), _toConsumableArray(classList));
          }
          if (typeof action.onClick === 'function') {
            target.onClick = function () {
              var resp = Reflect.apply(action.onClick, _this, []);
              if ((_typeof(resp) === undefined || resp) && typeof defClickFn === 'function') {
                Reflect.apply(defClickFn, _this, []);
              }
            };
            return target;
          }
          target.onClick = defClickFn;
          return target;
        });
        var appendList = sortActionIdList.filter(function (id) {
          return !resultList.some(function (action) {
            return action.id === id;
          });
        }).map(function (id) {
          return defActionList.value[id];
        });
        resultList.push.apply(resultList, _toConsumableArray(appendList));
        return resultList;
      }
      return sortActionIdList.map(function (id) {
        return defActionList.value[id];
      });
    });
    var renderMessageActions = function renderMessageActions() {
      var _slots$action, _slots$action2;
      var renderIcon = function renderIcon(_ref3) {
        var icon = _ref3.icon;
        if (typeof icon === 'function') {
          return Reflect.apply(icon, _this, []);
        }
        return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("span", {
          "class": icon
        }, null);
      };
      var renderText = function renderText(_ref4) {
        var text = _ref4.text;
        var content = undefined;
        if (typeof text === 'function') {
          content = Reflect.apply(text, _this, []);
        }
        if (content === undefined) {
          return;
        }
        if (typeof content === 'string') {
          return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("span", {
            "class": "message-action-text"
          }, [content]);
        }
        return content;
      };
      var handleActionClick = function handleActionClick(e, action) {
        if (action.readonly || action.disabled) {
          return;
        }
        if (typeof action.onClick === 'function') {
          Reflect.apply(action.onClick, _this, [e, action]);
        }
      };
      var renderActionList = function renderActionList() {
        return actionList.value.map(function (action) {
          if (action.disabled) {
            return null;
          }
          if (typeof action.render === 'function') {
            return Reflect.apply(action.render, _this, []);
          }
          var classList = Array.isArray(action.classList) ? action.classList.join(' ') : action.classList;
          return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("span", {
            "class": ['tool', action.id, classList],
            "onClick": function onClick(e) {
              return handleActionClick(e, action);
            }
          }, [renderIcon(action), renderText(action)]);
        });
      };
      return (_slots$action = (_slots$action2 = slots.action) === null || _slots$action2 === void 0 ? void 0 : _slots$action2.call(slots)) !== null && _slots$action !== void 0 ? _slots$action : renderActionList();
    };
    expose({
      setDetailsShow: setDetailsShow
    });
    return {
      classNames: classNames,
      styles: styles,
      visible: visible,
      close: close,
      setDetailsShow: setDetailsShow,
      fixMesage: fixMesage,
      copyMessage: copyMessage,
      parseToJson: parseToJson,
      handleMouseenter: handleMouseenter,
      handleMouseleave: handleMouseleave,
      renderMessageActions: renderMessageActions,
      refJsonContent: refJsonContent,
      refCopyStatus: refCopyStatus,
      refCopyMsgDiv: refCopyMsgDiv,
      toolOperation: toolOperation,
      copyStatus: copyStatus,
      t: t,
      resolveClassName: resolveClassName,
      copyValueItem: copyValueItem
    };
  },
  render: function render() {
    var _this2 = this;
    var renderIcon = function renderIcon(theme) {
      var iconMap = {
        primary: __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Info__, null, null),
        warning: __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Warn__, null, null),
        success: __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Success__, null, null),
        error: __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Close__, null, null)
      };
      return iconMap[theme !== null && theme !== void 0 ? theme : _this2.theme];
    };
    var renderMsgDetail = function renderMsgDetail(msg) {
      if (msg.type === MessageContentType.KEY_VALUE) {
        var target = _this2.parseToJson(msg.details || {});
        var keys = Object.keys(target);
        return keys.map(function (key) {
          return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
            "class": "message-row"
          }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("label", null, [key]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("span", {
            "class": "copy-value"
          }, [target[key]])]);
        });
      }
    };
    var renderMessage = function renderMessage() {
      if (_typeof(_this2.message) === 'object' && !__WEBPACK_EXTERNAL_MODULE_vue_isVNode__(_this2.message)) {
        var _this2$$slots$title, _this2$$slots$title2, _this2$$slots;
        return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": "".concat(_this2.resolveClassName('message-content'), " multi")
        }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": "overview"
        }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": "left-content"
        }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": "".concat(_this2.resolveClassName('message-icon'))
        }, [renderIcon()]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": "describe"
        }, [(_this2$$slots$title = (_this2$$slots$title2 = (_this2$$slots = _this2.$slots).title) === null || _this2$$slots$title2 === void 0 ? void 0 : _this2$$slots$title2.call(_this2$$slots)) !== null && _this2$$slots$title !== void 0 ? _this2$$slots$title : "".concat(_this2.message.code ? "\u3010".concat(_this2.message.code, "\u3011") : '').concat(_this2.message.overview, " ").concat(_this2.message.suggestion)])]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": "tools"
        }, [_this2.renderMessageActions()])]), _this2.toolOperation.isDetailShow && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": "message-detail"
        }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "ref": "refCopyMsgDiv",
          "class": "message-copy"
        }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_CopyShape__, null, null)]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "ref": "refCopyStatus",
          "class": "copy-status"
        }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "class": "inner"
        }, [renderIcon(_this2.copyStatus), _this2.copyStatus === 'success' ? _this2.t.copySuccess : _this2.t.copyFailed])]), __WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "ref": "refJsonContent",
          "class": "message-tree"
        }, [renderMsgDetail(_this2.message)])])]);
      }
      return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Fragment__, null, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "class": "".concat(_this2.resolveClassName('message-content'))
      }, [__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
        "class": "".concat(_this2.resolveClassName('message-icon'))
      }, [renderIcon()]), _this2.message]), _this2.dismissable && __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3_Error__, {
        "class": "".concat(_this2.resolveClassName('message-close')),
        "onClick": _this2.close
      }, null)]);
    };
    return __WEBPACK_EXTERNAL_MODULE_vue_createVNode__(__WEBPACK_EXTERNAL_MODULE_vue_Transition__, {
      "name": "bk-message-fade"
    }, {
      "default": function _default() {
        return [__WEBPACK_EXTERNAL_MODULE_vue_withDirectives__(__WEBPACK_EXTERNAL_MODULE_vue_createVNode__("div", {
          "style": _this2.styles,
          "class": _this2.classNames,
          "onMouseenter": _this2.handleMouseenter,
          "onMouseleave": _this2.handleMouseleave
        }, [renderMessage()]), [[__WEBPACK_EXTERNAL_MODULE_vue_vShow__, _this2.visible]])];
      }
    });
  }
}));
;// ../../packages/message/src/index.ts
/*
 * Tencent is pleased to support the open source community by making
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 *
 * Copyright (C) 2025 Tencent.  All rights reserved.
 *
 * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
 *
 * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
 *
 * ---------------------------------------------------
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
 * the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */


var src_Message = function Message(options) {
  use_message(messageConstructor, options);
};
/* harmony default export */ const src = (src_Message);
export { src as default };
