万宝楼韭菜助手

万宝楼物品搜索优化,方便查找物品

// ==UserScript==
// @name         万宝楼韭菜助手
// @namespace    leek
// @version      1.1.2
// @author       吴彦祖
// @description  万宝楼物品搜索优化,方便查找物品
// @license MIT
// @match        https://jx3.seasunwbl.com/*
// @icon         https://jx3.seasunwbl.com/favicon.ico
// @connect      aijx3.cn
// @connect      xoyocdn.com
// @grant        unsafeWindow
// @grant        GM_addElement
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_xmlhttpRequest
// @run-at       document-start
// ==/UserScript==

(function () {
  'use strict';
  async function patchScript(scriptNode) {
    try {
      scriptNode.remove();
      const replacements = [
        {
          pattern: /=new (\w{1,2})\.default\(\{viewStore/,
          inject: '=window.buyerFilter=new $1.default({viewStore',
        },
        {
          pattern: /"重置"\),(\w{1,2})\.default\.createElement/,
          inject: '"重置"),window.searchButton=$1.default.createElement',
        },
        {
          pattern: ',this.setOrderType=',
          inject: ',window.buyerStore=this,this.setOrderType=',
        },
      ];

      const scriptUrl = scriptNode.src;
      const response = await GM.xmlHttpRequest({ url: scriptUrl }).catch(e => console.error(e));;
      if (response.status !== 200) {
        console.error(`Failed to fetch script: ${response.statusText}`);
        return;
      }

      let scriptCode = await response.responseText;
      let modifiedCount = 0;
      let expectedModifications = replacements.length;

      for (const { pattern, inject } of replacements) {
        const matches = scriptCode.match(pattern);
        if (matches) {
          scriptCode = scriptCode.replace(pattern, inject);
          modifiedCount += 1;
        }
      }

      if (modifiedCount < expectedModifications) {
        console.error('脚本注入失败,万宝楼可能更新拉!');
        return;
      }else{
        console.log('脚本注入成功');
        startLeekApp();
      }

      const newScriptNode = document.createElement('script');
      newScriptNode.textContent = scriptCode;
      document.body.appendChild(newScriptNode);
    } catch (error) {
      console.error('脚本注入注入失败:', error);
    }
  }

  new MutationObserver((mutationsList, obs) => {
    mutationsList.forEach((mutationRecord) => {
      for (const node of mutationRecord.addedNodes) {
        if (node.nodeName === 'SCRIPT' && node.src?.includes('/chunk/buyer/index')) {
          obs.disconnect();
          patchScript(node);
          break;
        }
      }
    });
  }).observe(document, { childList: true, subtree: true });

  function startLeekApp(){

    GM_addElement(document.body, 'div', {
      id: 'leek-app',
    });

    GM_addElement(document.head, 'style', {
      textContent: `
      
.leek-count {
    padding: 0 3px;
    font-weight: bold;
    color: red;
    letter-spacing: 3px;
}
.leek-drawer-footer {
    display: flex;
    font-size: 12px;
    justify-content: right;
}
.leek-search {
.leek-search-sticky {
      position: sticky;
      top: 0;
      z-index: 10;
      background-color: #fff;
}
.leek-search-history {
      display: flex;
      flex-direction: column;
      padding-block-end: 32px;
.leek-search-history-title {
        display: flex;
        justify-content: space-between;
        height: 40px;
h4 {
          margin: 0;
          padding: 0;
}
.leek-search-history-clear {
          cursor: pointer;
          width: 32px;
          height: 32px;
          display: flex;
          justify-content: center;
          align-items: center;
}
}
.leek-search-history-content {
        display: flex;
.leek-search-history-tag {
          cursor: pointer;
}
}
}
}
.leek-select-item {
    display: flex;
    justify-content: space-between;
}
.leek-search-select-popup .antVue-select-item-option-state {
    display: none;
}
.leek-btn-start {
    position: fixed;
    top: 200px;
    right: max(calc((100% - 1160px) / 2 - 90px), 50px);
    font-size: 80px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    z-index: 9999;
    transform: translate(0, 0);
    transform-origin: center bottom;
}
.leek-growing {
    animation: leek-growAnimation 0.8s ease forwards;
}
@keyframes leek-growAnimation {
0% {
      transform: scale(0) translateY(0); /* 初始为原始大小的50% */
}
100% {
      transform: scale(1) translateY(0); /* 恢复到正常大小 */
}
}
@keyframes leek-pullOutAnimation {
0% {
      transform: translate(0, 0);
}
50% {
      transform: translate(0, -20px); /* 慢慢上升一点 */
      animation-timing-function: ease-in-out; /* 先缓慢 */
}
70% {
      transform: translate(0, -50px); /* 加速上升 */
      animation-timing-function: ease-in-out;
}
100% {
      transform: translate(0, -120vh); /* 被拔出屏幕 */
      animation-timing-function: ease-in; /* 最后快速拔出 */
}
}
.leek-fly-out {
    animation: leek-pullOutAnimation 0.6s ease forwards;
}
.leek-drawer {
.antVue-drawer-body {
      padding: 18px;
}
}
body {
    overflow-y: scroll !important;
}
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background-color: rgb(0 0 0 / 5%);
}
::-webkit-scrollbar-thumb {
    background-color: rgb(144 147 147 / 30%);
}
::-webkit-scrollbar-thumb:hover {
    background-color: #b6b7b9;
}

     `,
    });

    var __defProp = Object.defineProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __commonJS = (cb, mod) => function __require() {
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
var require_index = __commonJS({
  "index.js"(exports, module) {
    (function polyfill() {
      const relList = document.createElement("link").relList;
      if (relList && relList.supports && relList.supports("modulepreload")) {
        return;
      }
      for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
        processPreload(link);
      }
      new MutationObserver((mutations) => {
        for (const mutation of mutations) {
          if (mutation.type !== "childList") {
            continue;
          }
          for (const node2 of mutation.addedNodes) {
            if (node2.tagName === "LINK" && node2.rel === "modulepreload")
              processPreload(node2);
          }
        }
      }).observe(document, { childList: true, subtree: true });
      function getFetchOpts(link) {
        const fetchOpts = {};
        if (link.integrity) fetchOpts.integrity = link.integrity;
        if (link.referrerPolicy) fetchOpts.referrerPolicy = link.referrerPolicy;
        if (link.crossOrigin === "use-credentials")
          fetchOpts.credentials = "include";
        else if (link.crossOrigin === "anonymous") fetchOpts.credentials = "omit";
        else fetchOpts.credentials = "same-origin";
        return fetchOpts;
      }
      function processPreload(link) {
        if (link.ep)
          return;
        link.ep = true;
        const fetchOpts = getFetchOpts(link);
        fetch(link.href, fetchOpts);
      }
    })();
    /**
    * @vue/shared v3.4.38
    * (c) 2018-present Yuxi (Evan) You and Vue contributors
    * @license MIT
    **/
    /*! #__NO_SIDE_EFFECTS__ */
    // @__NO_SIDE_EFFECTS__
    function makeMap(str, expectsLowerCase) {
      const set2 = new Set(str.split(","));
      return (val) => set2.has(val);
    }
    const EMPTY_OBJ = {};
    const EMPTY_ARR = [];
    const NOOP = () => {
    };
    const NO = () => false;
    const isOn$1 = (key2) => key2.charCodeAt(0) === 111 && key2.charCodeAt(1) === 110 && // uppercase letter
    (key2.charCodeAt(2) > 122 || key2.charCodeAt(2) < 97);
    const isModelListener = (key2) => key2.startsWith("onUpdate:");
    const extend = Object.assign;
    const remove = (arr, el) => {
      const i2 = arr.indexOf(el);
      if (i2 > -1) {
        arr.splice(i2, 1);
      }
    };
    const hasOwnProperty$g = Object.prototype.hasOwnProperty;
    const hasOwn$1 = (val, key2) => hasOwnProperty$g.call(val, key2);
    const isArray$2 = Array.isArray;
    const isMap$1 = (val) => toTypeString(val) === "[object Map]";
    const isSet$1 = (val) => toTypeString(val) === "[object Set]";
    const isFunction$2 = (val) => typeof val === "function";
    const isString$1 = (val) => typeof val === "string";
    const isSymbol$1 = (val) => typeof val === "symbol";
    const isObject$3 = (val) => val !== null && typeof val === "object";
    const isPromise = (val) => {
      return (isObject$3(val) || isFunction$2(val)) && isFunction$2(val.then) && isFunction$2(val.catch);
    };
    const objectToString$1 = Object.prototype.toString;
    const toTypeString = (value) => objectToString$1.call(value);
    const toRawType = (value) => {
      return toTypeString(value).slice(8, -1);
    };
    const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]";
    const isIntegerKey = (key2) => isString$1(key2) && key2 !== "NaN" && key2[0] !== "-" && "" + parseInt(key2, 10) === key2;
    const isReservedProp = /* @__PURE__ */ makeMap(
      // the leading comma is intentional so empty string "" is also included
      ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
    );
    const cacheStringFunction$1 = (fn) => {
      const cache = /* @__PURE__ */ Object.create(null);
      return (str) => {
        const hit = cache[str];
        return hit || (cache[str] = fn(str));
      };
    };
    const camelizeRE$1 = /-(\w)/g;
    const camelize$1 = cacheStringFunction$1((str) => {
      return str.replace(camelizeRE$1, (_2, c2) => c2 ? c2.toUpperCase() : "");
    });
    const hyphenateRE$1 = /\B([A-Z])/g;
    const hyphenate$1 = cacheStringFunction$1(
      (str) => str.replace(hyphenateRE$1, "-$1").toLowerCase()
    );
    const capitalize$1 = cacheStringFunction$1((str) => {
      return str.charAt(0).toUpperCase() + str.slice(1);
    });
    const toHandlerKey = cacheStringFunction$1((str) => {
      const s2 = str ? `on${capitalize$1(str)}` : ``;
      return s2;
    });
    const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
    const invokeArrayFns = (fns, ...arg) => {
      for (let i2 = 0; i2 < fns.length; i2++) {
        fns[i2](...arg);
      }
    };
    const def = (obj, key2, value, writable = false) => {
      Object.defineProperty(obj, key2, {
        configurable: true,
        enumerable: false,
        writable,
        value
      });
    };
    const looseToNumber = (val) => {
      const n2 = parseFloat(val);
      return isNaN(n2) ? val : n2;
    };
    const toNumber$1 = (val) => {
      const n2 = isString$1(val) ? Number(val) : NaN;
      return isNaN(n2) ? val : n2;
    };
    let _globalThis;
    const getGlobalThis = () => {
      return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
    };
    function normalizeStyle$1(value) {
      if (isArray$2(value)) {
        const res = {};
        for (let i2 = 0; i2 < value.length; i2++) {
          const item = value[i2];
          const normalized = isString$1(item) ? parseStringStyle(item) : normalizeStyle$1(item);
          if (normalized) {
            for (const key2 in normalized) {
              res[key2] = normalized[key2];
            }
          }
        }
        return res;
      } else if (isString$1(value) || isObject$3(value)) {
        return value;
      }
    }
    const listDelimiterRE = /;(?![^(]*\))/g;
    const propertyDelimiterRE = /:([^]+)/;
    const styleCommentRE = /\/\*[^]*?\*\//g;
    function parseStringStyle(cssText) {
      const ret = {};
      cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
        if (item) {
          const tmp = item.split(propertyDelimiterRE);
          tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
        }
      });
      return ret;
    }
    function normalizeClass(value) {
      let res = "";
      if (isString$1(value)) {
        res = value;
      } else if (isArray$2(value)) {
        for (let i2 = 0; i2 < value.length; i2++) {
          const normalized = normalizeClass(value[i2]);
          if (normalized) {
            res += normalized + " ";
          }
        }
      } else if (isObject$3(value)) {
        for (const name in value) {
          if (value[name]) {
            res += name + " ";
          }
        }
      }
      return res.trim();
    }
    const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
    const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
    function includeBooleanAttr(value) {
      return !!value || value === "";
    }
    const isRef$1 = (val) => {
      return !!(val && val.__v_isRef === true);
    };
    const toDisplayString = (val) => {
      return isString$1(val) ? val : val == null ? "" : isArray$2(val) || isObject$3(val) && (val.toString === objectToString$1 || !isFunction$2(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
    };
    const replacer = (_key, val) => {
      if (isRef$1(val)) {
        return replacer(_key, val.value);
      } else if (isMap$1(val)) {
        return {
          [`Map(${val.size})`]: [...val.entries()].reduce(
            (entries, [key2, val2], i2) => {
              entries[stringifySymbol(key2, i2) + " =>"] = val2;
              return entries;
            },
            {}
          )
        };
      } else if (isSet$1(val)) {
        return {
          [`Set(${val.size})`]: [...val.values()].map((v2) => stringifySymbol(v2))
        };
      } else if (isSymbol$1(val)) {
        return stringifySymbol(val);
      } else if (isObject$3(val) && !isArray$2(val) && !isPlainObject$1(val)) {
        return String(val);
      }
      return val;
    };
    const stringifySymbol = (v2, i2 = "") => {
      var _a;
      return (
        // Symbol.description in es2019+ so we need to cast here to pass
        // the lib: es2016 check
        isSymbol$1(v2) ? `Symbol(${(_a = v2.description) != null ? _a : i2})` : v2
      );
    };
    /**
    * @vue/reactivity v3.4.38
    * (c) 2018-present Yuxi (Evan) You and Vue contributors
    * @license MIT
    **/
    let activeEffectScope;
    class EffectScope {
      constructor(detached = false) {
        this.detached = detached;
        this._active = true;
        this.effects = [];
        this.cleanups = [];
        this.parent = activeEffectScope;
        if (!detached && activeEffectScope) {
          this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
            this
          ) - 1;
        }
      }
      get active() {
        return this._active;
      }
      run(fn) {
        if (this._active) {
          const currentEffectScope = activeEffectScope;
          try {
            activeEffectScope = this;
            return fn();
          } finally {
            activeEffectScope = currentEffectScope;
          }
        }
      }
      /**
       * This should only be called on non-detached scopes
       * @internal
       */
      on() {
        activeEffectScope = this;
      }
      /**
       * This should only be called on non-detached scopes
       * @internal
       */
      off() {
        activeEffectScope = this.parent;
      }
      stop(fromParent) {
        if (this._active) {
          let i2, l2;
          for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) {
            this.effects[i2].stop();
          }
          for (i2 = 0, l2 = this.cleanups.length; i2 < l2; i2++) {
            this.cleanups[i2]();
          }
          if (this.scopes) {
            for (i2 = 0, l2 = this.scopes.length; i2 < l2; i2++) {
              this.scopes[i2].stop(true);
            }
          }
          if (!this.detached && this.parent && !fromParent) {
            const last2 = this.parent.scopes.pop();
            if (last2 && last2 !== this) {
              this.parent.scopes[this.index] = last2;
              last2.index = this.index;
            }
          }
          this.parent = void 0;
          this._active = false;
        }
      }
    }
    function recordEffectScope(effect2, scope = activeEffectScope) {
      if (scope && scope.active) {
        scope.effects.push(effect2);
      }
    }
    function getCurrentScope() {
      return activeEffectScope;
    }
    let activeEffect;
    class ReactiveEffect {
      constructor(fn, trigger2, scheduler, scope) {
        this.fn = fn;
        this.trigger = trigger2;
        this.scheduler = scheduler;
        this.active = true;
        this.deps = [];
        this._dirtyLevel = 4;
        this._trackId = 0;
        this._runnings = 0;
        this._shouldSchedule = false;
        this._depsLength = 0;
        recordEffectScope(this, scope);
      }
      get dirty() {
        if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
          this._dirtyLevel = 1;
          pauseTracking();
          for (let i2 = 0; i2 < this._depsLength; i2++) {
            const dep = this.deps[i2];
            if (dep.computed) {
              triggerComputed(dep.computed);
              if (this._dirtyLevel >= 4) {
                break;
              }
            }
          }
          if (this._dirtyLevel === 1) {
            this._dirtyLevel = 0;
          }
          resetTracking();
        }
        return this._dirtyLevel >= 4;
      }
      set dirty(v2) {
        this._dirtyLevel = v2 ? 4 : 0;
      }
      run() {
        this._dirtyLevel = 0;
        if (!this.active) {
          return this.fn();
        }
        let lastShouldTrack = shouldTrack;
        let lastEffect = activeEffect;
        try {
          shouldTrack = true;
          activeEffect = this;
          this._runnings++;
          preCleanupEffect(this);
          return this.fn();
        } finally {
          postCleanupEffect(this);
          this._runnings--;
          activeEffect = lastEffect;
          shouldTrack = lastShouldTrack;
        }
      }
      stop() {
        if (this.active) {
          preCleanupEffect(this);
          postCleanupEffect(this);
          this.onStop && this.onStop();
          this.active = false;
        }
      }
    }
    function triggerComputed(computed2) {
      return computed2.value;
    }
    function preCleanupEffect(effect2) {
      effect2._trackId++;
      effect2._depsLength = 0;
    }
    function postCleanupEffect(effect2) {
      if (effect2.deps.length > effect2._depsLength) {
        for (let i2 = effect2._depsLength; i2 < effect2.deps.length; i2++) {
          cleanupDepEffect(effect2.deps[i2], effect2);
        }
        effect2.deps.length = effect2._depsLength;
      }
    }
    function cleanupDepEffect(dep, effect2) {
      const trackId = dep.get(effect2);
      if (trackId !== void 0 && effect2._trackId !== trackId) {
        dep.delete(effect2);
        if (dep.size === 0) {
          dep.cleanup();
        }
      }
    }
    let shouldTrack = true;
    let pauseScheduleStack = 0;
    const trackStack = [];
    function pauseTracking() {
      trackStack.push(shouldTrack);
      shouldTrack = false;
    }
    function resetTracking() {
      const last2 = trackStack.pop();
      shouldTrack = last2 === void 0 ? true : last2;
    }
    function pauseScheduling() {
      pauseScheduleStack++;
    }
    function resetScheduling() {
      pauseScheduleStack--;
      while (!pauseScheduleStack && queueEffectSchedulers.length) {
        queueEffectSchedulers.shift()();
      }
    }
    function trackEffect(effect2, dep, debuggerEventExtraInfo) {
      if (dep.get(effect2) !== effect2._trackId) {
        dep.set(effect2, effect2._trackId);
        const oldDep = effect2.deps[effect2._depsLength];
        if (oldDep !== dep) {
          if (oldDep) {
            cleanupDepEffect(oldDep, effect2);
          }
          effect2.deps[effect2._depsLength++] = dep;
        } else {
          effect2._depsLength++;
        }
      }
    }
    const queueEffectSchedulers = [];
    function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
      pauseScheduling();
      for (const effect2 of dep.keys()) {
        let tracking;
        if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
          effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
          effect2._dirtyLevel = dirtyLevel;
        }
        if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
          effect2.trigger();
          if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
            effect2._shouldSchedule = false;
            if (effect2.scheduler) {
              queueEffectSchedulers.push(effect2.scheduler);
            }
          }
        }
      }
      resetScheduling();
    }
    const createDep = (cleanup2, computed2) => {
      const dep = /* @__PURE__ */ new Map();
      dep.cleanup = cleanup2;
      dep.computed = computed2;
      return dep;
    };
    const targetMap = /* @__PURE__ */ new WeakMap();
    const ITERATE_KEY = Symbol("");
    const MAP_KEY_ITERATE_KEY = Symbol("");
    function track(target, type, key2) {
      if (shouldTrack && activeEffect) {
        let depsMap = targetMap.get(target);
        if (!depsMap) {
          targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
        }
        let dep = depsMap.get(key2);
        if (!dep) {
          depsMap.set(key2, dep = createDep(() => depsMap.delete(key2)));
        }
        trackEffect(
          activeEffect,
          dep
        );
      }
    }
    function trigger(target, type, key2, newValue, oldValue, oldTarget) {
      const depsMap = targetMap.get(target);
      if (!depsMap) {
        return;
      }
      let deps = [];
      if (type === "clear") {
        deps = [...depsMap.values()];
      } else if (key2 === "length" && isArray$2(target)) {
        const newLength = Number(newValue);
        depsMap.forEach((dep, key22) => {
          if (key22 === "length" || !isSymbol$1(key22) && key22 >= newLength) {
            deps.push(dep);
          }
        });
      } else {
        if (key2 !== void 0) {
          deps.push(depsMap.get(key2));
        }
        switch (type) {
          case "add":
            if (!isArray$2(target)) {
              deps.push(depsMap.get(ITERATE_KEY));
              if (isMap$1(target)) {
                deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
              }
            } else if (isIntegerKey(key2)) {
              deps.push(depsMap.get("length"));
            }
            break;
          case "delete":
            if (!isArray$2(target)) {
              deps.push(depsMap.get(ITERATE_KEY));
              if (isMap$1(target)) {
                deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
              }
            }
            break;
          case "set":
            if (isMap$1(target)) {
              deps.push(depsMap.get(ITERATE_KEY));
            }
            break;
        }
      }
      pauseScheduling();
      for (const dep of deps) {
        if (dep) {
          triggerEffects(
            dep,
            4
          );
        }
      }
      resetScheduling();
    }
    function getDepFromReactive(object, key2) {
      const depsMap = targetMap.get(object);
      return depsMap && depsMap.get(key2);
    }
    const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
    const builtInSymbols = new Set(
      /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key2) => key2 !== "arguments" && key2 !== "caller").map((key2) => Symbol[key2]).filter(isSymbol$1)
    );
    const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
    function createArrayInstrumentations() {
      const instrumentations = {};
      ["includes", "indexOf", "lastIndexOf"].forEach((key2) => {
        instrumentations[key2] = function(...args) {
          const arr = toRaw(this);
          for (let i2 = 0, l2 = this.length; i2 < l2; i2++) {
            track(arr, "get", i2 + "");
          }
          const res = arr[key2](...args);
          if (res === -1 || res === false) {
            return arr[key2](...args.map(toRaw));
          } else {
            return res;
          }
        };
      });
      ["push", "pop", "shift", "unshift", "splice"].forEach((key2) => {
        instrumentations[key2] = function(...args) {
          pauseTracking();
          pauseScheduling();
          const res = toRaw(this)[key2].apply(this, args);
          resetScheduling();
          resetTracking();
          return res;
        };
      });
      return instrumentations;
    }
    function hasOwnProperty$f(key2) {
      if (!isSymbol$1(key2)) key2 = String(key2);
      const obj = toRaw(this);
      track(obj, "has", key2);
      return obj.hasOwnProperty(key2);
    }
    class BaseReactiveHandler {
      constructor(_isReadonly = false, _isShallow = false) {
        this._isReadonly = _isReadonly;
        this._isShallow = _isShallow;
      }
      get(target, key2, receiver) {
        const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
        if (key2 === "__v_isReactive") {
          return !isReadonly2;
        } else if (key2 === "__v_isReadonly") {
          return isReadonly2;
        } else if (key2 === "__v_isShallow") {
          return isShallow2;
        } else if (key2 === "__v_raw") {
          if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
          // this means the receiver is a user proxy of the reactive proxy
          Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
            return target;
          }
          return;
        }
        const targetIsArray = isArray$2(target);
        if (!isReadonly2) {
          if (targetIsArray && hasOwn$1(arrayInstrumentations, key2)) {
            return Reflect.get(arrayInstrumentations, key2, receiver);
          }
          if (key2 === "hasOwnProperty") {
            return hasOwnProperty$f;
          }
        }
        const res = Reflect.get(target, key2, receiver);
        if (isSymbol$1(key2) ? builtInSymbols.has(key2) : isNonTrackableKeys(key2)) {
          return res;
        }
        if (!isReadonly2) {
          track(target, "get", key2);
        }
        if (isShallow2) {
          return res;
        }
        if (isRef(res)) {
          return targetIsArray && isIntegerKey(key2) ? res : res.value;
        }
        if (isObject$3(res)) {
          return isReadonly2 ? readonly(res) : reactive(res);
        }
        return res;
      }
    }
    class MutableReactiveHandler extends BaseReactiveHandler {
      constructor(isShallow2 = false) {
        super(false, isShallow2);
      }
      set(target, key2, value, receiver) {
        let oldValue = target[key2];
        if (!this._isShallow) {
          const isOldValueReadonly = isReadonly(oldValue);
          if (!isShallow(value) && !isReadonly(value)) {
            oldValue = toRaw(oldValue);
            value = toRaw(value);
          }
          if (!isArray$2(target) && isRef(oldValue) && !isRef(value)) {
            if (isOldValueReadonly) {
              return false;
            } else {
              oldValue.value = value;
              return true;
            }
          }
        }
        const hadKey = isArray$2(target) && isIntegerKey(key2) ? Number(key2) < target.length : hasOwn$1(target, key2);
        const result = Reflect.set(target, key2, value, receiver);
        if (target === toRaw(receiver)) {
          if (!hadKey) {
            trigger(target, "add", key2, value);
          } else if (hasChanged(value, oldValue)) {
            trigger(target, "set", key2, value);
          }
        }
        return result;
      }
      deleteProperty(target, key2) {
        const hadKey = hasOwn$1(target, key2);
        target[key2];
        const result = Reflect.deleteProperty(target, key2);
        if (result && hadKey) {
          trigger(target, "delete", key2, void 0);
        }
        return result;
      }
      has(target, key2) {
        const result = Reflect.has(target, key2);
        if (!isSymbol$1(key2) || !builtInSymbols.has(key2)) {
          track(target, "has", key2);
        }
        return result;
      }
      ownKeys(target) {
        track(
          target,
          "iterate",
          isArray$2(target) ? "length" : ITERATE_KEY
        );
        return Reflect.ownKeys(target);
      }
    }
    class ReadonlyReactiveHandler extends BaseReactiveHandler {
      constructor(isShallow2 = false) {
        super(true, isShallow2);
      }
      set(target, key2) {
        return true;
      }
      deleteProperty(target, key2) {
        return true;
      }
    }
    const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
    const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
    const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
      true
    );
    const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
    const toShallow = (value) => value;
    const getProto = (v2) => Reflect.getPrototypeOf(v2);
    function get$2(target, key2, isReadonly2 = false, isShallow2 = false) {
      target = target["__v_raw"];
      const rawTarget = toRaw(target);
      const rawKey = toRaw(key2);
      if (!isReadonly2) {
        if (hasChanged(key2, rawKey)) {
          track(rawTarget, "get", key2);
        }
        track(rawTarget, "get", rawKey);
      }
      const { has: has2 } = getProto(rawTarget);
      const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive$1;
      if (has2.call(rawTarget, key2)) {
        return wrap(target.get(key2));
      } else if (has2.call(rawTarget, rawKey)) {
        return wrap(target.get(rawKey));
      } else if (target !== rawTarget) {
        target.get(key2);
      }
    }
    function has(key2, isReadonly2 = false) {
      const target = this["__v_raw"];
      const rawTarget = toRaw(target);
      const rawKey = toRaw(key2);
      if (!isReadonly2) {
        if (hasChanged(key2, rawKey)) {
          track(rawTarget, "has", key2);
        }
        track(rawTarget, "has", rawKey);
      }
      return key2 === rawKey ? target.has(key2) : target.has(key2) || target.has(rawKey);
    }
    function size(target, isReadonly2 = false) {
      target = target["__v_raw"];
      !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
      return Reflect.get(target, "size", target);
    }
    function add(value, _isShallow = false) {
      if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
        value = toRaw(value);
      }
      const target = toRaw(this);
      const proto = getProto(target);
      const hadKey = proto.has.call(target, value);
      if (!hadKey) {
        target.add(value);
        trigger(target, "add", value, value);
      }
      return this;
    }
    function set$1(key2, value, _isShallow = false) {
      if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
        value = toRaw(value);
      }
      const target = toRaw(this);
      const { has: has2, get: get2 } = getProto(target);
      let hadKey = has2.call(target, key2);
      if (!hadKey) {
        key2 = toRaw(key2);
        hadKey = has2.call(target, key2);
      }
      const oldValue = get2.call(target, key2);
      target.set(key2, value);
      if (!hadKey) {
        trigger(target, "add", key2, value);
      } else if (hasChanged(value, oldValue)) {
        trigger(target, "set", key2, value);
      }
      return this;
    }
    function deleteEntry(key2) {
      const target = toRaw(this);
      const { has: has2, get: get2 } = getProto(target);
      let hadKey = has2.call(target, key2);
      if (!hadKey) {
        key2 = toRaw(key2);
        hadKey = has2.call(target, key2);
      }
      get2 ? get2.call(target, key2) : void 0;
      const result = target.delete(key2);
      if (hadKey) {
        trigger(target, "delete", key2, void 0);
      }
      return result;
    }
    function clear() {
      const target = toRaw(this);
      const hadItems = target.size !== 0;
      const result = target.clear();
      if (hadItems) {
        trigger(target, "clear", void 0, void 0);
      }
      return result;
    }
    function createForEach(isReadonly2, isShallow2) {
      return function forEach(callback, thisArg) {
        const observed = this;
        const target = observed["__v_raw"];
        const rawTarget = toRaw(target);
        const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive$1;
        !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
        return target.forEach((value, key2) => {
          return callback.call(thisArg, wrap(value), wrap(key2), observed);
        });
      };
    }
    function createIterableMethod(method, isReadonly2, isShallow2) {
      return function(...args) {
        const target = this["__v_raw"];
        const rawTarget = toRaw(target);
        const targetIsMap = isMap$1(rawTarget);
        const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
        const isKeyOnly = method === "keys" && targetIsMap;
        const innerIterator = target[method](...args);
        const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive$1;
        !isReadonly2 && track(
          rawTarget,
          "iterate",
          isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
        );
        return {
          // iterator protocol
          next() {
            const { value, done } = innerIterator.next();
            return done ? { value, done } : {
              value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
              done
            };
          },
          // iterable protocol
          [Symbol.iterator]() {
            return this;
          }
        };
      };
    }
    function createReadonlyMethod(type) {
      return function(...args) {
        return type === "delete" ? false : type === "clear" ? void 0 : this;
      };
    }
    function createInstrumentations() {
      const mutableInstrumentations2 = {
        get(key2) {
          return get$2(this, key2);
        },
        get size() {
          return size(this);
        },
        has,
        add,
        set: set$1,
        delete: deleteEntry,
        clear,
        forEach: createForEach(false, false)
      };
      const shallowInstrumentations2 = {
        get(key2) {
          return get$2(this, key2, false, true);
        },
        get size() {
          return size(this);
        },
        has,
        add(value) {
          return add.call(this, value, true);
        },
        set(key2, value) {
          return set$1.call(this, key2, value, true);
        },
        delete: deleteEntry,
        clear,
        forEach: createForEach(false, true)
      };
      const readonlyInstrumentations2 = {
        get(key2) {
          return get$2(this, key2, true);
        },
        get size() {
          return size(this, true);
        },
        has(key2) {
          return has.call(this, key2, true);
        },
        add: createReadonlyMethod("add"),
        set: createReadonlyMethod("set"),
        delete: createReadonlyMethod("delete"),
        clear: createReadonlyMethod("clear"),
        forEach: createForEach(true, false)
      };
      const shallowReadonlyInstrumentations2 = {
        get(key2) {
          return get$2(this, key2, true, true);
        },
        get size() {
          return size(this, true);
        },
        has(key2) {
          return has.call(this, key2, true);
        },
        add: createReadonlyMethod("add"),
        set: createReadonlyMethod("set"),
        delete: createReadonlyMethod("delete"),
        clear: createReadonlyMethod("clear"),
        forEach: createForEach(true, true)
      };
      const iteratorMethods = [
        "keys",
        "values",
        "entries",
        Symbol.iterator
      ];
      iteratorMethods.forEach((method) => {
        mutableInstrumentations2[method] = createIterableMethod(method, false, false);
        readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
        shallowInstrumentations2[method] = createIterableMethod(method, false, true);
        shallowReadonlyInstrumentations2[method] = createIterableMethod(
          method,
          true,
          true
        );
      });
      return [
        mutableInstrumentations2,
        readonlyInstrumentations2,
        shallowInstrumentations2,
        shallowReadonlyInstrumentations2
      ];
    }
    const [
      mutableInstrumentations,
      readonlyInstrumentations,
      shallowInstrumentations,
      shallowReadonlyInstrumentations
    ] = /* @__PURE__ */ createInstrumentations();
    function createInstrumentationGetter(isReadonly2, shallow) {
      const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
      return (target, key2, receiver) => {
        if (key2 === "__v_isReactive") {
          return !isReadonly2;
        } else if (key2 === "__v_isReadonly") {
          return isReadonly2;
        } else if (key2 === "__v_raw") {
          return target;
        }
        return Reflect.get(
          hasOwn$1(instrumentations, key2) && key2 in target ? instrumentations : target,
          key2,
          receiver
        );
      };
    }
    const mutableCollectionHandlers = {
      get: /* @__PURE__ */ createInstrumentationGetter(false, false)
    };
    const shallowCollectionHandlers = {
      get: /* @__PURE__ */ createInstrumentationGetter(false, true)
    };
    const readonlyCollectionHandlers = {
      get: /* @__PURE__ */ createInstrumentationGetter(true, false)
    };
    const shallowReadonlyCollectionHandlers = {
      get: /* @__PURE__ */ createInstrumentationGetter(true, true)
    };
    const reactiveMap = /* @__PURE__ */ new WeakMap();
    const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
    const readonlyMap = /* @__PURE__ */ new WeakMap();
    const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
    function targetTypeMap(rawType) {
      switch (rawType) {
        case "Object":
        case "Array":
          return 1;
        case "Map":
        case "Set":
        case "WeakMap":
        case "WeakSet":
          return 2;
        default:
          return 0;
      }
    }
    function getTargetType(value) {
      return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
    }
    function reactive(target) {
      if (isReadonly(target)) {
        return target;
      }
      return createReactiveObject(
        target,
        false,
        mutableHandlers,
        mutableCollectionHandlers,
        reactiveMap
      );
    }
    function shallowReactive(target) {
      return createReactiveObject(
        target,
        false,
        shallowReactiveHandlers,
        shallowCollectionHandlers,
        shallowReactiveMap
      );
    }
    function readonly(target) {
      return createReactiveObject(
        target,
        true,
        readonlyHandlers,
        readonlyCollectionHandlers,
        readonlyMap
      );
    }
    function shallowReadonly(target) {
      return createReactiveObject(
        target,
        true,
        shallowReadonlyHandlers,
        shallowReadonlyCollectionHandlers,
        shallowReadonlyMap
      );
    }
    function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
      if (!isObject$3(target)) {
        return target;
      }
      if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
        return target;
      }
      const existingProxy = proxyMap.get(target);
      if (existingProxy) {
        return existingProxy;
      }
      const targetType = getTargetType(target);
      if (targetType === 0) {
        return target;
      }
      const proxy = new Proxy(
        target,
        targetType === 2 ? collectionHandlers : baseHandlers
      );
      proxyMap.set(target, proxy);
      return proxy;
    }
    function isReactive(value) {
      if (isReadonly(value)) {
        return isReactive(value["__v_raw"]);
      }
      return !!(value && value["__v_isReactive"]);
    }
    function isReadonly(value) {
      return !!(value && value["__v_isReadonly"]);
    }
    function isShallow(value) {
      return !!(value && value["__v_isShallow"]);
    }
    function isProxy(value) {
      return value ? !!value["__v_raw"] : false;
    }
    function toRaw(observed) {
      const raw = observed && observed["__v_raw"];
      return raw ? toRaw(raw) : observed;
    }
    function markRaw(value) {
      if (Object.isExtensible(value)) {
        def(value, "__v_skip", true);
      }
      return value;
    }
    const toReactive$1 = (value) => isObject$3(value) ? reactive(value) : value;
    const toReadonly = (value) => isObject$3(value) ? readonly(value) : value;
    class ComputedRefImpl {
      constructor(getter, _setter, isReadonly2, isSSR) {
        this.getter = getter;
        this._setter = _setter;
        this.dep = void 0;
        this.__v_isRef = true;
        this["__v_isReadonly"] = false;
        this.effect = new ReactiveEffect(
          () => getter(this._value),
          () => triggerRefValue(
            this,
            this.effect._dirtyLevel === 2 ? 2 : 3
          )
        );
        this.effect.computed = this;
        this.effect.active = this._cacheable = !isSSR;
        this["__v_isReadonly"] = isReadonly2;
      }
      get value() {
        const self2 = toRaw(this);
        if ((!self2._cacheable || self2.effect.dirty) && hasChanged(self2._value, self2._value = self2.effect.run())) {
          triggerRefValue(self2, 4);
        }
        trackRefValue(self2);
        if (self2.effect._dirtyLevel >= 2) {
          triggerRefValue(self2, 2);
        }
        return self2._value;
      }
      set value(newValue) {
        this._setter(newValue);
      }
      // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
      get _dirty() {
        return this.effect.dirty;
      }
      set _dirty(v2) {
        this.effect.dirty = v2;
      }
      // #endregion
    }
    function computed$1(getterOrOptions, debugOptions, isSSR = false) {
      let getter;
      let setter;
      const onlyGetter = isFunction$2(getterOrOptions);
      if (onlyGetter) {
        getter = getterOrOptions;
        setter = NOOP;
      } else {
        getter = getterOrOptions.get;
        setter = getterOrOptions.set;
      }
      const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
      return cRef;
    }
    function trackRefValue(ref2) {
      var _a;
      if (shouldTrack && activeEffect) {
        ref2 = toRaw(ref2);
        trackEffect(
          activeEffect,
          (_a = ref2.dep) != null ? _a : ref2.dep = createDep(
            () => ref2.dep = void 0,
            ref2 instanceof ComputedRefImpl ? ref2 : void 0
          )
        );
      }
    }
    function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
      ref2 = toRaw(ref2);
      const dep = ref2.dep;
      if (dep) {
        triggerEffects(
          dep,
          dirtyLevel
        );
      }
    }
    function isRef(r2) {
      return !!(r2 && r2.__v_isRef === true);
    }
    function ref(value) {
      return createRef$1(value, false);
    }
    function shallowRef(value) {
      return createRef$1(value, true);
    }
    function createRef$1(rawValue, shallow) {
      if (isRef(rawValue)) {
        return rawValue;
      }
      return new RefImpl(rawValue, shallow);
    }
    class RefImpl {
      constructor(value, __v_isShallow) {
        this.__v_isShallow = __v_isShallow;
        this.dep = void 0;
        this.__v_isRef = true;
        this._rawValue = __v_isShallow ? value : toRaw(value);
        this._value = __v_isShallow ? value : toReactive$1(value);
      }
      get value() {
        trackRefValue(this);
        return this._value;
      }
      set value(newVal) {
        const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
        newVal = useDirectValue ? newVal : toRaw(newVal);
        if (hasChanged(newVal, this._rawValue)) {
          this._rawValue;
          this._rawValue = newVal;
          this._value = useDirectValue ? newVal : toReactive$1(newVal);
          triggerRefValue(this, 4);
        }
      }
    }
    function triggerRef(ref2) {
      triggerRefValue(ref2, 4);
    }
    function unref(ref2) {
      return isRef(ref2) ? ref2.value : ref2;
    }
    const shallowUnwrapHandlers = {
      get: (target, key2, receiver) => unref(Reflect.get(target, key2, receiver)),
      set: (target, key2, value, receiver) => {
        const oldValue = target[key2];
        if (isRef(oldValue) && !isRef(value)) {
          oldValue.value = value;
          return true;
        } else {
          return Reflect.set(target, key2, value, receiver);
        }
      }
    };
    function proxyRefs(objectWithRefs) {
      return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
    }
    function toRefs(object) {
      const ret = isArray$2(object) ? new Array(object.length) : {};
      for (const key2 in object) {
        ret[key2] = propertyToRef(object, key2);
      }
      return ret;
    }
    class ObjectRefImpl {
      constructor(_object, _key, _defaultValue) {
        this._object = _object;
        this._key = _key;
        this._defaultValue = _defaultValue;
        this.__v_isRef = true;
      }
      get value() {
        const val = this._object[this._key];
        return val === void 0 ? this._defaultValue : val;
      }
      set value(newVal) {
        this._object[this._key] = newVal;
      }
      get dep() {
        return getDepFromReactive(toRaw(this._object), this._key);
      }
    }
    class GetterRefImpl {
      constructor(_getter) {
        this._getter = _getter;
        this.__v_isRef = true;
        this.__v_isReadonly = true;
      }
      get value() {
        return this._getter();
      }
    }
    function toRef(source, key2, defaultValue) {
      if (isRef(source)) {
        return source;
      } else if (isFunction$2(source)) {
        return new GetterRefImpl(source);
      } else if (isObject$3(source) && arguments.length > 1) {
        return propertyToRef(source, key2, defaultValue);
      } else {
        return ref(source);
      }
    }
    function propertyToRef(source, key2, defaultValue) {
      const val = source[key2];
      return isRef(val) ? val : new ObjectRefImpl(source, key2, defaultValue);
    }
    /**
    * @vue/runtime-core v3.4.38
    * (c) 2018-present Yuxi (Evan) You and Vue contributors
    * @license MIT
    **/
    const stack = [];
    let isWarning = false;
    function warn$1(msg, ...args) {
      if (isWarning) return;
      isWarning = true;
      pauseTracking();
      const instance = stack.length ? stack[stack.length - 1].component : null;
      const appWarnHandler = instance && instance.appContext.config.warnHandler;
      const trace = getComponentTrace();
      if (appWarnHandler) {
        callWithErrorHandling(
          appWarnHandler,
          instance,
          11,
          [
            // eslint-disable-next-line no-restricted-syntax
            msg + args.map((a2) => {
              var _a, _b;
              return (_b = (_a = a2.toString) == null ? void 0 : _a.call(a2)) != null ? _b : JSON.stringify(a2);
            }).join(""),
            instance && instance.proxy,
            trace.map(
              ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
            ).join("\n"),
            trace
          ]
        );
      } else {
        const warnArgs = [`[Vue warn]: ${msg}`, ...args];
        if (trace.length && // avoid spamming console during tests
        true) {
          warnArgs.push(`
`, ...formatTrace(trace));
        }
        console.warn(...warnArgs);
      }
      resetTracking();
      isWarning = false;
    }
    function getComponentTrace() {
      let currentVNode = stack[stack.length - 1];
      if (!currentVNode) {
        return [];
      }
      const normalizedStack = [];
      while (currentVNode) {
        const last2 = normalizedStack[0];
        if (last2 && last2.vnode === currentVNode) {
          last2.recurseCount++;
        } else {
          normalizedStack.push({
            vnode: currentVNode,
            recurseCount: 0
          });
        }
        const parentInstance = currentVNode.component && currentVNode.component.parent;
        currentVNode = parentInstance && parentInstance.vnode;
      }
      return normalizedStack;
    }
    function formatTrace(trace) {
      const logs = [];
      trace.forEach((entry, i2) => {
        logs.push(...i2 === 0 ? [] : [`
`], ...formatTraceEntry(entry));
      });
      return logs;
    }
    function formatTraceEntry({ vnode, recurseCount }) {
      const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
      const isRoot = vnode.component ? vnode.component.parent == null : false;
      const open2 = ` at <${formatComponentName(
        vnode.component,
        vnode.type,
        isRoot
      )}`;
      const close = `>` + postfix;
      return vnode.props ? [open2, ...formatProps(vnode.props), close] : [open2 + close];
    }
    function formatProps(props2) {
      const res = [];
      const keys2 = Object.keys(props2);
      keys2.slice(0, 3).forEach((key2) => {
        res.push(...formatProp(key2, props2[key2]));
      });
      if (keys2.length > 3) {
        res.push(` ...`);
      }
      return res;
    }
    function formatProp(key2, value, raw) {
      if (isString$1(value)) {
        value = JSON.stringify(value);
        return raw ? value : [`${key2}=${value}`];
      } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
        return raw ? value : [`${key2}=${value}`];
      } else if (isRef(value)) {
        value = formatProp(key2, toRaw(value.value), true);
        return raw ? value : [`${key2}=Ref<`, value, `>`];
      } else if (isFunction$2(value)) {
        return [`${key2}=fn${value.name ? `<${value.name}>` : ``}`];
      } else {
        value = toRaw(value);
        return raw ? value : [`${key2}=`, value];
      }
    }
    function callWithErrorHandling(fn, instance, type, args) {
      try {
        return args ? fn(...args) : fn();
      } catch (err) {
        handleError(err, instance, type);
      }
    }
    function callWithAsyncErrorHandling(fn, instance, type, args) {
      if (isFunction$2(fn)) {
        const res = callWithErrorHandling(fn, instance, type, args);
        if (res && isPromise(res)) {
          res.catch((err) => {
            handleError(err, instance, type);
          });
        }
        return res;
      }
      if (isArray$2(fn)) {
        const values = [];
        for (let i2 = 0; i2 < fn.length; i2++) {
          values.push(callWithAsyncErrorHandling(fn[i2], instance, type, args));
        }
        return values;
      }
    }
    function handleError(err, instance, type, throwInDev = true) {
      const contextVNode = instance ? instance.vnode : null;
      if (instance) {
        let cur = instance.parent;
        const exposedInstance = instance.proxy;
        const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;
        while (cur) {
          const errorCapturedHooks = cur.ec;
          if (errorCapturedHooks) {
            for (let i2 = 0; i2 < errorCapturedHooks.length; i2++) {
              if (errorCapturedHooks[i2](err, exposedInstance, errorInfo) === false) {
                return;
              }
            }
          }
          cur = cur.parent;
        }
        const appErrorHandler = instance.appContext.config.errorHandler;
        if (appErrorHandler) {
          pauseTracking();
          callWithErrorHandling(
            appErrorHandler,
            null,
            10,
            [err, exposedInstance, errorInfo]
          );
          resetTracking();
          return;
        }
      }
      logError(err, type, contextVNode, throwInDev);
    }
    function logError(err, type, contextVNode, throwInDev = true) {
      {
        console.error(err);
      }
    }
    let isFlushing = false;
    let isFlushPending = false;
    const queue = [];
    let flushIndex = 0;
    const pendingPostFlushCbs = [];
    let activePostFlushCbs = null;
    let postFlushIndex = 0;
    const resolvedPromise = /* @__PURE__ */ Promise.resolve();
    let currentFlushPromise = null;
    function nextTick(fn) {
      const p2 = currentFlushPromise || resolvedPromise;
      return fn ? p2.then(this ? fn.bind(this) : fn) : p2;
    }
    function findInsertionIndex(id) {
      let start = flushIndex + 1;
      let end = queue.length;
      while (start < end) {
        const middle = start + end >>> 1;
        const middleJob = queue[middle];
        const middleJobId = getId(middleJob);
        if (middleJobId < id || middleJobId === id && middleJob.pre) {
          start = middle + 1;
        } else {
          end = middle;
        }
      }
      return start;
    }
    function queueJob(job) {
      if (!queue.length || !queue.includes(
        job,
        isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
      )) {
        if (job.id == null) {
          queue.push(job);
        } else {
          queue.splice(findInsertionIndex(job.id), 0, job);
        }
        queueFlush();
      }
    }
    function queueFlush() {
      if (!isFlushing && !isFlushPending) {
        isFlushPending = true;
        currentFlushPromise = resolvedPromise.then(flushJobs);
      }
    }
    function invalidateJob(job) {
      const i2 = queue.indexOf(job);
      if (i2 > flushIndex) {
        queue.splice(i2, 1);
      }
    }
    function queuePostFlushCb(cb) {
      if (!isArray$2(cb)) {
        if (!activePostFlushCbs || !activePostFlushCbs.includes(
          cb,
          cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
        )) {
          pendingPostFlushCbs.push(cb);
        }
      } else {
        pendingPostFlushCbs.push(...cb);
      }
      queueFlush();
    }
    function flushPreFlushCbs(instance, seen, i2 = isFlushing ? flushIndex + 1 : 0) {
      for (; i2 < queue.length; i2++) {
        const cb = queue[i2];
        if (cb && cb.pre) {
          if (instance && cb.id !== instance.uid) {
            continue;
          }
          queue.splice(i2, 1);
          i2--;
          cb();
        }
      }
    }
    function flushPostFlushCbs(seen) {
      if (pendingPostFlushCbs.length) {
        const deduped = [...new Set(pendingPostFlushCbs)].sort(
          (a2, b2) => getId(a2) - getId(b2)
        );
        pendingPostFlushCbs.length = 0;
        if (activePostFlushCbs) {
          activePostFlushCbs.push(...deduped);
          return;
        }
        activePostFlushCbs = deduped;
        for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
          const cb = activePostFlushCbs[postFlushIndex];
          if (cb.active !== false) cb();
        }
        activePostFlushCbs = null;
        postFlushIndex = 0;
      }
    }
    const getId = (job) => job.id == null ? Infinity : job.id;
    const comparator = (a2, b2) => {
      const diff = getId(a2) - getId(b2);
      if (diff === 0) {
        if (a2.pre && !b2.pre) return -1;
        if (b2.pre && !a2.pre) return 1;
      }
      return diff;
    };
    function flushJobs(seen) {
      isFlushPending = false;
      isFlushing = true;
      queue.sort(comparator);
      try {
        for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
          const job = queue[flushIndex];
          if (job && job.active !== false) {
            if (false) ;
            callWithErrorHandling(
              job,
              job.i,
              job.i ? 15 : 14
            );
          }
        }
      } finally {
        flushIndex = 0;
        queue.length = 0;
        flushPostFlushCbs();
        isFlushing = false;
        currentFlushPromise = null;
        if (queue.length || pendingPostFlushCbs.length) {
          flushJobs();
        }
      }
    }
    let currentRenderingInstance = null;
    let currentScopeId = null;
    function setCurrentRenderingInstance(instance) {
      const prev2 = currentRenderingInstance;
      currentRenderingInstance = instance;
      currentScopeId = instance && instance.type.__scopeId || null;
      return prev2;
    }
    function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
      if (!ctx) return fn;
      if (fn._n) {
        return fn;
      }
      const renderFnWithContext = (...args) => {
        if (renderFnWithContext._d) {
          setBlockTracking(-1);
        }
        const prevInstance = setCurrentRenderingInstance(ctx);
        let res;
        try {
          res = fn(...args);
        } finally {
          setCurrentRenderingInstance(prevInstance);
          if (renderFnWithContext._d) {
            setBlockTracking(1);
          }
        }
        return res;
      };
      renderFnWithContext._n = true;
      renderFnWithContext._c = true;
      renderFnWithContext._d = true;
      return renderFnWithContext;
    }
    function withDirectives(vnode, directives) {
      if (currentRenderingInstance === null) {
        return vnode;
      }
      const instance = getComponentPublicInstance(currentRenderingInstance);
      const bindings = vnode.dirs || (vnode.dirs = []);
      for (let i2 = 0; i2 < directives.length; i2++) {
        let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i2];
        if (dir) {
          if (isFunction$2(dir)) {
            dir = {
              mounted: dir,
              updated: dir
            };
          }
          if (dir.deep) {
            traverse(value);
          }
          bindings.push({
            dir,
            instance,
            value,
            oldValue: void 0,
            arg,
            modifiers
          });
        }
      }
      return vnode;
    }
    function invokeDirectiveHook(vnode, prevVNode, instance, name) {
      const bindings = vnode.dirs;
      const oldBindings = prevVNode && prevVNode.dirs;
      for (let i2 = 0; i2 < bindings.length; i2++) {
        const binding = bindings[i2];
        if (oldBindings) {
          binding.oldValue = oldBindings[i2].value;
        }
        let hook = binding.dir[name];
        if (hook) {
          pauseTracking();
          callWithAsyncErrorHandling(hook, instance, 8, [
            vnode.el,
            binding,
            vnode,
            prevVNode
          ]);
          resetTracking();
        }
      }
    }
    const leaveCbKey = Symbol("_leaveCb");
    const enterCbKey$1 = Symbol("_enterCb");
    function useTransitionState() {
      const state = {
        isMounted: false,
        isLeaving: false,
        isUnmounting: false,
        leavingVNodes: /* @__PURE__ */ new Map()
      };
      onMounted(() => {
        state.isMounted = true;
      });
      onBeforeUnmount(() => {
        state.isUnmounting = true;
      });
      return state;
    }
    const TransitionHookValidator = [Function, Array];
    const BaseTransitionPropsValidators = {
      mode: String,
      appear: Boolean,
      persisted: Boolean,
      // enter
      onBeforeEnter: TransitionHookValidator,
      onEnter: TransitionHookValidator,
      onAfterEnter: TransitionHookValidator,
      onEnterCancelled: TransitionHookValidator,
      // leave
      onBeforeLeave: TransitionHookValidator,
      onLeave: TransitionHookValidator,
      onAfterLeave: TransitionHookValidator,
      onLeaveCancelled: TransitionHookValidator,
      // appear
      onBeforeAppear: TransitionHookValidator,
      onAppear: TransitionHookValidator,
      onAfterAppear: TransitionHookValidator,
      onAppearCancelled: TransitionHookValidator
    };
    const recursiveGetSubtree = (instance) => {
      const subTree = instance.subTree;
      return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
    };
    const BaseTransitionImpl = {
      name: `BaseTransition`,
      props: BaseTransitionPropsValidators,
      setup(props2, { slots }) {
        const instance = getCurrentInstance();
        const state = useTransitionState();
        return () => {
          const children = slots.default && getTransitionRawChildren(slots.default(), true);
          if (!children || !children.length) {
            return;
          }
          let child = children[0];
          if (children.length > 1) {
            for (const c2 of children) {
              if (c2.type !== Comment) {
                child = c2;
                break;
              }
            }
          }
          const rawProps = toRaw(props2);
          const { mode } = rawProps;
          if (state.isLeaving) {
            return emptyPlaceholder(child);
          }
          const innerChild = getKeepAliveChild(child);
          if (!innerChild) {
            return emptyPlaceholder(child);
          }
          let enterHooks = resolveTransitionHooks(
            innerChild,
            rawProps,
            state,
            instance,
            // #11061, ensure enterHooks is fresh after clone
            (hooks) => enterHooks = hooks
          );
          setTransitionHooks(innerChild, enterHooks);
          const oldChild = instance.subTree;
          const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
          if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
            const leavingHooks = resolveTransitionHooks(
              oldInnerChild,
              rawProps,
              state,
              instance
            );
            setTransitionHooks(oldInnerChild, leavingHooks);
            if (mode === "out-in" && innerChild.type !== Comment) {
              state.isLeaving = true;
              leavingHooks.afterLeave = () => {
                state.isLeaving = false;
                if (instance.update.active !== false) {
                  instance.effect.dirty = true;
                  instance.update();
                }
              };
              return emptyPlaceholder(child);
            } else if (mode === "in-out" && innerChild.type !== Comment) {
              leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
                const leavingVNodesCache = getLeavingNodesForType(
                  state,
                  oldInnerChild
                );
                leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
                el[leaveCbKey] = () => {
                  earlyRemove();
                  el[leaveCbKey] = void 0;
                  delete enterHooks.delayedLeave;
                };
                enterHooks.delayedLeave = delayedLeave;
              };
            }
          }
          return child;
        };
      }
    };
    const BaseTransition = BaseTransitionImpl;
    function getLeavingNodesForType(state, vnode) {
      const { leavingVNodes } = state;
      let leavingVNodesCache = leavingVNodes.get(vnode.type);
      if (!leavingVNodesCache) {
        leavingVNodesCache = /* @__PURE__ */ Object.create(null);
        leavingVNodes.set(vnode.type, leavingVNodesCache);
      }
      return leavingVNodesCache;
    }
    function resolveTransitionHooks(vnode, props2, state, instance, postClone) {
      const {
        appear,
        mode,
        persisted = false,
        onBeforeEnter,
        onEnter,
        onAfterEnter,
        onEnterCancelled,
        onBeforeLeave,
        onLeave,
        onAfterLeave,
        onLeaveCancelled,
        onBeforeAppear,
        onAppear,
        onAfterAppear,
        onAppearCancelled
      } = props2;
      const key2 = String(vnode.key);
      const leavingVNodesCache = getLeavingNodesForType(state, vnode);
      const callHook2 = (hook, args) => {
        hook && callWithAsyncErrorHandling(
          hook,
          instance,
          9,
          args
        );
      };
      const callAsyncHook = (hook, args) => {
        const done = args[1];
        callHook2(hook, args);
        if (isArray$2(hook)) {
          if (hook.every((hook2) => hook2.length <= 1)) done();
        } else if (hook.length <= 1) {
          done();
        }
      };
      const hooks = {
        mode,
        persisted,
        beforeEnter(el) {
          let hook = onBeforeEnter;
          if (!state.isMounted) {
            if (appear) {
              hook = onBeforeAppear || onBeforeEnter;
            } else {
              return;
            }
          }
          if (el[leaveCbKey]) {
            el[leaveCbKey](
              true
              /* cancelled */
            );
          }
          const leavingVNode = leavingVNodesCache[key2];
          if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
            leavingVNode.el[leaveCbKey]();
          }
          callHook2(hook, [el]);
        },
        enter(el) {
          let hook = onEnter;
          let afterHook = onAfterEnter;
          let cancelHook = onEnterCancelled;
          if (!state.isMounted) {
            if (appear) {
              hook = onAppear || onEnter;
              afterHook = onAfterAppear || onAfterEnter;
              cancelHook = onAppearCancelled || onEnterCancelled;
            } else {
              return;
            }
          }
          let called = false;
          const done = el[enterCbKey$1] = (cancelled) => {
            if (called) return;
            called = true;
            if (cancelled) {
              callHook2(cancelHook, [el]);
            } else {
              callHook2(afterHook, [el]);
            }
            if (hooks.delayedLeave) {
              hooks.delayedLeave();
            }
            el[enterCbKey$1] = void 0;
          };
          if (hook) {
            callAsyncHook(hook, [el, done]);
          } else {
            done();
          }
        },
        leave(el, remove2) {
          const key22 = String(vnode.key);
          if (el[enterCbKey$1]) {
            el[enterCbKey$1](
              true
              /* cancelled */
            );
          }
          if (state.isUnmounting) {
            return remove2();
          }
          callHook2(onBeforeLeave, [el]);
          let called = false;
          const done = el[leaveCbKey] = (cancelled) => {
            if (called) return;
            called = true;
            remove2();
            if (cancelled) {
              callHook2(onLeaveCancelled, [el]);
            } else {
              callHook2(onAfterLeave, [el]);
            }
            el[leaveCbKey] = void 0;
            if (leavingVNodesCache[key22] === vnode) {
              delete leavingVNodesCache[key22];
            }
          };
          leavingVNodesCache[key22] = vnode;
          if (onLeave) {
            callAsyncHook(onLeave, [el, done]);
          } else {
            done();
          }
        },
        clone(vnode2) {
          const hooks2 = resolveTransitionHooks(
            vnode2,
            props2,
            state,
            instance,
            postClone
          );
          if (postClone) postClone(hooks2);
          return hooks2;
        }
      };
      return hooks;
    }
    function emptyPlaceholder(vnode) {
      if (isKeepAlive(vnode)) {
        vnode = cloneVNode(vnode);
        vnode.children = null;
        return vnode;
      }
    }
    function getKeepAliveChild(vnode) {
      if (!isKeepAlive(vnode)) {
        return vnode;
      }
      const { shapeFlag, children } = vnode;
      if (children) {
        if (shapeFlag & 16) {
          return children[0];
        }
        if (shapeFlag & 32 && isFunction$2(children.default)) {
          return children.default();
        }
      }
    }
    function setTransitionHooks(vnode, hooks) {
      if (vnode.shapeFlag & 6 && vnode.component) {
        setTransitionHooks(vnode.component.subTree, hooks);
      } else if (vnode.shapeFlag & 128) {
        vnode.ssContent.transition = hooks.clone(vnode.ssContent);
        vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
      } else {
        vnode.transition = hooks;
      }
    }
    function getTransitionRawChildren(children, keepComment = false, parentKey) {
      let ret = [];
      let keyedFragmentCount = 0;
      for (let i2 = 0; i2 < children.length; i2++) {
        let child = children[i2];
        const key2 = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i2);
        if (child.type === Fragment) {
          if (child.patchFlag & 128) keyedFragmentCount++;
          ret = ret.concat(
            getTransitionRawChildren(child.children, keepComment, key2)
          );
        } else if (keepComment || child.type !== Comment) {
          ret.push(key2 != null ? cloneVNode(child, { key: key2 }) : child);
        }
      }
      if (keyedFragmentCount > 1) {
        for (let i2 = 0; i2 < ret.length; i2++) {
          ret[i2].patchFlag = -2;
        }
      }
      return ret;
    }
    /*! #__NO_SIDE_EFFECTS__ */
    // @__NO_SIDE_EFFECTS__
    function defineComponent(options, extraOptions) {
      return isFunction$2(options) ? (
        // #8326: extend call and options.name access are considered side-effects
        // by Rollup, so we have to wrap it in a pure-annotated IIFE.
        /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
      ) : options;
    }
    const isAsyncWrapper = (i2) => !!i2.type.__asyncLoader;
    const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
    function onActivated(hook, target) {
      registerKeepAliveHook(hook, "a", target);
    }
    function onDeactivated(hook, target) {
      registerKeepAliveHook(hook, "da", target);
    }
    function registerKeepAliveHook(hook, type, target = currentInstance) {
      const wrappedHook = hook.__wdc || (hook.__wdc = () => {
        let current = target;
        while (current) {
          if (current.isDeactivated) {
            return;
          }
          current = current.parent;
        }
        return hook();
      });
      injectHook(type, wrappedHook, target);
      if (target) {
        let current = target.parent;
        while (current && current.parent) {
          if (isKeepAlive(current.parent.vnode)) {
            injectToKeepAliveRoot(wrappedHook, type, target, current);
          }
          current = current.parent;
        }
      }
    }
    function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
      const injected = injectHook(
        type,
        hook,
        keepAliveRoot,
        true
        /* prepend */
      );
      onUnmounted(() => {
        remove(keepAliveRoot[type], injected);
      }, target);
    }
    function injectHook(type, hook, target = currentInstance, prepend = false) {
      if (target) {
        const hooks = target[type] || (target[type] = []);
        const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
          pauseTracking();
          const reset = setCurrentInstance(target);
          const res = callWithAsyncErrorHandling(hook, target, type, args);
          reset();
          resetTracking();
          return res;
        });
        if (prepend) {
          hooks.unshift(wrappedHook);
        } else {
          hooks.push(wrappedHook);
        }
        return wrappedHook;
      }
    }
    const createHook = (lifecycle) => (hook, target = currentInstance) => {
      if (!isInSSRComponentSetup || lifecycle === "sp") {
        injectHook(lifecycle, (...args) => hook(...args), target);
      }
    };
    const onBeforeMount = createHook("bm");
    const onMounted = createHook("m");
    const onBeforeUpdate = createHook("bu");
    const onUpdated = createHook("u");
    const onBeforeUnmount = createHook("bum");
    const onUnmounted = createHook("um");
    const onServerPrefetch = createHook("sp");
    const onRenderTriggered = createHook(
      "rtg"
    );
    const onRenderTracked = createHook(
      "rtc"
    );
    function onErrorCaptured(hook, target = currentInstance) {
      injectHook("ec", hook, target);
    }
    const DIRECTIVES = "directives";
    const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
    function resolveDirective(name) {
      return resolveAsset(DIRECTIVES, name);
    }
    function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
      const instance = currentRenderingInstance || currentInstance;
      if (instance) {
        const Component = instance.type;
        const res = (
          // local registration
          // check instance[type] first which is resolved for options API
          resolve(instance[type] || Component[type], name) || // global registration
          resolve(instance.appContext[type], name)
        );
        if (!res && maybeSelfReference) {
          return Component;
        }
        return res;
      }
    }
    function resolve(registry, name) {
      return registry && (registry[name] || registry[camelize$1(name)] || registry[capitalize$1(camelize$1(name))]);
    }
    function renderList(source, renderItem, cache, index2) {
      let ret;
      const cached2 = cache;
      if (isArray$2(source) || isString$1(source)) {
        ret = new Array(source.length);
        for (let i2 = 0, l2 = source.length; i2 < l2; i2++) {
          ret[i2] = renderItem(source[i2], i2, void 0, cached2);
        }
      } else if (typeof source === "number") {
        ret = new Array(source);
        for (let i2 = 0; i2 < source; i2++) {
          ret[i2] = renderItem(i2 + 1, i2, void 0, cached2);
        }
      } else if (isObject$3(source)) {
        if (source[Symbol.iterator]) {
          ret = Array.from(
            source,
            (item, i2) => renderItem(item, i2, void 0, cached2)
          );
        } else {
          const keys2 = Object.keys(source);
          ret = new Array(keys2.length);
          for (let i2 = 0, l2 = keys2.length; i2 < l2; i2++) {
            const key2 = keys2[i2];
            ret[i2] = renderItem(source[key2], key2, i2, cached2);
          }
        }
      } else {
        ret = [];
      }
      return ret;
    }
    const getPublicInstance = (i2) => {
      if (!i2) return null;
      if (isStatefulComponent(i2)) return getComponentPublicInstance(i2);
      return getPublicInstance(i2.parent);
    };
    const publicPropertiesMap = (
      // Move PURE marker to new line to workaround compiler discarding it
      // due to type annotation
      /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
        $: (i2) => i2,
        $el: (i2) => i2.vnode.el,
        $data: (i2) => i2.data,
        $props: (i2) => i2.props,
        $attrs: (i2) => i2.attrs,
        $slots: (i2) => i2.slots,
        $refs: (i2) => i2.refs,
        $parent: (i2) => getPublicInstance(i2.parent),
        $root: (i2) => getPublicInstance(i2.root),
        $emit: (i2) => i2.emit,
        $options: (i2) => resolveMergedOptions(i2),
        $forceUpdate: (i2) => i2.f || (i2.f = () => {
          i2.effect.dirty = true;
          queueJob(i2.update);
        }),
        $nextTick: (i2) => i2.n || (i2.n = nextTick.bind(i2.proxy)),
        $watch: (i2) => instanceWatch.bind(i2)
      })
    );
    const hasSetupBinding = (state, key2) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn$1(state, key2);
    const PublicInstanceProxyHandlers = {
      get({ _: instance }, key2) {
        if (key2 === "__v_skip") {
          return true;
        }
        const { ctx, setupState, data, props: props2, accessCache, type, appContext } = instance;
        let normalizedProps;
        if (key2[0] !== "$") {
          const n2 = accessCache[key2];
          if (n2 !== void 0) {
            switch (n2) {
              case 1:
                return setupState[key2];
              case 2:
                return data[key2];
              case 4:
                return ctx[key2];
              case 3:
                return props2[key2];
            }
          } else if (hasSetupBinding(setupState, key2)) {
            accessCache[key2] = 1;
            return setupState[key2];
          } else if (data !== EMPTY_OBJ && hasOwn$1(data, key2)) {
            accessCache[key2] = 2;
            return data[key2];
          } else if (
            // only cache other properties when instance has declared (thus stable)
            // props
            (normalizedProps = instance.propsOptions[0]) && hasOwn$1(normalizedProps, key2)
          ) {
            accessCache[key2] = 3;
            return props2[key2];
          } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key2)) {
            accessCache[key2] = 4;
            return ctx[key2];
          } else if (shouldCacheAccess) {
            accessCache[key2] = 0;
          }
        }
        const publicGetter = publicPropertiesMap[key2];
        let cssModule, globalProperties;
        if (publicGetter) {
          if (key2 === "$attrs") {
            track(instance.attrs, "get", "");
          }
          return publicGetter(instance);
        } else if (
          // css module (injected by vue-loader)
          (cssModule = type.__cssModules) && (cssModule = cssModule[key2])
        ) {
          return cssModule;
        } else if (ctx !== EMPTY_OBJ && hasOwn$1(ctx, key2)) {
          accessCache[key2] = 4;
          return ctx[key2];
        } else if (
          // global properties
          globalProperties = appContext.config.globalProperties, hasOwn$1(globalProperties, key2)
        ) {
          {
            return globalProperties[key2];
          }
        } else ;
      },
      set({ _: instance }, key2, value) {
        const { data, setupState, ctx } = instance;
        if (hasSetupBinding(setupState, key2)) {
          setupState[key2] = value;
          return true;
        } else if (data !== EMPTY_OBJ && hasOwn$1(data, key2)) {
          data[key2] = value;
          return true;
        } else if (hasOwn$1(instance.props, key2)) {
          return false;
        }
        if (key2[0] === "$" && key2.slice(1) in instance) {
          return false;
        } else {
          {
            ctx[key2] = value;
          }
        }
        return true;
      },
      has({
        _: { data, setupState, accessCache, ctx, appContext, propsOptions }
      }, key2) {
        let normalizedProps;
        return !!accessCache[key2] || data !== EMPTY_OBJ && hasOwn$1(data, key2) || hasSetupBinding(setupState, key2) || (normalizedProps = propsOptions[0]) && hasOwn$1(normalizedProps, key2) || hasOwn$1(ctx, key2) || hasOwn$1(publicPropertiesMap, key2) || hasOwn$1(appContext.config.globalProperties, key2);
      },
      defineProperty(target, key2, descriptor) {
        if (descriptor.get != null) {
          target._.accessCache[key2] = 0;
        } else if (hasOwn$1(descriptor, "value")) {
          this.set(target, key2, descriptor.value, null);
        }
        return Reflect.defineProperty(target, key2, descriptor);
      }
    };
    function normalizePropsOrEmits(props2) {
      return isArray$2(props2) ? props2.reduce(
        (normalized, p2) => (normalized[p2] = null, normalized),
        {}
      ) : props2;
    }
    let shouldCacheAccess = true;
    function applyOptions(instance) {
      const options = resolveMergedOptions(instance);
      const publicThis = instance.proxy;
      const ctx = instance.ctx;
      shouldCacheAccess = false;
      if (options.beforeCreate) {
        callHook$1(options.beforeCreate, instance, "bc");
      }
      const {
        // state
        data: dataOptions,
        computed: computedOptions,
        methods,
        watch: watchOptions,
        provide: provideOptions,
        inject: injectOptions,
        // lifecycle
        created,
        beforeMount,
        mounted,
        beforeUpdate,
        updated,
        activated,
        deactivated,
        beforeDestroy,
        beforeUnmount,
        destroyed,
        unmounted,
        render: render2,
        renderTracked,
        renderTriggered,
        errorCaptured,
        serverPrefetch,
        // public API
        expose,
        inheritAttrs,
        // assets
        components,
        directives,
        filters
      } = options;
      const checkDuplicateProperties = null;
      if (injectOptions) {
        resolveInjections(injectOptions, ctx, checkDuplicateProperties);
      }
      if (methods) {
        for (const key2 in methods) {
          const methodHandler = methods[key2];
          if (isFunction$2(methodHandler)) {
            {
              ctx[key2] = methodHandler.bind(publicThis);
            }
          }
        }
      }
      if (dataOptions) {
        const data = dataOptions.call(publicThis, publicThis);
        if (!isObject$3(data)) ;
        else {
          instance.data = reactive(data);
        }
      }
      shouldCacheAccess = true;
      if (computedOptions) {
        for (const key2 in computedOptions) {
          const opt = computedOptions[key2];
          const get2 = isFunction$2(opt) ? opt.bind(publicThis, publicThis) : isFunction$2(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
          const set2 = !isFunction$2(opt) && isFunction$2(opt.set) ? opt.set.bind(publicThis) : NOOP;
          const c2 = computed({
            get: get2,
            set: set2
          });
          Object.defineProperty(ctx, key2, {
            enumerable: true,
            configurable: true,
            get: () => c2.value,
            set: (v2) => c2.value = v2
          });
        }
      }
      if (watchOptions) {
        for (const key2 in watchOptions) {
          createWatcher(watchOptions[key2], ctx, publicThis, key2);
        }
      }
      if (provideOptions) {
        const provides = isFunction$2(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
        Reflect.ownKeys(provides).forEach((key2) => {
          provide(key2, provides[key2]);
        });
      }
      if (created) {
        callHook$1(created, instance, "c");
      }
      function registerLifecycleHook(register, hook) {
        if (isArray$2(hook)) {
          hook.forEach((_hook) => register(_hook.bind(publicThis)));
        } else if (hook) {
          register(hook.bind(publicThis));
        }
      }
      registerLifecycleHook(onBeforeMount, beforeMount);
      registerLifecycleHook(onMounted, mounted);
      registerLifecycleHook(onBeforeUpdate, beforeUpdate);
      registerLifecycleHook(onUpdated, updated);
      registerLifecycleHook(onActivated, activated);
      registerLifecycleHook(onDeactivated, deactivated);
      registerLifecycleHook(onErrorCaptured, errorCaptured);
      registerLifecycleHook(onRenderTracked, renderTracked);
      registerLifecycleHook(onRenderTriggered, renderTriggered);
      registerLifecycleHook(onBeforeUnmount, beforeUnmount);
      registerLifecycleHook(onUnmounted, unmounted);
      registerLifecycleHook(onServerPrefetch, serverPrefetch);
      if (isArray$2(expose)) {
        if (expose.length) {
          const exposed = instance.exposed || (instance.exposed = {});
          expose.forEach((key2) => {
            Object.defineProperty(exposed, key2, {
              get: () => publicThis[key2],
              set: (val) => publicThis[key2] = val
            });
          });
        } else if (!instance.exposed) {
          instance.exposed = {};
        }
      }
      if (render2 && instance.render === NOOP) {
        instance.render = render2;
      }
      if (inheritAttrs != null) {
        instance.inheritAttrs = inheritAttrs;
      }
      if (components) instance.components = components;
      if (directives) instance.directives = directives;
    }
    function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
      if (isArray$2(injectOptions)) {
        injectOptions = normalizeInject(injectOptions);
      }
      for (const key2 in injectOptions) {
        const opt = injectOptions[key2];
        let injected;
        if (isObject$3(opt)) {
          if ("default" in opt) {
            injected = inject(
              opt.from || key2,
              opt.default,
              true
            );
          } else {
            injected = inject(opt.from || key2);
          }
        } else {
          injected = inject(opt);
        }
        if (isRef(injected)) {
          Object.defineProperty(ctx, key2, {
            enumerable: true,
            configurable: true,
            get: () => injected.value,
            set: (v2) => injected.value = v2
          });
        } else {
          ctx[key2] = injected;
        }
      }
    }
    function callHook$1(hook, instance, type) {
      callWithAsyncErrorHandling(
        isArray$2(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
        instance,
        type
      );
    }
    function createWatcher(raw, ctx, publicThis, key2) {
      const getter = key2.includes(".") ? createPathGetter(publicThis, key2) : () => publicThis[key2];
      if (isString$1(raw)) {
        const handler = ctx[raw];
        if (isFunction$2(handler)) {
          watch(getter, handler);
        }
      } else if (isFunction$2(raw)) {
        watch(getter, raw.bind(publicThis));
      } else if (isObject$3(raw)) {
        if (isArray$2(raw)) {
          raw.forEach((r2) => createWatcher(r2, ctx, publicThis, key2));
        } else {
          const handler = isFunction$2(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
          if (isFunction$2(handler)) {
            watch(getter, handler, raw);
          }
        }
      } else ;
    }
    function resolveMergedOptions(instance) {
      const base = instance.type;
      const { mixins, extends: extendsOptions } = base;
      const {
        mixins: globalMixins,
        optionsCache: cache,
        config: { optionMergeStrategies }
      } = instance.appContext;
      const cached2 = cache.get(base);
      let resolved;
      if (cached2) {
        resolved = cached2;
      } else if (!globalMixins.length && !mixins && !extendsOptions) {
        {
          resolved = base;
        }
      } else {
        resolved = {};
        if (globalMixins.length) {
          globalMixins.forEach(
            (m2) => mergeOptions(resolved, m2, optionMergeStrategies, true)
          );
        }
        mergeOptions(resolved, base, optionMergeStrategies);
      }
      if (isObject$3(base)) {
        cache.set(base, resolved);
      }
      return resolved;
    }
    function mergeOptions(to, from2, strats, asMixin = false) {
      const { mixins, extends: extendsOptions } = from2;
      if (extendsOptions) {
        mergeOptions(to, extendsOptions, strats, true);
      }
      if (mixins) {
        mixins.forEach(
          (m2) => mergeOptions(to, m2, strats, true)
        );
      }
      for (const key2 in from2) {
        if (asMixin && key2 === "expose") ;
        else {
          const strat = internalOptionMergeStrats[key2] || strats && strats[key2];
          to[key2] = strat ? strat(to[key2], from2[key2]) : from2[key2];
        }
      }
      return to;
    }
    const internalOptionMergeStrats = {
      data: mergeDataFn,
      props: mergeEmitsOrPropsOptions,
      emits: mergeEmitsOrPropsOptions,
      // objects
      methods: mergeObjectOptions,
      computed: mergeObjectOptions,
      // lifecycle
      beforeCreate: mergeAsArray,
      created: mergeAsArray,
      beforeMount: mergeAsArray,
      mounted: mergeAsArray,
      beforeUpdate: mergeAsArray,
      updated: mergeAsArray,
      beforeDestroy: mergeAsArray,
      beforeUnmount: mergeAsArray,
      destroyed: mergeAsArray,
      unmounted: mergeAsArray,
      activated: mergeAsArray,
      deactivated: mergeAsArray,
      errorCaptured: mergeAsArray,
      serverPrefetch: mergeAsArray,
      // assets
      components: mergeObjectOptions,
      directives: mergeObjectOptions,
      // watch
      watch: mergeWatchOptions,
      // provide / inject
      provide: mergeDataFn,
      inject: mergeInject
    };
    function mergeDataFn(to, from2) {
      if (!from2) {
        return to;
      }
      if (!to) {
        return from2;
      }
      return function mergedDataFn() {
        return extend(
          isFunction$2(to) ? to.call(this, this) : to,
          isFunction$2(from2) ? from2.call(this, this) : from2
        );
      };
    }
    function mergeInject(to, from2) {
      return mergeObjectOptions(normalizeInject(to), normalizeInject(from2));
    }
    function normalizeInject(raw) {
      if (isArray$2(raw)) {
        const res = {};
        for (let i2 = 0; i2 < raw.length; i2++) {
          res[raw[i2]] = raw[i2];
        }
        return res;
      }
      return raw;
    }
    function mergeAsArray(to, from2) {
      return to ? [...new Set([].concat(to, from2))] : from2;
    }
    function mergeObjectOptions(to, from2) {
      return to ? extend(/* @__PURE__ */ Object.create(null), to, from2) : from2;
    }
    function mergeEmitsOrPropsOptions(to, from2) {
      if (to) {
        if (isArray$2(to) && isArray$2(from2)) {
          return [.../* @__PURE__ */ new Set([...to, ...from2])];
        }
        return extend(
          /* @__PURE__ */ Object.create(null),
          normalizePropsOrEmits(to),
          normalizePropsOrEmits(from2 != null ? from2 : {})
        );
      } else {
        return from2;
      }
    }
    function mergeWatchOptions(to, from2) {
      if (!to) return from2;
      if (!from2) return to;
      const merged = extend(/* @__PURE__ */ Object.create(null), to);
      for (const key2 in from2) {
        merged[key2] = mergeAsArray(to[key2], from2[key2]);
      }
      return merged;
    }
    function createAppContext() {
      return {
        app: null,
        config: {
          isNativeTag: NO,
          performance: false,
          globalProperties: {},
          optionMergeStrategies: {},
          errorHandler: void 0,
          warnHandler: void 0,
          compilerOptions: {}
        },
        mixins: [],
        components: {},
        directives: {},
        provides: /* @__PURE__ */ Object.create(null),
        optionsCache: /* @__PURE__ */ new WeakMap(),
        propsCache: /* @__PURE__ */ new WeakMap(),
        emitsCache: /* @__PURE__ */ new WeakMap()
      };
    }
    let uid$1 = 0;
    function createAppAPI(render2, hydrate) {
      return function createApp2(rootComponent, rootProps = null) {
        if (!isFunction$2(rootComponent)) {
          rootComponent = extend({}, rootComponent);
        }
        if (rootProps != null && !isObject$3(rootProps)) {
          rootProps = null;
        }
        const context = createAppContext();
        const installedPlugins = /* @__PURE__ */ new WeakSet();
        let isMounted = false;
        const app = context.app = {
          _uid: uid$1++,
          _component: rootComponent,
          _props: rootProps,
          _container: null,
          _context: context,
          _instance: null,
          version: version$1,
          get config() {
            return context.config;
          },
          set config(v2) {
          },
          use(plugin, ...options) {
            if (installedPlugins.has(plugin)) ;
            else if (plugin && isFunction$2(plugin.install)) {
              installedPlugins.add(plugin);
              plugin.install(app, ...options);
            } else if (isFunction$2(plugin)) {
              installedPlugins.add(plugin);
              plugin(app, ...options);
            } else ;
            return app;
          },
          mixin(mixin) {
            {
              if (!context.mixins.includes(mixin)) {
                context.mixins.push(mixin);
              }
            }
            return app;
          },
          component(name, component) {
            if (!component) {
              return context.components[name];
            }
            context.components[name] = component;
            return app;
          },
          directive(name, directive) {
            if (!directive) {
              return context.directives[name];
            }
            context.directives[name] = directive;
            return app;
          },
          mount(rootContainer, isHydrate, namespace) {
            if (!isMounted) {
              const vnode = createVNode(rootComponent, rootProps);
              vnode.appContext = context;
              if (namespace === true) {
                namespace = "svg";
              } else if (namespace === false) {
                namespace = void 0;
              }
              if (isHydrate && hydrate) {
                hydrate(vnode, rootContainer);
              } else {
                render2(vnode, rootContainer, namespace);
              }
              isMounted = true;
              app._container = rootContainer;
              rootContainer.__vue_app__ = app;
              return getComponentPublicInstance(vnode.component);
            }
          },
          unmount() {
            if (isMounted) {
              render2(null, app._container);
              delete app._container.__vue_app__;
            }
          },
          provide(key2, value) {
            context.provides[key2] = value;
            return app;
          },
          runWithContext(fn) {
            const lastApp = currentApp;
            currentApp = app;
            try {
              return fn();
            } finally {
              currentApp = lastApp;
            }
          }
        };
        return app;
      };
    }
    let currentApp = null;
    function provide(key2, value) {
      if (!currentInstance) ;
      else {
        let provides = currentInstance.provides;
        const parentProvides = currentInstance.parent && currentInstance.parent.provides;
        if (parentProvides === provides) {
          provides = currentInstance.provides = Object.create(parentProvides);
        }
        provides[key2] = value;
      }
    }
    function inject(key2, defaultValue, treatDefaultAsFactory = false) {
      const instance = currentInstance || currentRenderingInstance;
      if (instance || currentApp) {
        const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
        if (provides && key2 in provides) {
          return provides[key2];
        } else if (arguments.length > 1) {
          return treatDefaultAsFactory && isFunction$2(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
        } else ;
      }
    }
    const internalObjectProto = {};
    const createInternalObject = () => Object.create(internalObjectProto);
    const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
    function initProps(instance, rawProps, isStateful, isSSR = false) {
      const props2 = {};
      const attrs = createInternalObject();
      instance.propsDefaults = /* @__PURE__ */ Object.create(null);
      setFullProps(instance, rawProps, props2, attrs);
      for (const key2 in instance.propsOptions[0]) {
        if (!(key2 in props2)) {
          props2[key2] = void 0;
        }
      }
      if (isStateful) {
        instance.props = isSSR ? props2 : shallowReactive(props2);
      } else {
        if (!instance.type.props) {
          instance.props = attrs;
        } else {
          instance.props = props2;
        }
      }
      instance.attrs = attrs;
    }
    function updateProps(instance, rawProps, rawPrevProps, optimized) {
      const {
        props: props2,
        attrs,
        vnode: { patchFlag }
      } = instance;
      const rawCurrentProps = toRaw(props2);
      const [options] = instance.propsOptions;
      let hasAttrsChanged = false;
      if (
        // always force full diff in dev
        // - #1942 if hmr is enabled with sfc component
        // - vite#872 non-sfc component used by sfc component
        (optimized || patchFlag > 0) && !(patchFlag & 16)
      ) {
        if (patchFlag & 8) {
          const propsToUpdate = instance.vnode.dynamicProps;
          for (let i2 = 0; i2 < propsToUpdate.length; i2++) {
            let key2 = propsToUpdate[i2];
            if (isEmitListener(instance.emitsOptions, key2)) {
              continue;
            }
            const value = rawProps[key2];
            if (options) {
              if (hasOwn$1(attrs, key2)) {
                if (value !== attrs[key2]) {
                  attrs[key2] = value;
                  hasAttrsChanged = true;
                }
              } else {
                const camelizedKey = camelize$1(key2);
                props2[camelizedKey] = resolvePropValue$1(
                  options,
                  rawCurrentProps,
                  camelizedKey,
                  value,
                  instance,
                  false
                );
              }
            } else {
              if (value !== attrs[key2]) {
                attrs[key2] = value;
                hasAttrsChanged = true;
              }
            }
          }
        }
      } else {
        if (setFullProps(instance, rawProps, props2, attrs)) {
          hasAttrsChanged = true;
        }
        let kebabKey;
        for (const key2 in rawCurrentProps) {
          if (!rawProps || // for camelCase
          !hasOwn$1(rawProps, key2) && // it's possible the original props was passed in as kebab-case
          // and converted to camelCase (#955)
          ((kebabKey = hyphenate$1(key2)) === key2 || !hasOwn$1(rawProps, kebabKey))) {
            if (options) {
              if (rawPrevProps && // for camelCase
              (rawPrevProps[key2] !== void 0 || // for kebab-case
              rawPrevProps[kebabKey] !== void 0)) {
                props2[key2] = resolvePropValue$1(
                  options,
                  rawCurrentProps,
                  key2,
                  void 0,
                  instance,
                  true
                );
              }
            } else {
              delete props2[key2];
            }
          }
        }
        if (attrs !== rawCurrentProps) {
          for (const key2 in attrs) {
            if (!rawProps || !hasOwn$1(rawProps, key2) && true) {
              delete attrs[key2];
              hasAttrsChanged = true;
            }
          }
        }
      }
      if (hasAttrsChanged) {
        trigger(instance.attrs, "set", "");
      }
    }
    function setFullProps(instance, rawProps, props2, attrs) {
      const [options, needCastKeys] = instance.propsOptions;
      let hasAttrsChanged = false;
      let rawCastValues;
      if (rawProps) {
        for (let key2 in rawProps) {
          if (isReservedProp(key2)) {
            continue;
          }
          const value = rawProps[key2];
          let camelKey;
          if (options && hasOwn$1(options, camelKey = camelize$1(key2))) {
            if (!needCastKeys || !needCastKeys.includes(camelKey)) {
              props2[camelKey] = value;
            } else {
              (rawCastValues || (rawCastValues = {}))[camelKey] = value;
            }
          } else if (!isEmitListener(instance.emitsOptions, key2)) {
            if (!(key2 in attrs) || value !== attrs[key2]) {
              attrs[key2] = value;
              hasAttrsChanged = true;
            }
          }
        }
      }
      if (needCastKeys) {
        const rawCurrentProps = toRaw(props2);
        const castValues = rawCastValues || EMPTY_OBJ;
        for (let i2 = 0; i2 < needCastKeys.length; i2++) {
          const key2 = needCastKeys[i2];
          props2[key2] = resolvePropValue$1(
            options,
            rawCurrentProps,
            key2,
            castValues[key2],
            instance,
            !hasOwn$1(castValues, key2)
          );
        }
      }
      return hasAttrsChanged;
    }
    function resolvePropValue$1(options, props2, key2, value, instance, isAbsent) {
      const opt = options[key2];
      if (opt != null) {
        const hasDefault = hasOwn$1(opt, "default");
        if (hasDefault && value === void 0) {
          const defaultValue = opt.default;
          if (opt.type !== Function && !opt.skipFactory && isFunction$2(defaultValue)) {
            const { propsDefaults } = instance;
            if (key2 in propsDefaults) {
              value = propsDefaults[key2];
            } else {
              const reset = setCurrentInstance(instance);
              value = propsDefaults[key2] = defaultValue.call(
                null,
                props2
              );
              reset();
            }
          } else {
            value = defaultValue;
          }
        }
        if (opt[
          0
          /* shouldCast */
        ]) {
          if (isAbsent && !hasDefault) {
            value = false;
          } else if (opt[
            1
            /* shouldCastTrue */
          ] && (value === "" || value === hyphenate$1(key2))) {
            value = true;
          }
        }
      }
      return value;
    }
    const mixinPropsCache = /* @__PURE__ */ new WeakMap();
    function normalizePropsOptions(comp, appContext, asMixin = false) {
      const cache = asMixin ? mixinPropsCache : appContext.propsCache;
      const cached2 = cache.get(comp);
      if (cached2) {
        return cached2;
      }
      const raw = comp.props;
      const normalized = {};
      const needCastKeys = [];
      let hasExtends = false;
      if (!isFunction$2(comp)) {
        const extendProps = (raw2) => {
          hasExtends = true;
          const [props2, keys2] = normalizePropsOptions(raw2, appContext, true);
          extend(normalized, props2);
          if (keys2) needCastKeys.push(...keys2);
        };
        if (!asMixin && appContext.mixins.length) {
          appContext.mixins.forEach(extendProps);
        }
        if (comp.extends) {
          extendProps(comp.extends);
        }
        if (comp.mixins) {
          comp.mixins.forEach(extendProps);
        }
      }
      if (!raw && !hasExtends) {
        if (isObject$3(comp)) {
          cache.set(comp, EMPTY_ARR);
        }
        return EMPTY_ARR;
      }
      if (isArray$2(raw)) {
        for (let i2 = 0; i2 < raw.length; i2++) {
          const normalizedKey = camelize$1(raw[i2]);
          if (validatePropName(normalizedKey)) {
            normalized[normalizedKey] = EMPTY_OBJ;
          }
        }
      } else if (raw) {
        for (const key2 in raw) {
          const normalizedKey = camelize$1(key2);
          if (validatePropName(normalizedKey)) {
            const opt = raw[key2];
            const prop = normalized[normalizedKey] = isArray$2(opt) || isFunction$2(opt) ? { type: opt } : extend({}, opt);
            const propType = prop.type;
            let shouldCast = false;
            let shouldCastTrue = true;
            if (isArray$2(propType)) {
              for (let index2 = 0; index2 < propType.length; ++index2) {
                const type = propType[index2];
                const typeName = isFunction$2(type) && type.name;
                if (typeName === "Boolean") {
                  shouldCast = true;
                  break;
                } else if (typeName === "String") {
                  shouldCastTrue = false;
                }
              }
            } else {
              shouldCast = isFunction$2(propType) && propType.name === "Boolean";
            }
            prop[
              0
              /* shouldCast */
            ] = shouldCast;
            prop[
              1
              /* shouldCastTrue */
            ] = shouldCastTrue;
            if (shouldCast || hasOwn$1(prop, "default")) {
              needCastKeys.push(normalizedKey);
            }
          }
        }
      }
      const res = [normalized, needCastKeys];
      if (isObject$3(comp)) {
        cache.set(comp, res);
      }
      return res;
    }
    function validatePropName(key2) {
      if (key2[0] !== "$" && !isReservedProp(key2)) {
        return true;
      }
      return false;
    }
    const isInternalKey = (key2) => key2[0] === "_" || key2 === "$stable";
    const normalizeSlotValue = (value) => isArray$2(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
    const normalizeSlot = (key2, rawSlot, ctx) => {
      if (rawSlot._n) {
        return rawSlot;
      }
      const normalized = withCtx((...args) => {
        if (false) ;
        return normalizeSlotValue(rawSlot(...args));
      }, ctx);
      normalized._c = false;
      return normalized;
    };
    const normalizeObjectSlots = (rawSlots, slots, instance) => {
      const ctx = rawSlots._ctx;
      for (const key2 in rawSlots) {
        if (isInternalKey(key2)) continue;
        const value = rawSlots[key2];
        if (isFunction$2(value)) {
          slots[key2] = normalizeSlot(key2, value, ctx);
        } else if (value != null) {
          const normalized = normalizeSlotValue(value);
          slots[key2] = () => normalized;
        }
      }
    };
    const normalizeVNodeSlots = (instance, children) => {
      const normalized = normalizeSlotValue(children);
      instance.slots.default = () => normalized;
    };
    const assignSlots = (slots, children, optimized) => {
      for (const key2 in children) {
        if (optimized || key2 !== "_") {
          slots[key2] = children[key2];
        }
      }
    };
    const initSlots = (instance, children, optimized) => {
      const slots = instance.slots = createInternalObject();
      if (instance.vnode.shapeFlag & 32) {
        const type = children._;
        if (type) {
          assignSlots(slots, children, optimized);
          if (optimized) {
            def(slots, "_", type, true);
          }
        } else {
          normalizeObjectSlots(children, slots);
        }
      } else if (children) {
        normalizeVNodeSlots(instance, children);
      }
    };
    const updateSlots = (instance, children, optimized) => {
      const { vnode, slots } = instance;
      let needDeletionCheck = true;
      let deletionComparisonTarget = EMPTY_OBJ;
      if (vnode.shapeFlag & 32) {
        const type = children._;
        if (type) {
          if (optimized && type === 1) {
            needDeletionCheck = false;
          } else {
            assignSlots(slots, children, optimized);
          }
        } else {
          needDeletionCheck = !children.$stable;
          normalizeObjectSlots(children, slots);
        }
        deletionComparisonTarget = children;
      } else if (children) {
        normalizeVNodeSlots(instance, children);
        deletionComparisonTarget = { default: 1 };
      }
      if (needDeletionCheck) {
        for (const key2 in slots) {
          if (!isInternalKey(key2) && deletionComparisonTarget[key2] == null) {
            delete slots[key2];
          }
        }
      }
    };
    function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
      if (isArray$2(rawRef)) {
        rawRef.forEach(
          (r2, i2) => setRef(
            r2,
            oldRawRef && (isArray$2(oldRawRef) ? oldRawRef[i2] : oldRawRef),
            parentSuspense,
            vnode,
            isUnmount
          )
        );
        return;
      }
      if (isAsyncWrapper(vnode) && !isUnmount) {
        return;
      }
      const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
      const value = isUnmount ? null : refValue;
      const { i: owner, r: ref3 } = rawRef;
      const oldRef = oldRawRef && oldRawRef.r;
      const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
      const setupState = owner.setupState;
      if (oldRef != null && oldRef !== ref3) {
        if (isString$1(oldRef)) {
          refs[oldRef] = null;
          if (hasOwn$1(setupState, oldRef)) {
            setupState[oldRef] = null;
          }
        } else if (isRef(oldRef)) {
          oldRef.value = null;
        }
      }
      if (isFunction$2(ref3)) {
        callWithErrorHandling(ref3, owner, 12, [value, refs]);
      } else {
        const _isString = isString$1(ref3);
        const _isRef = isRef(ref3);
        if (_isString || _isRef) {
          const doSet = () => {
            if (rawRef.f) {
              const existing = _isString ? hasOwn$1(setupState, ref3) ? setupState[ref3] : refs[ref3] : ref3.value;
              if (isUnmount) {
                isArray$2(existing) && remove(existing, refValue);
              } else {
                if (!isArray$2(existing)) {
                  if (_isString) {
                    refs[ref3] = [refValue];
                    if (hasOwn$1(setupState, ref3)) {
                      setupState[ref3] = refs[ref3];
                    }
                  } else {
                    ref3.value = [refValue];
                    if (rawRef.k) refs[rawRef.k] = ref3.value;
                  }
                } else if (!existing.includes(refValue)) {
                  existing.push(refValue);
                }
              }
            } else if (_isString) {
              refs[ref3] = value;
              if (hasOwn$1(setupState, ref3)) {
                setupState[ref3] = value;
              }
            } else if (_isRef) {
              ref3.value = value;
              if (rawRef.k) refs[rawRef.k] = value;
            } else ;
          };
          if (value) {
            doSet.id = -1;
            queuePostRenderEffect(doSet, parentSuspense);
          } else {
            doSet();
          }
        }
      }
    }
    const TeleportEndKey = Symbol("_vte");
    const isTeleport = (type) => type.__isTeleport;
    const isTeleportDisabled = (props2) => props2 && (props2.disabled || props2.disabled === "");
    const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
    const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
    const resolveTarget = (props2, select) => {
      const targetSelector = props2 && props2.to;
      if (isString$1(targetSelector)) {
        if (!select) {
          return null;
        } else {
          const target = select(targetSelector);
          return target;
        }
      } else {
        return targetSelector;
      }
    };
    const TeleportImpl = {
      name: "Teleport",
      __isTeleport: true,
      process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
        const {
          mc: mountChildren,
          pc: patchChildren,
          pbc: patchBlockChildren,
          o: { insert, querySelector, createText, createComment }
        } = internals;
        const disabled = isTeleportDisabled(n2.props);
        let { shapeFlag, children, dynamicChildren } = n2;
        if (n1 == null) {
          const placeholder = n2.el = createText("");
          const mainAnchor = n2.anchor = createText("");
          insert(placeholder, container, anchor);
          insert(mainAnchor, container, anchor);
          const target = n2.target = resolveTarget(n2.props, querySelector);
          const targetAnchor = prepareAnchor(target, n2, createText, insert);
          if (target) {
            if (namespace === "svg" || isTargetSVG(target)) {
              namespace = "svg";
            } else if (namespace === "mathml" || isTargetMathML(target)) {
              namespace = "mathml";
            }
          }
          const mount = (container2, anchor2) => {
            if (shapeFlag & 16) {
              mountChildren(
                children,
                container2,
                anchor2,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized
              );
            }
          };
          if (disabled) {
            mount(container, mainAnchor);
          } else if (target) {
            mount(target, targetAnchor);
          }
        } else {
          n2.el = n1.el;
          n2.targetStart = n1.targetStart;
          const mainAnchor = n2.anchor = n1.anchor;
          const target = n2.target = n1.target;
          const targetAnchor = n2.targetAnchor = n1.targetAnchor;
          const wasDisabled = isTeleportDisabled(n1.props);
          const currentContainer = wasDisabled ? container : target;
          const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
          if (namespace === "svg" || isTargetSVG(target)) {
            namespace = "svg";
          } else if (namespace === "mathml" || isTargetMathML(target)) {
            namespace = "mathml";
          }
          if (dynamicChildren) {
            patchBlockChildren(
              n1.dynamicChildren,
              dynamicChildren,
              currentContainer,
              parentComponent,
              parentSuspense,
              namespace,
              slotScopeIds
            );
            traverseStaticChildren(n1, n2, true);
          } else if (!optimized) {
            patchChildren(
              n1,
              n2,
              currentContainer,
              currentAnchor,
              parentComponent,
              parentSuspense,
              namespace,
              slotScopeIds,
              false
            );
          }
          if (disabled) {
            if (!wasDisabled) {
              moveTeleport(
                n2,
                container,
                mainAnchor,
                internals,
                1
              );
            } else {
              if (n2.props && n1.props && n2.props.to !== n1.props.to) {
                n2.props.to = n1.props.to;
              }
            }
          } else {
            if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
              const nextTarget = n2.target = resolveTarget(
                n2.props,
                querySelector
              );
              if (nextTarget) {
                moveTeleport(
                  n2,
                  nextTarget,
                  null,
                  internals,
                  0
                );
              }
            } else if (wasDisabled) {
              moveTeleport(
                n2,
                target,
                targetAnchor,
                internals,
                1
              );
            }
          }
        }
        updateCssVars(n2);
      },
      remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
        const {
          shapeFlag,
          children,
          anchor,
          targetStart,
          targetAnchor,
          target,
          props: props2
        } = vnode;
        if (target) {
          hostRemove(targetStart);
          hostRemove(targetAnchor);
        }
        doRemove && hostRemove(anchor);
        if (shapeFlag & 16) {
          const shouldRemove = doRemove || !isTeleportDisabled(props2);
          for (let i2 = 0; i2 < children.length; i2++) {
            const child = children[i2];
            unmount(
              child,
              parentComponent,
              parentSuspense,
              shouldRemove,
              !!child.dynamicChildren
            );
          }
        }
      },
      move: moveTeleport,
      hydrate: hydrateTeleport
    };
    function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
      if (moveType === 0) {
        insert(vnode.targetAnchor, container, parentAnchor);
      }
      const { el, anchor, shapeFlag, children, props: props2 } = vnode;
      const isReorder = moveType === 2;
      if (isReorder) {
        insert(el, container, parentAnchor);
      }
      if (!isReorder || isTeleportDisabled(props2)) {
        if (shapeFlag & 16) {
          for (let i2 = 0; i2 < children.length; i2++) {
            move(
              children[i2],
              container,
              parentAnchor,
              2
            );
          }
        }
      }
      if (isReorder) {
        insert(anchor, container, parentAnchor);
      }
    }
    function hydrateTeleport(node2, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
      o: { nextSibling, parentNode, querySelector, insert, createText }
    }, hydrateChildren) {
      const target = vnode.target = resolveTarget(
        vnode.props,
        querySelector
      );
      if (target) {
        const targetNode = target._lpa || target.firstChild;
        if (vnode.shapeFlag & 16) {
          if (isTeleportDisabled(vnode.props)) {
            vnode.anchor = hydrateChildren(
              nextSibling(node2),
              vnode,
              parentNode(node2),
              parentComponent,
              parentSuspense,
              slotScopeIds,
              optimized
            );
            vnode.targetStart = targetNode;
            vnode.targetAnchor = targetNode && nextSibling(targetNode);
          } else {
            vnode.anchor = nextSibling(node2);
            let targetAnchor = targetNode;
            while (targetAnchor) {
              if (targetAnchor && targetAnchor.nodeType === 8) {
                if (targetAnchor.data === "teleport start anchor") {
                  vnode.targetStart = targetAnchor;
                } else if (targetAnchor.data === "teleport anchor") {
                  vnode.targetAnchor = targetAnchor;
                  target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
                  break;
                }
              }
              targetAnchor = nextSibling(targetAnchor);
            }
            if (!vnode.targetAnchor) {
              prepareAnchor(target, vnode, createText, insert);
            }
            hydrateChildren(
              targetNode && nextSibling(targetNode),
              vnode,
              target,
              parentComponent,
              parentSuspense,
              slotScopeIds,
              optimized
            );
          }
        }
        updateCssVars(vnode);
      }
      return vnode.anchor && nextSibling(vnode.anchor);
    }
    const Teleport = TeleportImpl;
    function updateCssVars(vnode) {
      const ctx = vnode.ctx;
      if (ctx && ctx.ut) {
        let node2 = vnode.children[0].el;
        while (node2 && node2 !== vnode.targetAnchor) {
          if (node2.nodeType === 1) node2.setAttribute("data-v-owner", ctx.uid);
          node2 = node2.nextSibling;
        }
        ctx.ut();
      }
    }
    function prepareAnchor(target, vnode, createText, insert) {
      const targetStart = vnode.targetStart = createText("");
      const targetAnchor = vnode.targetAnchor = createText("");
      targetStart[TeleportEndKey] = targetAnchor;
      if (target) {
        insert(targetStart, target);
        insert(targetAnchor, target);
      }
      return targetAnchor;
    }
    const queuePostRenderEffect = queueEffectWithSuspense;
    function createRenderer(options) {
      return baseCreateRenderer(options);
    }
    function baseCreateRenderer(options, createHydrationFns) {
      const target = getGlobalThis();
      target.__VUE__ = true;
      const {
        insert: hostInsert,
        remove: hostRemove,
        patchProp: hostPatchProp,
        createElement: hostCreateElement,
        createText: hostCreateText,
        createComment: hostCreateComment,
        setText: hostSetText,
        setElementText: hostSetElementText,
        parentNode: hostParentNode,
        nextSibling: hostNextSibling,
        setScopeId: hostSetScopeId = NOOP,
        insertStaticContent: hostInsertStaticContent
      } = options;
      const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {
        if (n1 === n2) {
          return;
        }
        if (n1 && !isSameVNodeType(n1, n2)) {
          anchor = getNextHostNode(n1);
          unmount(n1, parentComponent, parentSuspense, true);
          n1 = null;
        }
        if (n2.patchFlag === -2) {
          optimized = false;
          n2.dynamicChildren = null;
        }
        const { type, ref: ref3, shapeFlag } = n2;
        switch (type) {
          case Text:
            processText(n1, n2, container, anchor);
            break;
          case Comment:
            processCommentNode(n1, n2, container, anchor);
            break;
          case Static:
            if (n1 == null) {
              mountStaticNode(n2, container, anchor, namespace);
            }
            break;
          case Fragment:
            processFragment(
              n1,
              n2,
              container,
              anchor,
              parentComponent,
              parentSuspense,
              namespace,
              slotScopeIds,
              optimized
            );
            break;
          default:
            if (shapeFlag & 1) {
              processElement(
                n1,
                n2,
                container,
                anchor,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized
              );
            } else if (shapeFlag & 6) {
              processComponent(
                n1,
                n2,
                container,
                anchor,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized
              );
            } else if (shapeFlag & 64) {
              type.process(
                n1,
                n2,
                container,
                anchor,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized,
                internals
              );
            } else if (shapeFlag & 128) {
              type.process(
                n1,
                n2,
                container,
                anchor,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized,
                internals
              );
            } else ;
        }
        if (ref3 != null && parentComponent) {
          setRef(ref3, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
        }
      };
      const processText = (n1, n2, container, anchor) => {
        if (n1 == null) {
          hostInsert(
            n2.el = hostCreateText(n2.children),
            container,
            anchor
          );
        } else {
          const el = n2.el = n1.el;
          if (n2.children !== n1.children) {
            hostSetText(el, n2.children);
          }
        }
      };
      const processCommentNode = (n1, n2, container, anchor) => {
        if (n1 == null) {
          hostInsert(
            n2.el = hostCreateComment(n2.children || ""),
            container,
            anchor
          );
        } else {
          n2.el = n1.el;
        }
      };
      const mountStaticNode = (n2, container, anchor, namespace) => {
        [n2.el, n2.anchor] = hostInsertStaticContent(
          n2.children,
          container,
          anchor,
          namespace,
          n2.el,
          n2.anchor
        );
      };
      const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
        let next2;
        while (el && el !== anchor) {
          next2 = hostNextSibling(el);
          hostInsert(el, container, nextSibling);
          el = next2;
        }
        hostInsert(anchor, container, nextSibling);
      };
      const removeStaticNode = ({ el, anchor }) => {
        let next2;
        while (el && el !== anchor) {
          next2 = hostNextSibling(el);
          hostRemove(el);
          el = next2;
        }
        hostRemove(anchor);
      };
      const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
        if (n2.type === "svg") {
          namespace = "svg";
        } else if (n2.type === "math") {
          namespace = "mathml";
        }
        if (n1 == null) {
          mountElement(
            n2,
            container,
            anchor,
            parentComponent,
            parentSuspense,
            namespace,
            slotScopeIds,
            optimized
          );
        } else {
          patchElement(
            n1,
            n2,
            parentComponent,
            parentSuspense,
            namespace,
            slotScopeIds,
            optimized
          );
        }
      };
      const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
        let el;
        let vnodeHook;
        const { props: props2, shapeFlag, transition, dirs } = vnode;
        el = vnode.el = hostCreateElement(
          vnode.type,
          namespace,
          props2 && props2.is,
          props2
        );
        if (shapeFlag & 8) {
          hostSetElementText(el, vnode.children);
        } else if (shapeFlag & 16) {
          mountChildren(
            vnode.children,
            el,
            null,
            parentComponent,
            parentSuspense,
            resolveChildrenNamespace(vnode, namespace),
            slotScopeIds,
            optimized
          );
        }
        if (dirs) {
          invokeDirectiveHook(vnode, null, parentComponent, "created");
        }
        setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
        if (props2) {
          for (const key2 in props2) {
            if (key2 !== "value" && !isReservedProp(key2)) {
              hostPatchProp(el, key2, null, props2[key2], namespace, parentComponent);
            }
          }
          if ("value" in props2) {
            hostPatchProp(el, "value", null, props2.value, namespace);
          }
          if (vnodeHook = props2.onVnodeBeforeMount) {
            invokeVNodeHook(vnodeHook, parentComponent, vnode);
          }
        }
        if (dirs) {
          invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
        }
        const needCallTransitionHooks = needTransition(parentSuspense, transition);
        if (needCallTransitionHooks) {
          transition.beforeEnter(el);
        }
        hostInsert(el, container, anchor);
        if ((vnodeHook = props2 && props2.onVnodeMounted) || needCallTransitionHooks || dirs) {
          queuePostRenderEffect(() => {
            vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
            needCallTransitionHooks && transition.enter(el);
            dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
          }, parentSuspense);
        }
      };
      const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
        if (scopeId) {
          hostSetScopeId(el, scopeId);
        }
        if (slotScopeIds) {
          for (let i2 = 0; i2 < slotScopeIds.length; i2++) {
            hostSetScopeId(el, slotScopeIds[i2]);
          }
        }
        if (parentComponent) {
          let subTree = parentComponent.subTree;
          if (vnode === subTree) {
            const parentVNode = parentComponent.vnode;
            setScopeId(
              el,
              parentVNode,
              parentVNode.scopeId,
              parentVNode.slotScopeIds,
              parentComponent.parent
            );
          }
        }
      };
      const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
        for (let i2 = start; i2 < children.length; i2++) {
          const child = children[i2] = optimized ? cloneIfMounted(children[i2]) : normalizeVNode(children[i2]);
          patch(
            null,
            child,
            container,
            anchor,
            parentComponent,
            parentSuspense,
            namespace,
            slotScopeIds,
            optimized
          );
        }
      };
      const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
        const el = n2.el = n1.el;
        let { patchFlag, dynamicChildren, dirs } = n2;
        patchFlag |= n1.patchFlag & 16;
        const oldProps = n1.props || EMPTY_OBJ;
        const newProps = n2.props || EMPTY_OBJ;
        let vnodeHook;
        parentComponent && toggleRecurse(parentComponent, false);
        if (vnodeHook = newProps.onVnodeBeforeUpdate) {
          invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
        }
        if (dirs) {
          invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
        }
        parentComponent && toggleRecurse(parentComponent, true);
        if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
          hostSetElementText(el, "");
        }
        if (dynamicChildren) {
          patchBlockChildren(
            n1.dynamicChildren,
            dynamicChildren,
            el,
            parentComponent,
            parentSuspense,
            resolveChildrenNamespace(n2, namespace),
            slotScopeIds
          );
        } else if (!optimized) {
          patchChildren(
            n1,
            n2,
            el,
            null,
            parentComponent,
            parentSuspense,
            resolveChildrenNamespace(n2, namespace),
            slotScopeIds,
            false
          );
        }
        if (patchFlag > 0) {
          if (patchFlag & 16) {
            patchProps(el, oldProps, newProps, parentComponent, namespace);
          } else {
            if (patchFlag & 2) {
              if (oldProps.class !== newProps.class) {
                hostPatchProp(el, "class", null, newProps.class, namespace);
              }
            }
            if (patchFlag & 4) {
              hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
            }
            if (patchFlag & 8) {
              const propsToUpdate = n2.dynamicProps;
              for (let i2 = 0; i2 < propsToUpdate.length; i2++) {
                const key2 = propsToUpdate[i2];
                const prev2 = oldProps[key2];
                const next2 = newProps[key2];
                if (next2 !== prev2 || key2 === "value") {
                  hostPatchProp(el, key2, prev2, next2, namespace, parentComponent);
                }
              }
            }
          }
          if (patchFlag & 1) {
            if (n1.children !== n2.children) {
              hostSetElementText(el, n2.children);
            }
          }
        } else if (!optimized && dynamicChildren == null) {
          patchProps(el, oldProps, newProps, parentComponent, namespace);
        }
        if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
          queuePostRenderEffect(() => {
            vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
            dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
          }, parentSuspense);
        }
      };
      const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
        for (let i2 = 0; i2 < newChildren.length; i2++) {
          const oldVNode = oldChildren[i2];
          const newVNode = newChildren[i2];
          const container = (
            // oldVNode may be an errored async setup() component inside Suspense
            // which will not have a mounted element
            oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
            // of the Fragment itself so it can move its children.
            (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
            // which also requires the correct parent container
            !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
            oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
              // In other cases, the parent container is not actually used so we
              // just pass the block element here to avoid a DOM parentNode call.
              fallbackContainer
            )
          );
          patch(
            oldVNode,
            newVNode,
            container,
            null,
            parentComponent,
            parentSuspense,
            namespace,
            slotScopeIds,
            true
          );
        }
      };
      const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
        if (oldProps !== newProps) {
          if (oldProps !== EMPTY_OBJ) {
            for (const key2 in oldProps) {
              if (!isReservedProp(key2) && !(key2 in newProps)) {
                hostPatchProp(
                  el,
                  key2,
                  oldProps[key2],
                  null,
                  namespace,
                  parentComponent
                );
              }
            }
          }
          for (const key2 in newProps) {
            if (isReservedProp(key2)) continue;
            const next2 = newProps[key2];
            const prev2 = oldProps[key2];
            if (next2 !== prev2 && key2 !== "value") {
              hostPatchProp(el, key2, prev2, next2, namespace, parentComponent);
            }
          }
          if ("value" in newProps) {
            hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
          }
        }
      };
      const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
        const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
        const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
        let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
        if (fragmentSlotScopeIds) {
          slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
        }
        if (n1 == null) {
          hostInsert(fragmentStartAnchor, container, anchor);
          hostInsert(fragmentEndAnchor, container, anchor);
          mountChildren(
            // #10007
            // such fragment like `<></>` will be compiled into
            // a fragment which doesn't have a children.
            // In this case fallback to an empty array
            n2.children || [],
            container,
            fragmentEndAnchor,
            parentComponent,
            parentSuspense,
            namespace,
            slotScopeIds,
            optimized
          );
        } else {
          if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
          // of renderSlot() with no valid children
          n1.dynamicChildren) {
            patchBlockChildren(
              n1.dynamicChildren,
              dynamicChildren,
              container,
              parentComponent,
              parentSuspense,
              namespace,
              slotScopeIds
            );
            if (
              // #2080 if the stable fragment has a key, it's a <template v-for> that may
              //  get moved around. Make sure all root level vnodes inherit el.
              // #2134 or if it's a component root, it may also get moved around
              // as the component is being moved.
              n2.key != null || parentComponent && n2 === parentComponent.subTree
            ) {
              traverseStaticChildren(
                n1,
                n2,
                true
                /* shallow */
              );
            }
          } else {
            patchChildren(
              n1,
              n2,
              container,
              fragmentEndAnchor,
              parentComponent,
              parentSuspense,
              namespace,
              slotScopeIds,
              optimized
            );
          }
        }
      };
      const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
        n2.slotScopeIds = slotScopeIds;
        if (n1 == null) {
          if (n2.shapeFlag & 512) {
            parentComponent.ctx.activate(
              n2,
              container,
              anchor,
              namespace,
              optimized
            );
          } else {
            mountComponent(
              n2,
              container,
              anchor,
              parentComponent,
              parentSuspense,
              namespace,
              optimized
            );
          }
        } else {
          updateComponent(n1, n2, optimized);
        }
      };
      const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
        const instance = initialVNode.component = createComponentInstance(
          initialVNode,
          parentComponent,
          parentSuspense
        );
        if (isKeepAlive(initialVNode)) {
          instance.ctx.renderer = internals;
        }
        {
          setupComponent(instance, false, optimized);
        }
        if (instance.asyncDep) {
          parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
          if (!initialVNode.el) {
            const placeholder = instance.subTree = createVNode(Comment);
            processCommentNode(null, placeholder, container, anchor);
          }
        } else {
          setupRenderEffect(
            instance,
            initialVNode,
            container,
            anchor,
            parentSuspense,
            namespace,
            optimized
          );
        }
      };
      const updateComponent = (n1, n2, optimized) => {
        const instance = n2.component = n1.component;
        if (shouldUpdateComponent(n1, n2, optimized)) {
          if (instance.asyncDep && !instance.asyncResolved) {
            updateComponentPreRender(instance, n2, optimized);
            return;
          } else {
            instance.next = n2;
            invalidateJob(instance.update);
            instance.effect.dirty = true;
            instance.update();
          }
        } else {
          n2.el = n1.el;
          instance.vnode = n2;
        }
      };
      const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
        const componentUpdateFn = () => {
          if (!instance.isMounted) {
            let vnodeHook;
            const { el, props: props2 } = initialVNode;
            const { bm, m: m2, parent: parent2 } = instance;
            const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
            toggleRecurse(instance, false);
            if (bm) {
              invokeArrayFns(bm);
            }
            if (!isAsyncWrapperVNode && (vnodeHook = props2 && props2.onVnodeBeforeMount)) {
              invokeVNodeHook(vnodeHook, parent2, initialVNode);
            }
            toggleRecurse(instance, true);
            if (el && hydrateNode) {
              const hydrateSubTree = () => {
                instance.subTree = renderComponentRoot(instance);
                hydrateNode(
                  el,
                  instance.subTree,
                  instance,
                  parentSuspense,
                  null
                );
              };
              if (isAsyncWrapperVNode) {
                initialVNode.type.__asyncLoader().then(
                  // note: we are moving the render call into an async callback,
                  // which means it won't track dependencies - but it's ok because
                  // a server-rendered async wrapper is already in resolved state
                  // and it will never need to change.
                  () => !instance.isUnmounted && hydrateSubTree()
                );
              } else {
                hydrateSubTree();
              }
            } else {
              const subTree = instance.subTree = renderComponentRoot(instance);
              patch(
                null,
                subTree,
                container,
                anchor,
                instance,
                parentSuspense,
                namespace
              );
              initialVNode.el = subTree.el;
            }
            if (m2) {
              queuePostRenderEffect(m2, parentSuspense);
            }
            if (!isAsyncWrapperVNode && (vnodeHook = props2 && props2.onVnodeMounted)) {
              const scopedInitialVNode = initialVNode;
              queuePostRenderEffect(
                () => invokeVNodeHook(vnodeHook, parent2, scopedInitialVNode),
                parentSuspense
              );
            }
            if (initialVNode.shapeFlag & 256 || parent2 && isAsyncWrapper(parent2.vnode) && parent2.vnode.shapeFlag & 256) {
              instance.a && queuePostRenderEffect(instance.a, parentSuspense);
            }
            instance.isMounted = true;
            initialVNode = container = anchor = null;
          } else {
            let { next: next2, bu, u: u2, parent: parent2, vnode } = instance;
            {
              const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
              if (nonHydratedAsyncRoot) {
                if (next2) {
                  next2.el = vnode.el;
                  updateComponentPreRender(instance, next2, optimized);
                }
                nonHydratedAsyncRoot.asyncDep.then(() => {
                  if (!instance.isUnmounted) {
                    componentUpdateFn();
                  }
                });
                return;
              }
            }
            let originNext = next2;
            let vnodeHook;
            toggleRecurse(instance, false);
            if (next2) {
              next2.el = vnode.el;
              updateComponentPreRender(instance, next2, optimized);
            } else {
              next2 = vnode;
            }
            if (bu) {
              invokeArrayFns(bu);
            }
            if (vnodeHook = next2.props && next2.props.onVnodeBeforeUpdate) {
              invokeVNodeHook(vnodeHook, parent2, next2, vnode);
            }
            toggleRecurse(instance, true);
            const nextTree = renderComponentRoot(instance);
            const prevTree = instance.subTree;
            instance.subTree = nextTree;
            patch(
              prevTree,
              nextTree,
              // parent may have changed if it's in a teleport
              hostParentNode(prevTree.el),
              // anchor may have changed if it's in a fragment
              getNextHostNode(prevTree),
              instance,
              parentSuspense,
              namespace
            );
            next2.el = nextTree.el;
            if (originNext === null) {
              updateHOCHostEl(instance, nextTree.el);
            }
            if (u2) {
              queuePostRenderEffect(u2, parentSuspense);
            }
            if (vnodeHook = next2.props && next2.props.onVnodeUpdated) {
              queuePostRenderEffect(
                () => invokeVNodeHook(vnodeHook, parent2, next2, vnode),
                parentSuspense
              );
            }
          }
        };
        const effect2 = instance.effect = new ReactiveEffect(
          componentUpdateFn,
          NOOP,
          () => queueJob(update),
          instance.scope
          // track it in component's effect scope
        );
        const update = instance.update = () => {
          if (effect2.dirty) {
            effect2.run();
          }
        };
        update.i = instance;
        update.id = instance.uid;
        toggleRecurse(instance, true);
        update();
      };
      const updateComponentPreRender = (instance, nextVNode, optimized) => {
        nextVNode.component = instance;
        const prevProps = instance.vnode.props;
        instance.vnode = nextVNode;
        instance.next = null;
        updateProps(instance, nextVNode.props, prevProps, optimized);
        updateSlots(instance, nextVNode.children, optimized);
        pauseTracking();
        flushPreFlushCbs(instance);
        resetTracking();
      };
      const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
        const c1 = n1 && n1.children;
        const prevShapeFlag = n1 ? n1.shapeFlag : 0;
        const c2 = n2.children;
        const { patchFlag, shapeFlag } = n2;
        if (patchFlag > 0) {
          if (patchFlag & 128) {
            patchKeyedChildren(
              c1,
              c2,
              container,
              anchor,
              parentComponent,
              parentSuspense,
              namespace,
              slotScopeIds,
              optimized
            );
            return;
          } else if (patchFlag & 256) {
            patchUnkeyedChildren(
              c1,
              c2,
              container,
              anchor,
              parentComponent,
              parentSuspense,
              namespace,
              slotScopeIds,
              optimized
            );
            return;
          }
        }
        if (shapeFlag & 8) {
          if (prevShapeFlag & 16) {
            unmountChildren(c1, parentComponent, parentSuspense);
          }
          if (c2 !== c1) {
            hostSetElementText(container, c2);
          }
        } else {
          if (prevShapeFlag & 16) {
            if (shapeFlag & 16) {
              patchKeyedChildren(
                c1,
                c2,
                container,
                anchor,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized
              );
            } else {
              unmountChildren(c1, parentComponent, parentSuspense, true);
            }
          } else {
            if (prevShapeFlag & 8) {
              hostSetElementText(container, "");
            }
            if (shapeFlag & 16) {
              mountChildren(
                c2,
                container,
                anchor,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized
              );
            }
          }
        }
      };
      const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
        c1 = c1 || EMPTY_ARR;
        c2 = c2 || EMPTY_ARR;
        const oldLength = c1.length;
        const newLength = c2.length;
        const commonLength = Math.min(oldLength, newLength);
        let i2;
        for (i2 = 0; i2 < commonLength; i2++) {
          const nextChild = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
          patch(
            c1[i2],
            nextChild,
            container,
            null,
            parentComponent,
            parentSuspense,
            namespace,
            slotScopeIds,
            optimized
          );
        }
        if (oldLength > newLength) {
          unmountChildren(
            c1,
            parentComponent,
            parentSuspense,
            true,
            false,
            commonLength
          );
        } else {
          mountChildren(
            c2,
            container,
            anchor,
            parentComponent,
            parentSuspense,
            namespace,
            slotScopeIds,
            optimized,
            commonLength
          );
        }
      };
      const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
        let i2 = 0;
        const l2 = c2.length;
        let e1 = c1.length - 1;
        let e2 = l2 - 1;
        while (i2 <= e1 && i2 <= e2) {
          const n1 = c1[i2];
          const n2 = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
          if (isSameVNodeType(n1, n2)) {
            patch(
              n1,
              n2,
              container,
              null,
              parentComponent,
              parentSuspense,
              namespace,
              slotScopeIds,
              optimized
            );
          } else {
            break;
          }
          i2++;
        }
        while (i2 <= e1 && i2 <= e2) {
          const n1 = c1[e1];
          const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);
          if (isSameVNodeType(n1, n2)) {
            patch(
              n1,
              n2,
              container,
              null,
              parentComponent,
              parentSuspense,
              namespace,
              slotScopeIds,
              optimized
            );
          } else {
            break;
          }
          e1--;
          e2--;
        }
        if (i2 > e1) {
          if (i2 <= e2) {
            const nextPos = e2 + 1;
            const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
            while (i2 <= e2) {
              patch(
                null,
                c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]),
                container,
                anchor,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized
              );
              i2++;
            }
          }
        } else if (i2 > e2) {
          while (i2 <= e1) {
            unmount(c1[i2], parentComponent, parentSuspense, true);
            i2++;
          }
        } else {
          const s1 = i2;
          const s2 = i2;
          const keyToNewIndexMap = /* @__PURE__ */ new Map();
          for (i2 = s2; i2 <= e2; i2++) {
            const nextChild = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
            if (nextChild.key != null) {
              keyToNewIndexMap.set(nextChild.key, i2);
            }
          }
          let j2;
          let patched = 0;
          const toBePatched = e2 - s2 + 1;
          let moved = false;
          let maxNewIndexSoFar = 0;
          const newIndexToOldIndexMap = new Array(toBePatched);
          for (i2 = 0; i2 < toBePatched; i2++) newIndexToOldIndexMap[i2] = 0;
          for (i2 = s1; i2 <= e1; i2++) {
            const prevChild = c1[i2];
            if (patched >= toBePatched) {
              unmount(prevChild, parentComponent, parentSuspense, true);
              continue;
            }
            let newIndex;
            if (prevChild.key != null) {
              newIndex = keyToNewIndexMap.get(prevChild.key);
            } else {
              for (j2 = s2; j2 <= e2; j2++) {
                if (newIndexToOldIndexMap[j2 - s2] === 0 && isSameVNodeType(prevChild, c2[j2])) {
                  newIndex = j2;
                  break;
                }
              }
            }
            if (newIndex === void 0) {
              unmount(prevChild, parentComponent, parentSuspense, true);
            } else {
              newIndexToOldIndexMap[newIndex - s2] = i2 + 1;
              if (newIndex >= maxNewIndexSoFar) {
                maxNewIndexSoFar = newIndex;
              } else {
                moved = true;
              }
              patch(
                prevChild,
                c2[newIndex],
                container,
                null,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized
              );
              patched++;
            }
          }
          const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
          j2 = increasingNewIndexSequence.length - 1;
          for (i2 = toBePatched - 1; i2 >= 0; i2--) {
            const nextIndex = s2 + i2;
            const nextChild = c2[nextIndex];
            const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
            if (newIndexToOldIndexMap[i2] === 0) {
              patch(
                null,
                nextChild,
                container,
                anchor,
                parentComponent,
                parentSuspense,
                namespace,
                slotScopeIds,
                optimized
              );
            } else if (moved) {
              if (j2 < 0 || i2 !== increasingNewIndexSequence[j2]) {
                move(nextChild, container, anchor, 2);
              } else {
                j2--;
              }
            }
          }
        }
      };
      const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
        const { el, type, transition, children, shapeFlag } = vnode;
        if (shapeFlag & 6) {
          move(vnode.component.subTree, container, anchor, moveType);
          return;
        }
        if (shapeFlag & 128) {
          vnode.suspense.move(container, anchor, moveType);
          return;
        }
        if (shapeFlag & 64) {
          type.move(vnode, container, anchor, internals);
          return;
        }
        if (type === Fragment) {
          hostInsert(el, container, anchor);
          for (let i2 = 0; i2 < children.length; i2++) {
            move(children[i2], container, anchor, moveType);
          }
          hostInsert(vnode.anchor, container, anchor);
          return;
        }
        if (type === Static) {
          moveStaticNode(vnode, container, anchor);
          return;
        }
        const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
        if (needTransition2) {
          if (moveType === 0) {
            transition.beforeEnter(el);
            hostInsert(el, container, anchor);
            queuePostRenderEffect(() => transition.enter(el), parentSuspense);
          } else {
            const { leave, delayLeave, afterLeave } = transition;
            const remove22 = () => hostInsert(el, container, anchor);
            const performLeave = () => {
              leave(el, () => {
                remove22();
                afterLeave && afterLeave();
              });
            };
            if (delayLeave) {
              delayLeave(el, remove22, performLeave);
            } else {
              performLeave();
            }
          }
        } else {
          hostInsert(el, container, anchor);
        }
      };
      const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
        const {
          type,
          props: props2,
          ref: ref3,
          children,
          dynamicChildren,
          shapeFlag,
          patchFlag,
          dirs,
          cacheIndex
        } = vnode;
        if (patchFlag === -2) {
          optimized = false;
        }
        if (ref3 != null) {
          setRef(ref3, null, parentSuspense, vnode, true);
        }
        if (cacheIndex != null) {
          parentComponent.renderCache[cacheIndex] = void 0;
        }
        if (shapeFlag & 256) {
          parentComponent.ctx.deactivate(vnode);
          return;
        }
        const shouldInvokeDirs = shapeFlag & 1 && dirs;
        const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
        let vnodeHook;
        if (shouldInvokeVnodeHook && (vnodeHook = props2 && props2.onVnodeBeforeUnmount)) {
          invokeVNodeHook(vnodeHook, parentComponent, vnode);
        }
        if (shapeFlag & 6) {
          unmountComponent(vnode.component, parentSuspense, doRemove);
        } else {
          if (shapeFlag & 128) {
            vnode.suspense.unmount(parentSuspense, doRemove);
            return;
          }
          if (shouldInvokeDirs) {
            invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
          }
          if (shapeFlag & 64) {
            vnode.type.remove(
              vnode,
              parentComponent,
              parentSuspense,
              internals,
              doRemove
            );
          } else if (dynamicChildren && // #5154
          // when v-once is used inside a block, setBlockTracking(-1) marks the
          // parent block with hasOnce: true
          // so that it doesn't take the fast path during unmount - otherwise
          // components nested in v-once are never unmounted.
          !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
          (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
            unmountChildren(
              dynamicChildren,
              parentComponent,
              parentSuspense,
              false,
              true
            );
          } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
            unmountChildren(children, parentComponent, parentSuspense);
          }
          if (doRemove) {
            remove2(vnode);
          }
        }
        if (shouldInvokeVnodeHook && (vnodeHook = props2 && props2.onVnodeUnmounted) || shouldInvokeDirs) {
          queuePostRenderEffect(() => {
            vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
            shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
          }, parentSuspense);
        }
      };
      const remove2 = (vnode) => {
        const { type, el, anchor, transition } = vnode;
        if (type === Fragment) {
          {
            removeFragment(el, anchor);
          }
          return;
        }
        if (type === Static) {
          removeStaticNode(vnode);
          return;
        }
        const performRemove = () => {
          hostRemove(el);
          if (transition && !transition.persisted && transition.afterLeave) {
            transition.afterLeave();
          }
        };
        if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
          const { leave, delayLeave } = transition;
          const performLeave = () => leave(el, performRemove);
          if (delayLeave) {
            delayLeave(vnode.el, performRemove, performLeave);
          } else {
            performLeave();
          }
        } else {
          performRemove();
        }
      };
      const removeFragment = (cur, end) => {
        let next2;
        while (cur !== end) {
          next2 = hostNextSibling(cur);
          hostRemove(cur);
          cur = next2;
        }
        hostRemove(end);
      };
      const unmountComponent = (instance, parentSuspense, doRemove) => {
        const { bum, scope, update, subTree, um, m: m2, a: a2 } = instance;
        invalidateMount(m2);
        invalidateMount(a2);
        if (bum) {
          invokeArrayFns(bum);
        }
        scope.stop();
        if (update) {
          update.active = false;
          unmount(subTree, instance, parentSuspense, doRemove);
        }
        if (um) {
          queuePostRenderEffect(um, parentSuspense);
        }
        queuePostRenderEffect(() => {
          instance.isUnmounted = true;
        }, parentSuspense);
        if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
          parentSuspense.deps--;
          if (parentSuspense.deps === 0) {
            parentSuspense.resolve();
          }
        }
      };
      const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
        for (let i2 = start; i2 < children.length; i2++) {
          unmount(children[i2], parentComponent, parentSuspense, doRemove, optimized);
        }
      };
      const getNextHostNode = (vnode) => {
        if (vnode.shapeFlag & 6) {
          return getNextHostNode(vnode.component.subTree);
        }
        if (vnode.shapeFlag & 128) {
          return vnode.suspense.next();
        }
        const el = hostNextSibling(vnode.anchor || vnode.el);
        const teleportEnd = el && el[TeleportEndKey];
        return teleportEnd ? hostNextSibling(teleportEnd) : el;
      };
      let isFlushing2 = false;
      const render2 = (vnode, container, namespace) => {
        if (vnode == null) {
          if (container._vnode) {
            unmount(container._vnode, null, null, true);
          }
        } else {
          patch(
            container._vnode || null,
            vnode,
            container,
            null,
            null,
            null,
            namespace
          );
        }
        container._vnode = vnode;
        if (!isFlushing2) {
          isFlushing2 = true;
          flushPreFlushCbs();
          flushPostFlushCbs();
          isFlushing2 = false;
        }
      };
      const internals = {
        p: patch,
        um: unmount,
        m: move,
        r: remove2,
        mt: mountComponent,
        mc: mountChildren,
        pc: patchChildren,
        pbc: patchBlockChildren,
        n: getNextHostNode,
        o: options
      };
      let hydrate;
      let hydrateNode;
      return {
        render: render2,
        hydrate,
        createApp: createAppAPI(render2, hydrate)
      };
    }
    function resolveChildrenNamespace({ type, props: props2 }, currentNamespace) {
      return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props2 && props2.encoding && props2.encoding.includes("html") ? void 0 : currentNamespace;
    }
    function toggleRecurse({ effect: effect2, update }, allowed) {
      effect2.allowRecurse = update.allowRecurse = allowed;
    }
    function needTransition(parentSuspense, transition) {
      return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
    }
    function traverseStaticChildren(n1, n2, shallow = false) {
      const ch1 = n1.children;
      const ch2 = n2.children;
      if (isArray$2(ch1) && isArray$2(ch2)) {
        for (let i2 = 0; i2 < ch1.length; i2++) {
          const c1 = ch1[i2];
          let c2 = ch2[i2];
          if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
            if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
              c2 = ch2[i2] = cloneIfMounted(ch2[i2]);
              c2.el = c1.el;
            }
            if (!shallow && c2.patchFlag !== -2)
              traverseStaticChildren(c1, c2);
          }
          if (c2.type === Text) {
            c2.el = c1.el;
          }
        }
      }
    }
    function getSequence(arr) {
      const p2 = arr.slice();
      const result = [0];
      let i2, j2, u2, v2, c2;
      const len = arr.length;
      for (i2 = 0; i2 < len; i2++) {
        const arrI = arr[i2];
        if (arrI !== 0) {
          j2 = result[result.length - 1];
          if (arr[j2] < arrI) {
            p2[i2] = j2;
            result.push(i2);
            continue;
          }
          u2 = 0;
          v2 = result.length - 1;
          while (u2 < v2) {
            c2 = u2 + v2 >> 1;
            if (arr[result[c2]] < arrI) {
              u2 = c2 + 1;
            } else {
              v2 = c2;
            }
          }
          if (arrI < arr[result[u2]]) {
            if (u2 > 0) {
              p2[i2] = result[u2 - 1];
            }
            result[u2] = i2;
          }
        }
      }
      u2 = result.length;
      v2 = result[u2 - 1];
      while (u2-- > 0) {
        result[u2] = v2;
        v2 = p2[v2];
      }
      return result;
    }
    function locateNonHydratedAsyncRoot(instance) {
      const subComponent = instance.subTree.component;
      if (subComponent) {
        if (subComponent.asyncDep && !subComponent.asyncResolved) {
          return subComponent;
        } else {
          return locateNonHydratedAsyncRoot(subComponent);
        }
      }
    }
    function invalidateMount(hooks) {
      if (hooks) {
        for (let i2 = 0; i2 < hooks.length; i2++) hooks[i2].active = false;
      }
    }
    const ssrContextKey = Symbol.for("v-scx");
    const useSSRContext = () => {
      {
        const ctx = inject(ssrContextKey);
        return ctx;
      }
    };
    function watchEffect(effect2, options) {
      return doWatch(effect2, null, options);
    }
    const INITIAL_WATCHER_VALUE = {};
    function watch(source, cb, options) {
      return doWatch(source, cb, options);
    }
    function doWatch(source, cb, {
      immediate,
      deep,
      flush,
      once,
      onTrack,
      onTrigger
    } = EMPTY_OBJ) {
      if (cb && once) {
        const _cb = cb;
        cb = (...args) => {
          _cb(...args);
          unwatch();
        };
      }
      const instance = currentInstance;
      const reactiveGetter = (source2) => deep === true ? source2 : (
        // for deep: false, only traverse root-level properties
        traverse(source2, deep === false ? 1 : void 0)
      );
      let getter;
      let forceTrigger = false;
      let isMultiSource = false;
      if (isRef(source)) {
        getter = () => source.value;
        forceTrigger = isShallow(source);
      } else if (isReactive(source)) {
        getter = () => reactiveGetter(source);
        forceTrigger = true;
      } else if (isArray$2(source)) {
        isMultiSource = true;
        forceTrigger = source.some((s2) => isReactive(s2) || isShallow(s2));
        getter = () => source.map((s2) => {
          if (isRef(s2)) {
            return s2.value;
          } else if (isReactive(s2)) {
            return reactiveGetter(s2);
          } else if (isFunction$2(s2)) {
            return callWithErrorHandling(s2, instance, 2);
          } else ;
        });
      } else if (isFunction$2(source)) {
        if (cb) {
          getter = () => callWithErrorHandling(source, instance, 2);
        } else {
          getter = () => {
            if (cleanup2) {
              cleanup2();
            }
            return callWithAsyncErrorHandling(
              source,
              instance,
              3,
              [onCleanup]
            );
          };
        }
      } else {
        getter = NOOP;
      }
      if (cb && deep) {
        const baseGetter = getter;
        getter = () => traverse(baseGetter());
      }
      let cleanup2;
      let onCleanup = (fn) => {
        cleanup2 = effect2.onStop = () => {
          callWithErrorHandling(fn, instance, 4);
          cleanup2 = effect2.onStop = void 0;
        };
      };
      let ssrCleanup;
      if (isInSSRComponentSetup) {
        onCleanup = NOOP;
        if (!cb) {
          getter();
        } else if (immediate) {
          callWithAsyncErrorHandling(cb, instance, 3, [
            getter(),
            isMultiSource ? [] : void 0,
            onCleanup
          ]);
        }
        if (flush === "sync") {
          const ctx = useSSRContext();
          ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
        } else {
          return NOOP;
        }
      }
      let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
      const job = () => {
        if (!effect2.active || !effect2.dirty) {
          return;
        }
        if (cb) {
          const newValue = effect2.run();
          if (deep || forceTrigger || (isMultiSource ? newValue.some((v2, i2) => hasChanged(v2, oldValue[i2])) : hasChanged(newValue, oldValue)) || false) {
            if (cleanup2) {
              cleanup2();
            }
            callWithAsyncErrorHandling(cb, instance, 3, [
              newValue,
              // pass undefined as the old value when it's changed for the first time
              oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
              onCleanup
            ]);
            oldValue = newValue;
          }
        } else {
          effect2.run();
        }
      };
      job.allowRecurse = !!cb;
      let scheduler;
      if (flush === "sync") {
        scheduler = job;
      } else if (flush === "post") {
        scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
      } else {
        job.pre = true;
        if (instance) job.id = instance.uid;
        scheduler = () => queueJob(job);
      }
      const effect2 = new ReactiveEffect(getter, NOOP, scheduler);
      const scope = getCurrentScope();
      const unwatch = () => {
        effect2.stop();
        if (scope) {
          remove(scope.effects, effect2);
        }
      };
      if (cb) {
        if (immediate) {
          job();
        } else {
          oldValue = effect2.run();
        }
      } else if (flush === "post") {
        queuePostRenderEffect(
          effect2.run.bind(effect2),
          instance && instance.suspense
        );
      } else {
        effect2.run();
      }
      if (ssrCleanup) ssrCleanup.push(unwatch);
      return unwatch;
    }
    function instanceWatch(source, value, options) {
      const publicThis = this.proxy;
      const getter = isString$1(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
      let cb;
      if (isFunction$2(value)) {
        cb = value;
      } else {
        cb = value.handler;
        options = value;
      }
      const reset = setCurrentInstance(this);
      const res = doWatch(getter, cb.bind(publicThis), options);
      reset();
      return res;
    }
    function createPathGetter(ctx, path) {
      const segments = path.split(".");
      return () => {
        let cur = ctx;
        for (let i2 = 0; i2 < segments.length && cur; i2++) {
          cur = cur[segments[i2]];
        }
        return cur;
      };
    }
    function traverse(value, depth = Infinity, seen) {
      if (depth <= 0 || !isObject$3(value) || value["__v_skip"]) {
        return value;
      }
      seen = seen || /* @__PURE__ */ new Set();
      if (seen.has(value)) {
        return value;
      }
      seen.add(value);
      depth--;
      if (isRef(value)) {
        traverse(value.value, depth, seen);
      } else if (isArray$2(value)) {
        for (let i2 = 0; i2 < value.length; i2++) {
          traverse(value[i2], depth, seen);
        }
      } else if (isSet$1(value) || isMap$1(value)) {
        value.forEach((v2) => {
          traverse(v2, depth, seen);
        });
      } else if (isPlainObject$1(value)) {
        for (const key2 in value) {
          traverse(value[key2], depth, seen);
        }
        for (const key2 of Object.getOwnPropertySymbols(value)) {
          if (Object.prototype.propertyIsEnumerable.call(value, key2)) {
            traverse(value[key2], depth, seen);
          }
        }
      }
      return value;
    }
    const getModelModifiers = (props2, modelName) => {
      return modelName === "modelValue" || modelName === "model-value" ? props2.modelModifiers : props2[`${modelName}Modifiers`] || props2[`${camelize$1(modelName)}Modifiers`] || props2[`${hyphenate$1(modelName)}Modifiers`];
    };
    function emit(instance, event, ...rawArgs) {
      if (instance.isUnmounted) return;
      const props2 = instance.vnode.props || EMPTY_OBJ;
      let args = rawArgs;
      const isModelListener2 = event.startsWith("update:");
      const modifiers = isModelListener2 && getModelModifiers(props2, event.slice(7));
      if (modifiers) {
        if (modifiers.trim) {
          args = rawArgs.map((a2) => isString$1(a2) ? a2.trim() : a2);
        }
        if (modifiers.number) {
          args = rawArgs.map(looseToNumber);
        }
      }
      let handlerName;
      let handler = props2[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
      props2[handlerName = toHandlerKey(camelize$1(event))];
      if (!handler && isModelListener2) {
        handler = props2[handlerName = toHandlerKey(hyphenate$1(event))];
      }
      if (handler) {
        callWithAsyncErrorHandling(
          handler,
          instance,
          6,
          args
        );
      }
      const onceHandler = props2[handlerName + `Once`];
      if (onceHandler) {
        if (!instance.emitted) {
          instance.emitted = {};
        } else if (instance.emitted[handlerName]) {
          return;
        }
        instance.emitted[handlerName] = true;
        callWithAsyncErrorHandling(
          onceHandler,
          instance,
          6,
          args
        );
      }
    }
    function normalizeEmitsOptions(comp, appContext, asMixin = false) {
      const cache = appContext.emitsCache;
      const cached2 = cache.get(comp);
      if (cached2 !== void 0) {
        return cached2;
      }
      const raw = comp.emits;
      let normalized = {};
      let hasExtends = false;
      if (!isFunction$2(comp)) {
        const extendEmits = (raw2) => {
          const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
          if (normalizedFromExtend) {
            hasExtends = true;
            extend(normalized, normalizedFromExtend);
          }
        };
        if (!asMixin && appContext.mixins.length) {
          appContext.mixins.forEach(extendEmits);
        }
        if (comp.extends) {
          extendEmits(comp.extends);
        }
        if (comp.mixins) {
          comp.mixins.forEach(extendEmits);
        }
      }
      if (!raw && !hasExtends) {
        if (isObject$3(comp)) {
          cache.set(comp, null);
        }
        return null;
      }
      if (isArray$2(raw)) {
        raw.forEach((key2) => normalized[key2] = null);
      } else {
        extend(normalized, raw);
      }
      if (isObject$3(comp)) {
        cache.set(comp, normalized);
      }
      return normalized;
    }
    function isEmitListener(options, key2) {
      if (!options || !isOn$1(key2)) {
        return false;
      }
      key2 = key2.slice(2).replace(/Once$/, "");
      return hasOwn$1(options, key2[0].toLowerCase() + key2.slice(1)) || hasOwn$1(options, hyphenate$1(key2)) || hasOwn$1(options, key2);
    }
    function markAttrsAccessed() {
    }
    function renderComponentRoot(instance) {
      const {
        type: Component,
        vnode,
        proxy,
        withProxy,
        propsOptions: [propsOptions],
        slots,
        attrs,
        emit: emit2,
        render: render2,
        renderCache,
        props: props2,
        data,
        setupState,
        ctx,
        inheritAttrs
      } = instance;
      const prev2 = setCurrentRenderingInstance(instance);
      let result;
      let fallthroughAttrs;
      try {
        if (vnode.shapeFlag & 4) {
          const proxyToUse = withProxy || proxy;
          const thisProxy = false ? new Proxy(proxyToUse, {
            get(target, key2, receiver) {
              warn$1(
                `Property '${String(
                  key2
                )}' was accessed via 'this'. Avoid using 'this' in templates.`
              );
              return Reflect.get(target, key2, receiver);
            }
          }) : proxyToUse;
          result = normalizeVNode(
            render2.call(
              thisProxy,
              proxyToUse,
              renderCache,
              false ? shallowReadonly(props2) : props2,
              setupState,
              data,
              ctx
            )
          );
          fallthroughAttrs = attrs;
        } else {
          const render22 = Component;
          if (false) ;
          result = normalizeVNode(
            render22.length > 1 ? render22(
              false ? shallowReadonly(props2) : props2,
              false ? {
                get attrs() {
                  markAttrsAccessed();
                  return shallowReadonly(attrs);
                },
                slots,
                emit: emit2
              } : { attrs, slots, emit: emit2 }
            ) : render22(
              false ? shallowReadonly(props2) : props2,
              null
            )
          );
          fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
        }
      } catch (err) {
        blockStack.length = 0;
        handleError(err, instance, 1);
        result = createVNode(Comment);
      }
      let root2 = result;
      if (fallthroughAttrs && inheritAttrs !== false) {
        const keys2 = Object.keys(fallthroughAttrs);
        const { shapeFlag } = root2;
        if (keys2.length) {
          if (shapeFlag & (1 | 6)) {
            if (propsOptions && keys2.some(isModelListener)) {
              fallthroughAttrs = filterModelListeners(
                fallthroughAttrs,
                propsOptions
              );
            }
            root2 = cloneVNode(root2, fallthroughAttrs, false, true);
          }
        }
      }
      if (vnode.dirs) {
        root2 = cloneVNode(root2, null, false, true);
        root2.dirs = root2.dirs ? root2.dirs.concat(vnode.dirs) : vnode.dirs;
      }
      if (vnode.transition) {
        root2.transition = vnode.transition;
      }
      {
        result = root2;
      }
      setCurrentRenderingInstance(prev2);
      return result;
    }
    const getFunctionalFallthrough = (attrs) => {
      let res;
      for (const key2 in attrs) {
        if (key2 === "class" || key2 === "style" || isOn$1(key2)) {
          (res || (res = {}))[key2] = attrs[key2];
        }
      }
      return res;
    };
    const filterModelListeners = (attrs, props2) => {
      const res = {};
      for (const key2 in attrs) {
        if (!isModelListener(key2) || !(key2.slice(9) in props2)) {
          res[key2] = attrs[key2];
        }
      }
      return res;
    };
    function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
      const { props: prevProps, children: prevChildren, component } = prevVNode;
      const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
      const emits = component.emitsOptions;
      if (nextVNode.dirs || nextVNode.transition) {
        return true;
      }
      if (optimized && patchFlag >= 0) {
        if (patchFlag & 1024) {
          return true;
        }
        if (patchFlag & 16) {
          if (!prevProps) {
            return !!nextProps;
          }
          return hasPropsChanged(prevProps, nextProps, emits);
        } else if (patchFlag & 8) {
          const dynamicProps = nextVNode.dynamicProps;
          for (let i2 = 0; i2 < dynamicProps.length; i2++) {
            const key2 = dynamicProps[i2];
            if (nextProps[key2] !== prevProps[key2] && !isEmitListener(emits, key2)) {
              return true;
            }
          }
        }
      } else {
        if (prevChildren || nextChildren) {
          if (!nextChildren || !nextChildren.$stable) {
            return true;
          }
        }
        if (prevProps === nextProps) {
          return false;
        }
        if (!prevProps) {
          return !!nextProps;
        }
        if (!nextProps) {
          return true;
        }
        return hasPropsChanged(prevProps, nextProps, emits);
      }
      return false;
    }
    function hasPropsChanged(prevProps, nextProps, emitsOptions) {
      const nextKeys = Object.keys(nextProps);
      if (nextKeys.length !== Object.keys(prevProps).length) {
        return true;
      }
      for (let i2 = 0; i2 < nextKeys.length; i2++) {
        const key2 = nextKeys[i2];
        if (nextProps[key2] !== prevProps[key2] && !isEmitListener(emitsOptions, key2)) {
          return true;
        }
      }
      return false;
    }
    function updateHOCHostEl({ vnode, parent: parent2 }, el) {
      while (parent2) {
        const root2 = parent2.subTree;
        if (root2.suspense && root2.suspense.activeBranch === vnode) {
          root2.el = vnode.el;
        }
        if (root2 === vnode) {
          (vnode = parent2.vnode).el = el;
          parent2 = parent2.parent;
        } else {
          break;
        }
      }
    }
    const isSuspense = (type) => type.__isSuspense;
    function queueEffectWithSuspense(fn, suspense) {
      if (suspense && suspense.pendingBranch) {
        if (isArray$2(fn)) {
          suspense.effects.push(...fn);
        } else {
          suspense.effects.push(fn);
        }
      } else {
        queuePostFlushCb(fn);
      }
    }
    const Fragment = Symbol.for("v-fgt");
    const Text = Symbol.for("v-txt");
    const Comment = Symbol.for("v-cmt");
    const Static = Symbol.for("v-stc");
    const blockStack = [];
    let currentBlock = null;
    function openBlock(disableTracking = false) {
      blockStack.push(currentBlock = disableTracking ? null : []);
    }
    function closeBlock() {
      blockStack.pop();
      currentBlock = blockStack[blockStack.length - 1] || null;
    }
    let isBlockTreeEnabled = 1;
    function setBlockTracking(value) {
      isBlockTreeEnabled += value;
      if (value < 0 && currentBlock) {
        currentBlock.hasOnce = true;
      }
    }
    function setupBlock(vnode) {
      vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
      closeBlock();
      if (isBlockTreeEnabled > 0 && currentBlock) {
        currentBlock.push(vnode);
      }
      return vnode;
    }
    function createElementBlock(type, props2, children, patchFlag, dynamicProps, shapeFlag) {
      return setupBlock(
        createBaseVNode(
          type,
          props2,
          children,
          patchFlag,
          dynamicProps,
          shapeFlag,
          true
        )
      );
    }
    function createBlock(type, props2, children, patchFlag, dynamicProps) {
      return setupBlock(
        createVNode(
          type,
          props2,
          children,
          patchFlag,
          dynamicProps,
          true
        )
      );
    }
    function isVNode(value) {
      return value ? value.__v_isVNode === true : false;
    }
    function isSameVNodeType(n1, n2) {
      return n1.type === n2.type && n1.key === n2.key;
    }
    const normalizeKey = ({ key: key2 }) => key2 != null ? key2 : null;
    const normalizeRef = ({
      ref: ref3,
      ref_key,
      ref_for
    }) => {
      if (typeof ref3 === "number") {
        ref3 = "" + ref3;
      }
      return ref3 != null ? isString$1(ref3) || isRef(ref3) || isFunction$2(ref3) ? { i: currentRenderingInstance, r: ref3, k: ref_key, f: !!ref_for } : ref3 : null;
    };
    function createBaseVNode(type, props2 = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
      const vnode = {
        __v_isVNode: true,
        __v_skip: true,
        type,
        props: props2,
        key: props2 && normalizeKey(props2),
        ref: props2 && normalizeRef(props2),
        scopeId: currentScopeId,
        slotScopeIds: null,
        children,
        component: null,
        suspense: null,
        ssContent: null,
        ssFallback: null,
        dirs: null,
        transition: null,
        el: null,
        anchor: null,
        target: null,
        targetStart: null,
        targetAnchor: null,
        staticCount: 0,
        shapeFlag,
        patchFlag,
        dynamicProps,
        dynamicChildren: null,
        appContext: null,
        ctx: currentRenderingInstance
      };
      if (needFullChildrenNormalization) {
        normalizeChildren(vnode, children);
        if (shapeFlag & 128) {
          type.normalize(vnode);
        }
      } else if (children) {
        vnode.shapeFlag |= isString$1(children) ? 8 : 16;
      }
      if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
      !isBlockNode && // has current parent block
      currentBlock && // presence of a patch flag indicates this node needs patching on updates.
      // component nodes also should always be patched, because even if the
      // component doesn't need to update, it needs to persist the instance on to
      // the next vnode so that it can be properly unmounted later.
      (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
      // vnode should not be considered dynamic due to handler caching.
      vnode.patchFlag !== 32) {
        currentBlock.push(vnode);
      }
      return vnode;
    }
    const createVNode = _createVNode;
    function _createVNode(type, props2 = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
      if (!type || type === NULL_DYNAMIC_COMPONENT) {
        type = Comment;
      }
      if (isVNode(type)) {
        const cloned = cloneVNode(
          type,
          props2,
          true
          /* mergeRef: true */
        );
        if (children) {
          normalizeChildren(cloned, children);
        }
        if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
          if (cloned.shapeFlag & 6) {
            currentBlock[currentBlock.indexOf(type)] = cloned;
          } else {
            currentBlock.push(cloned);
          }
        }
        cloned.patchFlag = -2;
        return cloned;
      }
      if (isClassComponent(type)) {
        type = type.__vccOpts;
      }
      if (props2) {
        props2 = guardReactiveProps(props2);
        let { class: klass, style } = props2;
        if (klass && !isString$1(klass)) {
          props2.class = normalizeClass(klass);
        }
        if (isObject$3(style)) {
          if (isProxy(style) && !isArray$2(style)) {
            style = extend({}, style);
          }
          props2.style = normalizeStyle$1(style);
        }
      }
      const shapeFlag = isString$1(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject$3(type) ? 4 : isFunction$2(type) ? 2 : 0;
      return createBaseVNode(
        type,
        props2,
        children,
        patchFlag,
        dynamicProps,
        shapeFlag,
        isBlockNode,
        true
      );
    }
    function guardReactiveProps(props2) {
      if (!props2) return null;
      return isProxy(props2) || isInternalObject(props2) ? extend({}, props2) : props2;
    }
    function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
      const { props: props2, ref: ref3, patchFlag, children, transition } = vnode;
      const mergedProps = extraProps ? mergeProps(props2 || {}, extraProps) : props2;
      const cloned = {
        __v_isVNode: true,
        __v_skip: true,
        type: vnode.type,
        props: mergedProps,
        key: mergedProps && normalizeKey(mergedProps),
        ref: extraProps && extraProps.ref ? (
          // #2078 in the case of <component :is="vnode" ref="extra"/>
          // if the vnode itself already has a ref, cloneVNode will need to merge
          // the refs so the single vnode can be set on multiple refs
          mergeRef && ref3 ? isArray$2(ref3) ? ref3.concat(normalizeRef(extraProps)) : [ref3, normalizeRef(extraProps)] : normalizeRef(extraProps)
        ) : ref3,
        scopeId: vnode.scopeId,
        slotScopeIds: vnode.slotScopeIds,
        children,
        target: vnode.target,
        targetStart: vnode.targetStart,
        targetAnchor: vnode.targetAnchor,
        staticCount: vnode.staticCount,
        shapeFlag: vnode.shapeFlag,
        // if the vnode is cloned with extra props, we can no longer assume its
        // existing patch flag to be reliable and need to add the FULL_PROPS flag.
        // note: preserve flag for fragments since they use the flag for children
        // fast paths only.
        patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
        dynamicProps: vnode.dynamicProps,
        dynamicChildren: vnode.dynamicChildren,
        appContext: vnode.appContext,
        dirs: vnode.dirs,
        transition,
        // These should technically only be non-null on mounted VNodes. However,
        // they *should* be copied for kept-alive vnodes. So we just always copy
        // them since them being non-null during a mount doesn't affect the logic as
        // they will simply be overwritten.
        component: vnode.component,
        suspense: vnode.suspense,
        ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
        ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
        el: vnode.el,
        anchor: vnode.anchor,
        ctx: vnode.ctx,
        ce: vnode.ce
      };
      if (transition && cloneTransition) {
        setTransitionHooks(
          cloned,
          transition.clone(cloned)
        );
      }
      return cloned;
    }
    function createTextVNode(text = " ", flag = 0) {
      return createVNode(Text, null, text, flag);
    }
    function normalizeVNode(child) {
      if (child == null || typeof child === "boolean") {
        return createVNode(Comment);
      } else if (isArray$2(child)) {
        return createVNode(
          Fragment,
          null,
          // #3666, avoid reference pollution when reusing vnode
          child.slice()
        );
      } else if (typeof child === "object") {
        return cloneIfMounted(child);
      } else {
        return createVNode(Text, null, String(child));
      }
    }
    function cloneIfMounted(child) {
      return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
    }
    function normalizeChildren(vnode, children) {
      let type = 0;
      const { shapeFlag } = vnode;
      if (children == null) {
        children = null;
      } else if (isArray$2(children)) {
        type = 16;
      } else if (typeof children === "object") {
        if (shapeFlag & (1 | 64)) {
          const slot = children.default;
          if (slot) {
            slot._c && (slot._d = false);
            normalizeChildren(vnode, slot());
            slot._c && (slot._d = true);
          }
          return;
        } else {
          type = 32;
          const slotFlag = children._;
          if (!slotFlag && !isInternalObject(children)) {
            children._ctx = currentRenderingInstance;
          } else if (slotFlag === 3 && currentRenderingInstance) {
            if (currentRenderingInstance.slots._ === 1) {
              children._ = 1;
            } else {
              children._ = 2;
              vnode.patchFlag |= 1024;
            }
          }
        }
      } else if (isFunction$2(children)) {
        children = { default: children, _ctx: currentRenderingInstance };
        type = 32;
      } else {
        children = String(children);
        if (shapeFlag & 64) {
          type = 16;
          children = [createTextVNode(children)];
        } else {
          type = 8;
        }
      }
      vnode.children = children;
      vnode.shapeFlag |= type;
    }
    function mergeProps(...args) {
      const ret = {};
      for (let i2 = 0; i2 < args.length; i2++) {
        const toMerge = args[i2];
        for (const key2 in toMerge) {
          if (key2 === "class") {
            if (ret.class !== toMerge.class) {
              ret.class = normalizeClass([ret.class, toMerge.class]);
            }
          } else if (key2 === "style") {
            ret.style = normalizeStyle$1([ret.style, toMerge.style]);
          } else if (isOn$1(key2)) {
            const existing = ret[key2];
            const incoming = toMerge[key2];
            if (incoming && existing !== incoming && !(isArray$2(existing) && existing.includes(incoming))) {
              ret[key2] = existing ? [].concat(existing, incoming) : incoming;
            }
          } else if (key2 !== "") {
            ret[key2] = toMerge[key2];
          }
        }
      }
      return ret;
    }
    function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
      callWithAsyncErrorHandling(hook, instance, 7, [
        vnode,
        prevVNode
      ]);
    }
    const emptyAppContext = createAppContext();
    let uid = 0;
    function createComponentInstance(vnode, parent2, suspense) {
      const type = vnode.type;
      const appContext = (parent2 ? parent2.appContext : vnode.appContext) || emptyAppContext;
      const instance = {
        uid: uid++,
        vnode,
        type,
        parent: parent2,
        appContext,
        root: null,
        // to be immediately set
        next: null,
        subTree: null,
        // will be set synchronously right after creation
        effect: null,
        update: null,
        // will be set synchronously right after creation
        scope: new EffectScope(
          true
          /* detached */
        ),
        render: null,
        proxy: null,
        exposed: null,
        exposeProxy: null,
        withProxy: null,
        provides: parent2 ? parent2.provides : Object.create(appContext.provides),
        accessCache: null,
        renderCache: [],
        // local resolved assets
        components: null,
        directives: null,
        // resolved props and emits options
        propsOptions: normalizePropsOptions(type, appContext),
        emitsOptions: normalizeEmitsOptions(type, appContext),
        // emit
        emit: null,
        // to be set immediately
        emitted: null,
        // props default value
        propsDefaults: EMPTY_OBJ,
        // inheritAttrs
        inheritAttrs: type.inheritAttrs,
        // state
        ctx: EMPTY_OBJ,
        data: EMPTY_OBJ,
        props: EMPTY_OBJ,
        attrs: EMPTY_OBJ,
        slots: EMPTY_OBJ,
        refs: EMPTY_OBJ,
        setupState: EMPTY_OBJ,
        setupContext: null,
        // suspense related
        suspense,
        suspenseId: suspense ? suspense.pendingId : 0,
        asyncDep: null,
        asyncResolved: false,
        // lifecycle hooks
        // not using enums here because it results in computed properties
        isMounted: false,
        isUnmounted: false,
        isDeactivated: false,
        bc: null,
        c: null,
        bm: null,
        m: null,
        bu: null,
        u: null,
        um: null,
        bum: null,
        da: null,
        a: null,
        rtg: null,
        rtc: null,
        ec: null,
        sp: null
      };
      {
        instance.ctx = { _: instance };
      }
      instance.root = parent2 ? parent2.root : instance;
      instance.emit = emit.bind(null, instance);
      if (vnode.ce) {
        vnode.ce(instance);
      }
      return instance;
    }
    let currentInstance = null;
    const getCurrentInstance = () => currentInstance || currentRenderingInstance;
    let internalSetCurrentInstance;
    let setInSSRSetupState;
    {
      const g2 = getGlobalThis();
      const registerGlobalSetter = (key2, setter) => {
        let setters;
        if (!(setters = g2[key2])) setters = g2[key2] = [];
        setters.push(setter);
        return (v2) => {
          if (setters.length > 1) setters.forEach((set2) => set2(v2));
          else setters[0](v2);
        };
      };
      internalSetCurrentInstance = registerGlobalSetter(
        `__VUE_INSTANCE_SETTERS__`,
        (v2) => currentInstance = v2
      );
      setInSSRSetupState = registerGlobalSetter(
        `__VUE_SSR_SETTERS__`,
        (v2) => isInSSRComponentSetup = v2
      );
    }
    const setCurrentInstance = (instance) => {
      const prev2 = currentInstance;
      internalSetCurrentInstance(instance);
      instance.scope.on();
      return () => {
        instance.scope.off();
        internalSetCurrentInstance(prev2);
      };
    };
    const unsetCurrentInstance = () => {
      currentInstance && currentInstance.scope.off();
      internalSetCurrentInstance(null);
    };
    function isStatefulComponent(instance) {
      return instance.vnode.shapeFlag & 4;
    }
    let isInSSRComponentSetup = false;
    function setupComponent(instance, isSSR = false, optimized = false) {
      isSSR && setInSSRSetupState(isSSR);
      const { props: props2, children } = instance.vnode;
      const isStateful = isStatefulComponent(instance);
      initProps(instance, props2, isStateful, isSSR);
      initSlots(instance, children, optimized);
      const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
      isSSR && setInSSRSetupState(false);
      return setupResult;
    }
    function setupStatefulComponent(instance, isSSR) {
      const Component = instance.type;
      instance.accessCache = /* @__PURE__ */ Object.create(null);
      instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
      const { setup } = Component;
      if (setup) {
        const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
        const reset = setCurrentInstance(instance);
        pauseTracking();
        const setupResult = callWithErrorHandling(
          setup,
          instance,
          0,
          [
            instance.props,
            setupContext
          ]
        );
        resetTracking();
        reset();
        if (isPromise(setupResult)) {
          setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
          if (isSSR) {
            return setupResult.then((resolvedResult) => {
              handleSetupResult(instance, resolvedResult, isSSR);
            }).catch((e2) => {
              handleError(e2, instance, 0);
            });
          } else {
            instance.asyncDep = setupResult;
          }
        } else {
          handleSetupResult(instance, setupResult, isSSR);
        }
      } else {
        finishComponentSetup(instance, isSSR);
      }
    }
    function handleSetupResult(instance, setupResult, isSSR) {
      if (isFunction$2(setupResult)) {
        if (instance.type.__ssrInlineRender) {
          instance.ssrRender = setupResult;
        } else {
          instance.render = setupResult;
        }
      } else if (isObject$3(setupResult)) {
        instance.setupState = proxyRefs(setupResult);
      } else ;
      finishComponentSetup(instance, isSSR);
    }
    let compile$1;
    function finishComponentSetup(instance, isSSR, skipOptions) {
      const Component = instance.type;
      if (!instance.render) {
        if (!isSSR && compile$1 && !Component.render) {
          const template = Component.template || resolveMergedOptions(instance).template;
          if (template) {
            const { isCustomElement, compilerOptions } = instance.appContext.config;
            const { delimiters, compilerOptions: componentCompilerOptions } = Component;
            const finalCompilerOptions = extend(
              extend(
                {
                  isCustomElement,
                  delimiters
                },
                compilerOptions
              ),
              componentCompilerOptions
            );
            Component.render = compile$1(template, finalCompilerOptions);
          }
        }
        instance.render = Component.render || NOOP;
      }
      {
        const reset = setCurrentInstance(instance);
        pauseTracking();
        try {
          applyOptions(instance);
        } finally {
          resetTracking();
          reset();
        }
      }
    }
    const attrsProxyHandlers = {
      get(target, key2) {
        track(target, "get", "");
        return target[key2];
      }
    };
    function createSetupContext(instance) {
      const expose = (exposed) => {
        instance.exposed = exposed || {};
      };
      {
        return {
          attrs: new Proxy(instance.attrs, attrsProxyHandlers),
          slots: instance.slots,
          emit: instance.emit,
          expose
        };
      }
    }
    function getComponentPublicInstance(instance) {
      if (instance.exposed) {
        return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
          get(target, key2) {
            if (key2 in target) {
              return target[key2];
            } else if (key2 in publicPropertiesMap) {
              return publicPropertiesMap[key2](instance);
            }
          },
          has(target, key2) {
            return key2 in target || key2 in publicPropertiesMap;
          }
        }));
      } else {
        return instance.proxy;
      }
    }
    const classifyRE = /(?:^|[-_])(\w)/g;
    const classify = (str) => str.replace(classifyRE, (c2) => c2.toUpperCase()).replace(/[-_]/g, "");
    function getComponentName(Component, includeInferred = true) {
      return isFunction$2(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
    }
    function formatComponentName(instance, Component, isRoot = false) {
      let name = getComponentName(Component);
      if (!name && Component.__file) {
        const match2 = Component.__file.match(/([^/\\]+)\.\w+$/);
        if (match2) {
          name = match2[1];
        }
      }
      if (!name && instance && instance.parent) {
        const inferFromRegistry = (registry) => {
          for (const key2 in registry) {
            if (registry[key2] === Component) {
              return key2;
            }
          }
        };
        name = inferFromRegistry(
          instance.components || instance.parent.type.components
        ) || inferFromRegistry(instance.appContext.components);
      }
      return name ? classify(name) : isRoot ? `App` : `Anonymous`;
    }
    function isClassComponent(value) {
      return isFunction$2(value) && "__vccOpts" in value;
    }
    const computed = (getterOrOptions, debugOptions) => {
      const c2 = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
      return c2;
    };
    function h$1(type, propsOrChildren, children) {
      const l2 = arguments.length;
      if (l2 === 2) {
        if (isObject$3(propsOrChildren) && !isArray$2(propsOrChildren)) {
          if (isVNode(propsOrChildren)) {
            return createVNode(type, null, [propsOrChildren]);
          }
          return createVNode(type, propsOrChildren);
        } else {
          return createVNode(type, null, propsOrChildren);
        }
      } else {
        if (l2 > 3) {
          children = Array.prototype.slice.call(arguments, 2);
        } else if (l2 === 3 && isVNode(children)) {
          children = [children];
        }
        return createVNode(type, propsOrChildren, children);
      }
    }
    const version$1 = "3.4.38";
    /**
    * @vue/runtime-dom v3.4.38
    * (c) 2018-present Yuxi (Evan) You and Vue contributors
    * @license MIT
    **/
    const svgNS = "http://www.w3.org/2000/svg";
    const mathmlNS = "http://www.w3.org/1998/Math/MathML";
    const doc = typeof document !== "undefined" ? document : null;
    const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
    const nodeOps = {
      insert: (child, parent2, anchor) => {
        parent2.insertBefore(child, anchor || null);
      },
      remove: (child) => {
        const parent2 = child.parentNode;
        if (parent2) {
          parent2.removeChild(child);
        }
      },
      createElement: (tag, namespace, is, props2) => {
        const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
        if (tag === "select" && props2 && props2.multiple != null) {
          el.setAttribute("multiple", props2.multiple);
        }
        return el;
      },
      createText: (text) => doc.createTextNode(text),
      createComment: (text) => doc.createComment(text),
      setText: (node2, text) => {
        node2.nodeValue = text;
      },
      setElementText: (el, text) => {
        el.textContent = text;
      },
      parentNode: (node2) => node2.parentNode,
      nextSibling: (node2) => node2.nextSibling,
      querySelector: (selector) => doc.querySelector(selector),
      setScopeId(el, id) {
        el.setAttribute(id, "");
      },
      // __UNSAFE__
      // Reason: innerHTML.
      // Static content here can only come from compiled templates.
      // As long as the user only uses trusted templates, this is safe.
      insertStaticContent(content, parent2, anchor, namespace, start, end) {
        const before = anchor ? anchor.previousSibling : parent2.lastChild;
        if (start && (start === end || start.nextSibling)) {
          while (true) {
            parent2.insertBefore(start.cloneNode(true), anchor);
            if (start === end || !(start = start.nextSibling)) break;
          }
        } else {
          templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content;
          const template = templateContainer.content;
          if (namespace === "svg" || namespace === "mathml") {
            const wrapper = template.firstChild;
            while (wrapper.firstChild) {
              template.appendChild(wrapper.firstChild);
            }
            template.removeChild(wrapper);
          }
          parent2.insertBefore(template, anchor);
        }
        return [
          // first
          before ? before.nextSibling : parent2.firstChild,
          // last
          anchor ? anchor.previousSibling : parent2.lastChild
        ];
      }
    };
    const TRANSITION = "transition";
    const ANIMATION = "animation";
    const vtcKey = Symbol("_vtc");
    const Transition = (props2, { slots }) => h$1(BaseTransition, resolveTransitionProps(props2), slots);
    Transition.displayName = "Transition";
    const DOMTransitionPropsValidators = {
      name: String,
      type: String,
      css: {
        type: Boolean,
        default: true
      },
      duration: [String, Number, Object],
      enterFromClass: String,
      enterActiveClass: String,
      enterToClass: String,
      appearFromClass: String,
      appearActiveClass: String,
      appearToClass: String,
      leaveFromClass: String,
      leaveActiveClass: String,
      leaveToClass: String
    };
    const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
      {},
      BaseTransitionPropsValidators,
      DOMTransitionPropsValidators
    );
    const callHook = (hook, args = []) => {
      if (isArray$2(hook)) {
        hook.forEach((h2) => h2(...args));
      } else if (hook) {
        hook(...args);
      }
    };
    const hasExplicitCallback = (hook) => {
      return hook ? isArray$2(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
    };
    function resolveTransitionProps(rawProps) {
      const baseProps = {};
      for (const key2 in rawProps) {
        if (!(key2 in DOMTransitionPropsValidators)) {
          baseProps[key2] = rawProps[key2];
        }
      }
      if (rawProps.css === false) {
        return baseProps;
      }
      const {
        name = "v",
        type,
        duration,
        enterFromClass = `${name}-enter-from`,
        enterActiveClass = `${name}-enter-active`,
        enterToClass = `${name}-enter-to`,
        appearFromClass = enterFromClass,
        appearActiveClass = enterActiveClass,
        appearToClass = enterToClass,
        leaveFromClass = `${name}-leave-from`,
        leaveActiveClass = `${name}-leave-active`,
        leaveToClass = `${name}-leave-to`
      } = rawProps;
      const durations = normalizeDuration(duration);
      const enterDuration = durations && durations[0];
      const leaveDuration = durations && durations[1];
      const {
        onBeforeEnter,
        onEnter,
        onEnterCancelled,
        onLeave,
        onLeaveCancelled,
        onBeforeAppear = onBeforeEnter,
        onAppear = onEnter,
        onAppearCancelled = onEnterCancelled
      } = baseProps;
      const finishEnter = (el, isAppear, done) => {
        removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
        removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
        done && done();
      };
      const finishLeave = (el, done) => {
        el._isLeaving = false;
        removeTransitionClass(el, leaveFromClass);
        removeTransitionClass(el, leaveToClass);
        removeTransitionClass(el, leaveActiveClass);
        done && done();
      };
      const makeEnterHook = (isAppear) => {
        return (el, done) => {
          const hook = isAppear ? onAppear : onEnter;
          const resolve2 = () => finishEnter(el, isAppear, done);
          callHook(hook, [el, resolve2]);
          nextFrame(() => {
            removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
            addTransitionClass(el, isAppear ? appearToClass : enterToClass);
            if (!hasExplicitCallback(hook)) {
              whenTransitionEnds(el, type, enterDuration, resolve2);
            }
          });
        };
      };
      return extend(baseProps, {
        onBeforeEnter(el) {
          callHook(onBeforeEnter, [el]);
          addTransitionClass(el, enterFromClass);
          addTransitionClass(el, enterActiveClass);
        },
        onBeforeAppear(el) {
          callHook(onBeforeAppear, [el]);
          addTransitionClass(el, appearFromClass);
          addTransitionClass(el, appearActiveClass);
        },
        onEnter: makeEnterHook(false),
        onAppear: makeEnterHook(true),
        onLeave(el, done) {
          el._isLeaving = true;
          const resolve2 = () => finishLeave(el, done);
          addTransitionClass(el, leaveFromClass);
          addTransitionClass(el, leaveActiveClass);
          forceReflow();
          nextFrame(() => {
            if (!el._isLeaving) {
              return;
            }
            removeTransitionClass(el, leaveFromClass);
            addTransitionClass(el, leaveToClass);
            if (!hasExplicitCallback(onLeave)) {
              whenTransitionEnds(el, type, leaveDuration, resolve2);
            }
          });
          callHook(onLeave, [el, resolve2]);
        },
        onEnterCancelled(el) {
          finishEnter(el, false);
          callHook(onEnterCancelled, [el]);
        },
        onAppearCancelled(el) {
          finishEnter(el, true);
          callHook(onAppearCancelled, [el]);
        },
        onLeaveCancelled(el) {
          finishLeave(el);
          callHook(onLeaveCancelled, [el]);
        }
      });
    }
    function normalizeDuration(duration) {
      if (duration == null) {
        return null;
      } else if (isObject$3(duration)) {
        return [NumberOf(duration.enter), NumberOf(duration.leave)];
      } else {
        const n2 = NumberOf(duration);
        return [n2, n2];
      }
    }
    function NumberOf(val) {
      const res = toNumber$1(val);
      return res;
    }
    function addTransitionClass(el, cls) {
      cls.split(/\s+/).forEach((c2) => c2 && el.classList.add(c2));
      (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
    }
    function removeTransitionClass(el, cls) {
      cls.split(/\s+/).forEach((c2) => c2 && el.classList.remove(c2));
      const _vtc = el[vtcKey];
      if (_vtc) {
        _vtc.delete(cls);
        if (!_vtc.size) {
          el[vtcKey] = void 0;
        }
      }
    }
    function nextFrame(cb) {
      requestAnimationFrame(() => {
        requestAnimationFrame(cb);
      });
    }
    let endId = 0;
    function whenTransitionEnds(el, expectedType, explicitTimeout, resolve2) {
      const id = el._endId = ++endId;
      const resolveIfNotStale = () => {
        if (id === el._endId) {
          resolve2();
        }
      };
      if (explicitTimeout) {
        return setTimeout(resolveIfNotStale, explicitTimeout);
      }
      const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
      if (!type) {
        return resolve2();
      }
      const endEvent = type + "end";
      let ended = 0;
      const end = () => {
        el.removeEventListener(endEvent, onEnd);
        resolveIfNotStale();
      };
      const onEnd = (e2) => {
        if (e2.target === el && ++ended >= propCount) {
          end();
        }
      };
      setTimeout(() => {
        if (ended < propCount) {
          end();
        }
      }, timeout + 1);
      el.addEventListener(endEvent, onEnd);
    }
    function getTransitionInfo(el, expectedType) {
      const styles = window.getComputedStyle(el);
      const getStyleProperties = (key2) => (styles[key2] || "").split(", ");
      const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
      const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
      const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
      const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
      const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
      const animationTimeout = getTimeout(animationDelays, animationDurations);
      let type = null;
      let timeout = 0;
      let propCount = 0;
      if (expectedType === TRANSITION) {
        if (transitionTimeout > 0) {
          type = TRANSITION;
          timeout = transitionTimeout;
          propCount = transitionDurations.length;
        }
      } else if (expectedType === ANIMATION) {
        if (animationTimeout > 0) {
          type = ANIMATION;
          timeout = animationTimeout;
          propCount = animationDurations.length;
        }
      } else {
        timeout = Math.max(transitionTimeout, animationTimeout);
        type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
        propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
      }
      const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test(
        getStyleProperties(`${TRANSITION}Property`).toString()
      );
      return {
        type,
        timeout,
        propCount,
        hasTransform
      };
    }
    function getTimeout(delays, durations) {
      while (delays.length < durations.length) {
        delays = delays.concat(delays);
      }
      return Math.max(...durations.map((d2, i2) => toMs(d2) + toMs(delays[i2])));
    }
    function toMs(s2) {
      if (s2 === "auto") return 0;
      return Number(s2.slice(0, -1).replace(",", ".")) * 1e3;
    }
    function forceReflow() {
      return document.body.offsetHeight;
    }
    function patchClass(el, value, isSVG) {
      const transitionClasses = el[vtcKey];
      if (transitionClasses) {
        value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
      }
      if (value == null) {
        el.removeAttribute("class");
      } else if (isSVG) {
        el.setAttribute("class", value);
      } else {
        el.className = value;
      }
    }
    const vShowOriginalDisplay = Symbol("_vod");
    const vShowHidden = Symbol("_vsh");
    const vShow = {
      beforeMount(el, { value }, { transition }) {
        el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
        if (transition && value) {
          transition.beforeEnter(el);
        } else {
          setDisplay(el, value);
        }
      },
      mounted(el, { value }, { transition }) {
        if (transition && value) {
          transition.enter(el);
        }
      },
      updated(el, { value, oldValue }, { transition }) {
        if (!value === !oldValue) return;
        if (transition) {
          if (value) {
            transition.beforeEnter(el);
            setDisplay(el, true);
            transition.enter(el);
          } else {
            transition.leave(el, () => {
              setDisplay(el, false);
            });
          }
        } else {
          setDisplay(el, value);
        }
      },
      beforeUnmount(el, { value }) {
        setDisplay(el, value);
      }
    };
    function setDisplay(el, value) {
      el.style.display = value ? el[vShowOriginalDisplay] : "none";
      el[vShowHidden] = !value;
    }
    const CSS_VAR_TEXT = Symbol("");
    const displayRE = /(^|;)\s*display\s*:/;
    function patchStyle(el, prev2, next2) {
      const style = el.style;
      const isCssString = isString$1(next2);
      let hasControlledDisplay = false;
      if (next2 && !isCssString) {
        if (prev2) {
          if (!isString$1(prev2)) {
            for (const key2 in prev2) {
              if (next2[key2] == null) {
                setStyle(style, key2, "");
              }
            }
          } else {
            for (const prevStyle of prev2.split(";")) {
              const key2 = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
              if (next2[key2] == null) {
                setStyle(style, key2, "");
              }
            }
          }
        }
        for (const key2 in next2) {
          if (key2 === "display") {
            hasControlledDisplay = true;
          }
          setStyle(style, key2, next2[key2]);
        }
      } else {
        if (isCssString) {
          if (prev2 !== next2) {
            const cssVarText = style[CSS_VAR_TEXT];
            if (cssVarText) {
              next2 += ";" + cssVarText;
            }
            style.cssText = next2;
            hasControlledDisplay = displayRE.test(next2);
          }
        } else if (prev2) {
          el.removeAttribute("style");
        }
      }
      if (vShowOriginalDisplay in el) {
        el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
        if (el[vShowHidden]) {
          style.display = "none";
        }
      }
    }
    const importantRE = /\s*!important$/;
    function setStyle(style, name, val) {
      if (isArray$2(val)) {
        val.forEach((v2) => setStyle(style, name, v2));
      } else {
        if (val == null) val = "";
        if (name.startsWith("--")) {
          style.setProperty(name, val);
        } else {
          const prefixed = autoPrefix(style, name);
          if (importantRE.test(val)) {
            style.setProperty(
              hyphenate$1(prefixed),
              val.replace(importantRE, ""),
              "important"
            );
          } else {
            style[prefixed] = val;
          }
        }
      }
    }
    const prefixes = ["Webkit", "Moz", "ms"];
    const prefixCache = {};
    function autoPrefix(style, rawName) {
      const cached2 = prefixCache[rawName];
      if (cached2) {
        return cached2;
      }
      let name = camelize$1(rawName);
      if (name !== "filter" && name in style) {
        return prefixCache[rawName] = name;
      }
      name = capitalize$1(name);
      for (let i2 = 0; i2 < prefixes.length; i2++) {
        const prefixed = prefixes[i2] + name;
        if (prefixed in style) {
          return prefixCache[rawName] = prefixed;
        }
      }
      return rawName;
    }
    const xlinkNS = "http://www.w3.org/1999/xlink";
    function patchAttr(el, key2, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key2)) {
      if (isSVG && key2.startsWith("xlink:")) {
        if (value == null) {
          el.removeAttributeNS(xlinkNS, key2.slice(6, key2.length));
        } else {
          el.setAttributeNS(xlinkNS, key2, value);
        }
      } else {
        if (value == null || isBoolean && !includeBooleanAttr(value)) {
          el.removeAttribute(key2);
        } else {
          el.setAttribute(
            key2,
            isBoolean ? "" : isSymbol$1(value) ? String(value) : value
          );
        }
      }
    }
    function patchDOMProp(el, key2, value, parentComponent) {
      if (key2 === "innerHTML" || key2 === "textContent") {
        if (value == null) return;
        el[key2] = value;
        return;
      }
      const tag = el.tagName;
      if (key2 === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
      !tag.includes("-")) {
        const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
        const newValue = value == null ? "" : String(value);
        if (oldValue !== newValue || !("_value" in el)) {
          el.value = newValue;
        }
        if (value == null) {
          el.removeAttribute(key2);
        }
        el._value = value;
        return;
      }
      let needRemove = false;
      if (value === "" || value == null) {
        const type = typeof el[key2];
        if (type === "boolean") {
          value = includeBooleanAttr(value);
        } else if (value == null && type === "string") {
          value = "";
          needRemove = true;
        } else if (type === "number") {
          value = 0;
          needRemove = true;
        }
      }
      try {
        el[key2] = value;
      } catch (e2) {
      }
      needRemove && el.removeAttribute(key2);
    }
    function addEventListener(el, event, handler, options) {
      el.addEventListener(event, handler, options);
    }
    function removeEventListener(el, event, handler, options) {
      el.removeEventListener(event, handler, options);
    }
    const veiKey = Symbol("_vei");
    function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
      const invokers = el[veiKey] || (el[veiKey] = {});
      const existingInvoker = invokers[rawName];
      if (nextValue && existingInvoker) {
        existingInvoker.value = nextValue;
      } else {
        const [name, options] = parseName(rawName);
        if (nextValue) {
          const invoker = invokers[rawName] = createInvoker(
            nextValue,
            instance
          );
          addEventListener(el, name, invoker, options);
        } else if (existingInvoker) {
          removeEventListener(el, name, existingInvoker, options);
          invokers[rawName] = void 0;
        }
      }
    }
    const optionsModifierRE = /(?:Once|Passive|Capture)$/;
    function parseName(name) {
      let options;
      if (optionsModifierRE.test(name)) {
        options = {};
        let m2;
        while (m2 = name.match(optionsModifierRE)) {
          name = name.slice(0, name.length - m2[0].length);
          options[m2[0].toLowerCase()] = true;
        }
      }
      const event = name[2] === ":" ? name.slice(3) : hyphenate$1(name.slice(2));
      return [event, options];
    }
    let cachedNow = 0;
    const p = /* @__PURE__ */ Promise.resolve();
    const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
    function createInvoker(initialValue, instance) {
      const invoker = (e2) => {
        if (!e2._vts) {
          e2._vts = Date.now();
        } else if (e2._vts <= invoker.attached) {
          return;
        }
        callWithAsyncErrorHandling(
          patchStopImmediatePropagation(e2, invoker.value),
          instance,
          5,
          [e2]
        );
      };
      invoker.value = initialValue;
      invoker.attached = getNow();
      return invoker;
    }
    function patchStopImmediatePropagation(e2, value) {
      if (isArray$2(value)) {
        const originalStop = e2.stopImmediatePropagation;
        e2.stopImmediatePropagation = () => {
          originalStop.call(e2);
          e2._stopped = true;
        };
        return value.map(
          (fn) => (e22) => !e22._stopped && fn && fn(e22)
        );
      } else {
        return value;
      }
    }
    const isNativeOn = (key2) => key2.charCodeAt(0) === 111 && key2.charCodeAt(1) === 110 && // lowercase letter
    key2.charCodeAt(2) > 96 && key2.charCodeAt(2) < 123;
    const patchProp = (el, key2, prevValue, nextValue, namespace, parentComponent) => {
      const isSVG = namespace === "svg";
      if (key2 === "class") {
        patchClass(el, nextValue, isSVG);
      } else if (key2 === "style") {
        patchStyle(el, prevValue, nextValue);
      } else if (isOn$1(key2)) {
        if (!isModelListener(key2)) {
          patchEvent(el, key2, prevValue, nextValue, parentComponent);
        }
      } else if (key2[0] === "." ? (key2 = key2.slice(1), true) : key2[0] === "^" ? (key2 = key2.slice(1), false) : shouldSetAsProp(el, key2, nextValue, isSVG)) {
        patchDOMProp(el, key2, nextValue);
        if (!el.tagName.includes("-") && (key2 === "value" || key2 === "checked" || key2 === "selected")) {
          patchAttr(el, key2, nextValue, isSVG, parentComponent, key2 !== "value");
        }
      } else {
        if (key2 === "true-value") {
          el._trueValue = nextValue;
        } else if (key2 === "false-value") {
          el._falseValue = nextValue;
        }
        patchAttr(el, key2, nextValue, isSVG);
      }
    };
    function shouldSetAsProp(el, key2, value, isSVG) {
      if (isSVG) {
        if (key2 === "innerHTML" || key2 === "textContent") {
          return true;
        }
        if (key2 in el && isNativeOn(key2) && isFunction$2(value)) {
          return true;
        }
        return false;
      }
      if (key2 === "spellcheck" || key2 === "draggable" || key2 === "translate") {
        return false;
      }
      if (key2 === "form") {
        return false;
      }
      if (key2 === "list" && el.tagName === "INPUT") {
        return false;
      }
      if (key2 === "type" && el.tagName === "TEXTAREA") {
        return false;
      }
      if (key2 === "width" || key2 === "height") {
        const tag = el.tagName;
        if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
          return false;
        }
      }
      if (isNativeOn(key2) && isString$1(value)) {
        return false;
      }
      return key2 in el;
    }
    const positionMap = /* @__PURE__ */ new WeakMap();
    const newPositionMap = /* @__PURE__ */ new WeakMap();
    const moveCbKey = Symbol("_moveCb");
    const enterCbKey = Symbol("_enterCb");
    const TransitionGroupImpl = {
      name: "TransitionGroup",
      props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
        tag: String,
        moveClass: String
      }),
      setup(props2, { slots }) {
        const instance = getCurrentInstance();
        const state = useTransitionState();
        let prevChildren;
        let children;
        onUpdated(() => {
          if (!prevChildren.length) {
            return;
          }
          const moveClass = props2.moveClass || `${props2.name || "v"}-move`;
          if (!hasCSSTransform(
            prevChildren[0].el,
            instance.vnode.el,
            moveClass
          )) {
            return;
          }
          prevChildren.forEach(callPendingCbs);
          prevChildren.forEach(recordPosition);
          const movedChildren = prevChildren.filter(applyTranslation);
          forceReflow();
          movedChildren.forEach((c2) => {
            const el = c2.el;
            const style = el.style;
            addTransitionClass(el, moveClass);
            style.transform = style.webkitTransform = style.transitionDuration = "";
            const cb = el[moveCbKey] = (e2) => {
              if (e2 && e2.target !== el) {
                return;
              }
              if (!e2 || /transform$/.test(e2.propertyName)) {
                el.removeEventListener("transitionend", cb);
                el[moveCbKey] = null;
                removeTransitionClass(el, moveClass);
              }
            };
            el.addEventListener("transitionend", cb);
          });
        });
        return () => {
          const rawProps = toRaw(props2);
          const cssTransitionProps = resolveTransitionProps(rawProps);
          let tag = rawProps.tag || Fragment;
          prevChildren = [];
          if (children) {
            for (let i2 = 0; i2 < children.length; i2++) {
              const child = children[i2];
              if (child.el && child.el instanceof Element) {
                prevChildren.push(child);
                setTransitionHooks(
                  child,
                  resolveTransitionHooks(
                    child,
                    cssTransitionProps,
                    state,
                    instance
                  )
                );
                positionMap.set(
                  child,
                  child.el.getBoundingClientRect()
                );
              }
            }
          }
          children = slots.default ? getTransitionRawChildren(slots.default()) : [];
          for (let i2 = 0; i2 < children.length; i2++) {
            const child = children[i2];
            if (child.key != null) {
              setTransitionHooks(
                child,
                resolveTransitionHooks(child, cssTransitionProps, state, instance)
              );
            }
          }
          return createVNode(tag, null, children);
        };
      }
    };
    const removeMode = (props2) => delete props2.mode;
    /* @__PURE__ */ removeMode(TransitionGroupImpl.props);
    const TransitionGroup = TransitionGroupImpl;
    function callPendingCbs(c2) {
      const el = c2.el;
      if (el[moveCbKey]) {
        el[moveCbKey]();
      }
      if (el[enterCbKey]) {
        el[enterCbKey]();
      }
    }
    function recordPosition(c2) {
      newPositionMap.set(c2, c2.el.getBoundingClientRect());
    }
    function applyTranslation(c2) {
      const oldPos = positionMap.get(c2);
      const newPos = newPositionMap.get(c2);
      const dx = oldPos.left - newPos.left;
      const dy = oldPos.top - newPos.top;
      if (dx || dy) {
        const s2 = c2.el.style;
        s2.transform = s2.webkitTransform = `translate(${dx}px,${dy}px)`;
        s2.transitionDuration = "0s";
        return c2;
      }
    }
    function hasCSSTransform(el, root2, moveClass) {
      const clone = el.cloneNode();
      const _vtc = el[vtcKey];
      if (_vtc) {
        _vtc.forEach((cls) => {
          cls.split(/\s+/).forEach((c2) => c2 && clone.classList.remove(c2));
        });
      }
      moveClass.split(/\s+/).forEach((c2) => c2 && clone.classList.add(c2));
      clone.style.display = "none";
      const container = root2.nodeType === 1 ? root2 : root2.parentNode;
      container.appendChild(clone);
      const { hasTransform } = getTransitionInfo(clone);
      container.removeChild(clone);
      return hasTransform;
    }
    const systemModifiers = ["ctrl", "shift", "alt", "meta"];
    const modifierGuards = {
      stop: (e2) => e2.stopPropagation(),
      prevent: (e2) => e2.preventDefault(),
      self: (e2) => e2.target !== e2.currentTarget,
      ctrl: (e2) => !e2.ctrlKey,
      shift: (e2) => !e2.shiftKey,
      alt: (e2) => !e2.altKey,
      meta: (e2) => !e2.metaKey,
      left: (e2) => "button" in e2 && e2.button !== 0,
      middle: (e2) => "button" in e2 && e2.button !== 1,
      right: (e2) => "button" in e2 && e2.button !== 2,
      exact: (e2, modifiers) => systemModifiers.some((m2) => e2[`${m2}Key`] && !modifiers.includes(m2))
    };
    const withModifiers = (fn, modifiers) => {
      const cache = fn._withMods || (fn._withMods = {});
      const cacheKey = modifiers.join(".");
      return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
        for (let i2 = 0; i2 < modifiers.length; i2++) {
          const guard = modifierGuards[modifiers[i2]];
          if (guard && guard(event, modifiers)) return;
        }
        return fn(event, ...args);
      });
    };
    const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
    let renderer;
    function ensureRenderer() {
      return renderer || (renderer = createRenderer(rendererOptions));
    }
    const render = (...args) => {
      ensureRenderer().render(...args);
    };
    const createApp = (...args) => {
      const app = ensureRenderer().createApp(...args);
      const { mount } = app;
      app.mount = (containerOrSelector) => {
        const container = normalizeContainer(containerOrSelector);
        if (!container) return;
        const component = app._component;
        if (!isFunction$2(component) && !component.render && !component.template) {
          component.template = container.innerHTML;
        }
        container.innerHTML = "";
        const proxy = mount(container, false, resolveRootNamespace(container));
        if (container instanceof Element) {
          container.removeAttribute("v-cloak");
          container.setAttribute("data-v-app", "");
        }
        return proxy;
      };
      return app;
    };
    function resolveRootNamespace(container) {
      if (container instanceof SVGElement) {
        return "svg";
      }
      if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
        return "mathml";
      }
    }
    function normalizeContainer(container) {
      if (isString$1(container)) {
        const res = document.querySelector(container);
        return res;
      }
      return container;
    }
    var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
    var freeSelf = typeof self == "object" && self && self.Object === Object && self;
    var root = freeGlobal || freeSelf || Function("return this")();
    var Symbol$1 = root.Symbol;
    var objectProto$g = Object.prototype;
    var hasOwnProperty$e = objectProto$g.hasOwnProperty;
    var nativeObjectToString$1 = objectProto$g.toString;
    var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
    function getRawTag(value) {
      var isOwn = hasOwnProperty$e.call(value, symToStringTag$1), tag = value[symToStringTag$1];
      try {
        value[symToStringTag$1] = void 0;
        var unmasked = true;
      } catch (e2) {
      }
      var result = nativeObjectToString$1.call(value);
      if (unmasked) {
        if (isOwn) {
          value[symToStringTag$1] = tag;
        } else {
          delete value[symToStringTag$1];
        }
      }
      return result;
    }
    var objectProto$f = Object.prototype;
    var nativeObjectToString = objectProto$f.toString;
    function objectToString(value) {
      return nativeObjectToString.call(value);
    }
    var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
    var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
    function baseGetTag(value) {
      if (value == null) {
        return value === void 0 ? undefinedTag : nullTag;
      }
      return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
    }
    function isObjectLike(value) {
      return value != null && typeof value == "object";
    }
    var symbolTag$3 = "[object Symbol]";
    function isSymbol(value) {
      return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
    }
    function arrayMap(array, iteratee) {
      var index2 = -1, length2 = array == null ? 0 : array.length, result = Array(length2);
      while (++index2 < length2) {
        result[index2] = iteratee(array[index2], index2, array);
      }
      return result;
    }
    var isArray$1 = Array.isArray;
    var INFINITY$2 = 1 / 0;
    var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
    function baseToString(value) {
      if (typeof value == "string") {
        return value;
      }
      if (isArray$1(value)) {
        return arrayMap(value, baseToString) + "";
      }
      if (isSymbol(value)) {
        return symbolToString ? symbolToString.call(value) : "";
      }
      var result = value + "";
      return result == "0" && 1 / value == -INFINITY$2 ? "-0" : result;
    }
    var reWhitespace = /\s/;
    function trimmedEndIndex(string2) {
      var index2 = string2.length;
      while (index2-- && reWhitespace.test(string2.charAt(index2))) {
      }
      return index2;
    }
    var reTrimStart = /^\s+/;
    function baseTrim(string2) {
      return string2 ? string2.slice(0, trimmedEndIndex(string2) + 1).replace(reTrimStart, "") : string2;
    }
    function isObject$2(value) {
      var type = typeof value;
      return value != null && (type == "object" || type == "function");
    }
    var NAN = 0 / 0;
    var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
    var reIsBinary = /^0b[01]+$/i;
    var reIsOctal = /^0o[0-7]+$/i;
    var freeParseInt = parseInt;
    function toNumber(value) {
      if (typeof value == "number") {
        return value;
      }
      if (isSymbol(value)) {
        return NAN;
      }
      if (isObject$2(value)) {
        var other = typeof value.valueOf == "function" ? value.valueOf() : value;
        value = isObject$2(other) ? other + "" : other;
      }
      if (typeof value != "string") {
        return value === 0 ? value : +value;
      }
      value = baseTrim(value);
      var isBinary = reIsBinary.test(value);
      return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
    }
    var INFINITY$1 = 1 / 0, MAX_INTEGER = 17976931348623157e292;
    function toFinite(value) {
      if (!value) {
        return value === 0 ? value : 0;
      }
      value = toNumber(value);
      if (value === INFINITY$1 || value === -INFINITY$1) {
        var sign = value < 0 ? -1 : 1;
        return sign * MAX_INTEGER;
      }
      return value === value ? value : 0;
    }
    function toInteger(value) {
      var result = toFinite(value), remainder = result % 1;
      return result === result ? remainder ? result - remainder : result : 0;
    }
    function identity(value) {
      return value;
    }
    var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
    function isFunction$1(value) {
      if (!isObject$2(value)) {
        return false;
      }
      var tag = baseGetTag(value);
      return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
    }
    var coreJsData = root["__core-js_shared__"];
    var maskSrcKey = function() {
      var uid2 = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
      return uid2 ? "Symbol(src)_1." + uid2 : "";
    }();
    function isMasked(func) {
      return !!maskSrcKey && maskSrcKey in func;
    }
    var funcProto$2 = Function.prototype;
    var funcToString$2 = funcProto$2.toString;
    function toSource(func) {
      if (func != null) {
        try {
          return funcToString$2.call(func);
        } catch (e2) {
        }
        try {
          return func + "";
        } catch (e2) {
        }
      }
      return "";
    }
    var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
    var reIsHostCtor = /^\[object .+?Constructor\]$/;
    var funcProto$1 = Function.prototype, objectProto$e = Object.prototype;
    var funcToString$1 = funcProto$1.toString;
    var hasOwnProperty$d = objectProto$e.hasOwnProperty;
    var reIsNative = RegExp(
      "^" + funcToString$1.call(hasOwnProperty$d).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
    );
    function baseIsNative(value) {
      if (!isObject$2(value) || isMasked(value)) {
        return false;
      }
      var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
      return pattern.test(toSource(value));
    }
    function getValue$3(object, key2) {
      return object == null ? void 0 : object[key2];
    }
    function getNative(object, key2) {
      var value = getValue$3(object, key2);
      return baseIsNative(value) ? value : void 0;
    }
    var WeakMap$1 = getNative(root, "WeakMap");
    var objectCreate = Object.create;
    var baseCreate = /* @__PURE__ */ function() {
      function object() {
      }
      return function(proto) {
        if (!isObject$2(proto)) {
          return {};
        }
        if (objectCreate) {
          return objectCreate(proto);
        }
        object.prototype = proto;
        var result = new object();
        object.prototype = void 0;
        return result;
      };
    }();
    function apply(func, thisArg, args) {
      switch (args.length) {
        case 0:
          return func.call(thisArg);
        case 1:
          return func.call(thisArg, args[0]);
        case 2:
          return func.call(thisArg, args[0], args[1]);
        case 3:
          return func.call(thisArg, args[0], args[1], args[2]);
      }
      return func.apply(thisArg, args);
    }
    function copyArray(source, array) {
      var index2 = -1, length2 = source.length;
      array || (array = Array(length2));
      while (++index2 < length2) {
        array[index2] = source[index2];
      }
      return array;
    }
    var HOT_COUNT = 800, HOT_SPAN = 16;
    var nativeNow = Date.now;
    function shortOut(func) {
      var count = 0, lastCalled = 0;
      return function() {
        var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
        lastCalled = stamp;
        if (remaining > 0) {
          if (++count >= HOT_COUNT) {
            return arguments[0];
          }
        } else {
          count = 0;
        }
        return func.apply(void 0, arguments);
      };
    }
    function constant(value) {
      return function() {
        return value;
      };
    }
    var defineProperty = function() {
      try {
        var func = getNative(Object, "defineProperty");
        func({}, "", {});
        return func;
      } catch (e2) {
      }
    }();
    var baseSetToString = !defineProperty ? identity : function(func, string2) {
      return defineProperty(func, "toString", {
        "configurable": true,
        "enumerable": false,
        "value": constant(string2),
        "writable": true
      });
    };
    var setToString = shortOut(baseSetToString);
    function arrayEach(array, iteratee) {
      var index2 = -1, length2 = array == null ? 0 : array.length;
      while (++index2 < length2) {
        if (iteratee(array[index2], index2, array) === false) {
          break;
        }
      }
      return array;
    }
    function baseFindIndex(array, predicate, fromIndex, fromRight) {
      var length2 = array.length, index2 = fromIndex + -1;
      while (++index2 < length2) {
        if (predicate(array[index2], index2, array)) {
          return index2;
        }
      }
      return -1;
    }
    function baseIsNaN(value) {
      return value !== value;
    }
    function strictIndexOf(array, value, fromIndex) {
      var index2 = fromIndex - 1, length2 = array.length;
      while (++index2 < length2) {
        if (array[index2] === value) {
          return index2;
        }
      }
      return -1;
    }
    function baseIndexOf(array, value, fromIndex) {
      return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
    }
    function arrayIncludes(array, value) {
      var length2 = array == null ? 0 : array.length;
      return !!length2 && baseIndexOf(array, value, 0) > -1;
    }
    var MAX_SAFE_INTEGER$1 = 9007199254740991;
    var reIsUint = /^(?:0|[1-9]\d*)$/;
    function isIndex(value, length2) {
      var type = typeof value;
      length2 = length2 == null ? MAX_SAFE_INTEGER$1 : length2;
      return !!length2 && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length2);
    }
    function baseAssignValue(object, key2, value) {
      if (key2 == "__proto__" && defineProperty) {
        defineProperty(object, key2, {
          "configurable": true,
          "enumerable": true,
          "value": value,
          "writable": true
        });
      } else {
        object[key2] = value;
      }
    }
    function eq(value, other) {
      return value === other || value !== value && other !== other;
    }
    var objectProto$d = Object.prototype;
    var hasOwnProperty$c = objectProto$d.hasOwnProperty;
    function assignValue(object, key2, value) {
      var objValue = object[key2];
      if (!(hasOwnProperty$c.call(object, key2) && eq(objValue, value)) || value === void 0 && !(key2 in object)) {
        baseAssignValue(object, key2, value);
      }
    }
    function copyObject(source, props2, object, customizer) {
      var isNew = !object;
      object || (object = {});
      var index2 = -1, length2 = props2.length;
      while (++index2 < length2) {
        var key2 = props2[index2];
        var newValue = void 0;
        if (newValue === void 0) {
          newValue = source[key2];
        }
        if (isNew) {
          baseAssignValue(object, key2, newValue);
        } else {
          assignValue(object, key2, newValue);
        }
      }
      return object;
    }
    var nativeMax$2 = Math.max;
    function overRest(func, start, transform) {
      start = nativeMax$2(start === void 0 ? func.length - 1 : start, 0);
      return function() {
        var args = arguments, index2 = -1, length2 = nativeMax$2(args.length - start, 0), array = Array(length2);
        while (++index2 < length2) {
          array[index2] = args[start + index2];
        }
        index2 = -1;
        var otherArgs = Array(start + 1);
        while (++index2 < start) {
          otherArgs[index2] = args[index2];
        }
        otherArgs[start] = transform(array);
        return apply(func, this, otherArgs);
      };
    }
    function baseRest(func, start) {
      return setToString(overRest(func, start, identity), func + "");
    }
    var MAX_SAFE_INTEGER = 9007199254740991;
    function isLength(value) {
      return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
    }
    function isArrayLike(value) {
      return value != null && isLength(value.length) && !isFunction$1(value);
    }
    var objectProto$c = Object.prototype;
    function isPrototype(value) {
      var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$c;
      return value === proto;
    }
    function baseTimes(n2, iteratee) {
      var index2 = -1, result = Array(n2);
      while (++index2 < n2) {
        result[index2] = iteratee(index2);
      }
      return result;
    }
    var argsTag$3 = "[object Arguments]";
    function baseIsArguments(value) {
      return isObjectLike(value) && baseGetTag(value) == argsTag$3;
    }
    var objectProto$b = Object.prototype;
    var hasOwnProperty$b = objectProto$b.hasOwnProperty;
    var propertyIsEnumerable$1 = objectProto$b.propertyIsEnumerable;
    var isArguments = baseIsArguments(/* @__PURE__ */ function() {
      return arguments;
    }()) ? baseIsArguments : function(value) {
      return isObjectLike(value) && hasOwnProperty$b.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
    };
    function stubFalse() {
      return false;
    }
    var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
    var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
    var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
    var Buffer$1 = moduleExports$2 ? root.Buffer : void 0;
    var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
    var isBuffer = nativeIsBuffer || stubFalse;
    var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$6 = "[object Map]", numberTag$3 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$6 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
    var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
    var typedArrayTags = {};
    typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
    typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$6] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$6] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
    function baseIsTypedArray(value) {
      return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
    }
    function baseUnary(func) {
      return function(value) {
        return func(value);
      };
    }
    var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
    var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
    var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
    var freeProcess = moduleExports$1 && freeGlobal.process;
    var nodeUtil = function() {
      try {
        var types2 = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
        if (types2) {
          return types2;
        }
        return freeProcess && freeProcess.binding && freeProcess.binding("util");
      } catch (e2) {
      }
    }();
    var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
    var objectProto$a = Object.prototype;
    var hasOwnProperty$a = objectProto$a.hasOwnProperty;
    function arrayLikeKeys(value, inherited) {
      var isArr = isArray$1(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length2 = result.length;
      for (var key2 in value) {
        if ((inherited || hasOwnProperty$a.call(value, key2)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
        (key2 == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
        isBuff && (key2 == "offset" || key2 == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
        isType && (key2 == "buffer" || key2 == "byteLength" || key2 == "byteOffset") || // Skip index properties.
        isIndex(key2, length2)))) {
          result.push(key2);
        }
      }
      return result;
    }
    function overArg(func, transform) {
      return function(arg) {
        return func(transform(arg));
      };
    }
    var nativeKeys = overArg(Object.keys, Object);
    var objectProto$9 = Object.prototype;
    var hasOwnProperty$9 = objectProto$9.hasOwnProperty;
    function baseKeys(object) {
      if (!isPrototype(object)) {
        return nativeKeys(object);
      }
      var result = [];
      for (var key2 in Object(object)) {
        if (hasOwnProperty$9.call(object, key2) && key2 != "constructor") {
          result.push(key2);
        }
      }
      return result;
    }
    function keys(object) {
      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
    }
    function nativeKeysIn(object) {
      var result = [];
      if (object != null) {
        for (var key2 in Object(object)) {
          result.push(key2);
        }
      }
      return result;
    }
    var objectProto$8 = Object.prototype;
    var hasOwnProperty$8 = objectProto$8.hasOwnProperty;
    function baseKeysIn(object) {
      if (!isObject$2(object)) {
        return nativeKeysIn(object);
      }
      var isProto = isPrototype(object), result = [];
      for (var key2 in object) {
        if (!(key2 == "constructor" && (isProto || !hasOwnProperty$8.call(object, key2)))) {
          result.push(key2);
        }
      }
      return result;
    }
    function keysIn(object) {
      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
    }
    var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
    function isKey(value, object) {
      if (isArray$1(value)) {
        return false;
      }
      var type = typeof value;
      if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
        return true;
      }
      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
    }
    var nativeCreate = getNative(Object, "create");
    function hashClear() {
      this.__data__ = nativeCreate ? nativeCreate(null) : {};
      this.size = 0;
    }
    function hashDelete(key2) {
      var result = this.has(key2) && delete this.__data__[key2];
      this.size -= result ? 1 : 0;
      return result;
    }
    var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
    var objectProto$7 = Object.prototype;
    var hasOwnProperty$7 = objectProto$7.hasOwnProperty;
    function hashGet(key2) {
      var data = this.__data__;
      if (nativeCreate) {
        var result = data[key2];
        return result === HASH_UNDEFINED$2 ? void 0 : result;
      }
      return hasOwnProperty$7.call(data, key2) ? data[key2] : void 0;
    }
    var objectProto$6 = Object.prototype;
    var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
    function hashHas(key2) {
      var data = this.__data__;
      return nativeCreate ? data[key2] !== void 0 : hasOwnProperty$6.call(data, key2);
    }
    var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
    function hashSet(key2, value) {
      var data = this.__data__;
      this.size += this.has(key2) ? 0 : 1;
      data[key2] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
      return this;
    }
    function Hash(entries) {
      var index2 = -1, length2 = entries == null ? 0 : entries.length;
      this.clear();
      while (++index2 < length2) {
        var entry = entries[index2];
        this.set(entry[0], entry[1]);
      }
    }
    Hash.prototype.clear = hashClear;
    Hash.prototype["delete"] = hashDelete;
    Hash.prototype.get = hashGet;
    Hash.prototype.has = hashHas;
    Hash.prototype.set = hashSet;
    function listCacheClear() {
      this.__data__ = [];
      this.size = 0;
    }
    function assocIndexOf(array, key2) {
      var length2 = array.length;
      while (length2--) {
        if (eq(array[length2][0], key2)) {
          return length2;
        }
      }
      return -1;
    }
    var arrayProto = Array.prototype;
    var splice = arrayProto.splice;
    function listCacheDelete(key2) {
      var data = this.__data__, index2 = assocIndexOf(data, key2);
      if (index2 < 0) {
        return false;
      }
      var lastIndex = data.length - 1;
      if (index2 == lastIndex) {
        data.pop();
      } else {
        splice.call(data, index2, 1);
      }
      --this.size;
      return true;
    }
    function listCacheGet(key2) {
      var data = this.__data__, index2 = assocIndexOf(data, key2);
      return index2 < 0 ? void 0 : data[index2][1];
    }
    function listCacheHas(key2) {
      return assocIndexOf(this.__data__, key2) > -1;
    }
    function listCacheSet(key2, value) {
      var data = this.__data__, index2 = assocIndexOf(data, key2);
      if (index2 < 0) {
        ++this.size;
        data.push([key2, value]);
      } else {
        data[index2][1] = value;
      }
      return this;
    }
    function ListCache(entries) {
      var index2 = -1, length2 = entries == null ? 0 : entries.length;
      this.clear();
      while (++index2 < length2) {
        var entry = entries[index2];
        this.set(entry[0], entry[1]);
      }
    }
    ListCache.prototype.clear = listCacheClear;
    ListCache.prototype["delete"] = listCacheDelete;
    ListCache.prototype.get = listCacheGet;
    ListCache.prototype.has = listCacheHas;
    ListCache.prototype.set = listCacheSet;
    var Map$1 = getNative(root, "Map");
    function mapCacheClear() {
      this.size = 0;
      this.__data__ = {
        "hash": new Hash(),
        "map": new (Map$1 || ListCache)(),
        "string": new Hash()
      };
    }
    function isKeyable(value) {
      var type = typeof value;
      return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
    }
    function getMapData(map, key2) {
      var data = map.__data__;
      return isKeyable(key2) ? data[typeof key2 == "string" ? "string" : "hash"] : data.map;
    }
    function mapCacheDelete(key2) {
      var result = getMapData(this, key2)["delete"](key2);
      this.size -= result ? 1 : 0;
      return result;
    }
    function mapCacheGet(key2) {
      return getMapData(this, key2).get(key2);
    }
    function mapCacheHas(key2) {
      return getMapData(this, key2).has(key2);
    }
    function mapCacheSet(key2, value) {
      var data = getMapData(this, key2), size2 = data.size;
      data.set(key2, value);
      this.size += data.size == size2 ? 0 : 1;
      return this;
    }
    function MapCache(entries) {
      var index2 = -1, length2 = entries == null ? 0 : entries.length;
      this.clear();
      while (++index2 < length2) {
        var entry = entries[index2];
        this.set(entry[0], entry[1]);
      }
    }
    MapCache.prototype.clear = mapCacheClear;
    MapCache.prototype["delete"] = mapCacheDelete;
    MapCache.prototype.get = mapCacheGet;
    MapCache.prototype.has = mapCacheHas;
    MapCache.prototype.set = mapCacheSet;
    var FUNC_ERROR_TEXT$1 = "Expected a function";
    function memoize(func, resolver) {
      if (typeof func != "function" || resolver != null && typeof resolver != "function") {
        throw new TypeError(FUNC_ERROR_TEXT$1);
      }
      var memoized = function() {
        var args = arguments, key2 = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
        if (cache.has(key2)) {
          return cache.get(key2);
        }
        var result = func.apply(this, args);
        memoized.cache = cache.set(key2, result) || cache;
        return result;
      };
      memoized.cache = new (memoize.Cache || MapCache)();
      return memoized;
    }
    memoize.Cache = MapCache;
    var MAX_MEMOIZE_SIZE = 500;
    function memoizeCapped(func) {
      var result = memoize(func, function(key2) {
        if (cache.size === MAX_MEMOIZE_SIZE) {
          cache.clear();
        }
        return key2;
      });
      var cache = result.cache;
      return result;
    }
    var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
    var reEscapeChar = /\\(\\)?/g;
    var stringToPath = memoizeCapped(function(string2) {
      var result = [];
      if (string2.charCodeAt(0) === 46) {
        result.push("");
      }
      string2.replace(rePropName, function(match2, number, quote, subString) {
        result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match2);
      });
      return result;
    });
    function toString(value) {
      return value == null ? "" : baseToString(value);
    }
    function castPath(value, object) {
      if (isArray$1(value)) {
        return value;
      }
      return isKey(value, object) ? [value] : stringToPath(toString(value));
    }
    var INFINITY = 1 / 0;
    function toKey(value) {
      if (typeof value == "string" || isSymbol(value)) {
        return value;
      }
      var result = value + "";
      return result == "0" && 1 / value == -INFINITY ? "-0" : result;
    }
    function baseGet(object, path) {
      path = castPath(path, object);
      var index2 = 0, length2 = path.length;
      while (object != null && index2 < length2) {
        object = object[toKey(path[index2++])];
      }
      return index2 && index2 == length2 ? object : void 0;
    }
    function get$1(object, path, defaultValue) {
      var result = object == null ? void 0 : baseGet(object, path);
      return result === void 0 ? defaultValue : result;
    }
    function arrayPush(array, values) {
      var index2 = -1, length2 = values.length, offset = array.length;
      while (++index2 < length2) {
        array[offset + index2] = values[index2];
      }
      return array;
    }
    var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
    function isFlattenable(value) {
      return isArray$1(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
    }
    function baseFlatten(array, depth, predicate, isStrict, result) {
      var index2 = -1, length2 = array.length;
      predicate || (predicate = isFlattenable);
      result || (result = []);
      while (++index2 < length2) {
        var value = array[index2];
        if (predicate(value)) {
          {
            arrayPush(result, value);
          }
        } else {
          result[result.length] = value;
        }
      }
      return result;
    }
    function flatten(array) {
      var length2 = array == null ? 0 : array.length;
      return length2 ? baseFlatten(array) : [];
    }
    function flatRest(func) {
      return setToString(overRest(func, void 0, flatten), func + "");
    }
    var getPrototype = overArg(Object.getPrototypeOf, Object);
    var objectTag$3 = "[object Object]";
    var funcProto = Function.prototype, objectProto$5 = Object.prototype;
    var funcToString = funcProto.toString;
    var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
    var objectCtorString = funcToString.call(Object);
    function isPlainObject(value) {
      if (!isObjectLike(value) || baseGetTag(value) != objectTag$3) {
        return false;
      }
      var proto = getPrototype(value);
      if (proto === null) {
        return true;
      }
      var Ctor = hasOwnProperty$5.call(proto, "constructor") && proto.constructor;
      return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
    }
    function baseSlice(array, start, end) {
      var index2 = -1, length2 = array.length;
      if (start < 0) {
        start = -start > length2 ? 0 : length2 + start;
      }
      end = end > length2 ? length2 : end;
      if (end < 0) {
        end += length2;
      }
      length2 = start > end ? 0 : end - start >>> 0;
      start >>>= 0;
      var result = Array(length2);
      while (++index2 < length2) {
        result[index2] = array[index2 + start];
      }
      return result;
    }
    function castArray() {
      if (!arguments.length) {
        return [];
      }
      var value = arguments[0];
      return isArray$1(value) ? value : [value];
    }
    function stackClear() {
      this.__data__ = new ListCache();
      this.size = 0;
    }
    function stackDelete(key2) {
      var data = this.__data__, result = data["delete"](key2);
      this.size = data.size;
      return result;
    }
    function stackGet(key2) {
      return this.__data__.get(key2);
    }
    function stackHas(key2) {
      return this.__data__.has(key2);
    }
    var LARGE_ARRAY_SIZE = 200;
    function stackSet(key2, value) {
      var data = this.__data__;
      if (data instanceof ListCache) {
        var pairs = data.__data__;
        if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {
          pairs.push([key2, value]);
          this.size = ++data.size;
          return this;
        }
        data = this.__data__ = new MapCache(pairs);
      }
      data.set(key2, value);
      this.size = data.size;
      return this;
    }
    function Stack(entries) {
      var data = this.__data__ = new ListCache(entries);
      this.size = data.size;
    }
    Stack.prototype.clear = stackClear;
    Stack.prototype["delete"] = stackDelete;
    Stack.prototype.get = stackGet;
    Stack.prototype.has = stackHas;
    Stack.prototype.set = stackSet;
    function baseAssign(object, source) {
      return object && copyObject(source, keys(source), object);
    }
    function baseAssignIn(object, source) {
      return object && copyObject(source, keysIn(source), object);
    }
    var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
    var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
    var moduleExports = freeModule && freeModule.exports === freeExports;
    var Buffer2 = moduleExports ? root.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
    function cloneBuffer(buffer, isDeep) {
      if (isDeep) {
        return buffer.slice();
      }
      var length2 = buffer.length, result = allocUnsafe ? allocUnsafe(length2) : new buffer.constructor(length2);
      buffer.copy(result);
      return result;
    }
    function arrayFilter(array, predicate) {
      var index2 = -1, length2 = array == null ? 0 : array.length, resIndex = 0, result = [];
      while (++index2 < length2) {
        var value = array[index2];
        if (predicate(value, index2, array)) {
          result[resIndex++] = value;
        }
      }
      return result;
    }
    function stubArray() {
      return [];
    }
    var objectProto$4 = Object.prototype;
    var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
    var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
    var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
      if (object == null) {
        return [];
      }
      object = Object(object);
      return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
        return propertyIsEnumerable.call(object, symbol);
      });
    };
    function copySymbols(source, object) {
      return copyObject(source, getSymbols(source), object);
    }
    var nativeGetSymbols = Object.getOwnPropertySymbols;
    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
      var result = [];
      while (object) {
        arrayPush(result, getSymbols(object));
        object = getPrototype(object);
      }
      return result;
    };
    function copySymbolsIn(source, object) {
      return copyObject(source, getSymbolsIn(source), object);
    }
    function baseGetAllKeys(object, keysFunc, symbolsFunc) {
      var result = keysFunc(object);
      return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
    }
    function getAllKeys(object) {
      return baseGetAllKeys(object, keys, getSymbols);
    }
    function getAllKeysIn(object) {
      return baseGetAllKeys(object, keysIn, getSymbolsIn);
    }
    var DataView = getNative(root, "DataView");
    var Promise$1 = getNative(root, "Promise");
    var Set$1 = getNative(root, "Set");
    var mapTag$5 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$5 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
    var dataViewTag$3 = "[object DataView]";
    var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
    var getTag = baseGetTag;
    if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$5 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$5 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) {
      getTag = function(value) {
        var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
        if (ctorString) {
          switch (ctorString) {
            case dataViewCtorString:
              return dataViewTag$3;
            case mapCtorString:
              return mapTag$5;
            case promiseCtorString:
              return promiseTag;
            case setCtorString:
              return setTag$5;
            case weakMapCtorString:
              return weakMapTag$1;
          }
        }
        return result;
      };
    }
    var objectProto$3 = Object.prototype;
    var hasOwnProperty$4 = objectProto$3.hasOwnProperty;
    function initCloneArray(array) {
      var length2 = array.length, result = new array.constructor(length2);
      if (length2 && typeof array[0] == "string" && hasOwnProperty$4.call(array, "index")) {
        result.index = array.index;
        result.input = array.input;
      }
      return result;
    }
    var Uint8Array2 = root.Uint8Array;
    function cloneArrayBuffer(arrayBuffer) {
      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
      new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
      return result;
    }
    function cloneDataView(dataView, isDeep) {
      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
    }
    var reFlags = /\w*$/;
    function cloneRegExp(regexp) {
      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
      result.lastIndex = regexp.lastIndex;
      return result;
    }
    var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
    function cloneSymbol(symbol) {
      return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
    }
    function cloneTypedArray(typedArray, isDeep) {
      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
    }
    var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$4 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$4 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]";
    var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
    function initCloneByTag(object, tag, isDeep) {
      var Ctor = object.constructor;
      switch (tag) {
        case arrayBufferTag$2:
          return cloneArrayBuffer(object);
        case boolTag$2:
        case dateTag$2:
          return new Ctor(+object);
        case dataViewTag$2:
          return cloneDataView(object, isDeep);
        case float32Tag$1:
        case float64Tag$1:
        case int8Tag$1:
        case int16Tag$1:
        case int32Tag$1:
        case uint8Tag$1:
        case uint8ClampedTag$1:
        case uint16Tag$1:
        case uint32Tag$1:
          return cloneTypedArray(object, isDeep);
        case mapTag$4:
          return new Ctor();
        case numberTag$2:
        case stringTag$2:
          return new Ctor(object);
        case regexpTag$2:
          return cloneRegExp(object);
        case setTag$4:
          return new Ctor();
        case symbolTag$2:
          return cloneSymbol(object);
      }
    }
    function initCloneObject(object) {
      return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
    }
    var mapTag$3 = "[object Map]";
    function baseIsMap(value) {
      return isObjectLike(value) && getTag(value) == mapTag$3;
    }
    var nodeIsMap = nodeUtil && nodeUtil.isMap;
    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
    var setTag$3 = "[object Set]";
    function baseIsSet(value) {
      return isObjectLike(value) && getTag(value) == setTag$3;
    }
    var nodeIsSet = nodeUtil && nodeUtil.isSet;
    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
    var CLONE_DEEP_FLAG$2 = 1, CLONE_FLAT_FLAG$1 = 2, CLONE_SYMBOLS_FLAG$2 = 4;
    var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
    var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
    var cloneableTags = {};
    cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$2] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$2] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
    cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
    function baseClone(value, bitmask, customizer, key2, object, stack2) {
      var result, isDeep = bitmask & CLONE_DEEP_FLAG$2, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$2;
      if (customizer) {
        result = object ? customizer(value, key2, object, stack2) : customizer(value);
      }
      if (result !== void 0) {
        return result;
      }
      if (!isObject$2(value)) {
        return value;
      }
      var isArr = isArray$1(value);
      if (isArr) {
        result = initCloneArray(value);
        if (!isDeep) {
          return copyArray(value, result);
        }
      } else {
        var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
        if (isBuffer(value)) {
          return cloneBuffer(value, isDeep);
        }
        if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
          result = isFlat || isFunc ? {} : initCloneObject(value);
          if (!isDeep) {
            return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
          }
        } else {
          if (!cloneableTags[tag]) {
            return object ? value : {};
          }
          result = initCloneByTag(value, tag, isDeep);
        }
      }
      stack2 || (stack2 = new Stack());
      var stacked = stack2.get(value);
      if (stacked) {
        return stacked;
      }
      stack2.set(value, result);
      if (isSet(value)) {
        value.forEach(function(subValue) {
          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack2));
        });
      } else if (isMap(value)) {
        value.forEach(function(subValue, key3) {
          result.set(key3, baseClone(subValue, bitmask, customizer, key3, value, stack2));
        });
      }
      var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
      var props2 = isArr ? void 0 : keysFunc(value);
      arrayEach(props2 || value, function(subValue, key3) {
        if (props2) {
          key3 = subValue;
          subValue = value[key3];
        }
        assignValue(result, key3, baseClone(subValue, bitmask, customizer, key3, value, stack2));
      });
      return result;
    }
    var CLONE_DEEP_FLAG$1 = 1, CLONE_SYMBOLS_FLAG$1 = 4;
    function cloneDeep(value) {
      return baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);
    }
    var HASH_UNDEFINED = "__lodash_hash_undefined__";
    function setCacheAdd(value) {
      this.__data__.set(value, HASH_UNDEFINED);
      return this;
    }
    function setCacheHas(value) {
      return this.__data__.has(value);
    }
    function SetCache(values) {
      var index2 = -1, length2 = values == null ? 0 : values.length;
      this.__data__ = new MapCache();
      while (++index2 < length2) {
        this.add(values[index2]);
      }
    }
    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
    SetCache.prototype.has = setCacheHas;
    function arraySome(array, predicate) {
      var index2 = -1, length2 = array == null ? 0 : array.length;
      while (++index2 < length2) {
        if (predicate(array[index2], index2, array)) {
          return true;
        }
      }
      return false;
    }
    function cacheHas(cache, key2) {
      return cache.has(key2);
    }
    var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
    function equalArrays(array, other, bitmask, customizer, equalFunc, stack2) {
      var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
        return false;
      }
      var arrStacked = stack2.get(array);
      var othStacked = stack2.get(other);
      if (arrStacked && othStacked) {
        return arrStacked == other && othStacked == array;
      }
      var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
      stack2.set(array, other);
      stack2.set(other, array);
      while (++index2 < arrLength) {
        var arrValue = array[index2], othValue = other[index2];
        if (customizer) {
          var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack2) : customizer(arrValue, othValue, index2, array, other, stack2);
        }
        if (compared !== void 0) {
          if (compared) {
            continue;
          }
          result = false;
          break;
        }
        if (seen) {
          if (!arraySome(other, function(othValue2, othIndex) {
            if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack2))) {
              return seen.push(othIndex);
            }
          })) {
            result = false;
            break;
          }
        } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack2))) {
          result = false;
          break;
        }
      }
      stack2["delete"](array);
      stack2["delete"](other);
      return result;
    }
    function mapToArray(map) {
      var index2 = -1, result = Array(map.size);
      map.forEach(function(value, key2) {
        result[++index2] = [key2, value];
      });
      return result;
    }
    function setToArray(set2) {
      var index2 = -1, result = Array(set2.size);
      set2.forEach(function(value) {
        result[++index2] = value;
      });
      return result;
    }
    var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
    var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag$1 = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
    var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
    var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack2) {
      switch (tag) {
        case dataViewTag:
          if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
            return false;
          }
          object = object.buffer;
          other = other.buffer;
        case arrayBufferTag:
          if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
            return false;
          }
          return true;
        case boolTag:
        case dateTag:
        case numberTag:
          return eq(+object, +other);
        case errorTag:
          return object.name == other.name && object.message == other.message;
        case regexpTag:
        case stringTag:
          return object == other + "";
        case mapTag$1:
          var convert = mapToArray;
        case setTag$1:
          var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
          convert || (convert = setToArray);
          if (object.size != other.size && !isPartial) {
            return false;
          }
          var stacked = stack2.get(object);
          if (stacked) {
            return stacked == other;
          }
          bitmask |= COMPARE_UNORDERED_FLAG$2;
          stack2.set(object, other);
          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack2);
          stack2["delete"](object);
          return result;
        case symbolTag:
          if (symbolValueOf) {
            return symbolValueOf.call(object) == symbolValueOf.call(other);
          }
      }
      return false;
    }
    var COMPARE_PARTIAL_FLAG$3 = 1;
    var objectProto$2 = Object.prototype;
    var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
    function equalObjects(object, other, bitmask, customizer, equalFunc, stack2) {
      var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
      if (objLength != othLength && !isPartial) {
        return false;
      }
      var index2 = objLength;
      while (index2--) {
        var key2 = objProps[index2];
        if (!(isPartial ? key2 in other : hasOwnProperty$3.call(other, key2))) {
          return false;
        }
      }
      var objStacked = stack2.get(object);
      var othStacked = stack2.get(other);
      if (objStacked && othStacked) {
        return objStacked == other && othStacked == object;
      }
      var result = true;
      stack2.set(object, other);
      stack2.set(other, object);
      var skipCtor = isPartial;
      while (++index2 < objLength) {
        key2 = objProps[index2];
        var objValue = object[key2], othValue = other[key2];
        if (customizer) {
          var compared = isPartial ? customizer(othValue, objValue, key2, other, object, stack2) : customizer(objValue, othValue, key2, object, other, stack2);
        }
        if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack2) : compared)) {
          result = false;
          break;
        }
        skipCtor || (skipCtor = key2 == "constructor");
      }
      if (result && !skipCtor) {
        var objCtor = object.constructor, othCtor = other.constructor;
        if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
          result = false;
        }
      }
      stack2["delete"](object);
      stack2["delete"](other);
      return result;
    }
    var COMPARE_PARTIAL_FLAG$2 = 1;
    var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
    var objectProto$1 = Object.prototype;
    var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack2) {
      var objIsArr = isArray$1(object), othIsArr = isArray$1(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
      objTag = objTag == argsTag ? objectTag : objTag;
      othTag = othTag == argsTag ? objectTag : othTag;
      var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
      if (isSameTag && isBuffer(object)) {
        if (!isBuffer(other)) {
          return false;
        }
        objIsArr = true;
        objIsObj = false;
      }
      if (isSameTag && !objIsObj) {
        stack2 || (stack2 = new Stack());
        return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack2) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack2);
      }
      if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
        var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$2.call(other, "__wrapped__");
        if (objIsWrapped || othIsWrapped) {
          var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
          stack2 || (stack2 = new Stack());
          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack2);
        }
      }
      if (!isSameTag) {
        return false;
      }
      stack2 || (stack2 = new Stack());
      return equalObjects(object, other, bitmask, customizer, equalFunc, stack2);
    }
    function baseIsEqual(value, other, bitmask, customizer, stack2) {
      if (value === other) {
        return true;
      }
      if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
        return value !== value && other !== other;
      }
      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack2);
    }
    var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
    function baseIsMatch(object, source, matchData, customizer) {
      var index2 = matchData.length, length2 = index2;
      if (object == null) {
        return !length2;
      }
      object = Object(object);
      while (index2--) {
        var data = matchData[index2];
        if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
          return false;
        }
      }
      while (++index2 < length2) {
        data = matchData[index2];
        var key2 = data[0], objValue = object[key2], srcValue = data[1];
        if (data[2]) {
          if (objValue === void 0 && !(key2 in object)) {
            return false;
          }
        } else {
          var stack2 = new Stack();
          var result;
          if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack2) : result)) {
            return false;
          }
        }
      }
      return true;
    }
    function isStrictComparable(value) {
      return value === value && !isObject$2(value);
    }
    function getMatchData(object) {
      var result = keys(object), length2 = result.length;
      while (length2--) {
        var key2 = result[length2], value = object[key2];
        result[length2] = [key2, value, isStrictComparable(value)];
      }
      return result;
    }
    function matchesStrictComparable(key2, srcValue) {
      return function(object) {
        if (object == null) {
          return false;
        }
        return object[key2] === srcValue && (srcValue !== void 0 || key2 in Object(object));
      };
    }
    function baseMatches(source) {
      var matchData = getMatchData(source);
      if (matchData.length == 1 && matchData[0][2]) {
        return matchesStrictComparable(matchData[0][0], matchData[0][1]);
      }
      return function(object) {
        return object === source || baseIsMatch(object, source, matchData);
      };
    }
    function baseHasIn(object, key2) {
      return object != null && key2 in Object(object);
    }
    function hasPath(object, path, hasFunc) {
      path = castPath(path, object);
      var index2 = -1, length2 = path.length, result = false;
      while (++index2 < length2) {
        var key2 = toKey(path[index2]);
        if (!(result = object != null && hasFunc(object, key2))) {
          break;
        }
        object = object[key2];
      }
      if (result || ++index2 != length2) {
        return result;
      }
      length2 = object == null ? 0 : object.length;
      return !!length2 && isLength(length2) && isIndex(key2, length2) && (isArray$1(object) || isArguments(object));
    }
    function hasIn(object, path) {
      return object != null && hasPath(object, path, baseHasIn);
    }
    var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
    function baseMatchesProperty(path, srcValue) {
      if (isKey(path) && isStrictComparable(srcValue)) {
        return matchesStrictComparable(toKey(path), srcValue);
      }
      return function(object) {
        var objValue = get$1(object, path);
        return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
      };
    }
    function baseProperty(key2) {
      return function(object) {
        return object == null ? void 0 : object[key2];
      };
    }
    function basePropertyDeep(path) {
      return function(object) {
        return baseGet(object, path);
      };
    }
    function property(path) {
      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
    }
    function baseIteratee(value) {
      if (typeof value == "function") {
        return value;
      }
      if (value == null) {
        return identity;
      }
      if (typeof value == "object") {
        return isArray$1(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
      }
      return property(value);
    }
    var now$2 = function() {
      return root.Date.now();
    };
    var FUNC_ERROR_TEXT = "Expected a function";
    var nativeMax$1 = Math.max, nativeMin$1 = Math.min;
    function debounce(func, wait, options) {
      var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
      if (typeof func != "function") {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      wait = toNumber(wait) || 0;
      if (isObject$2(options)) {
        leading = !!options.leading;
        maxing = "maxWait" in options;
        maxWait = maxing ? nativeMax$1(toNumber(options.maxWait) || 0, wait) : maxWait;
        trailing = "trailing" in options ? !!options.trailing : trailing;
      }
      function invokeFunc(time) {
        var args = lastArgs, thisArg = lastThis;
        lastArgs = lastThis = void 0;
        lastInvokeTime = time;
        result = func.apply(thisArg, args);
        return result;
      }
      function leadingEdge(time) {
        lastInvokeTime = time;
        timerId = setTimeout(timerExpired, wait);
        return leading ? invokeFunc(time) : result;
      }
      function remainingWait(time) {
        var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
        return maxing ? nativeMin$1(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
      }
      function shouldInvoke(time) {
        var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
        return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
      }
      function timerExpired() {
        var time = now$2();
        if (shouldInvoke(time)) {
          return trailingEdge(time);
        }
        timerId = setTimeout(timerExpired, remainingWait(time));
      }
      function trailingEdge(time) {
        timerId = void 0;
        if (trailing && lastArgs) {
          return invokeFunc(time);
        }
        lastArgs = lastThis = void 0;
        return result;
      }
      function cancel() {
        if (timerId !== void 0) {
          clearTimeout(timerId);
        }
        lastInvokeTime = 0;
        lastArgs = lastCallTime = lastThis = timerId = void 0;
      }
      function flush() {
        return timerId === void 0 ? result : trailingEdge(now$2());
      }
      function debounced() {
        var time = now$2(), isInvoking = shouldInvoke(time);
        lastArgs = arguments;
        lastThis = this;
        lastCallTime = time;
        if (isInvoking) {
          if (timerId === void 0) {
            return leadingEdge(lastCallTime);
          }
          if (maxing) {
            clearTimeout(timerId);
            timerId = setTimeout(timerExpired, wait);
            return invokeFunc(lastCallTime);
          }
        }
        if (timerId === void 0) {
          timerId = setTimeout(timerExpired, wait);
        }
        return result;
      }
      debounced.cancel = cancel;
      debounced.flush = flush;
      return debounced;
    }
    function isArrayLikeObject(value) {
      return isObjectLike(value) && isArrayLike(value);
    }
    function last(array) {
      var length2 = array == null ? 0 : array.length;
      return length2 ? array[length2 - 1] : void 0;
    }
    function createFind(findIndexFunc) {
      return function(collection, predicate, fromIndex) {
        var iterable = Object(collection);
        if (!isArrayLike(collection)) {
          var iteratee = baseIteratee(predicate);
          collection = keys(collection);
          predicate = function(key2) {
            return iteratee(iterable[key2], key2, iterable);
          };
        }
        var index2 = findIndexFunc(collection, predicate, fromIndex);
        return index2 > -1 ? iterable[iteratee ? collection[index2] : index2] : void 0;
      };
    }
    var nativeMax = Math.max;
    function findIndex(array, predicate, fromIndex) {
      var length2 = array == null ? 0 : array.length;
      if (!length2) {
        return -1;
      }
      var index2 = fromIndex == null ? 0 : toInteger(fromIndex);
      if (index2 < 0) {
        index2 = nativeMax(length2 + index2, 0);
      }
      return baseFindIndex(array, baseIteratee(predicate), index2);
    }
    var find = createFind(findIndex);
    var nativeMin = Math.min;
    function baseIntersection(arrays, iteratee, comparator2) {
      var includes2 = arrayIncludes, length2 = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = [];
      while (othIndex--) {
        var array = arrays[othIndex];
        if (othIndex && iteratee) {
          array = arrayMap(array, baseUnary(iteratee));
        }
        maxLength = nativeMin(array.length, maxLength);
        caches[othIndex] = length2 >= 120 && array.length >= 120 ? new SetCache(othIndex && array) : void 0;
      }
      array = arrays[0];
      var index2 = -1, seen = caches[0];
      outer:
        while (++index2 < length2 && result.length < maxLength) {
          var value = array[index2], computed2 = value;
          value = value !== 0 ? value : 0;
          if (!(seen ? cacheHas(seen, computed2) : includes2(result, computed2))) {
            othIndex = othLength;
            while (--othIndex) {
              var cache = caches[othIndex];
              if (!(cache ? cacheHas(cache, computed2) : includes2(arrays[othIndex], computed2))) {
                continue outer;
              }
            }
            if (seen) {
              seen.push(computed2);
            }
            result.push(value);
          }
        }
      return result;
    }
    function castArrayLikeObject(value) {
      return isArrayLikeObject(value) ? value : [];
    }
    var intersection = baseRest(function(arrays) {
      var mapped = arrayMap(arrays, castArrayLikeObject);
      return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
    });
    function parent(object, path) {
      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
    }
    var mapTag = "[object Map]", setTag = "[object Set]";
    var objectProto = Object.prototype;
    var hasOwnProperty$1 = objectProto.hasOwnProperty;
    function isEmpty(value) {
      if (value == null) {
        return true;
      }
      if (isArrayLike(value) && (isArray$1(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
        return !value.length;
      }
      var tag = getTag(value);
      if (tag == mapTag || tag == setTag) {
        return !value.size;
      }
      if (isPrototype(value)) {
        return !baseKeys(value).length;
      }
      for (var key2 in value) {
        if (hasOwnProperty$1.call(value, key2)) {
          return false;
        }
      }
      return true;
    }
    function isEqual(value, other) {
      return baseIsEqual(value, other);
    }
    function baseUnset(object, path) {
      path = castPath(path, object);
      object = parent(object, path);
      return object == null || delete object[toKey(last(path))];
    }
    function customOmitClone(value) {
      return isPlainObject(value) ? void 0 : value;
    }
    var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
    var omit$1 = flatRest(function(object, paths) {
      var result = {};
      if (object == null) {
        return result;
      }
      var isDeep = false;
      paths = arrayMap(paths, function(path) {
        path = castPath(path, object);
        isDeep || (isDeep = path.length > 1);
        return path;
      });
      copyObject(object, getAllKeysIn(object), result);
      if (isDeep) {
        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
      }
      var length2 = paths.length;
      while (length2--) {
        baseUnset(result, paths[length2]);
      }
      return result;
    });
    function _typeof$1(o2) {
      "@babel/helpers - typeof";
      return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) {
        return typeof o3;
      } : function(o3) {
        return o3 && "function" == typeof Symbol && o3.constructor === Symbol && o3 !== Symbol.prototype ? "symbol" : typeof o3;
      }, _typeof$1(o2);
    }
    function toPrimitive(t2, r2) {
      if ("object" != _typeof$1(t2) || !t2) return t2;
      var e2 = t2[Symbol.toPrimitive];
      if (void 0 !== e2) {
        var i2 = e2.call(t2, r2 || "default");
        if ("object" != _typeof$1(i2)) return i2;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return ("string" === r2 ? String : Number)(t2);
    }
    function toPropertyKey(t2) {
      var i2 = toPrimitive(t2, "string");
      return "symbol" == _typeof$1(i2) ? i2 : i2 + "";
    }
    function _defineProperty$o(e2, r2, t2) {
      return (r2 = toPropertyKey(r2)) in e2 ? Object.defineProperty(e2, r2, {
        value: t2,
        enumerable: true,
        configurable: true,
        writable: true
      }) : e2[r2] = t2, e2;
    }
    function ownKeys$1(e2, r2) {
      var t2 = Object.keys(e2);
      if (Object.getOwnPropertySymbols) {
        var o2 = Object.getOwnPropertySymbols(e2);
        r2 && (o2 = o2.filter(function(r3) {
          return Object.getOwnPropertyDescriptor(e2, r3).enumerable;
        })), t2.push.apply(t2, o2);
      }
      return t2;
    }
    function _objectSpread2$1(e2) {
      for (var r2 = 1; r2 < arguments.length; r2++) {
        var t2 = null != arguments[r2] ? arguments[r2] : {};
        r2 % 2 ? ownKeys$1(Object(t2), true).forEach(function(r3) {
          _defineProperty$o(e2, r3, t2[r3]);
        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$1(Object(t2)).forEach(function(r3) {
          Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3));
        });
      }
      return e2;
    }
    function _extends$1() {
      return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) {
        for (var e2 = 1; e2 < arguments.length; e2++) {
          var t2 = arguments[e2];
          for (var r2 in t2) ({}).hasOwnProperty.call(t2, r2) && (n2[r2] = t2[r2]);
        }
        return n2;
      }, _extends$1.apply(null, arguments);
    }
    const isFunction = (val) => typeof val === "function";
    const isArray = Array.isArray;
    const isString = (val) => typeof val === "string";
    const isObject$1 = (val) => val !== null && typeof val === "object";
    const onRE = /^on[^a-z]/;
    const isOn = (key2) => onRE.test(key2);
    const cacheStringFunction = (fn) => {
      const cache = /* @__PURE__ */ Object.create(null);
      return (str) => {
        const hit = cache[str];
        return hit || (cache[str] = fn(str));
      };
    };
    const camelizeRE = /-(\w)/g;
    const camelize = cacheStringFunction((str) => {
      return str.replace(camelizeRE, (_2, c2) => c2 ? c2.toUpperCase() : "");
    });
    const hyphenateRE = /\B([A-Z])/g;
    const hyphenate = cacheStringFunction((str) => {
      return str.replace(hyphenateRE, "-$1").toLowerCase();
    });
    const capitalize = cacheStringFunction((str) => {
      return str.charAt(0).toUpperCase() + str.slice(1);
    });
    const hasOwnProperty = Object.prototype.hasOwnProperty;
    const hasOwn = (val, key2) => hasOwnProperty.call(val, key2);
    function resolvePropValue(options, props2, key2, value) {
      const opt = options[key2];
      if (opt != null) {
        const hasDefault = hasOwn(opt, "default");
        if (hasDefault && value === void 0) {
          const defaultValue = opt.default;
          value = opt.type !== Function && isFunction(defaultValue) ? defaultValue() : defaultValue;
        }
        if (opt.type === Boolean) {
          if (!hasOwn(props2, key2) && !hasDefault) {
            value = false;
          } else if (value === "") {
            value = true;
          }
        }
      }
      return value;
    }
    function renderHelper(v2) {
      let props2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      let defaultV = arguments.length > 2 ? arguments[2] : void 0;
      if (typeof v2 === "function") {
        return v2(props2);
      }
      return v2 !== null && v2 !== void 0 ? v2 : defaultV;
    }
    function wrapPromiseFn(openFn) {
      let closeFn;
      const closePromise = new Promise((resolve2) => {
        closeFn = openFn(() => {
          resolve2(true);
        });
      });
      const result = () => {
        closeFn === null || closeFn === void 0 ? void 0 : closeFn();
      };
      result.then = (filled, rejected) => closePromise.then(filled, rejected);
      result.promise = closePromise;
      return result;
    }
    function classNames() {
      const classes = [];
      for (let i2 = 0; i2 < arguments.length; i2++) {
        const value = i2 < 0 || arguments.length <= i2 ? void 0 : arguments[i2];
        if (!value) continue;
        if (isString(value)) {
          classes.push(value);
        } else if (isArray(value)) {
          for (let i3 = 0; i3 < value.length; i3++) {
            const inner = classNames(value[i3]);
            if (inner) {
              classes.push(inner);
            }
          }
        } else if (isObject$1(value)) {
          for (const name in value) {
            if (value[name]) {
              classes.push(name);
            }
          }
        }
      }
      return classes.join(" ");
    }
    var MapShim = function() {
      if (typeof Map !== "undefined") {
        return Map;
      }
      function getIndex(arr, key2) {
        var result = -1;
        arr.some(function(entry, index2) {
          if (entry[0] === key2) {
            result = index2;
            return true;
          }
          return false;
        });
        return result;
      }
      return (
        /** @class */
        function() {
          function class_1() {
            this.__entries__ = [];
          }
          Object.defineProperty(class_1.prototype, "size", {
            /**
             * @returns {boolean}
             */
            get: function() {
              return this.__entries__.length;
            },
            enumerable: true,
            configurable: true
          });
          class_1.prototype.get = function(key2) {
            var index2 = getIndex(this.__entries__, key2);
            var entry = this.__entries__[index2];
            return entry && entry[1];
          };
          class_1.prototype.set = function(key2, value) {
            var index2 = getIndex(this.__entries__, key2);
            if (~index2) {
              this.__entries__[index2][1] = value;
            } else {
              this.__entries__.push([key2, value]);
            }
          };
          class_1.prototype.delete = function(key2) {
            var entries = this.__entries__;
            var index2 = getIndex(entries, key2);
            if (~index2) {
              entries.splice(index2, 1);
            }
          };
          class_1.prototype.has = function(key2) {
            return !!~getIndex(this.__entries__, key2);
          };
          class_1.prototype.clear = function() {
            this.__entries__.splice(0);
          };
          class_1.prototype.forEach = function(callback, ctx) {
            if (ctx === void 0) {
              ctx = null;
            }
            for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
              var entry = _a[_i];
              callback.call(ctx, entry[1], entry[0]);
            }
          };
          return class_1;
        }()
      );
    }();
    var isBrowser = typeof window !== "undefined" && typeof document !== "undefined" && window.document === document;
    var global$1 = function() {
      if (typeof global !== "undefined" && global.Math === Math) {
        return global;
      }
      if (typeof self !== "undefined" && self.Math === Math) {
        return self;
      }
      if (typeof window !== "undefined" && window.Math === Math) {
        return window;
      }
      return Function("return this")();
    }();
    var requestAnimationFrame$1 = function() {
      if (typeof requestAnimationFrame === "function") {
        return requestAnimationFrame.bind(global$1);
      }
      return function(callback) {
        return setTimeout(function() {
          return callback(Date.now());
        }, 1e3 / 60);
      };
    }();
    var trailingTimeout = 2;
    function throttle(callback, delay) {
      var leadingCall = false, trailingCall = false, lastCallTime = 0;
      function resolvePending() {
        if (leadingCall) {
          leadingCall = false;
          callback();
        }
        if (trailingCall) {
          proxy();
        }
      }
      function timeoutCallback() {
        requestAnimationFrame$1(resolvePending);
      }
      function proxy() {
        var timeStamp = Date.now();
        if (leadingCall) {
          if (timeStamp - lastCallTime < trailingTimeout) {
            return;
          }
          trailingCall = true;
        } else {
          leadingCall = true;
          trailingCall = false;
          setTimeout(timeoutCallback, delay);
        }
        lastCallTime = timeStamp;
      }
      return proxy;
    }
    var REFRESH_DELAY = 20;
    var transitionKeys = ["top", "right", "bottom", "left", "width", "height", "size", "weight"];
    var mutationObserverSupported = typeof MutationObserver !== "undefined";
    var ResizeObserverController = (
      /** @class */
      function() {
        function ResizeObserverController2() {
          this.connected_ = false;
          this.mutationEventsAdded_ = false;
          this.mutationsObserver_ = null;
          this.observers_ = [];
          this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
          this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
        }
        ResizeObserverController2.prototype.addObserver = function(observer) {
          if (!~this.observers_.indexOf(observer)) {
            this.observers_.push(observer);
          }
          if (!this.connected_) {
            this.connect_();
          }
        };
        ResizeObserverController2.prototype.removeObserver = function(observer) {
          var observers2 = this.observers_;
          var index2 = observers2.indexOf(observer);
          if (~index2) {
            observers2.splice(index2, 1);
          }
          if (!observers2.length && this.connected_) {
            this.disconnect_();
          }
        };
        ResizeObserverController2.prototype.refresh = function() {
          var changesDetected = this.updateObservers_();
          if (changesDetected) {
            this.refresh();
          }
        };
        ResizeObserverController2.prototype.updateObservers_ = function() {
          var activeObservers = this.observers_.filter(function(observer) {
            return observer.gatherActive(), observer.hasActive();
          });
          activeObservers.forEach(function(observer) {
            return observer.broadcastActive();
          });
          return activeObservers.length > 0;
        };
        ResizeObserverController2.prototype.connect_ = function() {
          if (!isBrowser || this.connected_) {
            return;
          }
          document.addEventListener("transitionend", this.onTransitionEnd_);
          window.addEventListener("resize", this.refresh);
          if (mutationObserverSupported) {
            this.mutationsObserver_ = new MutationObserver(this.refresh);
            this.mutationsObserver_.observe(document, {
              attributes: true,
              childList: true,
              characterData: true,
              subtree: true
            });
          } else {
            document.addEventListener("DOMSubtreeModified", this.refresh);
            this.mutationEventsAdded_ = true;
          }
          this.connected_ = true;
        };
        ResizeObserverController2.prototype.disconnect_ = function() {
          if (!isBrowser || !this.connected_) {
            return;
          }
          document.removeEventListener("transitionend", this.onTransitionEnd_);
          window.removeEventListener("resize", this.refresh);
          if (this.mutationsObserver_) {
            this.mutationsObserver_.disconnect();
          }
          if (this.mutationEventsAdded_) {
            document.removeEventListener("DOMSubtreeModified", this.refresh);
          }
          this.mutationsObserver_ = null;
          this.mutationEventsAdded_ = false;
          this.connected_ = false;
        };
        ResizeObserverController2.prototype.onTransitionEnd_ = function(_a) {
          var _b = _a.propertyName, propertyName = _b === void 0 ? "" : _b;
          var isReflowProperty = transitionKeys.some(function(key2) {
            return !!~propertyName.indexOf(key2);
          });
          if (isReflowProperty) {
            this.refresh();
          }
        };
        ResizeObserverController2.getInstance = function() {
          if (!this.instance_) {
            this.instance_ = new ResizeObserverController2();
          }
          return this.instance_;
        };
        ResizeObserverController2.instance_ = null;
        return ResizeObserverController2;
      }()
    );
    var defineConfigurable = function(target, props2) {
      for (var _i = 0, _a = Object.keys(props2); _i < _a.length; _i++) {
        var key2 = _a[_i];
        Object.defineProperty(target, key2, {
          value: props2[key2],
          enumerable: false,
          writable: false,
          configurable: true
        });
      }
      return target;
    };
    var getWindowOf = function(target) {
      var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
      return ownerGlobal || global$1;
    };
    var emptyRect = createRectInit(0, 0, 0, 0);
    function toFloat(value) {
      return parseFloat(value) || 0;
    }
    function getBordersSize(styles) {
      var positions = [];
      for (var _i = 1; _i < arguments.length; _i++) {
        positions[_i - 1] = arguments[_i];
      }
      return positions.reduce(function(size2, position2) {
        var value = styles["border-" + position2 + "-width"];
        return size2 + toFloat(value);
      }, 0);
    }
    function getPaddings(styles) {
      var positions = ["top", "right", "bottom", "left"];
      var paddings = {};
      for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
        var position2 = positions_1[_i];
        var value = styles["padding-" + position2];
        paddings[position2] = toFloat(value);
      }
      return paddings;
    }
    function getSVGContentRect(target) {
      var bbox = target.getBBox();
      return createRectInit(0, 0, bbox.width, bbox.height);
    }
    function getHTMLElementContentRect(target) {
      var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
      if (!clientWidth && !clientHeight) {
        return emptyRect;
      }
      var styles = getWindowOf(target).getComputedStyle(target);
      var paddings = getPaddings(styles);
      var horizPad = paddings.left + paddings.right;
      var vertPad = paddings.top + paddings.bottom;
      var width = toFloat(styles.width), height = toFloat(styles.height);
      if (styles.boxSizing === "border-box") {
        if (Math.round(width + horizPad) !== clientWidth) {
          width -= getBordersSize(styles, "left", "right") + horizPad;
        }
        if (Math.round(height + vertPad) !== clientHeight) {
          height -= getBordersSize(styles, "top", "bottom") + vertPad;
        }
      }
      if (!isDocumentElement(target)) {
        var vertScrollbar = Math.round(width + horizPad) - clientWidth;
        var horizScrollbar = Math.round(height + vertPad) - clientHeight;
        if (Math.abs(vertScrollbar) !== 1) {
          width -= vertScrollbar;
        }
        if (Math.abs(horizScrollbar) !== 1) {
          height -= horizScrollbar;
        }
      }
      return createRectInit(paddings.left, paddings.top, width, height);
    }
    var isSVGGraphicsElement = function() {
      if (typeof SVGGraphicsElement !== "undefined") {
        return function(target) {
          return target instanceof getWindowOf(target).SVGGraphicsElement;
        };
      }
      return function(target) {
        return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === "function";
      };
    }();
    function isDocumentElement(target) {
      return target === getWindowOf(target).document.documentElement;
    }
    function getContentRect(target) {
      if (!isBrowser) {
        return emptyRect;
      }
      if (isSVGGraphicsElement(target)) {
        return getSVGContentRect(target);
      }
      return getHTMLElementContentRect(target);
    }
    function createReadOnlyRect(_a) {
      var x2 = _a.x, y2 = _a.y, width = _a.width, height = _a.height;
      var Constr = typeof DOMRectReadOnly !== "undefined" ? DOMRectReadOnly : Object;
      var rect = Object.create(Constr.prototype);
      defineConfigurable(rect, {
        x: x2,
        y: y2,
        width,
        height,
        top: y2,
        right: x2 + width,
        bottom: height + y2,
        left: x2
      });
      return rect;
    }
    function createRectInit(x2, y2, width, height) {
      return { x: x2, y: y2, width, height };
    }
    var ResizeObservation = (
      /** @class */
      function() {
        function ResizeObservation2(target) {
          this.broadcastWidth = 0;
          this.broadcastHeight = 0;
          this.contentRect_ = createRectInit(0, 0, 0, 0);
          this.target = target;
        }
        ResizeObservation2.prototype.isActive = function() {
          var rect = getContentRect(this.target);
          this.contentRect_ = rect;
          return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;
        };
        ResizeObservation2.prototype.broadcastRect = function() {
          var rect = this.contentRect_;
          this.broadcastWidth = rect.width;
          this.broadcastHeight = rect.height;
          return rect;
        };
        return ResizeObservation2;
      }()
    );
    var ResizeObserverEntry = (
      /** @class */
      /* @__PURE__ */ function() {
        function ResizeObserverEntry2(target, rectInit) {
          var contentRect = createReadOnlyRect(rectInit);
          defineConfigurable(this, { target, contentRect });
        }
        return ResizeObserverEntry2;
      }()
    );
    var ResizeObserverSPI = (
      /** @class */
      function() {
        function ResizeObserverSPI2(callback, controller, callbackCtx) {
          this.activeObservations_ = [];
          this.observations_ = new MapShim();
          if (typeof callback !== "function") {
            throw new TypeError("The callback provided as parameter 1 is not a function.");
          }
          this.callback_ = callback;
          this.controller_ = controller;
          this.callbackCtx_ = callbackCtx;
        }
        ResizeObserverSPI2.prototype.observe = function(target) {
          if (!arguments.length) {
            throw new TypeError("1 argument required, but only 0 present.");
          }
          if (typeof Element === "undefined" || !(Element instanceof Object)) {
            return;
          }
          if (!(target instanceof getWindowOf(target).Element)) {
            throw new TypeError('parameter 1 is not of type "Element".');
          }
          var observations = this.observations_;
          if (observations.has(target)) {
            return;
          }
          observations.set(target, new ResizeObservation(target));
          this.controller_.addObserver(this);
          this.controller_.refresh();
        };
        ResizeObserverSPI2.prototype.unobserve = function(target) {
          if (!arguments.length) {
            throw new TypeError("1 argument required, but only 0 present.");
          }
          if (typeof Element === "undefined" || !(Element instanceof Object)) {
            return;
          }
          if (!(target instanceof getWindowOf(target).Element)) {
            throw new TypeError('parameter 1 is not of type "Element".');
          }
          var observations = this.observations_;
          if (!observations.has(target)) {
            return;
          }
          observations.delete(target);
          if (!observations.size) {
            this.controller_.removeObserver(this);
          }
        };
        ResizeObserverSPI2.prototype.disconnect = function() {
          this.clearActive();
          this.observations_.clear();
          this.controller_.removeObserver(this);
        };
        ResizeObserverSPI2.prototype.gatherActive = function() {
          var _this = this;
          this.clearActive();
          this.observations_.forEach(function(observation) {
            if (observation.isActive()) {
              _this.activeObservations_.push(observation);
            }
          });
        };
        ResizeObserverSPI2.prototype.broadcastActive = function() {
          if (!this.hasActive()) {
            return;
          }
          var ctx = this.callbackCtx_;
          var entries = this.activeObservations_.map(function(observation) {
            return new ResizeObserverEntry(observation.target, observation.broadcastRect());
          });
          this.callback_.call(ctx, entries, ctx);
          this.clearActive();
        };
        ResizeObserverSPI2.prototype.clearActive = function() {
          this.activeObservations_.splice(0);
        };
        ResizeObserverSPI2.prototype.hasActive = function() {
          return this.activeObservations_.length > 0;
        };
        return ResizeObserverSPI2;
      }()
    );
    var observers = typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : new MapShim();
    var ResizeObserver$2 = (
      /** @class */
      /* @__PURE__ */ function() {
        function ResizeObserver2(callback) {
          if (!(this instanceof ResizeObserver2)) {
            throw new TypeError("Cannot call a class as a function.");
          }
          if (!arguments.length) {
            throw new TypeError("1 argument required, but only 0 present.");
          }
          var controller = ResizeObserverController.getInstance();
          var observer = new ResizeObserverSPI(callback, controller, this);
          observers.set(this, observer);
        }
        return ResizeObserver2;
      }()
    );
    [
      "observe",
      "unobserve",
      "disconnect"
    ].forEach(function(method) {
      ResizeObserver$2.prototype[method] = function() {
        var _a;
        return (_a = observers.get(this))[method].apply(_a, arguments);
      };
    });
    var index = function() {
      if (typeof global$1.ResizeObserver !== "undefined") {
        return global$1.ResizeObserver;
      }
      return ResizeObserver$2;
    }();
    const isValid = (value) => {
      return value !== void 0 && value !== null && value !== "";
    };
    const initDefaultProps = (types2, defaultProps) => {
      const propTypes = _extends$1({}, types2);
      Object.keys(defaultProps).forEach((k2) => {
        const prop = propTypes[k2];
        if (prop) {
          if (prop.type || prop.default) {
            prop.default = defaultProps[k2];
          } else if (prop.def) {
            prop.def(defaultProps[k2]);
          } else {
            propTypes[k2] = {
              type: prop,
              default: defaultProps[k2]
            };
          }
        } else {
          throw new Error(`not have ${k2} prop`);
        }
      });
      return propTypes;
    };
    const splitAttrs = (attrs) => {
      const allAttrs = Object.keys(attrs);
      const eventAttrs = {};
      const onEvents = {};
      const extraAttrs = {};
      for (let i2 = 0, l2 = allAttrs.length; i2 < l2; i2++) {
        const key2 = allAttrs[i2];
        if (isOn(key2)) {
          eventAttrs[key2[2].toLowerCase() + key2.slice(3)] = attrs[key2];
          onEvents[key2] = attrs[key2];
        } else {
          extraAttrs[key2] = attrs[key2];
        }
      }
      return {
        onEvents,
        events: eventAttrs,
        extraAttrs
      };
    };
    const parseStyleText = function() {
      let cssText = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
      let camel = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
      const res = {};
      const listDelimiter = /;(?![^(]*\))/g;
      const propertyDelimiter = /:(.+)/;
      if (typeof cssText === "object") return cssText;
      cssText.split(listDelimiter).forEach(function(item) {
        if (item) {
          const tmp = item.split(propertyDelimiter);
          if (tmp.length > 1) {
            const k2 = camel ? camelize(tmp[0].trim()) : tmp[0].trim();
            res[k2] = tmp[1].trim();
          }
        }
      });
      return res;
    };
    const hasProp = (instance, prop) => {
      return instance[prop] !== void 0;
    };
    const skipFlattenKey = Symbol("skipFlatten");
    const flattenChildren = function() {
      let children = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      let filterEmpty2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
      const temp = Array.isArray(children) ? children : [children];
      const res = [];
      temp.forEach((child) => {
        if (Array.isArray(child)) {
          res.push(...flattenChildren(child, filterEmpty2));
        } else if (child && child.type === Fragment) {
          if (child.key === skipFlattenKey) {
            res.push(child);
          } else {
            res.push(...flattenChildren(child.children, filterEmpty2));
          }
        } else if (child && isVNode(child)) {
          if (filterEmpty2 && !isEmptyElement(child)) {
            res.push(child);
          } else if (!filterEmpty2) {
            res.push(child);
          }
        } else if (isValid(child)) {
          res.push(child);
        }
      });
      return res;
    };
    const getSlot = function(self2) {
      let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default";
      let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      if (isVNode(self2)) {
        if (self2.type === Fragment) {
          return name === "default" ? flattenChildren(self2.children) : [];
        } else if (self2.children && self2.children[name]) {
          return flattenChildren(self2.children[name](options));
        } else {
          return [];
        }
      } else {
        const res = self2.$slots[name] && self2.$slots[name](options);
        return flattenChildren(res);
      }
    };
    const findDOMNode = (instance) => {
      var _a;
      let node2 = ((_a = instance === null || instance === void 0 ? void 0 : instance.vnode) === null || _a === void 0 ? void 0 : _a.el) || instance && (instance.$el || instance);
      while (node2 && !node2.tagName) {
        node2 = node2.nextSibling;
      }
      return node2;
    };
    const getOptionProps = (instance) => {
      const res = {};
      if (instance.$ && instance.$.vnode) {
        const props2 = instance.$.vnode.props || {};
        Object.keys(instance.$props).forEach((k2) => {
          const v2 = instance.$props[k2];
          const hyphenateKey = hyphenate(k2);
          if (v2 !== void 0 || hyphenateKey in props2) {
            res[k2] = v2;
          }
        });
      } else if (isVNode(instance) && typeof instance.type === "object") {
        const originProps = instance.props || {};
        const props2 = {};
        Object.keys(originProps).forEach((key2) => {
          props2[camelize(key2)] = originProps[key2];
        });
        const options = instance.type.props || {};
        Object.keys(options).forEach((k2) => {
          const v2 = resolvePropValue(options, props2, k2, props2[k2]);
          if (v2 !== void 0 || k2 in props2) {
            res[k2] = v2;
          }
        });
      }
      return res;
    };
    const getComponent = function(instance) {
      let prop = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "default";
      let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : instance;
      let execute = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true;
      let com = void 0;
      if (instance.$) {
        const temp = instance[prop];
        if (temp !== void 0) {
          return typeof temp === "function" && execute ? temp(options) : temp;
        } else {
          com = instance.$slots[prop];
          com = execute && com ? com(options) : com;
        }
      } else if (isVNode(instance)) {
        const temp = instance.props && instance.props[prop];
        if (temp !== void 0 && instance.props !== null) {
          return typeof temp === "function" && execute ? temp(options) : temp;
        } else if (instance.type === Fragment) {
          com = instance.children;
        } else if (instance.children && instance.children[prop]) {
          com = instance.children[prop];
          com = execute && com ? com(options) : com;
        }
      }
      if (Array.isArray(com)) {
        com = flattenChildren(com);
        com = com.length === 1 ? com[0] : com;
        com = com.length === 0 ? void 0 : com;
      }
      return com;
    };
    function getEvents() {
      let ele = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      let on = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
      let props2 = {};
      if (ele.$) {
        props2 = _extends$1(_extends$1({}, props2), ele.$attrs);
      } else {
        props2 = _extends$1(_extends$1({}, props2), ele.props);
      }
      return splitAttrs(props2)[on ? "onEvents" : "events"];
    }
    function getStyle$1(ele, camel) {
      const props2 = (isVNode(ele) ? ele.props : ele.$attrs) || {};
      let style = props2.style || {};
      if (typeof style === "string") {
        style = parseStyleText(style, camel);
      }
      return style;
    }
    function isFragment(c2) {
      return c2.length === 1 && c2[0].type === Fragment;
    }
    function isEmptyElement(c2) {
      return c2 && (c2.type === Comment || c2.type === Fragment && c2.children.length === 0 || c2.type === Text && c2.children.trim() === "");
    }
    function filterEmpty() {
      let children = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      const res = [];
      children.forEach((child) => {
        if (Array.isArray(child)) {
          res.push(...child);
        } else if ((child === null || child === void 0 ? void 0 : child.type) === Fragment) {
          res.push(...filterEmpty(child.children));
        } else {
          res.push(child);
        }
      });
      return res.filter((c2) => !isEmptyElement(c2));
    }
    function isValidElement(element) {
      if (Array.isArray(element) && element.length === 1) {
        element = element[0];
      }
      return element && element.__v_isVNode && typeof element.type !== "symbol";
    }
    function getPropsSlot(slots, props2) {
      let prop = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default";
      var _a, _b;
      return (_a = props2[prop]) !== null && _a !== void 0 ? _a : (_b = slots[prop]) === null || _b === void 0 ? void 0 : _b.call(slots);
    }
    const ResizeObserver$1 = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ResizeObserver",
      props: {
        disabled: Boolean,
        onResize: Function
      },
      emits: ["resize"],
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        const state = reactive({
          width: 0,
          height: 0,
          offsetHeight: 0,
          offsetWidth: 0
        });
        let currentElement = null;
        let resizeObserver = null;
        const destroyObserver = () => {
          if (resizeObserver) {
            resizeObserver.disconnect();
            resizeObserver = null;
          }
        };
        const onResize = (entries) => {
          const {
            onResize: onResize2
          } = props2;
          const target = entries[0].target;
          const {
            width,
            height
          } = target.getBoundingClientRect();
          const {
            offsetWidth,
            offsetHeight
          } = target;
          const fixedWidth = Math.floor(width);
          const fixedHeight = Math.floor(height);
          if (state.width !== fixedWidth || state.height !== fixedHeight || state.offsetWidth !== offsetWidth || state.offsetHeight !== offsetHeight) {
            const size2 = {
              width: fixedWidth,
              height: fixedHeight,
              offsetWidth,
              offsetHeight
            };
            _extends$1(state, size2);
            if (onResize2) {
              Promise.resolve().then(() => {
                onResize2(_extends$1(_extends$1({}, size2), {
                  offsetWidth,
                  offsetHeight
                }), target);
              });
            }
          }
        };
        const instance = getCurrentInstance();
        const registerObserver = () => {
          const {
            disabled
          } = props2;
          if (disabled) {
            destroyObserver();
            return;
          }
          const element = findDOMNode(instance);
          const elementChanged = element !== currentElement;
          if (elementChanged) {
            destroyObserver();
            currentElement = element;
          }
          if (!resizeObserver && element) {
            resizeObserver = new index(onResize);
            resizeObserver.observe(element);
          }
        };
        onMounted(() => {
          registerObserver();
        });
        onUpdated(() => {
          registerObserver();
        });
        onUnmounted(() => {
          destroyObserver();
        });
        watch(() => props2.disabled, () => {
          registerObserver();
        }, {
          flush: "post"
        });
        return () => {
          var _a;
          return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)[0];
        };
      }
    });
    let raf = (callback) => setTimeout(callback, 16);
    let caf = (num) => clearTimeout(num);
    if (typeof window !== "undefined" && "requestAnimationFrame" in window) {
      raf = (callback) => window.requestAnimationFrame(callback);
      caf = (handle) => window.cancelAnimationFrame(handle);
    }
    let rafUUID = 0;
    const rafIds = /* @__PURE__ */ new Map();
    function cleanup(id) {
      rafIds.delete(id);
    }
    function wrapperRaf(callback) {
      let times = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
      rafUUID += 1;
      const id = rafUUID;
      function callRef(leftTimes) {
        if (leftTimes === 0) {
          cleanup(id);
          callback();
        } else {
          const realId = raf(() => {
            callRef(leftTimes - 1);
          });
          rafIds.set(id, realId);
        }
      }
      callRef(times);
      return id;
    }
    wrapperRaf.cancel = (id) => {
      const realId = rafIds.get(id);
      cleanup(realId);
      return caf(realId);
    };
    const tuple = function() {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      return args;
    };
    const withInstall = (comp) => {
      const c2 = comp;
      c2.install = function(app) {
        app.component(c2.displayName || c2.name, comp);
      };
      return comp;
    };
    function eventType() {
      return {
        type: [Function, Array]
      };
    }
    function objectType(defaultVal) {
      return {
        type: Object,
        default: defaultVal
      };
    }
    function booleanType(defaultVal) {
      return {
        type: Boolean,
        default: defaultVal
      };
    }
    function functionType(defaultVal) {
      return {
        type: Function,
        default: defaultVal
      };
    }
    function anyType(defaultVal, required) {
      const type = {
        validator: () => true,
        default: defaultVal
      };
      return required ? type : type;
    }
    function arrayType(defaultVal) {
      return {
        type: Array,
        default: defaultVal
      };
    }
    function stringType(defaultVal) {
      return {
        type: String,
        default: defaultVal
      };
    }
    function someType(types2, defaultVal) {
      return types2 ? {
        type: types2,
        default: defaultVal
      } : anyType(defaultVal);
    }
    let supportsPassive = false;
    try {
      const opts = Object.defineProperty({}, "passive", {
        get() {
          supportsPassive = true;
        }
      });
      window.addEventListener("testPassive", null, opts);
      window.removeEventListener("testPassive", null, opts);
    } catch (e2) {
    }
    function addEventListenerWrap(target, eventType2, cb, option) {
      if (target && target.addEventListener) {
        let opt = option;
        if (opt === void 0 && supportsPassive && (eventType2 === "touchstart" || eventType2 === "touchmove" || eventType2 === "wheel")) {
          opt = {
            passive: false
          };
        }
        target.addEventListener(eventType2, cb, opt);
      }
      return {
        remove: () => {
          if (target && target.removeEventListener) {
            target.removeEventListener(eventType2, cb);
          }
        }
      };
    }
    const defaultIconPrefixCls = "anticon";
    const GlobalFormContextKey = Symbol("GlobalFormContextKey");
    const useProvideGlobalForm = (state) => {
      provide(GlobalFormContextKey, state);
    };
    const useInjectGlobalForm = () => {
      return inject(GlobalFormContextKey, {
        validateMessages: computed(() => void 0)
      });
    };
    const configProviderProps = () => ({
      iconPrefixCls: String,
      getTargetContainer: {
        type: Function
      },
      getPopupContainer: {
        type: Function
      },
      prefixCls: String,
      getPrefixCls: {
        type: Function
      },
      renderEmpty: {
        type: Function
      },
      transformCellText: {
        type: Function
      },
      csp: objectType(),
      input: objectType(),
      autoInsertSpaceInButton: {
        type: Boolean,
        default: void 0
      },
      locale: objectType(),
      pageHeader: objectType(),
      componentSize: {
        type: String
      },
      componentDisabled: {
        type: Boolean,
        default: void 0
      },
      direction: {
        type: String,
        default: "ltr"
      },
      space: objectType(),
      virtual: {
        type: Boolean,
        default: void 0
      },
      dropdownMatchSelectWidth: {
        type: [Number, Boolean],
        default: true
      },
      form: objectType(),
      pagination: objectType(),
      theme: objectType(),
      select: objectType(),
      wave: objectType()
    });
    const configProviderKey = Symbol("configProvider");
    const defaultConfigProvider = {
      getPrefixCls: (suffixCls, customizePrefixCls) => {
        if (customizePrefixCls) return customizePrefixCls;
        return suffixCls ? `ant-${suffixCls}` : "ant";
      },
      iconPrefixCls: computed(() => defaultIconPrefixCls),
      getPopupContainer: computed(() => () => document.body),
      direction: computed(() => "ltr")
    };
    const useConfigContextInject = () => {
      return inject(configProviderKey, defaultConfigProvider);
    };
    const useConfigContextProvider = (props2) => {
      return provide(configProviderKey, props2);
    };
    const DisabledContextKey = Symbol("DisabledContextKey");
    const useInjectDisabled = () => {
      return inject(DisabledContextKey, ref(void 0));
    };
    const useProviderDisabled = (disabled) => {
      const parentDisabled = useInjectDisabled();
      provide(DisabledContextKey, computed(() => {
        var _a;
        return (_a = disabled.value) !== null && _a !== void 0 ? _a : parentDisabled.value;
      }));
      return disabled;
    };
    const enUS = {
      // Options.jsx
      items_per_page: "/ page",
      jump_to: "Go to",
      jump_to_confirm: "confirm",
      page: "",
      // Pagination.jsx
      prev_page: "Previous Page",
      next_page: "Next Page",
      prev_5: "Previous 5 Pages",
      next_5: "Next 5 Pages",
      prev_3: "Previous 3 Pages",
      next_3: "Next 3 Pages"
    };
    const locale$3 = {
      locale: "en_US",
      today: "Today",
      now: "Now",
      backToToday: "Back to today",
      ok: "Ok",
      clear: "Clear",
      month: "Month",
      year: "Year",
      timeSelect: "select time",
      dateSelect: "select date",
      weekSelect: "Choose a week",
      monthSelect: "Choose a month",
      yearSelect: "Choose a year",
      decadeSelect: "Choose a decade",
      yearFormat: "YYYY",
      dateFormat: "M/D/YYYY",
      dayFormat: "D",
      dateTimeFormat: "M/D/YYYY HH:mm:ss",
      monthBeforeYear: true,
      previousMonth: "Previous month (PageUp)",
      nextMonth: "Next month (PageDown)",
      previousYear: "Last year (Control + left)",
      nextYear: "Next year (Control + right)",
      previousDecade: "Last decade",
      nextDecade: "Next decade",
      previousCentury: "Last century",
      nextCentury: "Next century"
    };
    const locale$2 = {
      placeholder: "Select time",
      rangePlaceholder: ["Start time", "End time"]
    };
    const locale$1 = {
      lang: _extends$1({
        placeholder: "Select date",
        yearPlaceholder: "Select year",
        quarterPlaceholder: "Select quarter",
        monthPlaceholder: "Select month",
        weekPlaceholder: "Select week",
        rangePlaceholder: ["Start date", "End date"],
        rangeYearPlaceholder: ["Start year", "End year"],
        rangeQuarterPlaceholder: ["Start quarter", "End quarter"],
        rangeMonthPlaceholder: ["Start month", "End month"],
        rangeWeekPlaceholder: ["Start week", "End week"]
      }, locale$3),
      timePickerLocale: _extends$1({}, locale$2)
    };
    const typeTemplate$1 = "${label} is not a valid ${type}";
    const localeValues = {
      locale: "en",
      Pagination: enUS,
      DatePicker: locale$1,
      TimePicker: locale$2,
      Calendar: locale$1,
      global: {
        placeholder: "Please select"
      },
      Table: {
        filterTitle: "Filter menu",
        filterConfirm: "OK",
        filterReset: "Reset",
        filterEmptyText: "No filters",
        filterCheckall: "Select all items",
        filterSearchPlaceholder: "Search in filters",
        emptyText: "No data",
        selectAll: "Select current page",
        selectInvert: "Invert current page",
        selectNone: "Clear all data",
        selectionAll: "Select all data",
        sortTitle: "Sort",
        expand: "Expand row",
        collapse: "Collapse row",
        triggerDesc: "Click to sort descending",
        triggerAsc: "Click to sort ascending",
        cancelSort: "Click to cancel sorting"
      },
      Tour: {
        Next: "Next",
        Previous: "Previous",
        Finish: "Finish"
      },
      Modal: {
        okText: "OK",
        cancelText: "Cancel",
        justOkText: "OK"
      },
      Popconfirm: {
        okText: "OK",
        cancelText: "Cancel"
      },
      Transfer: {
        titles: ["", ""],
        searchPlaceholder: "Search here",
        itemUnit: "item",
        itemsUnit: "items",
        remove: "Remove",
        selectCurrent: "Select current page",
        removeCurrent: "Remove current page",
        selectAll: "Select all data",
        removeAll: "Remove all data",
        selectInvert: "Invert current page"
      },
      Upload: {
        uploading: "Uploading...",
        removeFile: "Remove file",
        uploadError: "Upload error",
        previewFile: "Preview file",
        downloadFile: "Download file"
      },
      Empty: {
        description: "No data"
      },
      Icon: {
        icon: "icon"
      },
      Text: {
        edit: "Edit",
        copy: "Copy",
        copied: "Copied",
        expand: "Expand"
      },
      PageHeader: {
        back: "Back"
      },
      Form: {
        optional: "(optional)",
        defaultValidateMessages: {
          default: "Field validation error for ${label}",
          required: "Please enter ${label}",
          enum: "${label} must be one of [${enum}]",
          whitespace: "${label} cannot be a blank character",
          date: {
            format: "${label} date format is invalid",
            parse: "${label} cannot be converted to a date",
            invalid: "${label} is an invalid date"
          },
          types: {
            string: typeTemplate$1,
            method: typeTemplate$1,
            array: typeTemplate$1,
            object: typeTemplate$1,
            number: typeTemplate$1,
            date: typeTemplate$1,
            boolean: typeTemplate$1,
            integer: typeTemplate$1,
            float: typeTemplate$1,
            regexp: typeTemplate$1,
            email: typeTemplate$1,
            url: typeTemplate$1,
            hex: typeTemplate$1
          },
          string: {
            len: "${label} must be ${len} characters",
            min: "${label} must be at least ${min} characters",
            max: "${label} must be up to ${max} characters",
            range: "${label} must be between ${min}-${max} characters"
          },
          number: {
            len: "${label} must be equal to ${len}",
            min: "${label} must be minimum ${min}",
            max: "${label} must be maximum ${max}",
            range: "${label} must be between ${min}-${max}"
          },
          array: {
            len: "Must be ${len} ${label}",
            min: "At least ${min} ${label}",
            max: "At most ${max} ${label}",
            range: "The amount of ${label} must be between ${min}-${max}"
          },
          pattern: {
            mismatch: "${label} does not match the pattern ${pattern}"
          }
        }
      },
      Image: {
        preview: "Preview"
      },
      QRCode: {
        expired: "QR code expired",
        refresh: "Refresh",
        scanned: "Scanned"
      }
    };
    const LocaleReceiver = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "LocaleReceiver",
      props: {
        componentName: String,
        defaultLocale: {
          type: [Object, Function]
        },
        children: {
          type: Function
        }
      },
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        const localeData = inject("localeData", {});
        const locale2 = computed(() => {
          const {
            componentName = "global",
            defaultLocale
          } = props2;
          const locale3 = defaultLocale || localeValues[componentName || "global"];
          const {
            antLocale
          } = localeData;
          const localeFromContext = componentName && antLocale ? antLocale[componentName] : {};
          return _extends$1(_extends$1({}, typeof locale3 === "function" ? locale3() : locale3), localeFromContext || {});
        });
        const localeCode = computed(() => {
          const {
            antLocale
          } = localeData;
          const localeCode2 = antLocale && antLocale.locale;
          if (antLocale && antLocale.exist && !localeCode2) {
            return localeValues.locale;
          }
          return localeCode2;
        });
        return () => {
          const children = props2.children || slots.default;
          const {
            antLocale
          } = localeData;
          return children === null || children === void 0 ? void 0 : children(locale2.value, localeCode.value, antLocale);
        };
      }
    });
    function useLocaleReceiver(componentName, defaultLocale, propsLocale) {
      const localeData = inject("localeData", {});
      const componentLocale = computed(() => {
        const {
          antLocale
        } = localeData;
        const locale2 = unref(defaultLocale) || localeValues[componentName];
        const localeFromContext = antLocale ? antLocale[componentName] : {};
        return _extends$1(_extends$1(_extends$1({}, typeof locale2 === "function" ? locale2() : locale2), localeFromContext || {}), unref(propsLocale) || {});
      });
      return [componentLocale];
    }
    function murmur2(str) {
      var h2 = 0;
      var k2, i2 = 0, len = str.length;
      for (; len >= 4; ++i2, len -= 4) {
        k2 = str.charCodeAt(i2) & 255 | (str.charCodeAt(++i2) & 255) << 8 | (str.charCodeAt(++i2) & 255) << 16 | (str.charCodeAt(++i2) & 255) << 24;
        k2 = /* Math.imul(k, m): */
        (k2 & 65535) * 1540483477 + ((k2 >>> 16) * 59797 << 16);
        k2 ^= /* k >>> r: */
        k2 >>> 24;
        h2 = /* Math.imul(k, m): */
        (k2 & 65535) * 1540483477 + ((k2 >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
        (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16);
      }
      switch (len) {
        case 3:
          h2 ^= (str.charCodeAt(i2 + 2) & 255) << 16;
        case 2:
          h2 ^= (str.charCodeAt(i2 + 1) & 255) << 8;
        case 1:
          h2 ^= str.charCodeAt(i2) & 255;
          h2 = /* Math.imul(h, m): */
          (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16);
      }
      h2 ^= h2 >>> 13;
      h2 = /* Math.imul(h, m): */
      (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16);
      return ((h2 ^ h2 >>> 15) >>> 0).toString(36);
    }
    const SPLIT = "%";
    class Entity {
      constructor(instanceId) {
        this.cache = /* @__PURE__ */ new Map();
        this.instanceId = instanceId;
      }
      get(keys2) {
        return this.cache.get(Array.isArray(keys2) ? keys2.join(SPLIT) : keys2) || null;
      }
      update(keys2, valueFn) {
        const path = Array.isArray(keys2) ? keys2.join(SPLIT) : keys2;
        const prevValue = this.cache.get(path);
        const nextValue = valueFn(prevValue);
        if (nextValue === null) {
          this.cache.delete(path);
        } else {
          this.cache.set(path, nextValue);
        }
      }
    }
    const ATTR_TOKEN = "data-token-hash";
    const ATTR_MARK = "data-css-hash";
    const CSS_IN_JS_INSTANCE = "__cssinjs_instance__";
    function createCache() {
      const cssinjsInstanceId = Math.random().toString(12).slice(2);
      if (typeof document !== "undefined" && document.head && document.body) {
        const styles = document.body.querySelectorAll(`style[${ATTR_MARK}]`) || [];
        const {
          firstChild
        } = document.head;
        Array.from(styles).forEach((style) => {
          style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || cssinjsInstanceId;
          if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
            document.head.insertBefore(style, firstChild);
          }
        });
        const styleHash = {};
        Array.from(document.querySelectorAll(`style[${ATTR_MARK}]`)).forEach((style) => {
          var _a;
          const hash = style.getAttribute(ATTR_MARK);
          if (styleHash[hash]) {
            if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {
              (_a = style.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(style);
            }
          } else {
            styleHash[hash] = true;
          }
        });
      }
      return new Entity(cssinjsInstanceId);
    }
    const StyleContextKey = Symbol("StyleContextKey");
    const getCache = () => {
      var _a, _b, _c;
      const instance = getCurrentInstance();
      let cache;
      if (instance && instance.appContext) {
        const globalCache = (_c = (_b = (_a = instance.appContext) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.globalProperties) === null || _c === void 0 ? void 0 : _c.__ANTDV_CSSINJS_CACHE__;
        if (globalCache) {
          cache = globalCache;
        } else {
          cache = createCache();
          if (instance.appContext.config.globalProperties) {
            instance.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__ = cache;
          }
        }
      } else {
        cache = createCache();
      }
      return cache;
    };
    const defaultStyleContext = {
      cache: createCache(),
      defaultCache: true,
      hashPriority: "low"
    };
    const useStyleInject = () => {
      const cache = getCache();
      return inject(StyleContextKey, shallowRef(_extends$1(_extends$1({}, defaultStyleContext), {
        cache
      })));
    };
    const useStyleProvider = (props2) => {
      const parentContext = useStyleInject();
      const context = shallowRef(_extends$1(_extends$1({}, defaultStyleContext), {
        cache: createCache()
      }));
      watch([() => unref(props2), parentContext], () => {
        const mergedContext = _extends$1({}, parentContext.value);
        const propsValue = unref(props2);
        Object.keys(propsValue).forEach((key2) => {
          const value = propsValue[key2];
          if (propsValue[key2] !== void 0) {
            mergedContext[key2] = value;
          }
        });
        const {
          cache
        } = propsValue;
        mergedContext.cache = mergedContext.cache || createCache();
        mergedContext.defaultCache = !cache && parentContext.value.defaultCache;
        context.value = mergedContext;
      }, {
        immediate: true
      });
      provide(StyleContextKey, context);
      return context;
    };
    const styleProviderProps = () => ({
      autoClear: booleanType(),
      /** @private Test only. Not work in production. */
      mock: stringType(),
      /**
       * Only set when you need ssr to extract style on you own.
       * If not provided, it will auto create <style /> on the end of Provider in server side.
       */
      cache: objectType(),
      /** Tell children that this context is default generated context */
      defaultCache: booleanType(),
      /** Use `:where` selector to reduce hashId css selector priority */
      hashPriority: stringType(),
      /** Tell cssinjs where to inject style in */
      container: someType(),
      /** Component wil render inline  `<style />` for fallback in SSR. Not recommend. */
      ssrInline: booleanType(),
      /** Transform css before inject in document. Please note that `transformers` do not support dynamic update */
      transformers: arrayType(),
      /**
       * Linters to lint css before inject in document.
       * Styles will be linted after transforming.
       * Please note that `linters` do not support dynamic update.
       */
      linters: arrayType()
    });
    withInstall(/* @__PURE__ */ defineComponent({
      name: "AStyleProvider",
      inheritAttrs: false,
      props: styleProviderProps(),
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        useStyleProvider(props2);
        return () => {
          var _a;
          return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
        };
      }
    }));
    function useClientCache(prefix, keyPath, cacheFn, onCacheRemove) {
      const styleContext = useStyleInject();
      const fullPathStr = shallowRef("");
      const res = shallowRef();
      watchEffect(() => {
        fullPathStr.value = [prefix, ...keyPath.value].join("%");
      });
      const clearCache = (pathStr) => {
        styleContext.value.cache.update(pathStr, (prevCache) => {
          const [times = 0, cache] = prevCache || [];
          const nextCount = times - 1;
          if (nextCount === 0) {
            onCacheRemove === null || onCacheRemove === void 0 ? void 0 : onCacheRemove(cache, false);
            return null;
          }
          return [times - 1, cache];
        });
      };
      watch(fullPathStr, (newStr, oldStr) => {
        if (oldStr) clearCache(oldStr);
        styleContext.value.cache.update(newStr, (prevCache) => {
          const [times = 0, cache] = prevCache || [];
          let tmpCache = cache;
          const mergedCache = tmpCache || cacheFn();
          return [times + 1, mergedCache];
        });
        res.value = styleContext.value.cache.get(fullPathStr.value)[1];
      }, {
        immediate: true
      });
      onBeforeUnmount(() => {
        clearCache(fullPathStr.value);
      });
      return res;
    }
    function canUseDom$1() {
      return !!(typeof window !== "undefined" && window.document && window.document.createElement);
    }
    function contains$1(root2, n2) {
      if (!root2) {
        return false;
      }
      if (root2.contains) {
        return root2.contains(n2);
      }
      return false;
    }
    const APPEND_ORDER$1 = "data-vc-order";
    const MARK_KEY$1 = `vc-util-key`;
    const containerCache$1 = /* @__PURE__ */ new Map();
    function getMark$1() {
      let {
        mark
      } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      if (mark) {
        return mark.startsWith("data-") ? mark : `data-${mark}`;
      }
      return MARK_KEY$1;
    }
    function getContainer$2(option) {
      if (option.attachTo) {
        return option.attachTo;
      }
      const head = document.querySelector("head");
      return head || document.body;
    }
    function getOrder$1(prepend) {
      if (prepend === "queue") {
        return "prependQueue";
      }
      return prepend ? "prepend" : "append";
    }
    function findStyles$1(container) {
      return Array.from((containerCache$1.get(container) || container).children).filter((node2) => node2.tagName === "STYLE");
    }
    function injectCSS$1(css2) {
      let option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      if (!canUseDom$1()) {
        return null;
      }
      const {
        csp,
        prepend
      } = option;
      const styleNode = document.createElement("style");
      styleNode.setAttribute(APPEND_ORDER$1, getOrder$1(prepend));
      if (csp === null || csp === void 0 ? void 0 : csp.nonce) {
        styleNode.nonce = csp === null || csp === void 0 ? void 0 : csp.nonce;
      }
      styleNode.innerHTML = css2;
      const container = getContainer$2(option);
      const {
        firstChild
      } = container;
      if (prepend) {
        if (prepend === "queue") {
          const existStyle = findStyles$1(container).filter((node2) => ["prepend", "prependQueue"].includes(node2.getAttribute(APPEND_ORDER$1)));
          if (existStyle.length) {
            container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);
            return styleNode;
          }
        }
        container.insertBefore(styleNode, firstChild);
      } else {
        container.appendChild(styleNode);
      }
      return styleNode;
    }
    function findExistNode$1(key2) {
      let option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const container = getContainer$2(option);
      return findStyles$1(container).find((node2) => node2.getAttribute(getMark$1(option)) === key2);
    }
    function removeCSS(key2) {
      let option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const existNode = findExistNode$1(key2, option);
      if (existNode) {
        const container = getContainer$2(option);
        container.removeChild(existNode);
      }
    }
    function syncRealContainer$1(container, option) {
      const cachedRealContainer = containerCache$1.get(container);
      if (!cachedRealContainer || !contains$1(document, cachedRealContainer)) {
        const placeholderStyle = injectCSS$1("", option);
        const {
          parentNode
        } = placeholderStyle;
        containerCache$1.set(container, parentNode);
        container.removeChild(placeholderStyle);
      }
    }
    function updateCSS$1(css2, key2) {
      let option = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      var _a, _b, _c;
      const container = getContainer$2(option);
      syncRealContainer$1(container, option);
      const existNode = findExistNode$1(key2, option);
      if (existNode) {
        if (((_a = option.csp) === null || _a === void 0 ? void 0 : _a.nonce) && existNode.nonce !== ((_b = option.csp) === null || _b === void 0 ? void 0 : _b.nonce)) {
          existNode.nonce = (_c = option.csp) === null || _c === void 0 ? void 0 : _c.nonce;
        }
        if (existNode.innerHTML !== css2) {
          existNode.innerHTML = css2;
        }
        return existNode;
      }
      const newNode = injectCSS$1(css2, option);
      newNode.setAttribute(getMark$1(option), key2);
      return newNode;
    }
    function sameDerivativeOption(left, right) {
      if (left.length !== right.length) {
        return false;
      }
      for (let i2 = 0; i2 < left.length; i2++) {
        if (left[i2] !== right[i2]) {
          return false;
        }
      }
      return true;
    }
    class ThemeCache {
      constructor() {
        this.cache = /* @__PURE__ */ new Map();
        this.keys = [];
        this.cacheCallTimes = 0;
      }
      size() {
        return this.keys.length;
      }
      internalGet(derivativeOption) {
        let updateCallTimes = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
        let cache = {
          map: this.cache
        };
        derivativeOption.forEach((derivative2) => {
          var _a;
          if (!cache) {
            cache = void 0;
          } else {
            cache = (_a = cache === null || cache === void 0 ? void 0 : cache.map) === null || _a === void 0 ? void 0 : _a.get(derivative2);
          }
        });
        if ((cache === null || cache === void 0 ? void 0 : cache.value) && updateCallTimes) {
          cache.value[1] = this.cacheCallTimes++;
        }
        return cache === null || cache === void 0 ? void 0 : cache.value;
      }
      get(derivativeOption) {
        var _a;
        return (_a = this.internalGet(derivativeOption, true)) === null || _a === void 0 ? void 0 : _a[0];
      }
      has(derivativeOption) {
        return !!this.internalGet(derivativeOption);
      }
      set(derivativeOption, value) {
        if (!this.has(derivativeOption)) {
          if (this.size() + 1 > ThemeCache.MAX_CACHE_SIZE + ThemeCache.MAX_CACHE_OFFSET) {
            const [targetKey] = this.keys.reduce((result, key2) => {
              const [, callTimes] = result;
              if (this.internalGet(key2)[1] < callTimes) {
                return [key2, this.internalGet(key2)[1]];
              }
              return result;
            }, [this.keys[0], this.cacheCallTimes]);
            this.delete(targetKey);
          }
          this.keys.push(derivativeOption);
        }
        let cache = this.cache;
        derivativeOption.forEach((derivative2, index2) => {
          if (index2 === derivativeOption.length - 1) {
            cache.set(derivative2, {
              value: [value, this.cacheCallTimes++]
            });
          } else {
            const cacheValue = cache.get(derivative2);
            if (!cacheValue) {
              cache.set(derivative2, {
                map: /* @__PURE__ */ new Map()
              });
            } else if (!cacheValue.map) {
              cacheValue.map = /* @__PURE__ */ new Map();
            }
            cache = cache.get(derivative2).map;
          }
        });
      }
      deleteByPath(currentCache, derivatives) {
        var _a;
        const cache = currentCache.get(derivatives[0]);
        if (derivatives.length === 1) {
          if (!cache.map) {
            currentCache.delete(derivatives[0]);
          } else {
            currentCache.set(derivatives[0], {
              map: cache.map
            });
          }
          return (_a = cache.value) === null || _a === void 0 ? void 0 : _a[0];
        }
        const result = this.deleteByPath(cache.map, derivatives.slice(1));
        if ((!cache.map || cache.map.size === 0) && !cache.value) {
          currentCache.delete(derivatives[0]);
        }
        return result;
      }
      delete(derivativeOption) {
        if (this.has(derivativeOption)) {
          this.keys = this.keys.filter((item) => !sameDerivativeOption(item, derivativeOption));
          return this.deleteByPath(this.cache, derivativeOption);
        }
        return void 0;
      }
    }
    ThemeCache.MAX_CACHE_SIZE = 20;
    ThemeCache.MAX_CACHE_OFFSET = 5;
    let warned = {};
    function warning$3(valid, message) {
    }
    function call(method, valid, message) {
      if (!valid && !warned[message]) {
        warned[message] = true;
      }
    }
    function warningOnce(valid, message) {
      call(warning$3, valid, message);
    }
    function noop$3() {
    }
    let warning$2 = noop$3;
    let uuid$2 = 0;
    class Theme {
      constructor(derivatives) {
        this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];
        this.id = uuid$2;
        if (derivatives.length === 0) {
          warning$2(derivatives.length > 0);
        }
        uuid$2 += 1;
      }
      getDerivativeToken(token2) {
        return this.derivatives.reduce((result, derivative2) => derivative2(token2, result), void 0);
      }
    }
    const cacheThemes = new ThemeCache();
    function createTheme(derivatives) {
      const derivativeArr = Array.isArray(derivatives) ? derivatives : [derivatives];
      if (!cacheThemes.has(derivativeArr)) {
        cacheThemes.set(derivativeArr, new Theme(derivativeArr));
      }
      return cacheThemes.get(derivativeArr);
    }
    const flattenTokenCache = /* @__PURE__ */ new WeakMap();
    function flattenToken(token2) {
      let str = flattenTokenCache.get(token2) || "";
      if (!str) {
        Object.keys(token2).forEach((key2) => {
          const value = token2[key2];
          str += key2;
          if (value instanceof Theme) {
            str += value.id;
          } else if (value && typeof value === "object") {
            str += flattenToken(value);
          } else {
            str += value;
          }
        });
        flattenTokenCache.set(token2, str);
      }
      return str;
    }
    function token2key(token2, salt) {
      return murmur2(`${salt}_${flattenToken(token2)}`);
    }
    const randomSelectorKey = `random-${Date.now()}-${Math.random()}`.replace(/\./g, "");
    const checkContent = "_bAmBoO_";
    function supportSelector(styleStr, handleElement, supportCheck) {
      var _a, _b;
      if (canUseDom$1()) {
        updateCSS$1(styleStr, randomSelectorKey);
        const ele = document.createElement("div");
        ele.style.position = "fixed";
        ele.style.left = "0";
        ele.style.top = "0";
        handleElement === null || handleElement === void 0 ? void 0 : handleElement(ele);
        document.body.appendChild(ele);
        const support = supportCheck ? supportCheck(ele) : (_a = getComputedStyle(ele).content) === null || _a === void 0 ? void 0 : _a.includes(checkContent);
        (_b = ele.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(ele);
        removeCSS(randomSelectorKey);
        return support;
      }
      return false;
    }
    let canLayer = void 0;
    function supportLayer() {
      if (canLayer === void 0) {
        canLayer = supportSelector(`@layer ${randomSelectorKey} { .${randomSelectorKey} { content: "${checkContent}"!important; } }`, (ele) => {
          ele.className = randomSelectorKey;
        });
      }
      return canLayer;
    }
    const EMPTY_OVERRIDE = {};
    const isProduction = true;
    const isPrerender = false;
    const hashPrefix = !isProduction && !isPrerender ? "css-dev-only-do-not-override" : "css";
    const tokenKeys = /* @__PURE__ */ new Map();
    function recordCleanToken(tokenKey) {
      tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) + 1);
    }
    function removeStyleTags(key2, instanceId) {
      if (typeof document !== "undefined") {
        const styles = document.querySelectorAll(`style[${ATTR_TOKEN}="${key2}"]`);
        styles.forEach((style) => {
          var _a;
          if (style[CSS_IN_JS_INSTANCE] === instanceId) {
            (_a = style.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(style);
          }
        });
      }
    }
    const TOKEN_THRESHOLD = 0;
    function cleanTokenStyle(tokenKey, instanceId) {
      tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);
      const tokenKeyList = Array.from(tokenKeys.keys());
      const cleanableKeyList = tokenKeyList.filter((key2) => {
        const count = tokenKeys.get(key2) || 0;
        return count <= 0;
      });
      if (tokenKeyList.length - cleanableKeyList.length > TOKEN_THRESHOLD) {
        cleanableKeyList.forEach((key2) => {
          removeStyleTags(key2, instanceId);
          tokenKeys.delete(key2);
        });
      }
    }
    const getComputedToken = (originToken, overrideToken, theme, format2) => {
      const derivativeToken = theme.getDerivativeToken(originToken);
      let mergedDerivativeToken = _extends$1(_extends$1({}, derivativeToken), overrideToken);
      if (format2) {
        mergedDerivativeToken = format2(mergedDerivativeToken);
      }
      return mergedDerivativeToken;
    };
    function useCacheToken(theme, tokens) {
      let option = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ref({});
      const style = useStyleInject();
      const mergedToken = computed(() => _extends$1({}, ...tokens.value));
      const tokenStr = computed(() => flattenToken(mergedToken.value));
      const overrideTokenStr = computed(() => flattenToken(option.value.override || EMPTY_OVERRIDE));
      const cachedToken = useClientCache("token", computed(() => [option.value.salt || "", theme.value.id, tokenStr.value, overrideTokenStr.value]), () => {
        const {
          salt = "",
          override = EMPTY_OVERRIDE,
          formatToken: formatToken2,
          getComputedToken: compute
        } = option.value;
        const mergedDerivativeToken = compute ? compute(mergedToken.value, override, theme.value) : getComputedToken(mergedToken.value, override, theme.value, formatToken2);
        const tokenKey = token2key(mergedDerivativeToken, salt);
        mergedDerivativeToken._tokenKey = tokenKey;
        recordCleanToken(tokenKey);
        const hashId = `${hashPrefix}-${murmur2(tokenKey)}`;
        mergedDerivativeToken._hashId = hashId;
        return [mergedDerivativeToken, hashId];
      }, (cache) => {
        var _a;
        cleanTokenStyle(cache[0]._tokenKey, (_a = style.value) === null || _a === void 0 ? void 0 : _a.cache.instanceId);
      });
      return cachedToken;
    }
    var unitlessKeys = {
      animationIterationCount: 1,
      aspectRatio: 1,
      borderImageOutset: 1,
      borderImageSlice: 1,
      borderImageWidth: 1,
      boxFlex: 1,
      boxFlexGroup: 1,
      boxOrdinalGroup: 1,
      columnCount: 1,
      columns: 1,
      flex: 1,
      flexGrow: 1,
      flexPositive: 1,
      flexShrink: 1,
      flexNegative: 1,
      flexOrder: 1,
      gridRow: 1,
      gridRowEnd: 1,
      gridRowSpan: 1,
      gridRowStart: 1,
      gridColumn: 1,
      gridColumnEnd: 1,
      gridColumnSpan: 1,
      gridColumnStart: 1,
      msGridRow: 1,
      msGridRowSpan: 1,
      msGridColumn: 1,
      msGridColumnSpan: 1,
      fontWeight: 1,
      lineHeight: 1,
      opacity: 1,
      order: 1,
      orphans: 1,
      tabSize: 1,
      widows: 1,
      zIndex: 1,
      zoom: 1,
      WebkitLineClamp: 1,
      // SVG-related properties
      fillOpacity: 1,
      floodOpacity: 1,
      stopOpacity: 1,
      strokeDasharray: 1,
      strokeDashoffset: 1,
      strokeMiterlimit: 1,
      strokeOpacity: 1,
      strokeWidth: 1
    };
    var COMMENT = "comm";
    var RULESET = "rule";
    var DECLARATION = "decl";
    var IMPORT = "@import";
    var KEYFRAMES = "@keyframes";
    var LAYER = "@layer";
    var abs = Math.abs;
    var from = String.fromCharCode;
    function trim(value) {
      return value.trim();
    }
    function replace(value, pattern, replacement) {
      return value.replace(pattern, replacement);
    }
    function indexof(value, search, position2) {
      return value.indexOf(search, position2);
    }
    function charat(value, index2) {
      return value.charCodeAt(index2) | 0;
    }
    function substr(value, begin, end) {
      return value.slice(begin, end);
    }
    function strlen(value) {
      return value.length;
    }
    function sizeof(value) {
      return value.length;
    }
    function append(value, array) {
      return array.push(value), value;
    }
    var line = 1;
    var column = 1;
    var length = 0;
    var position = 0;
    var character = 0;
    var characters = "";
    function node(value, root2, parent2, type, props2, children, length2, siblings) {
      return { value, root: root2, parent: parent2, type, props: props2, children, line, column, length: length2, return: "", siblings };
    }
    function char() {
      return character;
    }
    function prev() {
      character = position > 0 ? charat(characters, --position) : 0;
      if (column--, character === 10)
        column = 1, line--;
      return character;
    }
    function next() {
      character = position < length ? charat(characters, position++) : 0;
      if (column++, character === 10)
        column = 1, line++;
      return character;
    }
    function peek() {
      return charat(characters, position);
    }
    function caret() {
      return position;
    }
    function slice(begin, end) {
      return substr(characters, begin, end);
    }
    function token(type) {
      switch (type) {
        case 0:
        case 9:
        case 10:
        case 13:
        case 32:
          return 5;
        case 33:
        case 43:
        case 44:
        case 47:
        case 62:
        case 64:
        case 126:
        case 59:
        case 123:
        case 125:
          return 4;
        case 58:
          return 3;
        case 34:
        case 39:
        case 40:
        case 91:
          return 2;
        case 41:
        case 93:
          return 1;
      }
      return 0;
    }
    function alloc(value) {
      return line = column = 1, length = strlen(characters = value), position = 0, [];
    }
    function dealloc(value) {
      return characters = "", value;
    }
    function delimit(type) {
      return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
    }
    function whitespace$1(type) {
      while (character = peek())
        if (character < 33)
          next();
        else
          break;
      return token(type) > 2 || token(character) > 3 ? "" : " ";
    }
    function escaping(index2, count) {
      while (--count && next())
        if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
          break;
      return slice(index2, caret() + (count < 6 && peek() == 32 && next() == 32));
    }
    function delimiter(type) {
      while (next())
        switch (character) {
          case type:
            return position;
          case 34:
          case 39:
            if (type !== 34 && type !== 39)
              delimiter(character);
            break;
          case 40:
            if (type === 41)
              delimiter(type);
            break;
          case 92:
            next();
            break;
        }
      return position;
    }
    function commenter(type, index2) {
      while (next())
        if (type + character === 47 + 10)
          break;
        else if (type + character === 42 + 42 && peek() === 47)
          break;
      return "/*" + slice(index2, position - 1) + "*" + from(type === 47 ? type : next());
    }
    function identifier(index2) {
      while (!token(peek()))
        next();
      return slice(index2, position);
    }
    function compile(value) {
      return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
    }
    function parse(value, root2, parent2, rule, rules2, rulesets, pseudo, points, declarations) {
      var index2 = 0;
      var offset = 0;
      var length2 = pseudo;
      var atrule = 0;
      var property2 = 0;
      var previous = 0;
      var variable = 1;
      var scanning = 1;
      var ampersand = 1;
      var character2 = 0;
      var type = "";
      var props2 = rules2;
      var children = rulesets;
      var reference = rule;
      var characters2 = type;
      while (scanning)
        switch (previous = character2, character2 = next()) {
          case 40:
            if (previous != 108 && charat(characters2, length2 - 1) == 58) {
              if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index2 ? points[index2 - 1] : 0)) != -1)
                ampersand = -1;
              break;
            }
          case 34:
          case 39:
          case 91:
            characters2 += delimit(character2);
            break;
          case 9:
          case 10:
          case 13:
          case 32:
            characters2 += whitespace$1(previous);
            break;
          case 92:
            characters2 += escaping(caret() - 1, 7);
            continue;
          case 47:
            switch (peek()) {
              case 42:
              case 47:
                append(comment(commenter(next(), caret()), root2, parent2, declarations), declarations);
                break;
              default:
                characters2 += "/";
            }
            break;
          case 123 * variable:
            points[index2++] = strlen(characters2) * ampersand;
          case 125 * variable:
          case 59:
          case 0:
            switch (character2) {
              case 0:
              case 125:
                scanning = 0;
              case 59 + offset:
                if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
                if (property2 > 0 && strlen(characters2) - length2)
                  append(property2 > 32 ? declaration(characters2 + ";", rule, parent2, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent2, length2 - 2, declarations), declarations);
                break;
              case 59:
                characters2 += ";";
              default:
                append(reference = ruleset(characters2, root2, parent2, index2, offset, rules2, points, type, props2 = [], children = [], length2, rulesets), rulesets);
                if (character2 === 123)
                  if (offset === 0)
                    parse(characters2, root2, reference, reference, props2, rulesets, length2, points, children);
                  else
                    switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
                      case 100:
                      case 108:
                      case 109:
                      case 115:
                        parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules2, points, type, rules2, props2 = [], length2, children), children), rules2, children, length2, points, rule ? props2 : children);
                        break;
                      default:
                        parse(characters2, reference, reference, reference, [""], children, 0, points, children);
                    }
            }
            index2 = offset = property2 = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
            break;
          case 58:
            length2 = 1 + strlen(characters2), property2 = previous;
          default:
            if (variable < 1) {
              if (character2 == 123)
                --variable;
              else if (character2 == 125 && variable++ == 0 && prev() == 125)
                continue;
            }
            switch (characters2 += from(character2), character2 * variable) {
              case 38:
                ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
                break;
              case 44:
                points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
                break;
              case 64:
                if (peek() === 45)
                  characters2 += delimit(next());
                atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
                break;
              case 45:
                if (previous === 45 && strlen(characters2) == 2)
                  variable = 0;
            }
        }
      return rulesets;
    }
    function ruleset(value, root2, parent2, index2, offset, rules2, points, type, props2, children, length2, siblings) {
      var post = offset - 1;
      var rule = offset === 0 ? rules2 : [""];
      var size2 = sizeof(rule);
      for (var i2 = 0, j2 = 0, k2 = 0; i2 < index2; ++i2)
        for (var x2 = 0, y2 = substr(value, post + 1, post = abs(j2 = points[i2])), z2 = value; x2 < size2; ++x2)
          if (z2 = trim(j2 > 0 ? rule[x2] + " " + y2 : replace(y2, /&\f/g, rule[x2])))
            props2[k2++] = z2;
      return node(value, root2, parent2, offset === 0 ? RULESET : type, props2, children, length2, siblings);
    }
    function comment(value, root2, parent2, siblings) {
      return node(value, root2, parent2, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
    }
    function declaration(value, root2, parent2, length2, siblings) {
      return node(value, root2, parent2, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
    }
    function serialize(children, callback) {
      var output = "";
      for (var i2 = 0; i2 < children.length; i2++)
        output += callback(children[i2], i2, children, callback) || "";
      return output;
    }
    function stringify(element, index2, children, callback) {
      switch (element.type) {
        case LAYER:
          if (element.children.length) break;
        case IMPORT:
        case DECLARATION:
          return element.return = element.return || element.value;
        case COMMENT:
          return "";
        case KEYFRAMES:
          return element.return = element.value + "{" + serialize(element.children, callback) + "}";
        case RULESET:
          if (!strlen(element.value = element.props.join(","))) return "";
      }
      return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
    }
    const ATTR_CACHE_MAP = "data-ant-cssinjs-cache-path";
    const CSS_FILE_STYLE = "_FILE_STYLE__";
    let cachePathMap;
    let fromCSSFile = true;
    function prepare() {
      var _a;
      if (!cachePathMap) {
        cachePathMap = {};
        if (canUseDom$1()) {
          const div = document.createElement("div");
          div.className = ATTR_CACHE_MAP;
          div.style.position = "fixed";
          div.style.visibility = "hidden";
          div.style.top = "-9999px";
          document.body.appendChild(div);
          let content = getComputedStyle(div).content || "";
          content = content.replace(/^"/, "").replace(/"$/, "");
          content.split(";").forEach((item) => {
            const [path, hash] = item.split(":");
            cachePathMap[path] = hash;
          });
          const inlineMapStyle = document.querySelector(`style[${ATTR_CACHE_MAP}]`);
          if (inlineMapStyle) {
            fromCSSFile = false;
            (_a = inlineMapStyle.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(inlineMapStyle);
          }
          document.body.removeChild(div);
        }
      }
    }
    function existPath(path) {
      prepare();
      return !!cachePathMap[path];
    }
    function getStyleAndHash(path) {
      const hash = cachePathMap[path];
      let styleStr = null;
      if (hash && canUseDom$1()) {
        if (fromCSSFile) {
          styleStr = CSS_FILE_STYLE;
        } else {
          const style = document.querySelector(`style[${ATTR_MARK}="${cachePathMap[path]}"]`);
          if (style) {
            styleStr = style.innerHTML;
          } else {
            delete cachePathMap[path];
          }
        }
      }
      return [styleStr, hash];
    }
    const isClientSide = canUseDom$1();
    const SKIP_CHECK = "_skip_check_";
    const MULTI_VALUE = "_multi_value_";
    function normalizeStyle(styleStr) {
      const serialized = serialize(compile(styleStr), stringify);
      return serialized.replace(/\{%%%\:[^;];}/g, ";");
    }
    function isCompoundCSSProperty(value) {
      return typeof value === "object" && value && (SKIP_CHECK in value || MULTI_VALUE in value);
    }
    function injectSelectorHash(key2, hashId, hashPriority) {
      if (!hashId) {
        return key2;
      }
      const hashClassName = `.${hashId}`;
      const hashSelector = hashPriority === "low" ? `:where(${hashClassName})` : hashClassName;
      const keys2 = key2.split(",").map((k2) => {
        var _a;
        const fullPath = k2.trim().split(/\s+/);
        let firstPath = fullPath[0] || "";
        const htmlElement = ((_a = firstPath.match(/^\w+/)) === null || _a === void 0 ? void 0 : _a[0]) || "";
        firstPath = `${htmlElement}${hashSelector}${firstPath.slice(htmlElement.length)}`;
        return [firstPath, ...fullPath.slice(1)].join(" ");
      });
      return keys2.join(",");
    }
    const globalEffectStyleKeys = /* @__PURE__ */ new Set();
    const parseStyle = function(interpolation) {
      let config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      let {
        root: root2,
        injectHash,
        parentSelectors
      } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
        root: true,
        parentSelectors: []
      };
      const {
        hashId,
        layer,
        path,
        hashPriority,
        transformers = [],
        linters = []
      } = config;
      let styleStr = "";
      let effectStyle = {};
      function parseKeyframes(keyframes) {
        const animationName = keyframes.getName(hashId);
        if (!effectStyle[animationName]) {
          const [parsedStr] = parseStyle(keyframes.style, config, {
            root: false,
            parentSelectors
          });
          effectStyle[animationName] = `@keyframes ${keyframes.getName(hashId)}${parsedStr}`;
        }
      }
      function flattenList(list) {
        let fullList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
        list.forEach((item) => {
          if (Array.isArray(item)) {
            flattenList(item, fullList);
          } else if (item) {
            fullList.push(item);
          }
        });
        return fullList;
      }
      const flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);
      flattenStyleList.forEach((originStyle) => {
        const style = typeof originStyle === "string" && !root2 ? {} : originStyle;
        if (typeof style === "string") {
          styleStr += `${style}
`;
        } else if (style._keyframe) {
          parseKeyframes(style);
        } else {
          const mergedStyle = transformers.reduce((prev2, trans) => {
            var _a;
            return ((_a = trans === null || trans === void 0 ? void 0 : trans.visit) === null || _a === void 0 ? void 0 : _a.call(trans, prev2)) || prev2;
          }, style);
          Object.keys(mergedStyle).forEach((key2) => {
            var _a;
            const value = mergedStyle[key2];
            if (typeof value === "object" && value && (key2 !== "animationName" || !value._keyframe) && !isCompoundCSSProperty(value)) {
              let subInjectHash = false;
              let mergedKey = key2.trim();
              let nextRoot = false;
              if ((root2 || injectHash) && hashId) {
                if (mergedKey.startsWith("@")) {
                  subInjectHash = true;
                } else {
                  mergedKey = injectSelectorHash(key2, hashId, hashPriority);
                }
              } else if (root2 && !hashId && (mergedKey === "&" || mergedKey === "")) {
                mergedKey = "";
                nextRoot = true;
              }
              const [parsedStr, childEffectStyle] = parseStyle(value, config, {
                root: nextRoot,
                injectHash: subInjectHash,
                parentSelectors: [...parentSelectors, mergedKey]
              });
              effectStyle = _extends$1(_extends$1({}, effectStyle), childEffectStyle);
              styleStr += `${mergedKey}${parsedStr}`;
            } else {
              let appendStyle = function(cssKey, cssValue) {
                const styleName = cssKey.replace(/[A-Z]/g, (match2) => `-${match2.toLowerCase()}`);
                let formatValue = cssValue;
                if (!unitlessKeys[cssKey] && typeof formatValue === "number" && formatValue !== 0) {
                  formatValue = `${formatValue}px`;
                }
                if (cssKey === "animationName" && (cssValue === null || cssValue === void 0 ? void 0 : cssValue._keyframe)) {
                  parseKeyframes(cssValue);
                  formatValue = cssValue.getName(hashId);
                }
                styleStr += `${styleName}:${formatValue};`;
              };
              const actualValue = (_a = value === null || value === void 0 ? void 0 : value.value) !== null && _a !== void 0 ? _a : value;
              if (typeof value === "object" && (value === null || value === void 0 ? void 0 : value[MULTI_VALUE]) && Array.isArray(actualValue)) {
                actualValue.forEach((item) => {
                  appendStyle(key2, item);
                });
              } else {
                appendStyle(key2, actualValue);
              }
            }
          });
        }
      });
      if (!root2) {
        styleStr = `{${styleStr}}`;
      } else if (layer && supportLayer()) {
        const layerCells = layer.split(",");
        const layerName = layerCells[layerCells.length - 1].trim();
        styleStr = `@layer ${layerName} {${styleStr}}`;
        if (layerCells.length > 1) {
          styleStr = `@layer ${layer}{%%%:%}${styleStr}`;
        }
      }
      return [styleStr, effectStyle];
    };
    function uniqueHash(path, styleStr) {
      return murmur2(`${path.join("%")}${styleStr}`);
    }
    function useStyleRegister(info, styleFn) {
      const styleContext = useStyleInject();
      const tokenKey = computed(() => info.value.token._tokenKey);
      const fullPath = computed(() => [tokenKey.value, ...info.value.path]);
      let isMergedClientSide = isClientSide;
      useClientCache(
        "style",
        fullPath,
        // Create cache if needed
        () => {
          const {
            path,
            hashId,
            layer,
            nonce,
            clientOnly,
            order = 0
          } = info.value;
          const cachePath = fullPath.value.join("|");
          if (existPath(cachePath)) {
            const [inlineCacheStyleStr, styleHash] = getStyleAndHash(cachePath);
            if (inlineCacheStyleStr) {
              return [inlineCacheStyleStr, tokenKey.value, styleHash, {}, clientOnly, order];
            }
          }
          const styleObj = styleFn();
          const {
            hashPriority,
            container,
            transformers,
            linters,
            cache
          } = styleContext.value;
          const [parsedStyle, effectStyle] = parseStyle(styleObj, {
            hashId,
            hashPriority,
            layer,
            path: path.join("-"),
            transformers,
            linters
          });
          const styleStr = normalizeStyle(parsedStyle);
          const styleId = uniqueHash(fullPath.value, styleStr);
          if (isMergedClientSide) {
            const mergedCSSConfig = {
              mark: ATTR_MARK,
              prepend: "queue",
              attachTo: container,
              priority: order
            };
            const nonceStr = typeof nonce === "function" ? nonce() : nonce;
            if (nonceStr) {
              mergedCSSConfig.csp = {
                nonce: nonceStr
              };
            }
            const style = updateCSS$1(styleStr, styleId, mergedCSSConfig);
            style[CSS_IN_JS_INSTANCE] = cache.instanceId;
            style.setAttribute(ATTR_TOKEN, tokenKey.value);
            Object.keys(effectStyle).forEach((effectKey) => {
              if (!globalEffectStyleKeys.has(effectKey)) {
                globalEffectStyleKeys.add(effectKey);
                updateCSS$1(normalizeStyle(effectStyle[effectKey]), `_effect-${effectKey}`, {
                  mark: ATTR_MARK,
                  prepend: "queue",
                  attachTo: container
                });
              }
            });
          }
          return [styleStr, tokenKey.value, styleId, effectStyle, clientOnly, order];
        },
        // Remove cache if no need
        (_ref, fromHMR) => {
          let [, , styleId] = _ref;
          if ((fromHMR || styleContext.value.autoClear) && isClientSide) {
            removeCSS(styleId, {
              mark: ATTR_MARK
            });
          }
        }
      );
      return (node2) => {
        return node2;
      };
    }
    class Keyframe {
      constructor(name, style) {
        this._keyframe = true;
        this.name = name;
        this.style = style;
      }
      getName() {
        let hashId = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
        return hashId ? `${hashId}-${this.name}` : this.name;
      }
    }
    const version = "4.2.3";
    const PresetColors = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
    function bound01(n2, max) {
      if (isOnePointZero(n2)) {
        n2 = "100%";
      }
      var isPercent = isPercentage(n2);
      n2 = max === 360 ? n2 : Math.min(max, Math.max(0, parseFloat(n2)));
      if (isPercent) {
        n2 = parseInt(String(n2 * max), 10) / 100;
      }
      if (Math.abs(n2 - max) < 1e-6) {
        return 1;
      }
      if (max === 360) {
        n2 = (n2 < 0 ? n2 % max + max : n2 % max) / parseFloat(String(max));
      } else {
        n2 = n2 % max / parseFloat(String(max));
      }
      return n2;
    }
    function clamp01(val) {
      return Math.min(1, Math.max(0, val));
    }
    function isOnePointZero(n2) {
      return typeof n2 === "string" && n2.indexOf(".") !== -1 && parseFloat(n2) === 1;
    }
    function isPercentage(n2) {
      return typeof n2 === "string" && n2.indexOf("%") !== -1;
    }
    function boundAlpha(a2) {
      a2 = parseFloat(a2);
      if (isNaN(a2) || a2 < 0 || a2 > 1) {
        a2 = 1;
      }
      return a2;
    }
    function convertToPercentage(n2) {
      if (n2 <= 1) {
        return "".concat(Number(n2) * 100, "%");
      }
      return n2;
    }
    function pad2(c2) {
      return c2.length === 1 ? "0" + c2 : String(c2);
    }
    function rgbToRgb(r2, g2, b2) {
      return {
        r: bound01(r2, 255) * 255,
        g: bound01(g2, 255) * 255,
        b: bound01(b2, 255) * 255
      };
    }
    function rgbToHsl(r2, g2, b2) {
      r2 = bound01(r2, 255);
      g2 = bound01(g2, 255);
      b2 = bound01(b2, 255);
      var max = Math.max(r2, g2, b2);
      var min = Math.min(r2, g2, b2);
      var h2 = 0;
      var s2 = 0;
      var l2 = (max + min) / 2;
      if (max === min) {
        s2 = 0;
        h2 = 0;
      } else {
        var d2 = max - min;
        s2 = l2 > 0.5 ? d2 / (2 - max - min) : d2 / (max + min);
        switch (max) {
          case r2:
            h2 = (g2 - b2) / d2 + (g2 < b2 ? 6 : 0);
            break;
          case g2:
            h2 = (b2 - r2) / d2 + 2;
            break;
          case b2:
            h2 = (r2 - g2) / d2 + 4;
            break;
        }
        h2 /= 6;
      }
      return { h: h2, s: s2, l: l2 };
    }
    function hue2rgb(p2, q2, t2) {
      if (t2 < 0) {
        t2 += 1;
      }
      if (t2 > 1) {
        t2 -= 1;
      }
      if (t2 < 1 / 6) {
        return p2 + (q2 - p2) * (6 * t2);
      }
      if (t2 < 1 / 2) {
        return q2;
      }
      if (t2 < 2 / 3) {
        return p2 + (q2 - p2) * (2 / 3 - t2) * 6;
      }
      return p2;
    }
    function hslToRgb(h2, s2, l2) {
      var r2;
      var g2;
      var b2;
      h2 = bound01(h2, 360);
      s2 = bound01(s2, 100);
      l2 = bound01(l2, 100);
      if (s2 === 0) {
        g2 = l2;
        b2 = l2;
        r2 = l2;
      } else {
        var q2 = l2 < 0.5 ? l2 * (1 + s2) : l2 + s2 - l2 * s2;
        var p2 = 2 * l2 - q2;
        r2 = hue2rgb(p2, q2, h2 + 1 / 3);
        g2 = hue2rgb(p2, q2, h2);
        b2 = hue2rgb(p2, q2, h2 - 1 / 3);
      }
      return { r: r2 * 255, g: g2 * 255, b: b2 * 255 };
    }
    function rgbToHsv(r2, g2, b2) {
      r2 = bound01(r2, 255);
      g2 = bound01(g2, 255);
      b2 = bound01(b2, 255);
      var max = Math.max(r2, g2, b2);
      var min = Math.min(r2, g2, b2);
      var h2 = 0;
      var v2 = max;
      var d2 = max - min;
      var s2 = max === 0 ? 0 : d2 / max;
      if (max === min) {
        h2 = 0;
      } else {
        switch (max) {
          case r2:
            h2 = (g2 - b2) / d2 + (g2 < b2 ? 6 : 0);
            break;
          case g2:
            h2 = (b2 - r2) / d2 + 2;
            break;
          case b2:
            h2 = (r2 - g2) / d2 + 4;
            break;
        }
        h2 /= 6;
      }
      return { h: h2, s: s2, v: v2 };
    }
    function hsvToRgb(h2, s2, v2) {
      h2 = bound01(h2, 360) * 6;
      s2 = bound01(s2, 100);
      v2 = bound01(v2, 100);
      var i2 = Math.floor(h2);
      var f2 = h2 - i2;
      var p2 = v2 * (1 - s2);
      var q2 = v2 * (1 - f2 * s2);
      var t2 = v2 * (1 - (1 - f2) * s2);
      var mod = i2 % 6;
      var r2 = [v2, q2, p2, p2, t2, v2][mod];
      var g2 = [t2, v2, v2, q2, p2, p2][mod];
      var b2 = [p2, p2, t2, v2, v2, q2][mod];
      return { r: r2 * 255, g: g2 * 255, b: b2 * 255 };
    }
    function rgbToHex(r2, g2, b2, allow3Char) {
      var hex = [
        pad2(Math.round(r2).toString(16)),
        pad2(Math.round(g2).toString(16)),
        pad2(Math.round(b2).toString(16))
      ];
      if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) {
        return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
      }
      return hex.join("");
    }
    function rgbaToHex(r2, g2, b2, a2, allow4Char) {
      var hex = [
        pad2(Math.round(r2).toString(16)),
        pad2(Math.round(g2).toString(16)),
        pad2(Math.round(b2).toString(16)),
        pad2(convertDecimalToHex(a2))
      ];
      if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) {
        return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
      }
      return hex.join("");
    }
    function convertDecimalToHex(d2) {
      return Math.round(parseFloat(d2) * 255).toString(16);
    }
    function convertHexToDecimal(h2) {
      return parseIntFromHex(h2) / 255;
    }
    function parseIntFromHex(val) {
      return parseInt(val, 16);
    }
    function numberInputToObject(color) {
      return {
        r: color >> 16,
        g: (color & 65280) >> 8,
        b: color & 255
      };
    }
    var names = {
      aliceblue: "#f0f8ff",
      antiquewhite: "#faebd7",
      aqua: "#00ffff",
      aquamarine: "#7fffd4",
      azure: "#f0ffff",
      beige: "#f5f5dc",
      bisque: "#ffe4c4",
      black: "#000000",
      blanchedalmond: "#ffebcd",
      blue: "#0000ff",
      blueviolet: "#8a2be2",
      brown: "#a52a2a",
      burlywood: "#deb887",
      cadetblue: "#5f9ea0",
      chartreuse: "#7fff00",
      chocolate: "#d2691e",
      coral: "#ff7f50",
      cornflowerblue: "#6495ed",
      cornsilk: "#fff8dc",
      crimson: "#dc143c",
      cyan: "#00ffff",
      darkblue: "#00008b",
      darkcyan: "#008b8b",
      darkgoldenrod: "#b8860b",
      darkgray: "#a9a9a9",
      darkgreen: "#006400",
      darkgrey: "#a9a9a9",
      darkkhaki: "#bdb76b",
      darkmagenta: "#8b008b",
      darkolivegreen: "#556b2f",
      darkorange: "#ff8c00",
      darkorchid: "#9932cc",
      darkred: "#8b0000",
      darksalmon: "#e9967a",
      darkseagreen: "#8fbc8f",
      darkslateblue: "#483d8b",
      darkslategray: "#2f4f4f",
      darkslategrey: "#2f4f4f",
      darkturquoise: "#00ced1",
      darkviolet: "#9400d3",
      deeppink: "#ff1493",
      deepskyblue: "#00bfff",
      dimgray: "#696969",
      dimgrey: "#696969",
      dodgerblue: "#1e90ff",
      firebrick: "#b22222",
      floralwhite: "#fffaf0",
      forestgreen: "#228b22",
      fuchsia: "#ff00ff",
      gainsboro: "#dcdcdc",
      ghostwhite: "#f8f8ff",
      goldenrod: "#daa520",
      gold: "#ffd700",
      gray: "#808080",
      green: "#008000",
      greenyellow: "#adff2f",
      grey: "#808080",
      honeydew: "#f0fff0",
      hotpink: "#ff69b4",
      indianred: "#cd5c5c",
      indigo: "#4b0082",
      ivory: "#fffff0",
      khaki: "#f0e68c",
      lavenderblush: "#fff0f5",
      lavender: "#e6e6fa",
      lawngreen: "#7cfc00",
      lemonchiffon: "#fffacd",
      lightblue: "#add8e6",
      lightcoral: "#f08080",
      lightcyan: "#e0ffff",
      lightgoldenrodyellow: "#fafad2",
      lightgray: "#d3d3d3",
      lightgreen: "#90ee90",
      lightgrey: "#d3d3d3",
      lightpink: "#ffb6c1",
      lightsalmon: "#ffa07a",
      lightseagreen: "#20b2aa",
      lightskyblue: "#87cefa",
      lightslategray: "#778899",
      lightslategrey: "#778899",
      lightsteelblue: "#b0c4de",
      lightyellow: "#ffffe0",
      lime: "#00ff00",
      limegreen: "#32cd32",
      linen: "#faf0e6",
      magenta: "#ff00ff",
      maroon: "#800000",
      mediumaquamarine: "#66cdaa",
      mediumblue: "#0000cd",
      mediumorchid: "#ba55d3",
      mediumpurple: "#9370db",
      mediumseagreen: "#3cb371",
      mediumslateblue: "#7b68ee",
      mediumspringgreen: "#00fa9a",
      mediumturquoise: "#48d1cc",
      mediumvioletred: "#c71585",
      midnightblue: "#191970",
      mintcream: "#f5fffa",
      mistyrose: "#ffe4e1",
      moccasin: "#ffe4b5",
      navajowhite: "#ffdead",
      navy: "#000080",
      oldlace: "#fdf5e6",
      olive: "#808000",
      olivedrab: "#6b8e23",
      orange: "#ffa500",
      orangered: "#ff4500",
      orchid: "#da70d6",
      palegoldenrod: "#eee8aa",
      palegreen: "#98fb98",
      paleturquoise: "#afeeee",
      palevioletred: "#db7093",
      papayawhip: "#ffefd5",
      peachpuff: "#ffdab9",
      peru: "#cd853f",
      pink: "#ffc0cb",
      plum: "#dda0dd",
      powderblue: "#b0e0e6",
      purple: "#800080",
      rebeccapurple: "#663399",
      red: "#ff0000",
      rosybrown: "#bc8f8f",
      royalblue: "#4169e1",
      saddlebrown: "#8b4513",
      salmon: "#fa8072",
      sandybrown: "#f4a460",
      seagreen: "#2e8b57",
      seashell: "#fff5ee",
      sienna: "#a0522d",
      silver: "#c0c0c0",
      skyblue: "#87ceeb",
      slateblue: "#6a5acd",
      slategray: "#708090",
      slategrey: "#708090",
      snow: "#fffafa",
      springgreen: "#00ff7f",
      steelblue: "#4682b4",
      tan: "#d2b48c",
      teal: "#008080",
      thistle: "#d8bfd8",
      tomato: "#ff6347",
      turquoise: "#40e0d0",
      violet: "#ee82ee",
      wheat: "#f5deb3",
      white: "#ffffff",
      whitesmoke: "#f5f5f5",
      yellow: "#ffff00",
      yellowgreen: "#9acd32"
    };
    function inputToRGB(color) {
      var rgb = { r: 0, g: 0, b: 0 };
      var a2 = 1;
      var s2 = null;
      var v2 = null;
      var l2 = null;
      var ok = false;
      var format2 = false;
      if (typeof color === "string") {
        color = stringInputToObject(color);
      }
      if (typeof color === "object") {
        if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
          rgb = rgbToRgb(color.r, color.g, color.b);
          ok = true;
          format2 = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
        } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
          s2 = convertToPercentage(color.s);
          v2 = convertToPercentage(color.v);
          rgb = hsvToRgb(color.h, s2, v2);
          ok = true;
          format2 = "hsv";
        } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
          s2 = convertToPercentage(color.s);
          l2 = convertToPercentage(color.l);
          rgb = hslToRgb(color.h, s2, l2);
          ok = true;
          format2 = "hsl";
        }
        if (Object.prototype.hasOwnProperty.call(color, "a")) {
          a2 = color.a;
        }
      }
      a2 = boundAlpha(a2);
      return {
        ok,
        format: color.format || format2,
        r: Math.min(255, Math.max(rgb.r, 0)),
        g: Math.min(255, Math.max(rgb.g, 0)),
        b: Math.min(255, Math.max(rgb.b, 0)),
        a: a2
      };
    }
    var CSS_INTEGER = "[-\\+]?\\d+%?";
    var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
    var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
    var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
    var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
    var matchers = {
      CSS_UNIT: new RegExp(CSS_UNIT),
      rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
      rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
      hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
      hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
      hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
      hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
      hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
      hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
      hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
      hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
    };
    function stringInputToObject(color) {
      color = color.trim().toLowerCase();
      if (color.length === 0) {
        return false;
      }
      var named = false;
      if (names[color]) {
        color = names[color];
        named = true;
      } else if (color === "transparent") {
        return { r: 0, g: 0, b: 0, a: 0, format: "name" };
      }
      var match2 = matchers.rgb.exec(color);
      if (match2) {
        return { r: match2[1], g: match2[2], b: match2[3] };
      }
      match2 = matchers.rgba.exec(color);
      if (match2) {
        return { r: match2[1], g: match2[2], b: match2[3], a: match2[4] };
      }
      match2 = matchers.hsl.exec(color);
      if (match2) {
        return { h: match2[1], s: match2[2], l: match2[3] };
      }
      match2 = matchers.hsla.exec(color);
      if (match2) {
        return { h: match2[1], s: match2[2], l: match2[3], a: match2[4] };
      }
      match2 = matchers.hsv.exec(color);
      if (match2) {
        return { h: match2[1], s: match2[2], v: match2[3] };
      }
      match2 = matchers.hsva.exec(color);
      if (match2) {
        return { h: match2[1], s: match2[2], v: match2[3], a: match2[4] };
      }
      match2 = matchers.hex8.exec(color);
      if (match2) {
        return {
          r: parseIntFromHex(match2[1]),
          g: parseIntFromHex(match2[2]),
          b: parseIntFromHex(match2[3]),
          a: convertHexToDecimal(match2[4]),
          format: named ? "name" : "hex8"
        };
      }
      match2 = matchers.hex6.exec(color);
      if (match2) {
        return {
          r: parseIntFromHex(match2[1]),
          g: parseIntFromHex(match2[2]),
          b: parseIntFromHex(match2[3]),
          format: named ? "name" : "hex"
        };
      }
      match2 = matchers.hex4.exec(color);
      if (match2) {
        return {
          r: parseIntFromHex(match2[1] + match2[1]),
          g: parseIntFromHex(match2[2] + match2[2]),
          b: parseIntFromHex(match2[3] + match2[3]),
          a: convertHexToDecimal(match2[4] + match2[4]),
          format: named ? "name" : "hex8"
        };
      }
      match2 = matchers.hex3.exec(color);
      if (match2) {
        return {
          r: parseIntFromHex(match2[1] + match2[1]),
          g: parseIntFromHex(match2[2] + match2[2]),
          b: parseIntFromHex(match2[3] + match2[3]),
          format: named ? "name" : "hex"
        };
      }
      return false;
    }
    function isValidCSSUnit(color) {
      return Boolean(matchers.CSS_UNIT.exec(String(color)));
    }
    var TinyColor = (
      /** @class */
      function() {
        function TinyColor2(color, opts) {
          if (color === void 0) {
            color = "";
          }
          if (opts === void 0) {
            opts = {};
          }
          var _a;
          if (color instanceof TinyColor2) {
            return color;
          }
          if (typeof color === "number") {
            color = numberInputToObject(color);
          }
          this.originalInput = color;
          var rgb = inputToRGB(color);
          this.originalInput = color;
          this.r = rgb.r;
          this.g = rgb.g;
          this.b = rgb.b;
          this.a = rgb.a;
          this.roundA = Math.round(100 * this.a) / 100;
          this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;
          this.gradientType = opts.gradientType;
          if (this.r < 1) {
            this.r = Math.round(this.r);
          }
          if (this.g < 1) {
            this.g = Math.round(this.g);
          }
          if (this.b < 1) {
            this.b = Math.round(this.b);
          }
          this.isValid = rgb.ok;
        }
        TinyColor2.prototype.isDark = function() {
          return this.getBrightness() < 128;
        };
        TinyColor2.prototype.isLight = function() {
          return !this.isDark();
        };
        TinyColor2.prototype.getBrightness = function() {
          var rgb = this.toRgb();
          return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
        };
        TinyColor2.prototype.getLuminance = function() {
          var rgb = this.toRgb();
          var R2;
          var G;
          var B2;
          var RsRGB = rgb.r / 255;
          var GsRGB = rgb.g / 255;
          var BsRGB = rgb.b / 255;
          if (RsRGB <= 0.03928) {
            R2 = RsRGB / 12.92;
          } else {
            R2 = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
          }
          if (GsRGB <= 0.03928) {
            G = GsRGB / 12.92;
          } else {
            G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
          }
          if (BsRGB <= 0.03928) {
            B2 = BsRGB / 12.92;
          } else {
            B2 = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
          }
          return 0.2126 * R2 + 0.7152 * G + 0.0722 * B2;
        };
        TinyColor2.prototype.getAlpha = function() {
          return this.a;
        };
        TinyColor2.prototype.setAlpha = function(alpha) {
          this.a = boundAlpha(alpha);
          this.roundA = Math.round(100 * this.a) / 100;
          return this;
        };
        TinyColor2.prototype.isMonochrome = function() {
          var s2 = this.toHsl().s;
          return s2 === 0;
        };
        TinyColor2.prototype.toHsv = function() {
          var hsv = rgbToHsv(this.r, this.g, this.b);
          return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };
        };
        TinyColor2.prototype.toHsvString = function() {
          var hsv = rgbToHsv(this.r, this.g, this.b);
          var h2 = Math.round(hsv.h * 360);
          var s2 = Math.round(hsv.s * 100);
          var v2 = Math.round(hsv.v * 100);
          return this.a === 1 ? "hsv(".concat(h2, ", ").concat(s2, "%, ").concat(v2, "%)") : "hsva(".concat(h2, ", ").concat(s2, "%, ").concat(v2, "%, ").concat(this.roundA, ")");
        };
        TinyColor2.prototype.toHsl = function() {
          var hsl = rgbToHsl(this.r, this.g, this.b);
          return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };
        };
        TinyColor2.prototype.toHslString = function() {
          var hsl = rgbToHsl(this.r, this.g, this.b);
          var h2 = Math.round(hsl.h * 360);
          var s2 = Math.round(hsl.s * 100);
          var l2 = Math.round(hsl.l * 100);
          return this.a === 1 ? "hsl(".concat(h2, ", ").concat(s2, "%, ").concat(l2, "%)") : "hsla(".concat(h2, ", ").concat(s2, "%, ").concat(l2, "%, ").concat(this.roundA, ")");
        };
        TinyColor2.prototype.toHex = function(allow3Char) {
          if (allow3Char === void 0) {
            allow3Char = false;
          }
          return rgbToHex(this.r, this.g, this.b, allow3Char);
        };
        TinyColor2.prototype.toHexString = function(allow3Char) {
          if (allow3Char === void 0) {
            allow3Char = false;
          }
          return "#" + this.toHex(allow3Char);
        };
        TinyColor2.prototype.toHex8 = function(allow4Char) {
          if (allow4Char === void 0) {
            allow4Char = false;
          }
          return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
        };
        TinyColor2.prototype.toHex8String = function(allow4Char) {
          if (allow4Char === void 0) {
            allow4Char = false;
          }
          return "#" + this.toHex8(allow4Char);
        };
        TinyColor2.prototype.toHexShortString = function(allowShortChar) {
          if (allowShortChar === void 0) {
            allowShortChar = false;
          }
          return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
        };
        TinyColor2.prototype.toRgb = function() {
          return {
            r: Math.round(this.r),
            g: Math.round(this.g),
            b: Math.round(this.b),
            a: this.a
          };
        };
        TinyColor2.prototype.toRgbString = function() {
          var r2 = Math.round(this.r);
          var g2 = Math.round(this.g);
          var b2 = Math.round(this.b);
          return this.a === 1 ? "rgb(".concat(r2, ", ").concat(g2, ", ").concat(b2, ")") : "rgba(".concat(r2, ", ").concat(g2, ", ").concat(b2, ", ").concat(this.roundA, ")");
        };
        TinyColor2.prototype.toPercentageRgb = function() {
          var fmt = function(x2) {
            return "".concat(Math.round(bound01(x2, 255) * 100), "%");
          };
          return {
            r: fmt(this.r),
            g: fmt(this.g),
            b: fmt(this.b),
            a: this.a
          };
        };
        TinyColor2.prototype.toPercentageRgbString = function() {
          var rnd = function(x2) {
            return Math.round(bound01(x2, 255) * 100);
          };
          return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")");
        };
        TinyColor2.prototype.toName = function() {
          if (this.a === 0) {
            return "transparent";
          }
          if (this.a < 1) {
            return false;
          }
          var hex = "#" + rgbToHex(this.r, this.g, this.b, false);
          for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {
            var _b = _a[_i], key2 = _b[0], value = _b[1];
            if (hex === value) {
              return key2;
            }
          }
          return false;
        };
        TinyColor2.prototype.toString = function(format2) {
          var formatSet = Boolean(format2);
          format2 = format2 !== null && format2 !== void 0 ? format2 : this.format;
          var formattedString = false;
          var hasAlpha = this.a < 1 && this.a >= 0;
          var needsAlphaFormat = !formatSet && hasAlpha && (format2.startsWith("hex") || format2 === "name");
          if (needsAlphaFormat) {
            if (format2 === "name" && this.a === 0) {
              return this.toName();
            }
            return this.toRgbString();
          }
          if (format2 === "rgb") {
            formattedString = this.toRgbString();
          }
          if (format2 === "prgb") {
            formattedString = this.toPercentageRgbString();
          }
          if (format2 === "hex" || format2 === "hex6") {
            formattedString = this.toHexString();
          }
          if (format2 === "hex3") {
            formattedString = this.toHexString(true);
          }
          if (format2 === "hex4") {
            formattedString = this.toHex8String(true);
          }
          if (format2 === "hex8") {
            formattedString = this.toHex8String();
          }
          if (format2 === "name") {
            formattedString = this.toName();
          }
          if (format2 === "hsl") {
            formattedString = this.toHslString();
          }
          if (format2 === "hsv") {
            formattedString = this.toHsvString();
          }
          return formattedString || this.toHexString();
        };
        TinyColor2.prototype.toNumber = function() {
          return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
        };
        TinyColor2.prototype.clone = function() {
          return new TinyColor2(this.toString());
        };
        TinyColor2.prototype.lighten = function(amount) {
          if (amount === void 0) {
            amount = 10;
          }
          var hsl = this.toHsl();
          hsl.l += amount / 100;
          hsl.l = clamp01(hsl.l);
          return new TinyColor2(hsl);
        };
        TinyColor2.prototype.brighten = function(amount) {
          if (amount === void 0) {
            amount = 10;
          }
          var rgb = this.toRgb();
          rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
          rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
          rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
          return new TinyColor2(rgb);
        };
        TinyColor2.prototype.darken = function(amount) {
          if (amount === void 0) {
            amount = 10;
          }
          var hsl = this.toHsl();
          hsl.l -= amount / 100;
          hsl.l = clamp01(hsl.l);
          return new TinyColor2(hsl);
        };
        TinyColor2.prototype.tint = function(amount) {
          if (amount === void 0) {
            amount = 10;
          }
          return this.mix("white", amount);
        };
        TinyColor2.prototype.shade = function(amount) {
          if (amount === void 0) {
            amount = 10;
          }
          return this.mix("black", amount);
        };
        TinyColor2.prototype.desaturate = function(amount) {
          if (amount === void 0) {
            amount = 10;
          }
          var hsl = this.toHsl();
          hsl.s -= amount / 100;
          hsl.s = clamp01(hsl.s);
          return new TinyColor2(hsl);
        };
        TinyColor2.prototype.saturate = function(amount) {
          if (amount === void 0) {
            amount = 10;
          }
          var hsl = this.toHsl();
          hsl.s += amount / 100;
          hsl.s = clamp01(hsl.s);
          return new TinyColor2(hsl);
        };
        TinyColor2.prototype.greyscale = function() {
          return this.desaturate(100);
        };
        TinyColor2.prototype.spin = function(amount) {
          var hsl = this.toHsl();
          var hue = (hsl.h + amount) % 360;
          hsl.h = hue < 0 ? 360 + hue : hue;
          return new TinyColor2(hsl);
        };
        TinyColor2.prototype.mix = function(color, amount) {
          if (amount === void 0) {
            amount = 50;
          }
          var rgb1 = this.toRgb();
          var rgb2 = new TinyColor2(color).toRgb();
          var p2 = amount / 100;
          var rgba = {
            r: (rgb2.r - rgb1.r) * p2 + rgb1.r,
            g: (rgb2.g - rgb1.g) * p2 + rgb1.g,
            b: (rgb2.b - rgb1.b) * p2 + rgb1.b,
            a: (rgb2.a - rgb1.a) * p2 + rgb1.a
          };
          return new TinyColor2(rgba);
        };
        TinyColor2.prototype.analogous = function(results, slices) {
          if (results === void 0) {
            results = 6;
          }
          if (slices === void 0) {
            slices = 30;
          }
          var hsl = this.toHsl();
          var part = 360 / slices;
          var ret = [this];
          for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) {
            hsl.h = (hsl.h + part) % 360;
            ret.push(new TinyColor2(hsl));
          }
          return ret;
        };
        TinyColor2.prototype.complement = function() {
          var hsl = this.toHsl();
          hsl.h = (hsl.h + 180) % 360;
          return new TinyColor2(hsl);
        };
        TinyColor2.prototype.monochromatic = function(results) {
          if (results === void 0) {
            results = 6;
          }
          var hsv = this.toHsv();
          var h2 = hsv.h;
          var s2 = hsv.s;
          var v2 = hsv.v;
          var res = [];
          var modification = 1 / results;
          while (results--) {
            res.push(new TinyColor2({ h: h2, s: s2, v: v2 }));
            v2 = (v2 + modification) % 1;
          }
          return res;
        };
        TinyColor2.prototype.splitcomplement = function() {
          var hsl = this.toHsl();
          var h2 = hsl.h;
          return [
            this,
            new TinyColor2({ h: (h2 + 72) % 360, s: hsl.s, l: hsl.l }),
            new TinyColor2({ h: (h2 + 216) % 360, s: hsl.s, l: hsl.l })
          ];
        };
        TinyColor2.prototype.onBackground = function(background) {
          var fg = this.toRgb();
          var bg = new TinyColor2(background).toRgb();
          var alpha = fg.a + bg.a * (1 - fg.a);
          return new TinyColor2({
            r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
            g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
            b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
            a: alpha
          });
        };
        TinyColor2.prototype.triad = function() {
          return this.polyad(3);
        };
        TinyColor2.prototype.tetrad = function() {
          return this.polyad(4);
        };
        TinyColor2.prototype.polyad = function(n2) {
          var hsl = this.toHsl();
          var h2 = hsl.h;
          var result = [this];
          var increment = 360 / n2;
          for (var i2 = 1; i2 < n2; i2++) {
            result.push(new TinyColor2({ h: (h2 + i2 * increment) % 360, s: hsl.s, l: hsl.l }));
          }
          return result;
        };
        TinyColor2.prototype.equals = function(color) {
          return this.toRgbString() === new TinyColor2(color).toRgbString();
        };
        return TinyColor2;
      }()
    );
    var hueStep = 2;
    var saturationStep = 0.16;
    var saturationStep2 = 0.05;
    var brightnessStep1 = 0.05;
    var brightnessStep2 = 0.15;
    var lightColorCount = 5;
    var darkColorCount = 4;
    var darkColorMap = [{
      index: 7,
      opacity: 0.15
    }, {
      index: 6,
      opacity: 0.25
    }, {
      index: 5,
      opacity: 0.3
    }, {
      index: 5,
      opacity: 0.45
    }, {
      index: 5,
      opacity: 0.65
    }, {
      index: 5,
      opacity: 0.85
    }, {
      index: 4,
      opacity: 0.9
    }, {
      index: 3,
      opacity: 0.95
    }, {
      index: 2,
      opacity: 0.97
    }, {
      index: 1,
      opacity: 0.98
    }];
    function toHsv(_ref) {
      var r2 = _ref.r, g2 = _ref.g, b2 = _ref.b;
      var hsv = rgbToHsv(r2, g2, b2);
      return {
        h: hsv.h * 360,
        s: hsv.s,
        v: hsv.v
      };
    }
    function toHex(_ref2) {
      var r2 = _ref2.r, g2 = _ref2.g, b2 = _ref2.b;
      return "#".concat(rgbToHex(r2, g2, b2, false));
    }
    function mix$1(rgb1, rgb2, amount) {
      var p2 = amount / 100;
      var rgb = {
        r: (rgb2.r - rgb1.r) * p2 + rgb1.r,
        g: (rgb2.g - rgb1.g) * p2 + rgb1.g,
        b: (rgb2.b - rgb1.b) * p2 + rgb1.b
      };
      return rgb;
    }
    function getHue(hsv, i2, light) {
      var hue;
      if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
        hue = light ? Math.round(hsv.h) - hueStep * i2 : Math.round(hsv.h) + hueStep * i2;
      } else {
        hue = light ? Math.round(hsv.h) + hueStep * i2 : Math.round(hsv.h) - hueStep * i2;
      }
      if (hue < 0) {
        hue += 360;
      } else if (hue >= 360) {
        hue -= 360;
      }
      return hue;
    }
    function getSaturation(hsv, i2, light) {
      if (hsv.h === 0 && hsv.s === 0) {
        return hsv.s;
      }
      var saturation;
      if (light) {
        saturation = hsv.s - saturationStep * i2;
      } else if (i2 === darkColorCount) {
        saturation = hsv.s + saturationStep;
      } else {
        saturation = hsv.s + saturationStep2 * i2;
      }
      if (saturation > 1) {
        saturation = 1;
      }
      if (light && i2 === lightColorCount && saturation > 0.1) {
        saturation = 0.1;
      }
      if (saturation < 0.06) {
        saturation = 0.06;
      }
      return Number(saturation.toFixed(2));
    }
    function getValue$2(hsv, i2, light) {
      var value;
      if (light) {
        value = hsv.v + brightnessStep1 * i2;
      } else {
        value = hsv.v - brightnessStep2 * i2;
      }
      if (value > 1) {
        value = 1;
      }
      return Number(value.toFixed(2));
    }
    function generate$1(color) {
      var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      var patterns = [];
      var pColor = inputToRGB(color);
      for (var i2 = lightColorCount; i2 > 0; i2 -= 1) {
        var hsv = toHsv(pColor);
        var colorString = toHex(inputToRGB({
          h: getHue(hsv, i2, true),
          s: getSaturation(hsv, i2, true),
          v: getValue$2(hsv, i2, true)
        }));
        patterns.push(colorString);
      }
      patterns.push(toHex(pColor));
      for (var _i = 1; _i <= darkColorCount; _i += 1) {
        var _hsv = toHsv(pColor);
        var _colorString = toHex(inputToRGB({
          h: getHue(_hsv, _i),
          s: getSaturation(_hsv, _i),
          v: getValue$2(_hsv, _i)
        }));
        patterns.push(_colorString);
      }
      if (opts.theme === "dark") {
        return darkColorMap.map(function(_ref3) {
          var index2 = _ref3.index, opacity = _ref3.opacity;
          var darkColorString = toHex(mix$1(inputToRGB(opts.backgroundColor || "#141414"), inputToRGB(patterns[index2]), opacity * 100));
          return darkColorString;
        });
      }
      return patterns;
    }
    var presetPrimaryColors = {
      red: "#F5222D",
      volcano: "#FA541C",
      orange: "#FA8C16",
      gold: "#FAAD14",
      yellow: "#FADB14",
      lime: "#A0D911",
      green: "#52C41A",
      cyan: "#13C2C2",
      blue: "#1890FF",
      geekblue: "#2F54EB",
      purple: "#722ED1",
      magenta: "#EB2F96",
      grey: "#666666"
    };
    var presetPalettes = {};
    var presetDarkPalettes = {};
    Object.keys(presetPrimaryColors).forEach(function(key2) {
      presetPalettes[key2] = generate$1(presetPrimaryColors[key2]);
      presetPalettes[key2].primary = presetPalettes[key2][5];
      presetDarkPalettes[key2] = generate$1(presetPrimaryColors[key2], {
        theme: "dark",
        backgroundColor: "#141414"
      });
      presetDarkPalettes[key2].primary = presetDarkPalettes[key2][5];
    });
    var blue = presetPalettes.blue;
    const genControlHeight = (token2) => {
      const {
        controlHeight
      } = token2;
      return {
        controlHeightSM: controlHeight * 0.75,
        controlHeightXS: controlHeight * 0.5,
        controlHeightLG: controlHeight * 1.25
      };
    };
    function genSizeMapToken(token2) {
      const {
        sizeUnit,
        sizeStep
      } = token2;
      return {
        sizeXXL: sizeUnit * (sizeStep + 8),
        sizeXL: sizeUnit * (sizeStep + 4),
        sizeLG: sizeUnit * (sizeStep + 2),
        sizeMD: sizeUnit * (sizeStep + 1),
        sizeMS: sizeUnit * sizeStep,
        size: sizeUnit * sizeStep,
        sizeSM: sizeUnit * (sizeStep - 1),
        sizeXS: sizeUnit * (sizeStep - 2),
        sizeXXS: sizeUnit * (sizeStep - 3)
        // 4
      };
    }
    const defaultPresetColors = {
      blue: "#1677ff",
      purple: "#722ED1",
      cyan: "#13C2C2",
      green: "#52C41A",
      magenta: "#EB2F96",
      pink: "#eb2f96",
      red: "#F5222D",
      orange: "#FA8C16",
      yellow: "#FADB14",
      volcano: "#FA541C",
      geekblue: "#2F54EB",
      gold: "#FAAD14",
      lime: "#A0D911"
    };
    const seedToken = _extends$1(_extends$1({}, defaultPresetColors), {
      // Color
      colorPrimary: "#1677ff",
      colorSuccess: "#52c41a",
      colorWarning: "#faad14",
      colorError: "#ff4d4f",
      colorInfo: "#1677ff",
      colorTextBase: "",
      colorBgBase: "",
      // Font
      fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,
      fontSize: 14,
      // Line
      lineWidth: 1,
      lineType: "solid",
      // Motion
      motionUnit: 0.1,
      motionBase: 0,
      motionEaseOutCirc: "cubic-bezier(0.08, 0.82, 0.17, 1)",
      motionEaseInOutCirc: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
      motionEaseOut: "cubic-bezier(0.215, 0.61, 0.355, 1)",
      motionEaseInOut: "cubic-bezier(0.645, 0.045, 0.355, 1)",
      motionEaseOutBack: "cubic-bezier(0.12, 0.4, 0.29, 1.46)",
      motionEaseInBack: "cubic-bezier(0.71, -0.46, 0.88, 0.6)",
      motionEaseInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
      motionEaseOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
      // Radius
      borderRadius: 6,
      // Size
      sizeUnit: 4,
      sizeStep: 4,
      sizePopupArrow: 16,
      // Control Base
      controlHeight: 32,
      // zIndex
      zIndexBase: 0,
      zIndexPopupBase: 1e3,
      // Image
      opacityImage: 1,
      // Wireframe
      wireframe: false
    });
    function genColorMapToken(seed2, _ref) {
      let {
        generateColorPalettes: generateColorPalettes2,
        generateNeutralColorPalettes: generateNeutralColorPalettes2
      } = _ref;
      const {
        colorSuccess: colorSuccessBase,
        colorWarning: colorWarningBase,
        colorError: colorErrorBase,
        colorInfo: colorInfoBase,
        colorPrimary: colorPrimaryBase,
        colorBgBase,
        colorTextBase
      } = seed2;
      const primaryColors = generateColorPalettes2(colorPrimaryBase);
      const successColors = generateColorPalettes2(colorSuccessBase);
      const warningColors = generateColorPalettes2(colorWarningBase);
      const errorColors = generateColorPalettes2(colorErrorBase);
      const infoColors = generateColorPalettes2(colorInfoBase);
      const neutralColors = generateNeutralColorPalettes2(colorBgBase, colorTextBase);
      return _extends$1(_extends$1({}, neutralColors), {
        colorPrimaryBg: primaryColors[1],
        colorPrimaryBgHover: primaryColors[2],
        colorPrimaryBorder: primaryColors[3],
        colorPrimaryBorderHover: primaryColors[4],
        colorPrimaryHover: primaryColors[5],
        colorPrimary: primaryColors[6],
        colorPrimaryActive: primaryColors[7],
        colorPrimaryTextHover: primaryColors[8],
        colorPrimaryText: primaryColors[9],
        colorPrimaryTextActive: primaryColors[10],
        colorSuccessBg: successColors[1],
        colorSuccessBgHover: successColors[2],
        colorSuccessBorder: successColors[3],
        colorSuccessBorderHover: successColors[4],
        colorSuccessHover: successColors[4],
        colorSuccess: successColors[6],
        colorSuccessActive: successColors[7],
        colorSuccessTextHover: successColors[8],
        colorSuccessText: successColors[9],
        colorSuccessTextActive: successColors[10],
        colorErrorBg: errorColors[1],
        colorErrorBgHover: errorColors[2],
        colorErrorBorder: errorColors[3],
        colorErrorBorderHover: errorColors[4],
        colorErrorHover: errorColors[5],
        colorError: errorColors[6],
        colorErrorActive: errorColors[7],
        colorErrorTextHover: errorColors[8],
        colorErrorText: errorColors[9],
        colorErrorTextActive: errorColors[10],
        colorWarningBg: warningColors[1],
        colorWarningBgHover: warningColors[2],
        colorWarningBorder: warningColors[3],
        colorWarningBorderHover: warningColors[4],
        colorWarningHover: warningColors[4],
        colorWarning: warningColors[6],
        colorWarningActive: warningColors[7],
        colorWarningTextHover: warningColors[8],
        colorWarningText: warningColors[9],
        colorWarningTextActive: warningColors[10],
        colorInfoBg: infoColors[1],
        colorInfoBgHover: infoColors[2],
        colorInfoBorder: infoColors[3],
        colorInfoBorderHover: infoColors[4],
        colorInfoHover: infoColors[4],
        colorInfo: infoColors[6],
        colorInfoActive: infoColors[7],
        colorInfoTextHover: infoColors[8],
        colorInfoText: infoColors[9],
        colorInfoTextActive: infoColors[10],
        colorBgMask: new TinyColor("#000").setAlpha(0.45).toRgbString(),
        colorWhite: "#fff"
      });
    }
    const genRadius = (radiusBase) => {
      let radiusLG = radiusBase;
      let radiusSM = radiusBase;
      let radiusXS = radiusBase;
      let radiusOuter = radiusBase;
      if (radiusBase < 6 && radiusBase >= 5) {
        radiusLG = radiusBase + 1;
      } else if (radiusBase < 16 && radiusBase >= 6) {
        radiusLG = radiusBase + 2;
      } else if (radiusBase >= 16) {
        radiusLG = 16;
      }
      if (radiusBase < 7 && radiusBase >= 5) {
        radiusSM = 4;
      } else if (radiusBase < 8 && radiusBase >= 7) {
        radiusSM = 5;
      } else if (radiusBase < 14 && radiusBase >= 8) {
        radiusSM = 6;
      } else if (radiusBase < 16 && radiusBase >= 14) {
        radiusSM = 7;
      } else if (radiusBase >= 16) {
        radiusSM = 8;
      }
      if (radiusBase < 6 && radiusBase >= 2) {
        radiusXS = 1;
      } else if (radiusBase >= 6) {
        radiusXS = 2;
      }
      if (radiusBase > 4 && radiusBase < 8) {
        radiusOuter = 4;
      } else if (radiusBase >= 8) {
        radiusOuter = 6;
      }
      return {
        borderRadius: radiusBase > 16 ? 16 : radiusBase,
        borderRadiusXS: radiusXS,
        borderRadiusSM: radiusSM,
        borderRadiusLG: radiusLG,
        borderRadiusOuter: radiusOuter
      };
    };
    function genCommonMapToken(token2) {
      const {
        motionUnit,
        motionBase,
        borderRadius,
        lineWidth
      } = token2;
      return _extends$1({
        // motion
        motionDurationFast: `${(motionBase + motionUnit).toFixed(1)}s`,
        motionDurationMid: `${(motionBase + motionUnit * 2).toFixed(1)}s`,
        motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,
        // line
        lineWidthBold: lineWidth + 1
      }, genRadius(borderRadius));
    }
    const getAlphaColor$1 = (baseColor, alpha) => new TinyColor(baseColor).setAlpha(alpha).toRgbString();
    const getSolidColor = (baseColor, brightness) => {
      const instance = new TinyColor(baseColor);
      return instance.darken(brightness).toHexString();
    };
    const generateColorPalettes = (baseColor) => {
      const colors = generate$1(baseColor);
      return {
        1: colors[0],
        2: colors[1],
        3: colors[2],
        4: colors[3],
        5: colors[4],
        6: colors[5],
        7: colors[6],
        8: colors[4],
        9: colors[5],
        10: colors[6]
        // 8: colors[7],
        // 9: colors[8],
        // 10: colors[9],
      };
    };
    const generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {
      const colorBgBase = bgBaseColor || "#fff";
      const colorTextBase = textBaseColor || "#000";
      return {
        colorBgBase,
        colorTextBase,
        colorText: getAlphaColor$1(colorTextBase, 0.88),
        colorTextSecondary: getAlphaColor$1(colorTextBase, 0.65),
        colorTextTertiary: getAlphaColor$1(colorTextBase, 0.45),
        colorTextQuaternary: getAlphaColor$1(colorTextBase, 0.25),
        colorFill: getAlphaColor$1(colorTextBase, 0.15),
        colorFillSecondary: getAlphaColor$1(colorTextBase, 0.06),
        colorFillTertiary: getAlphaColor$1(colorTextBase, 0.04),
        colorFillQuaternary: getAlphaColor$1(colorTextBase, 0.02),
        colorBgLayout: getSolidColor(colorBgBase, 4),
        colorBgContainer: getSolidColor(colorBgBase, 0),
        colorBgElevated: getSolidColor(colorBgBase, 0),
        colorBgSpotlight: getAlphaColor$1(colorTextBase, 0.85),
        colorBorder: getSolidColor(colorBgBase, 15),
        colorBorderSecondary: getSolidColor(colorBgBase, 6)
      };
    };
    function getFontSizes(base) {
      const fontSizes = new Array(10).fill(null).map((_2, index2) => {
        const i2 = index2 - 1;
        const baseSize = base * Math.pow(2.71828, i2 / 5);
        const intSize = index2 > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);
        return Math.floor(intSize / 2) * 2;
      });
      fontSizes[1] = base;
      return fontSizes.map((size2) => {
        const height = size2 + 8;
        return {
          size: size2,
          lineHeight: height / size2
        };
      });
    }
    const genFontMapToken = (fontSize) => {
      const fontSizePairs = getFontSizes(fontSize);
      const fontSizes = fontSizePairs.map((pair) => pair.size);
      const lineHeights = fontSizePairs.map((pair) => pair.lineHeight);
      return {
        fontSizeSM: fontSizes[0],
        fontSize: fontSizes[1],
        fontSizeLG: fontSizes[2],
        fontSizeXL: fontSizes[3],
        fontSizeHeading1: fontSizes[6],
        fontSizeHeading2: fontSizes[5],
        fontSizeHeading3: fontSizes[4],
        fontSizeHeading4: fontSizes[3],
        fontSizeHeading5: fontSizes[2],
        lineHeight: lineHeights[1],
        lineHeightLG: lineHeights[2],
        lineHeightSM: lineHeights[0],
        lineHeightHeading1: lineHeights[6],
        lineHeightHeading2: lineHeights[5],
        lineHeightHeading3: lineHeights[4],
        lineHeightHeading4: lineHeights[3],
        lineHeightHeading5: lineHeights[2]
      };
    };
    function derivative(token2) {
      const colorPalettes = Object.keys(defaultPresetColors).map((colorKey) => {
        const colors = generate$1(token2[colorKey]);
        return new Array(10).fill(1).reduce((prev2, _2, i2) => {
          prev2[`${colorKey}-${i2 + 1}`] = colors[i2];
          return prev2;
        }, {});
      }).reduce((prev2, cur) => {
        prev2 = _extends$1(_extends$1({}, prev2), cur);
        return prev2;
      }, {});
      return _extends$1(_extends$1(_extends$1(_extends$1(_extends$1(_extends$1(_extends$1({}, token2), colorPalettes), genColorMapToken(token2, {
        generateColorPalettes,
        generateNeutralColorPalettes
      })), genFontMapToken(token2.fontSize)), genSizeMapToken(token2)), genControlHeight(token2)), genCommonMapToken(token2));
    }
    function isStableColor(color) {
      return color >= 0 && color <= 255;
    }
    function getAlphaColor(frontColor, backgroundColor) {
      const {
        r: fR,
        g: fG,
        b: fB,
        a: originAlpha
      } = new TinyColor(frontColor).toRgb();
      if (originAlpha < 1) {
        return frontColor;
      }
      const {
        r: bR,
        g: bG,
        b: bB
      } = new TinyColor(backgroundColor).toRgb();
      for (let fA = 0.01; fA <= 1; fA += 0.01) {
        const r2 = Math.round((fR - bR * (1 - fA)) / fA);
        const g2 = Math.round((fG - bG * (1 - fA)) / fA);
        const b2 = Math.round((fB - bB * (1 - fA)) / fA);
        if (isStableColor(r2) && isStableColor(g2) && isStableColor(b2)) {
          return new TinyColor({
            r: r2,
            g: g2,
            b: b2,
            a: Math.round(fA * 100) / 100
          }).toRgbString();
        }
      }
      return new TinyColor({
        r: fR,
        g: fG,
        b: fB,
        a: 1
      }).toRgbString();
    }
    var __rest$m = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    function formatToken(derivativeToken) {
      const {
        override
      } = derivativeToken, restToken = __rest$m(derivativeToken, ["override"]);
      const overrideTokens = _extends$1({}, override);
      Object.keys(seedToken).forEach((token2) => {
        delete overrideTokens[token2];
      });
      const mergedToken = _extends$1(_extends$1({}, restToken), overrideTokens);
      const screenXS = 480;
      const screenSM = 576;
      const screenMD = 768;
      const screenLG = 992;
      const screenXL = 1200;
      const screenXXL = 1600;
      const screenXXXL = 2e3;
      const aliasToken = _extends$1(_extends$1(_extends$1({}, mergedToken), {
        colorLink: mergedToken.colorInfoText,
        colorLinkHover: mergedToken.colorInfoHover,
        colorLinkActive: mergedToken.colorInfoActive,
        // ============== Background ============== //
        colorFillContent: mergedToken.colorFillSecondary,
        colorFillContentHover: mergedToken.colorFill,
        colorFillAlter: mergedToken.colorFillQuaternary,
        colorBgContainerDisabled: mergedToken.colorFillTertiary,
        // ============== Split ============== //
        colorBorderBg: mergedToken.colorBgContainer,
        colorSplit: getAlphaColor(mergedToken.colorBorderSecondary, mergedToken.colorBgContainer),
        // ============== Text ============== //
        colorTextPlaceholder: mergedToken.colorTextQuaternary,
        colorTextDisabled: mergedToken.colorTextQuaternary,
        colorTextHeading: mergedToken.colorText,
        colorTextLabel: mergedToken.colorTextSecondary,
        colorTextDescription: mergedToken.colorTextTertiary,
        colorTextLightSolid: mergedToken.colorWhite,
        colorHighlight: mergedToken.colorError,
        colorBgTextHover: mergedToken.colorFillSecondary,
        colorBgTextActive: mergedToken.colorFill,
        colorIcon: mergedToken.colorTextTertiary,
        colorIconHover: mergedToken.colorText,
        colorErrorOutline: getAlphaColor(mergedToken.colorErrorBg, mergedToken.colorBgContainer),
        colorWarningOutline: getAlphaColor(mergedToken.colorWarningBg, mergedToken.colorBgContainer),
        // Font
        fontSizeIcon: mergedToken.fontSizeSM,
        // Control
        lineWidth: mergedToken.lineWidth,
        controlOutlineWidth: mergedToken.lineWidth * 2,
        // Checkbox size and expand icon size
        controlInteractiveSize: mergedToken.controlHeight / 2,
        controlItemBgHover: mergedToken.colorFillTertiary,
        controlItemBgActive: mergedToken.colorPrimaryBg,
        controlItemBgActiveHover: mergedToken.colorPrimaryBgHover,
        controlItemBgActiveDisabled: mergedToken.colorFill,
        controlTmpOutline: mergedToken.colorFillQuaternary,
        controlOutline: getAlphaColor(mergedToken.colorPrimaryBg, mergedToken.colorBgContainer),
        lineType: mergedToken.lineType,
        borderRadius: mergedToken.borderRadius,
        borderRadiusXS: mergedToken.borderRadiusXS,
        borderRadiusSM: mergedToken.borderRadiusSM,
        borderRadiusLG: mergedToken.borderRadiusLG,
        fontWeightStrong: 600,
        opacityLoading: 0.65,
        linkDecoration: "none",
        linkHoverDecoration: "none",
        linkFocusDecoration: "none",
        controlPaddingHorizontal: 12,
        controlPaddingHorizontalSM: 8,
        paddingXXS: mergedToken.sizeXXS,
        paddingXS: mergedToken.sizeXS,
        paddingSM: mergedToken.sizeSM,
        padding: mergedToken.size,
        paddingMD: mergedToken.sizeMD,
        paddingLG: mergedToken.sizeLG,
        paddingXL: mergedToken.sizeXL,
        paddingContentHorizontalLG: mergedToken.sizeLG,
        paddingContentVerticalLG: mergedToken.sizeMS,
        paddingContentHorizontal: mergedToken.sizeMS,
        paddingContentVertical: mergedToken.sizeSM,
        paddingContentHorizontalSM: mergedToken.size,
        paddingContentVerticalSM: mergedToken.sizeXS,
        marginXXS: mergedToken.sizeXXS,
        marginXS: mergedToken.sizeXS,
        marginSM: mergedToken.sizeSM,
        margin: mergedToken.size,
        marginMD: mergedToken.sizeMD,
        marginLG: mergedToken.sizeLG,
        marginXL: mergedToken.sizeXL,
        marginXXL: mergedToken.sizeXXL,
        boxShadow: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
        boxShadowSecondary: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
        boxShadowTertiary: `
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,
        screenXS,
        screenXSMin: screenXS,
        screenXSMax: screenSM - 1,
        screenSM,
        screenSMMin: screenSM,
        screenSMMax: screenMD - 1,
        screenMD,
        screenMDMin: screenMD,
        screenMDMax: screenLG - 1,
        screenLG,
        screenLGMin: screenLG,
        screenLGMax: screenXL - 1,
        screenXL,
        screenXLMin: screenXL,
        screenXLMax: screenXXL - 1,
        screenXXL,
        screenXXLMin: screenXXL,
        screenXXLMax: screenXXXL - 1,
        screenXXXL,
        screenXXXLMin: screenXXXL,
        // FIXME: component box-shadow, should be removed
        boxShadowPopoverArrow: "3px 3px 7px rgba(0, 0, 0, 0.1)",
        boxShadowCard: `
      0 1px 2px -2px ${new TinyColor("rgba(0, 0, 0, 0.16)").toRgbString()},
      0 3px 6px 0 ${new TinyColor("rgba(0, 0, 0, 0.12)").toRgbString()},
      0 5px 12px 4px ${new TinyColor("rgba(0, 0, 0, 0.09)").toRgbString()}
    `,
        boxShadowDrawerRight: `
      -6px 0 16px 0 rgba(0, 0, 0, 0.08),
      -3px 0 6px -4px rgba(0, 0, 0, 0.12),
      -9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
        boxShadowDrawerLeft: `
      6px 0 16px 0 rgba(0, 0, 0, 0.08),
      3px 0 6px -4px rgba(0, 0, 0, 0.12),
      9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,
        boxShadowDrawerUp: `
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
        boxShadowDrawerDown: `
      0 -6px 16px 0 rgba(0, 0, 0, 0.08),
      0 -3px 6px -4px rgba(0, 0, 0, 0.12),
      0 -9px 28px 8px rgba(0, 0, 0, 0.05)
    `,
        boxShadowTabsOverflowLeft: "inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",
        boxShadowTabsOverflowRight: "inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",
        boxShadowTabsOverflowTop: "inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",
        boxShadowTabsOverflowBottom: "inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"
      }), overrideTokens);
      return aliasToken;
    }
    const roundedArrow = (width, innerRadius, outerRadius, bgColor, boxShadow) => {
      const unitWidth = width / 2;
      const ax = 0;
      const ay = unitWidth;
      const bx = outerRadius * 1 / Math.sqrt(2);
      const by = unitWidth - outerRadius * (1 - 1 / Math.sqrt(2));
      const cx = unitWidth - innerRadius * (1 / Math.sqrt(2));
      const cy = outerRadius * (Math.sqrt(2) - 1) + innerRadius * (1 / Math.sqrt(2));
      const dx = 2 * unitWidth - cx;
      const dy = cy;
      const ex = 2 * unitWidth - bx;
      const ey = by;
      const fx = 2 * unitWidth - ax;
      const fy = ay;
      const shadowWidth = unitWidth * Math.sqrt(2) + outerRadius * (Math.sqrt(2) - 2);
      const polygonOffset = outerRadius * (Math.sqrt(2) - 1);
      return {
        pointerEvents: "none",
        width,
        height: width,
        overflow: "hidden",
        "&::after": {
          content: '""',
          position: "absolute",
          width: shadowWidth,
          height: shadowWidth,
          bottom: 0,
          insetInline: 0,
          margin: "auto",
          borderRadius: {
            _skip_check_: true,
            value: `0 0 ${innerRadius}px 0`
          },
          transform: "translateY(50%) rotate(-135deg)",
          boxShadow,
          zIndex: 0,
          background: "transparent"
        },
        "&::before": {
          position: "absolute",
          bottom: 0,
          insetInlineStart: 0,
          width,
          height: width / 2,
          background: bgColor,
          clipPath: {
            _multi_value_: true,
            value: [`polygon(${polygonOffset}px 100%, 50% ${polygonOffset}px, ${2 * unitWidth - polygonOffset}px 100%, ${polygonOffset}px 100%)`, `path('M ${ax} ${ay} A ${outerRadius} ${outerRadius} 0 0 0 ${bx} ${by} L ${cx} ${cy} A ${innerRadius} ${innerRadius} 0 0 1 ${dx} ${dy} L ${ex} ${ey} A ${outerRadius} ${outerRadius} 0 0 0 ${fx} ${fy} Z')`]
          },
          content: '""'
        }
      };
    };
    function genPresetColor(token2, genCss) {
      return PresetColors.reduce((prev2, colorKey) => {
        const lightColor = token2[`${colorKey}-1`];
        const lightBorderColor = token2[`${colorKey}-3`];
        const darkColor = token2[`${colorKey}-6`];
        const textColor = token2[`${colorKey}-7`];
        return _extends$1(_extends$1({}, prev2), genCss(colorKey, {
          lightColor,
          lightBorderColor,
          darkColor,
          textColor
        }));
      }, {});
    }
    const textEllipsis = {
      overflow: "hidden",
      whiteSpace: "nowrap",
      textOverflow: "ellipsis"
    };
    const resetComponent = (token2) => ({
      boxSizing: "border-box",
      margin: 0,
      padding: 0,
      color: token2.colorText,
      fontSize: token2.fontSize,
      // font-variant: @font-variant-base;
      lineHeight: token2.lineHeight,
      listStyle: "none",
      // font-feature-settings: @font-feature-settings-base;
      fontFamily: token2.fontFamily
    });
    const resetIcon = () => ({
      display: "inline-flex",
      alignItems: "center",
      color: "inherit",
      fontStyle: "normal",
      lineHeight: 0,
      textAlign: "center",
      textTransform: "none",
      // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
      verticalAlign: "-0.125em",
      textRendering: "optimizeLegibility",
      "-webkit-font-smoothing": "antialiased",
      "-moz-osx-font-smoothing": "grayscale",
      "> *": {
        lineHeight: 1
      },
      svg: {
        display: "inline-block"
      }
    });
    const genLinkStyle = (token2) => ({
      a: {
        color: token2.colorLink,
        textDecoration: token2.linkDecoration,
        backgroundColor: "transparent",
        outline: "none",
        cursor: "pointer",
        transition: `color ${token2.motionDurationSlow}`,
        "-webkit-text-decoration-skip": "objects",
        "&:hover": {
          color: token2.colorLinkHover
        },
        "&:active": {
          color: token2.colorLinkActive
        },
        [`&:active,
  &:hover`]: {
          textDecoration: token2.linkHoverDecoration,
          outline: 0
        },
        // https://github.com/ant-design/ant-design/issues/22503
        "&:focus": {
          textDecoration: token2.linkFocusDecoration,
          outline: 0
        },
        "&[disabled]": {
          color: token2.colorTextDisabled,
          cursor: "not-allowed"
        }
      }
    });
    const genCommonStyle = (token2, componentPrefixCls) => {
      const {
        fontFamily,
        fontSize
      } = token2;
      const rootPrefixSelector = `[class^="${componentPrefixCls}"], [class*=" ${componentPrefixCls}"]`;
      return {
        [rootPrefixSelector]: {
          fontFamily,
          fontSize,
          boxSizing: "border-box",
          "&::before, &::after": {
            boxSizing: "border-box"
          },
          [rootPrefixSelector]: {
            boxSizing: "border-box",
            "&::before, &::after": {
              boxSizing: "border-box"
            }
          }
        }
      };
    };
    const genFocusOutline = (token2) => ({
      outline: `${token2.lineWidthBold}px solid ${token2.colorPrimaryBorder}`,
      outlineOffset: 1,
      transition: "outline-offset 0s, outline 0s"
    });
    const genFocusStyle = (token2) => ({
      "&:focus-visible": _extends$1({}, genFocusOutline(token2))
    });
    function genComponentStyleHook(component, styleFn, getDefaultToken) {
      return (_prefixCls) => {
        const prefixCls = computed(() => _prefixCls === null || _prefixCls === void 0 ? void 0 : _prefixCls.value);
        const [theme, token2, hashId] = useToken();
        const {
          getPrefixCls,
          iconPrefixCls
        } = useConfigContextInject();
        const rootPrefixCls = computed(() => getPrefixCls());
        const sharedInfo = computed(() => {
          return {
            theme: theme.value,
            token: token2.value,
            hashId: hashId.value,
            path: ["Shared", rootPrefixCls.value]
          };
        });
        useStyleRegister(sharedInfo, () => [{
          // Link
          "&": genLinkStyle(token2.value)
        }]);
        const componentInfo = computed(() => {
          return {
            theme: theme.value,
            token: token2.value,
            hashId: hashId.value,
            path: [component, prefixCls.value, iconPrefixCls.value]
          };
        });
        return [useStyleRegister(componentInfo, () => {
          const {
            token: proxyToken,
            flush
          } = statisticToken(token2.value);
          const defaultComponentToken = typeof getDefaultToken === "function" ? getDefaultToken(proxyToken) : getDefaultToken;
          const mergedComponentToken = _extends$1(_extends$1({}, defaultComponentToken), token2.value[component]);
          const componentCls = `.${prefixCls.value}`;
          const mergedToken = merge(proxyToken, {
            componentCls,
            prefixCls: prefixCls.value,
            iconCls: `.${iconPrefixCls.value}`,
            antCls: `.${rootPrefixCls.value}`
          }, mergedComponentToken);
          const styleInterpolation = styleFn(mergedToken, {
            hashId: hashId.value,
            prefixCls: prefixCls.value,
            rootPrefixCls: rootPrefixCls.value,
            iconPrefixCls: iconPrefixCls.value,
            overrideComponentToken: token2.value[component]
          });
          flush(component, mergedComponentToken);
          return [genCommonStyle(token2.value, prefixCls.value), styleInterpolation];
        }), hashId];
      };
    }
    const enableStatistic = typeof CSSINJS_STATISTIC !== "undefined";
    let recording = true;
    function merge() {
      for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {
        objs[_key] = arguments[_key];
      }
      if (!enableStatistic) {
        return _extends$1({}, ...objs);
      }
      recording = false;
      const ret = {};
      objs.forEach((obj) => {
        const keys2 = Object.keys(obj);
        keys2.forEach((key2) => {
          Object.defineProperty(ret, key2, {
            configurable: true,
            enumerable: true,
            get: () => obj[key2]
          });
        });
      });
      recording = true;
      return ret;
    }
    function noop$2() {
    }
    function statisticToken(token2) {
      let tokenKeys2;
      let proxy = token2;
      let flush = noop$2;
      if (enableStatistic) {
        tokenKeys2 = /* @__PURE__ */ new Set();
        proxy = new Proxy(token2, {
          get(obj, prop) {
            if (recording) {
              tokenKeys2.add(prop);
            }
            return obj[prop];
          }
        });
        flush = (componentName, componentToken) => {
          ({
            global: Array.from(tokenKeys2),
            component: componentToken
          });
        };
      }
      return {
        token: proxy,
        keys: tokenKeys2,
        flush
      };
    }
    const defaultTheme = createTheme(derivative);
    const defaultConfig = {
      token: seedToken,
      hashed: true
    };
    const DesignTokenContextKey = Symbol("DesignTokenContext");
    const globalDesignTokenApi = shallowRef();
    const useDesignTokenProvider = (value) => {
      provide(DesignTokenContextKey, value);
      watch(value, () => {
        globalDesignTokenApi.value = unref(value);
        triggerRef(globalDesignTokenApi);
      }, {
        immediate: true,
        deep: true
      });
    };
    const DesignTokenProvider = /* @__PURE__ */ defineComponent({
      props: {
        value: objectType()
      },
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        useDesignTokenProvider(computed(() => props2.value));
        return () => {
          var _a;
          return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
        };
      }
    });
    function useToken() {
      const designTokenContext = inject(DesignTokenContextKey, computed(() => globalDesignTokenApi.value || defaultConfig));
      const salt = computed(() => `${version}-${designTokenContext.value.hashed || ""}`);
      const mergedTheme = computed(() => designTokenContext.value.theme || defaultTheme);
      const cacheToken = useCacheToken(mergedTheme, computed(() => [seedToken, designTokenContext.value.token]), computed(() => ({
        salt: salt.value,
        override: _extends$1({
          override: designTokenContext.value.token
        }, designTokenContext.value.components),
        formatToken
      })));
      return [mergedTheme, computed(() => cacheToken.value[0]), computed(() => designTokenContext.value.hashed ? cacheToken.value[1] : "")];
    }
    const Empty$2 = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      setup() {
        const [, token2] = useToken();
        const themeStyle = computed(() => {
          const bgColor = new TinyColor(token2.value.colorBgBase);
          if (bgColor.toHsl().l < 0.5) {
            return {
              opacity: 0.65
            };
          }
          return {};
        });
        return () => createVNode("svg", {
          "style": themeStyle.value,
          "width": "184",
          "height": "152",
          "viewBox": "0 0 184 152",
          "xmlns": "http://www.w3.org/2000/svg"
        }, [createVNode("g", {
          "fill": "none",
          "fill-rule": "evenodd"
        }, [createVNode("g", {
          "transform": "translate(24 31.67)"
        }, [createVNode("ellipse", {
          "fill-opacity": ".8",
          "fill": "#F5F5F7",
          "cx": "67.797",
          "cy": "106.89",
          "rx": "67.797",
          "ry": "12.668"
        }, null), createVNode("path", {
          "d": "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
          "fill": "#AEB8C2"
        }, null), createVNode("path", {
          "d": "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
          "fill": "url(#linearGradient-1)",
          "transform": "translate(13.56)"
        }, null), createVNode("path", {
          "d": "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
          "fill": "#F5F5F7"
        }, null), createVNode("path", {
          "d": "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
          "fill": "#DCE0E6"
        }, null)]), createVNode("path", {
          "d": "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
          "fill": "#DCE0E6"
        }, null), createVNode("g", {
          "transform": "translate(149.65 15.383)",
          "fill": "#FFF"
        }, [createVNode("ellipse", {
          "cx": "20.654",
          "cy": "3.167",
          "rx": "2.849",
          "ry": "2.815"
        }, null), createVNode("path", {
          "d": "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
        }, null)])])]);
      }
    });
    Empty$2.PRESENTED_IMAGE_DEFAULT = true;
    const Simple = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      setup() {
        const [, token2] = useToken();
        const color = computed(() => {
          const {
            colorFill,
            colorFillTertiary,
            colorFillQuaternary,
            colorBgContainer
          } = token2.value;
          return {
            borderColor: new TinyColor(colorFill).onBackground(colorBgContainer).toHexString(),
            shadowColor: new TinyColor(colorFillTertiary).onBackground(colorBgContainer).toHexString(),
            contentColor: new TinyColor(colorFillQuaternary).onBackground(colorBgContainer).toHexString()
          };
        });
        return () => createVNode("svg", {
          "width": "64",
          "height": "41",
          "viewBox": "0 0 64 41",
          "xmlns": "http://www.w3.org/2000/svg"
        }, [createVNode("g", {
          "transform": "translate(0 1)",
          "fill": "none",
          "fill-rule": "evenodd"
        }, [createVNode("ellipse", {
          "fill": color.value.shadowColor,
          "cx": "32",
          "cy": "33",
          "rx": "32",
          "ry": "7"
        }, null), createVNode("g", {
          "fill-rule": "nonzero",
          "stroke": color.value.borderColor
        }, [createVNode("path", {
          "d": "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
        }, null), createVNode("path", {
          "d": "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
          "fill": color.value.contentColor
        }, null)])])]);
      }
    });
    Simple.PRESENTED_IMAGE_SIMPLE = true;
    const genSharedEmptyStyle = (token2) => {
      const {
        componentCls,
        margin,
        marginXS,
        marginXL,
        fontSize,
        lineHeight
      } = token2;
      return {
        [componentCls]: {
          marginInline: marginXS,
          fontSize,
          lineHeight,
          textAlign: "center",
          // 原来 &-image 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
          [`${componentCls}-image`]: {
            height: token2.emptyImgHeight,
            marginBottom: marginXS,
            opacity: token2.opacityImage,
            img: {
              height: "100%"
            },
            svg: {
              height: "100%",
              margin: "auto"
            }
          },
          // 原来 &-footer 没有父子结构,现在为了外层承担我们的hashId,改成父子结果
          [`${componentCls}-footer`]: {
            marginTop: margin
          },
          "&-normal": {
            marginBlock: marginXL,
            color: token2.colorTextDisabled,
            [`${componentCls}-image`]: {
              height: token2.emptyImgHeightMD
            }
          },
          "&-small": {
            marginBlock: marginXS,
            color: token2.colorTextDisabled,
            [`${componentCls}-image`]: {
              height: token2.emptyImgHeightSM
            }
          }
        }
      };
    };
    const useStyle$c = genComponentStyleHook("Empty", (token2) => {
      const {
        componentCls,
        controlHeightLG
      } = token2;
      const emptyToken = merge(token2, {
        emptyImgCls: `${componentCls}-img`,
        emptyImgHeight: controlHeightLG * 2.5,
        emptyImgHeightMD: controlHeightLG,
        emptyImgHeightSM: controlHeightLG * 0.875
      });
      return [genSharedEmptyStyle(emptyToken)];
    });
    var __rest$l = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const defaultEmptyImg = createVNode(Empty$2, null, null);
    const simpleEmptyImg = createVNode(Simple, null, null);
    const emptyProps = () => ({
      prefixCls: String,
      imageStyle: objectType(),
      image: anyType(),
      description: anyType()
    });
    const Empty = /* @__PURE__ */ defineComponent({
      name: "AEmpty",
      compatConfig: {
        MODE: 3
      },
      inheritAttrs: false,
      props: emptyProps(),
      setup(props2, _ref) {
        let {
          slots = {},
          attrs
        } = _ref;
        const {
          direction,
          prefixCls: prefixClsRef
        } = useConfigInject("empty", props2);
        const [wrapSSR, hashId] = useStyle$c(prefixClsRef);
        return () => {
          var _a, _b;
          const prefixCls = prefixClsRef.value;
          const _c = _extends$1(_extends$1({}, props2), attrs), {
            image = ((_a = slots.image) === null || _a === void 0 ? void 0 : _a.call(slots)) || defaultEmptyImg,
            description = ((_b = slots.description) === null || _b === void 0 ? void 0 : _b.call(slots)) || void 0,
            imageStyle,
            class: className = ""
          } = _c, restProps = __rest$l(_c, ["image", "description", "imageStyle", "class"]);
          return wrapSSR(createVNode(LocaleReceiver, {
            "componentName": "Empty",
            "children": (locale2) => {
              const des = typeof description !== "undefined" ? description : locale2.description;
              const alt = typeof des === "string" ? des : "empty";
              let imageNode = null;
              if (typeof image === "string") {
                imageNode = createVNode("img", {
                  "alt": alt,
                  "src": image
                }, null);
              } else {
                imageNode = image;
              }
              return createVNode("div", _objectSpread2$1({
                "class": classNames(prefixCls, className, hashId.value, {
                  [`${prefixCls}-normal`]: image === simpleEmptyImg,
                  [`${prefixCls}-rtl`]: direction.value === "rtl"
                })
              }, restProps), [createVNode("div", {
                "class": `${prefixCls}-image`,
                "style": imageStyle
              }, [imageNode]), des && createVNode("p", {
                "class": `${prefixCls}-description`
              }, [des]), slots.default && createVNode("div", {
                "class": `${prefixCls}-footer`
              }, [filterEmpty(slots.default())])]);
            }
          }, null));
        };
      }
    });
    Empty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg;
    Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg;
    const Empty$1 = withInstall(Empty);
    const DefaultRenderEmpty = (props2) => {
      const {
        prefixCls
      } = useConfigInject("empty", props2);
      const renderHtml = (componentName) => {
        switch (componentName) {
          case "Table":
          case "List":
            return createVNode(Empty$1, {
              "image": Empty$1.PRESENTED_IMAGE_SIMPLE
            }, null);
          case "Select":
          case "TreeSelect":
          case "Cascader":
          case "Transfer":
          case "Mentions":
            return createVNode(Empty$1, {
              "image": Empty$1.PRESENTED_IMAGE_SIMPLE,
              "class": `${prefixCls.value}-small`
            }, null);
          default:
            return createVNode(Empty$1, null, null);
        }
      };
      return renderHtml(props2.componentName);
    };
    function renderEmpty(componentName) {
      return createVNode(DefaultRenderEmpty, {
        "componentName": componentName
      }, null);
    }
    const SizeContextKey = Symbol("SizeContextKey");
    const useInjectSize = () => {
      return inject(SizeContextKey, ref(void 0));
    };
    const useProviderSize = (size2) => {
      const parentSize = useInjectSize();
      provide(SizeContextKey, computed(() => size2.value || parentSize.value));
      return size2;
    };
    const useConfigInject = (name, props2) => {
      const sizeContext = useInjectSize();
      const disabledContext = useInjectDisabled();
      const configProvider = inject(configProviderKey, _extends$1(_extends$1({}, defaultConfigProvider), {
        renderEmpty: (name2) => h$1(DefaultRenderEmpty, {
          componentName: name2
        })
      }));
      const prefixCls = computed(() => configProvider.getPrefixCls(name, props2.prefixCls));
      const direction = computed(() => {
        var _a, _b;
        return (_a = props2.direction) !== null && _a !== void 0 ? _a : (_b = configProvider.direction) === null || _b === void 0 ? void 0 : _b.value;
      });
      const iconPrefixCls = computed(() => {
        var _a;
        return (_a = props2.iconPrefixCls) !== null && _a !== void 0 ? _a : configProvider.iconPrefixCls.value;
      });
      const rootPrefixCls = computed(() => configProvider.getPrefixCls());
      const autoInsertSpaceInButton = computed(() => {
        var _a;
        return (_a = configProvider.autoInsertSpaceInButton) === null || _a === void 0 ? void 0 : _a.value;
      });
      const renderEmpty2 = configProvider.renderEmpty;
      const space = configProvider.space;
      const pageHeader = configProvider.pageHeader;
      const form = configProvider.form;
      const getTargetContainer = computed(() => {
        var _a, _b;
        return (_a = props2.getTargetContainer) !== null && _a !== void 0 ? _a : (_b = configProvider.getTargetContainer) === null || _b === void 0 ? void 0 : _b.value;
      });
      const getPopupContainer = computed(() => {
        var _a, _b, _c;
        return (_b = (_a = props2.getContainer) !== null && _a !== void 0 ? _a : props2.getPopupContainer) !== null && _b !== void 0 ? _b : (_c = configProvider.getPopupContainer) === null || _c === void 0 ? void 0 : _c.value;
      });
      const dropdownMatchSelectWidth = computed(() => {
        var _a, _b;
        return (_a = props2.dropdownMatchSelectWidth) !== null && _a !== void 0 ? _a : (_b = configProvider.dropdownMatchSelectWidth) === null || _b === void 0 ? void 0 : _b.value;
      });
      const virtual = computed(() => {
        var _a;
        return (props2.virtual === void 0 ? ((_a = configProvider.virtual) === null || _a === void 0 ? void 0 : _a.value) !== false : props2.virtual !== false) && dropdownMatchSelectWidth.value !== false;
      });
      const size2 = computed(() => props2.size || sizeContext.value);
      const autocomplete = computed(() => {
        var _a, _b, _c;
        return (_a = props2.autocomplete) !== null && _a !== void 0 ? _a : (_c = (_b = configProvider.input) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.autocomplete;
      });
      const disabled = computed(() => {
        var _a;
        return (_a = props2.disabled) !== null && _a !== void 0 ? _a : disabledContext.value;
      });
      const csp = computed(() => {
        var _a;
        return (_a = props2.csp) !== null && _a !== void 0 ? _a : configProvider.csp;
      });
      const wave = computed(() => {
        var _a, _b;
        return (_a = props2.wave) !== null && _a !== void 0 ? _a : (_b = configProvider.wave) === null || _b === void 0 ? void 0 : _b.value;
      });
      return {
        configProvider,
        prefixCls,
        direction,
        size: size2,
        getTargetContainer,
        getPopupContainer,
        space,
        pageHeader,
        form,
        autoInsertSpaceInButton,
        renderEmpty: renderEmpty2,
        virtual,
        dropdownMatchSelectWidth,
        rootPrefixCls,
        getPrefixCls: configProvider.getPrefixCls,
        autocomplete,
        csp,
        iconPrefixCls,
        disabled,
        select: configProvider.select,
        wave
      };
    };
    function omit(obj, fields) {
      const shallowCopy = _extends$1({}, obj);
      for (let i2 = 0; i2 < fields.length; i2 += 1) {
        const key2 = fields[i2];
        delete shallowCopy[key2];
      }
      return shallowCopy;
    }
    function t$1(t2) {
      return "object" == typeof t2 && null != t2 && 1 === t2.nodeType;
    }
    function e$1(t2, e2) {
      return (!e2 || "hidden" !== t2) && "visible" !== t2 && "clip" !== t2;
    }
    function n$1(t2, n2) {
      if (t2.clientHeight < t2.scrollHeight || t2.clientWidth < t2.scrollWidth) {
        var r2 = getComputedStyle(t2, null);
        return e$1(r2.overflowY, n2) || e$1(r2.overflowX, n2) || function(t3) {
          var e2 = function(t4) {
            if (!t4.ownerDocument || !t4.ownerDocument.defaultView) return null;
            try {
              return t4.ownerDocument.defaultView.frameElement;
            } catch (t5) {
              return null;
            }
          }(t3);
          return !!e2 && (e2.clientHeight < t3.scrollHeight || e2.clientWidth < t3.scrollWidth);
        }(t2);
      }
      return false;
    }
    function r$1(t2, e2, n2, r2, i2, o2, l2, d2) {
      return o2 < t2 && l2 > e2 || o2 > t2 && l2 < e2 ? 0 : o2 <= t2 && d2 <= n2 || l2 >= e2 && d2 >= n2 ? o2 - t2 - r2 : l2 > e2 && d2 < n2 || o2 < t2 && d2 > n2 ? l2 - e2 + i2 : 0;
    }
    var i$1 = function(e2, i2) {
      var o2 = window, l2 = i2.scrollMode, d2 = i2.block, f2 = i2.inline, h2 = i2.boundary, u2 = i2.skipOverflowHiddenElements, s2 = "function" == typeof h2 ? h2 : function(t2) {
        return t2 !== h2;
      };
      if (!t$1(e2)) throw new TypeError("Invalid target");
      for (var a2, c2, g2 = document.scrollingElement || document.documentElement, p2 = [], m2 = e2; t$1(m2) && s2(m2); ) {
        if ((m2 = null == (c2 = (a2 = m2).parentElement) ? a2.getRootNode().host || null : c2) === g2) {
          p2.push(m2);
          break;
        }
        null != m2 && m2 === document.body && n$1(m2) && !n$1(document.documentElement) || null != m2 && n$1(m2, u2) && p2.push(m2);
      }
      for (var w2 = o2.visualViewport ? o2.visualViewport.width : innerWidth, v2 = o2.visualViewport ? o2.visualViewport.height : innerHeight, W = window.scrollX || pageXOffset, H = window.scrollY || pageYOffset, b2 = e2.getBoundingClientRect(), y2 = b2.height, E2 = b2.width, M2 = b2.top, V2 = b2.right, x2 = b2.bottom, I2 = b2.left, C = "start" === d2 || "nearest" === d2 ? M2 : "end" === d2 ? x2 : M2 + y2 / 2, R2 = "center" === f2 ? I2 + E2 / 2 : "end" === f2 ? V2 : I2, T2 = [], k2 = 0; k2 < p2.length; k2++) {
        var B2 = p2[k2], D2 = B2.getBoundingClientRect(), O2 = D2.height, X = D2.width, Y2 = D2.top, L2 = D2.right, S2 = D2.bottom, j2 = D2.left;
        if ("if-needed" === l2 && M2 >= 0 && I2 >= 0 && x2 <= v2 && V2 <= w2 && M2 >= Y2 && x2 <= S2 && I2 >= j2 && V2 <= L2) return T2;
        var N2 = getComputedStyle(B2), q2 = parseInt(N2.borderLeftWidth, 10), z2 = parseInt(N2.borderTopWidth, 10), A2 = parseInt(N2.borderRightWidth, 10), F2 = parseInt(N2.borderBottomWidth, 10), G = 0, J2 = 0, K = "offsetWidth" in B2 ? B2.offsetWidth - B2.clientWidth - q2 - A2 : 0, P2 = "offsetHeight" in B2 ? B2.offsetHeight - B2.clientHeight - z2 - F2 : 0, Q = "offsetWidth" in B2 ? 0 === B2.offsetWidth ? 0 : X / B2.offsetWidth : 0, U = "offsetHeight" in B2 ? 0 === B2.offsetHeight ? 0 : O2 / B2.offsetHeight : 0;
        if (g2 === B2) G = "start" === d2 ? C : "end" === d2 ? C - v2 : "nearest" === d2 ? r$1(H, H + v2, v2, z2, F2, H + C, H + C + y2, y2) : C - v2 / 2, J2 = "start" === f2 ? R2 : "center" === f2 ? R2 - w2 / 2 : "end" === f2 ? R2 - w2 : r$1(W, W + w2, w2, q2, A2, W + R2, W + R2 + E2, E2), G = Math.max(0, G + H), J2 = Math.max(0, J2 + W);
        else {
          G = "start" === d2 ? C - Y2 - z2 : "end" === d2 ? C - S2 + F2 + P2 : "nearest" === d2 ? r$1(Y2, S2, O2, z2, F2 + P2, C, C + y2, y2) : C - (Y2 + O2 / 2) + P2 / 2, J2 = "start" === f2 ? R2 - j2 - q2 : "center" === f2 ? R2 - (j2 + X / 2) + K / 2 : "end" === f2 ? R2 - L2 + A2 + K : r$1(j2, L2, X, q2, A2 + K, R2, R2 + E2, E2);
          var Z = B2.scrollLeft, $2 = B2.scrollTop;
          C += $2 - (G = Math.max(0, Math.min($2 + G / U, B2.scrollHeight - O2 / U + P2))), R2 += Z - (J2 = Math.max(0, Math.min(Z + J2 / Q, B2.scrollWidth - X / Q + K)));
        }
        T2.push({ el: B2, top: G, left: J2 });
      }
      return T2;
    };
    function isOptionsObject(options) {
      return options === Object(options) && Object.keys(options).length !== 0;
    }
    function defaultBehavior(actions, behavior) {
      if (behavior === void 0) {
        behavior = "auto";
      }
      var canSmoothScroll = "scrollBehavior" in document.body.style;
      actions.forEach(function(_ref) {
        var el = _ref.el, top = _ref.top, left = _ref.left;
        if (el.scroll && canSmoothScroll) {
          el.scroll({
            top,
            left,
            behavior
          });
        } else {
          el.scrollTop = top;
          el.scrollLeft = left;
        }
      });
    }
    function getOptions(options) {
      if (options === false) {
        return {
          block: "end",
          inline: "nearest"
        };
      }
      if (isOptionsObject(options)) {
        return options;
      }
      return {
        block: "start",
        inline: "nearest"
      };
    }
    function scrollIntoView(target, options) {
      var isTargetAttached = target.isConnected || target.ownerDocument.documentElement.contains(target);
      if (isOptionsObject(options) && typeof options.behavior === "function") {
        return options.behavior(isTargetAttached ? i$1(target, options) : []);
      }
      if (!isTargetAttached) {
        return;
      }
      var computeOptions = getOptions(options);
      return defaultBehavior(i$1(target, computeOptions), computeOptions.behavior);
    }
    function e(e2, t2) {
      for (var n2 = 0; n2 < t2.length; n2++) {
        var r2 = t2[n2];
        r2.enumerable = r2.enumerable || false, r2.configurable = true, "value" in r2 && (r2.writable = true), Object.defineProperty(e2, r2.key, r2);
      }
    }
    function t(t2, n2, r2) {
      return r2 && e(t2, r2), t2;
    }
    function n() {
      return (n = Object.assign || function(e2) {
        for (var t2 = 1; t2 < arguments.length; t2++) {
          var n2 = arguments[t2];
          for (var r2 in n2) Object.prototype.hasOwnProperty.call(n2, r2) && (e2[r2] = n2[r2]);
        }
        return e2;
      }).apply(this, arguments);
    }
    function r(e2, t2) {
      e2.prototype = Object.create(t2.prototype), e2.prototype.constructor = e2, e2.__proto__ = t2;
    }
    function i(e2, t2) {
      if (null == e2) return {};
      var n2, r2, i2 = {}, o2 = Object.keys(e2);
      for (r2 = 0; r2 < o2.length; r2++) t2.indexOf(n2 = o2[r2]) >= 0 || (i2[n2] = e2[n2]);
      return i2;
    }
    function o(e2) {
      return 1 == (null != (t2 = e2) && "object" == typeof t2 && false === Array.isArray(t2)) && "[object Object]" === Object.prototype.toString.call(e2);
      var t2;
    }
    var u = Object.prototype, a = u.toString, f = u.hasOwnProperty, c = /^\s*function (\w+)/;
    function l(e2) {
      var t2, n2 = null !== (t2 = null == e2 ? void 0 : e2.type) && void 0 !== t2 ? t2 : e2;
      if (n2) {
        var r2 = n2.toString().match(c);
        return r2 ? r2[1] : "";
      }
      return "";
    }
    var s = function(e2) {
      var t2, n2;
      return false !== o(e2) && "function" == typeof (t2 = e2.constructor) && false !== o(n2 = t2.prototype) && false !== n2.hasOwnProperty("isPrototypeOf");
    }, v = function(e2) {
      return e2;
    }, y = v;
    var d = function(e2, t2) {
      return f.call(e2, t2);
    }, h = Number.isInteger || function(e2) {
      return "number" == typeof e2 && isFinite(e2) && Math.floor(e2) === e2;
    }, b = Array.isArray || function(e2) {
      return "[object Array]" === a.call(e2);
    }, O = function(e2) {
      return "[object Function]" === a.call(e2);
    }, g = function(e2) {
      return s(e2) && d(e2, "_vueTypes_name");
    }, m = function(e2) {
      return s(e2) && (d(e2, "type") || ["_vueTypes_name", "validator", "default", "required"].some(function(t2) {
        return d(e2, t2);
      }));
    };
    function j(e2, t2) {
      return Object.defineProperty(e2.bind(t2), "__original", { value: e2 });
    }
    function _(e2, t2, n2) {
      var r2;
      void 0 === n2 && (n2 = false);
      var i2 = true, o2 = "";
      r2 = s(e2) ? e2 : { type: e2 };
      var u2 = g(r2) ? r2._vueTypes_name + " - " : "";
      if (m(r2) && null !== r2.type) {
        if (void 0 === r2.type || true === r2.type) return i2;
        if (!r2.required && void 0 === t2) return i2;
        b(r2.type) ? (i2 = r2.type.some(function(e3) {
          return true === _(e3, t2, true);
        }), o2 = r2.type.map(function(e3) {
          return l(e3);
        }).join(" or ")) : i2 = "Array" === (o2 = l(r2)) ? b(t2) : "Object" === o2 ? s(t2) : "String" === o2 || "Number" === o2 || "Boolean" === o2 || "Function" === o2 ? function(e3) {
          if (null == e3) return "";
          var t3 = e3.constructor.toString().match(c);
          return t3 ? t3[1] : "";
        }(t2) === o2 : t2 instanceof r2.type;
      }
      if (!i2) {
        var a2 = u2 + 'value "' + t2 + '" should be of type "' + o2 + '"';
        return false === n2 ? (y(a2), false) : a2;
      }
      if (d(r2, "validator") && O(r2.validator)) {
        var f2 = y, v2 = [];
        if (y = function(e3) {
          v2.push(e3);
        }, i2 = r2.validator(t2), y = f2, !i2) {
          var p2 = (v2.length > 1 ? "* " : "") + v2.join("\n* ");
          return v2.length = 0, false === n2 ? (y(p2), i2) : p2;
        }
      }
      return i2;
    }
    function T(e2, t2) {
      var n2 = Object.defineProperties(t2, { _vueTypes_name: { value: e2, writable: true }, isRequired: { get: function() {
        return this.required = true, this;
      } }, def: { value: function(e3) {
        return void 0 !== e3 || this.default ? O(e3) || true === _(this, e3, true) ? (this.default = b(e3) ? function() {
          return [].concat(e3);
        } : s(e3) ? function() {
          return Object.assign({}, e3);
        } : e3, this) : (y(this._vueTypes_name + ' - invalid default value: "' + e3 + '"'), this) : this;
      } } }), r2 = n2.validator;
      return O(r2) && (n2.validator = j(r2, n2)), n2;
    }
    function w(e2, t2) {
      var n2 = T(e2, t2);
      return Object.defineProperty(n2, "validate", { value: function(e3) {
        return O(this.validator) && y(this._vueTypes_name + " - calling .validate() will overwrite the current custom validator function. Validator info:\n" + JSON.stringify(this)), this.validator = j(e3, this), this;
      } });
    }
    function k(e2, t2, n2) {
      var r2, o2, u2 = (r2 = t2, o2 = {}, Object.getOwnPropertyNames(r2).forEach(function(e3) {
        o2[e3] = Object.getOwnPropertyDescriptor(r2, e3);
      }), Object.defineProperties({}, o2));
      if (u2._vueTypes_name = e2, !s(n2)) return u2;
      var a2, f2, c2 = n2.validator, l2 = i(n2, ["validator"]);
      if (O(c2)) {
        var v2 = u2.validator;
        v2 && (v2 = null !== (f2 = (a2 = v2).__original) && void 0 !== f2 ? f2 : a2), u2.validator = j(v2 ? function(e3) {
          return v2.call(this, e3) && c2.call(this, e3);
        } : c2, u2);
      }
      return Object.assign(u2, l2);
    }
    function P(e2) {
      return e2.replace(/^(?!\s*$)/gm, "  ");
    }
    var x = function() {
      return w("any", {});
    }, A = function() {
      return w("function", { type: Function });
    }, E = function() {
      return w("boolean", { type: Boolean });
    }, N = function() {
      return w("string", { type: String });
    }, q = function() {
      return w("number", { type: Number });
    }, S = function() {
      return w("array", { type: Array });
    }, V = function() {
      return w("object", { type: Object });
    }, F = function() {
      return T("integer", { type: Number, validator: function(e2) {
        return h(e2);
      } });
    }, D = function() {
      return T("symbol", { validator: function(e2) {
        return "symbol" == typeof e2;
      } });
    };
    function L(e2, t2) {
      if (void 0 === t2 && (t2 = "custom validation failed"), "function" != typeof e2) throw new TypeError("[VueTypes error]: You must provide a function as argument");
      return T(e2.name || "<<anonymous function>>", { validator: function(n2) {
        var r2 = e2(n2);
        return r2 || y(this._vueTypes_name + " - " + t2), r2;
      } });
    }
    function Y(e2) {
      if (!b(e2)) throw new TypeError("[VueTypes error]: You must provide an array as argument.");
      var t2 = 'oneOf - value should be one of "' + e2.join('", "') + '".', n2 = e2.reduce(function(e3, t3) {
        if (null != t3) {
          var n3 = t3.constructor;
          -1 === e3.indexOf(n3) && e3.push(n3);
        }
        return e3;
      }, []);
      return T("oneOf", { type: n2.length > 0 ? n2 : void 0, validator: function(n3) {
        var r2 = -1 !== e2.indexOf(n3);
        return r2 || y(t2), r2;
      } });
    }
    function B(e2) {
      if (!b(e2)) throw new TypeError("[VueTypes error]: You must provide an array as argument");
      for (var t2 = false, n2 = [], r2 = 0; r2 < e2.length; r2 += 1) {
        var i2 = e2[r2];
        if (m(i2)) {
          if (g(i2) && "oneOf" === i2._vueTypes_name) {
            n2 = n2.concat(i2.type);
            continue;
          }
          if (O(i2.validator) && (t2 = true), true !== i2.type && i2.type) {
            n2 = n2.concat(i2.type);
            continue;
          }
        }
        n2.push(i2);
      }
      return n2 = n2.filter(function(e3, t3) {
        return n2.indexOf(e3) === t3;
      }), T("oneOfType", t2 ? { type: n2, validator: function(t3) {
        var n3 = [], r3 = e2.some(function(e3) {
          var r4 = _(g(e3) && "oneOf" === e3._vueTypes_name ? e3.type || null : e3, t3, true);
          return "string" == typeof r4 && n3.push(r4), true === r4;
        });
        return r3 || y("oneOfType - provided value does not match any of the " + n3.length + " passed-in validators:\n" + P(n3.join("\n"))), r3;
      } } : { type: n2 });
    }
    function I(e2) {
      return T("arrayOf", { type: Array, validator: function(t2) {
        var n2, r2 = t2.every(function(t3) {
          return true === (n2 = _(e2, t3, true));
        });
        return r2 || y("arrayOf - value validation error:\n" + P(n2)), r2;
      } });
    }
    function J(e2) {
      return T("instanceOf", { type: e2 });
    }
    function M(e2) {
      return T("objectOf", { type: Object, validator: function(t2) {
        var n2, r2 = Object.keys(t2).every(function(r3) {
          return true === (n2 = _(e2, t2[r3], true));
        });
        return r2 || y("objectOf - value validation error:\n" + P(n2)), r2;
      } });
    }
    function R(e2) {
      var t2 = Object.keys(e2), n2 = t2.filter(function(t3) {
        var n3;
        return !!(null === (n3 = e2[t3]) || void 0 === n3 ? void 0 : n3.required);
      }), r2 = T("shape", { type: Object, validator: function(r3) {
        var i2 = this;
        if (!s(r3)) return false;
        var o2 = Object.keys(r3);
        if (n2.length > 0 && n2.some(function(e3) {
          return -1 === o2.indexOf(e3);
        })) {
          var u2 = n2.filter(function(e3) {
            return -1 === o2.indexOf(e3);
          });
          return y(1 === u2.length ? 'shape - required property "' + u2[0] + '" is not defined.' : 'shape - required properties "' + u2.join('", "') + '" are not defined.'), false;
        }
        return o2.every(function(n3) {
          if (-1 === t2.indexOf(n3)) return true === i2._vueTypes_isLoose || (y('shape - shape definition does not include a "' + n3 + '" property. Allowed keys: "' + t2.join('", "') + '".'), false);
          var o3 = _(e2[n3], r3[n3], true);
          return "string" == typeof o3 && y('shape - "' + n3 + '" property validation error:\n ' + P(o3)), true === o3;
        });
      } });
      return Object.defineProperty(r2, "_vueTypes_isLoose", { writable: true, value: false }), Object.defineProperty(r2, "loose", { get: function() {
        return this._vueTypes_isLoose = true, this;
      } }), r2;
    }
    var $ = function() {
      function e2() {
      }
      return e2.extend = function(e3) {
        var t2 = this;
        if (b(e3)) return e3.forEach(function(e4) {
          return t2.extend(e4);
        }), this;
        var n2 = e3.name, r2 = e3.validate, o2 = void 0 !== r2 && r2, u2 = e3.getter, a2 = void 0 !== u2 && u2, f2 = i(e3, ["name", "validate", "getter"]);
        if (d(this, n2)) throw new TypeError('[VueTypes error]: Type "' + n2 + '" already defined');
        var c2, l2 = f2.type;
        return g(l2) ? (delete f2.type, Object.defineProperty(this, n2, a2 ? { get: function() {
          return k(n2, l2, f2);
        } } : { value: function() {
          var e4, t3 = k(n2, l2, f2);
          return t3.validator && (t3.validator = (e4 = t3.validator).bind.apply(e4, [t3].concat([].slice.call(arguments)))), t3;
        } })) : (c2 = a2 ? { get: function() {
          var e4 = Object.assign({}, f2);
          return o2 ? w(n2, e4) : T(n2, e4);
        }, enumerable: true } : { value: function() {
          var e4, t3, r3 = Object.assign({}, f2);
          return e4 = o2 ? w(n2, r3) : T(n2, r3), r3.validator && (e4.validator = (t3 = r3.validator).bind.apply(t3, [e4].concat([].slice.call(arguments)))), e4;
        }, enumerable: true }, Object.defineProperty(this, n2, c2));
      }, t(e2, null, [{ key: "any", get: function() {
        return x();
      } }, { key: "func", get: function() {
        return A().def(this.defaults.func);
      } }, { key: "bool", get: function() {
        return E().def(this.defaults.bool);
      } }, { key: "string", get: function() {
        return N().def(this.defaults.string);
      } }, { key: "number", get: function() {
        return q().def(this.defaults.number);
      } }, { key: "array", get: function() {
        return S().def(this.defaults.array);
      } }, { key: "object", get: function() {
        return V().def(this.defaults.object);
      } }, { key: "integer", get: function() {
        return F().def(this.defaults.integer);
      } }, { key: "symbol", get: function() {
        return D();
      } }]), e2;
    }();
    function z(e2) {
      var i2;
      return void 0 === e2 && (e2 = { func: function() {
      }, bool: true, string: "", number: 0, array: function() {
        return [];
      }, object: function() {
        return {};
      }, integer: 0 }), (i2 = function(i3) {
        function o2() {
          return i3.apply(this, arguments) || this;
        }
        return r(o2, i3), t(o2, null, [{ key: "sensibleDefaults", get: function() {
          return n({}, this.defaults);
        }, set: function(t2) {
          this.defaults = false !== t2 ? n({}, true !== t2 ? t2 : e2) : {};
        } }]), o2;
      }($)).defaults = n({}, e2), i2;
    }
    $.defaults = {}, $.custom = L, $.oneOf = Y, $.instanceOf = J, $.oneOfType = B, $.arrayOf = I, $.objectOf = M, $.shape = R, $.utils = { validate: function(e2, t2) {
      return true === _(t2, e2, true);
    }, toType: function(e2, t2, n2) {
      return void 0 === n2 && (n2 = false), n2 ? w(e2, t2) : T(e2, t2);
    } };
    (function(e2) {
      function t2() {
        return e2.apply(this, arguments) || this;
      }
      return r(t2, e2), t2;
    })(z());
    const PropTypes = z({
      func: void 0,
      bool: void 0,
      string: void 0,
      number: void 0,
      array: void 0,
      object: void 0,
      integer: void 0
    });
    PropTypes.extend([{
      name: "looseBool",
      getter: true,
      type: Boolean,
      default: void 0
    }, {
      name: "style",
      getter: true,
      type: [String, Object],
      default: void 0
    }, {
      name: "VueNode",
      getter: true,
      type: null
    }]);
    const devWarning = (valid, component, message) => {
      warningOnce(valid, `[ant-design-vue: ${component}] ${message}`);
    };
    function getKey(data, index2) {
      const {
        key: key2
      } = data;
      let value;
      if ("value" in data) {
        ({
          value
        } = data);
      }
      if (key2 !== null && key2 !== void 0) {
        return key2;
      }
      if (value !== void 0) {
        return value;
      }
      return `rc-index-key-${index2}`;
    }
    function fillFieldNames(fieldNames, childrenAsData) {
      const {
        label,
        value,
        options
      } = fieldNames || {};
      return {
        label: label || (childrenAsData ? "children" : "label"),
        value: value || "value",
        options: options || "options"
      };
    }
    function flattenOptions(options) {
      let {
        fieldNames,
        childrenAsData
      } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const flattenList = [];
      const {
        label: fieldLabel,
        value: fieldValue,
        options: fieldOptions
      } = fillFieldNames(fieldNames, false);
      function dig(list, isGroupOption) {
        list.forEach((data) => {
          const label = data[fieldLabel];
          if (isGroupOption || !(fieldOptions in data)) {
            const value = data[fieldValue];
            flattenList.push({
              key: getKey(data, flattenList.length),
              groupOption: isGroupOption,
              data,
              label,
              value
            });
          } else {
            let grpLabel = label;
            if (grpLabel === void 0 && childrenAsData) {
              grpLabel = data.label;
            }
            flattenList.push({
              key: getKey(data, flattenList.length),
              group: true,
              data,
              label: grpLabel
            });
            dig(data[fieldOptions], true);
          }
        });
      }
      dig(options, false);
      return flattenList;
    }
    function injectPropsWithOption(option) {
      const newOption = _extends$1({}, option);
      if (!("props" in newOption)) {
        Object.defineProperty(newOption, "props", {
          get() {
            return newOption;
          }
        });
      }
      return newOption;
    }
    function getSeparatedContent(text, tokens) {
      if (!tokens || !tokens.length) {
        return null;
      }
      let match2 = false;
      function separate(str, _ref) {
        let [token2, ...restTokens] = _ref;
        if (!token2) {
          return [str];
        }
        const list2 = str.split(token2);
        match2 = match2 || list2.length > 1;
        return list2.reduce((prevList, unitStr) => [...prevList, ...separate(unitStr, restTokens)], []).filter((unit) => unit);
      }
      const list = separate(text, tokens);
      return match2 ? list : null;
    }
    function returnEmptyString() {
      return "";
    }
    function returnDocument(element) {
      if (element) {
        return element.ownerDocument;
      }
      return window.document;
    }
    function noop$1() {
    }
    const triggerProps = () => ({
      action: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]).def([]),
      showAction: PropTypes.any.def([]),
      hideAction: PropTypes.any.def([]),
      getPopupClassNameFromAlign: PropTypes.any.def(returnEmptyString),
      onPopupVisibleChange: Function,
      afterPopupVisibleChange: PropTypes.func.def(noop$1),
      popup: PropTypes.any,
      arrow: PropTypes.bool.def(true),
      popupStyle: {
        type: Object,
        default: void 0
      },
      prefixCls: PropTypes.string.def("rc-trigger-popup"),
      popupClassName: PropTypes.string.def(""),
      popupPlacement: String,
      builtinPlacements: PropTypes.object,
      popupTransitionName: String,
      popupAnimation: PropTypes.any,
      mouseEnterDelay: PropTypes.number.def(0),
      mouseLeaveDelay: PropTypes.number.def(0.1),
      zIndex: Number,
      focusDelay: PropTypes.number.def(0),
      blurDelay: PropTypes.number.def(0.15),
      getPopupContainer: Function,
      getDocument: PropTypes.func.def(returnDocument),
      forceRender: {
        type: Boolean,
        default: void 0
      },
      destroyPopupOnHide: {
        type: Boolean,
        default: false
      },
      mask: {
        type: Boolean,
        default: false
      },
      maskClosable: {
        type: Boolean,
        default: true
      },
      // onPopupAlign: PropTypes.func.def(noop),
      popupAlign: PropTypes.object.def(() => ({})),
      popupVisible: {
        type: Boolean,
        default: void 0
      },
      defaultPopupVisible: {
        type: Boolean,
        default: false
      },
      maskTransitionName: String,
      maskAnimation: String,
      stretch: String,
      alignPoint: {
        type: Boolean,
        default: void 0
      },
      autoDestroy: {
        type: Boolean,
        default: false
      },
      mobile: Object,
      getTriggerDOMNode: Function
    });
    const innerProps = {
      visible: Boolean,
      prefixCls: String,
      zIndex: Number,
      destroyPopupOnHide: Boolean,
      forceRender: Boolean,
      arrow: {
        type: Boolean,
        default: true
      },
      // Legacy Motion
      animation: [String, Object],
      transitionName: String,
      // Measure
      stretch: {
        type: String
      },
      // Align
      align: {
        type: Object
      },
      point: {
        type: Object
      },
      getRootDomNode: {
        type: Function
      },
      getClassNameFromAlign: {
        type: Function
      },
      onAlign: {
        type: Function
      },
      onMouseenter: {
        type: Function
      },
      onMouseleave: {
        type: Function
      },
      onMousedown: {
        type: Function
      },
      onTouchstart: {
        type: Function
      }
    };
    const mobileProps = _extends$1(_extends$1({}, innerProps), {
      mobile: {
        type: Object
      }
    });
    const popupProps = _extends$1(_extends$1({}, innerProps), {
      mask: Boolean,
      mobile: {
        type: Object
      },
      maskAnimation: String,
      maskTransitionName: String
    });
    function getMotion$1(_ref) {
      let {
        prefixCls,
        animation,
        transitionName: transitionName2
      } = _ref;
      if (animation) {
        return {
          name: `${prefixCls}-${animation}`
        };
      }
      if (transitionName2) {
        return {
          name: transitionName2
        };
      }
      return {};
    }
    function Mask(props2) {
      const {
        prefixCls,
        visible,
        zIndex,
        mask,
        maskAnimation,
        maskTransitionName
      } = props2;
      if (!mask) {
        return null;
      }
      let motion = {};
      if (maskTransitionName || maskAnimation) {
        motion = getMotion$1({
          prefixCls,
          transitionName: maskTransitionName,
          animation: maskAnimation
        });
      }
      return createVNode(Transition, _objectSpread2$1({
        "appear": true
      }, motion), {
        default: () => [withDirectives(createVNode("div", {
          "style": {
            zIndex
          },
          "class": `${prefixCls}-mask`
        }, null), [[resolveDirective("if"), visible]])]
      });
    }
    Mask.displayName = "Mask";
    const MobilePopupInner = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "MobilePopupInner",
      inheritAttrs: false,
      props: mobileProps,
      emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
      setup(props2, _ref) {
        let {
          expose,
          slots
        } = _ref;
        const elementRef = ref();
        expose({
          forceAlign: () => {
          },
          getElement: () => elementRef.value
        });
        return () => {
          var _a;
          const {
            zIndex,
            visible,
            prefixCls,
            mobile: {
              popupClassName,
              popupStyle,
              popupMotion = {},
              popupRender
            } = {}
          } = props2;
          const mergedStyle = _extends$1({
            zIndex
          }, popupStyle);
          let childNode = flattenChildren((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
          if (childNode.length > 1) {
            childNode = createVNode("div", {
              "class": `${prefixCls}-content`
            }, [childNode]);
          }
          if (popupRender) {
            childNode = popupRender(childNode);
          }
          const mergedClassName = classNames(prefixCls, popupClassName);
          return createVNode(Transition, _objectSpread2$1({
            "ref": elementRef
          }, popupMotion), {
            default: () => [visible ? createVNode("div", {
              "class": mergedClassName,
              "style": mergedStyle
            }, [childNode]) : null]
          });
        };
      }
    });
    var __awaiter$1 = function(thisArg, _arguments, P2, generator) {
      function adopt(value) {
        return value instanceof P2 ? value : new P2(function(resolve2) {
          resolve2(value);
        });
      }
      return new (P2 || (P2 = Promise))(function(resolve2, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e2) {
            reject(e2);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e2) {
            reject(e2);
          }
        }
        function step(result) {
          result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    const StatusQueue = ["measure", "align", null, "motion"];
    const useVisibleStatus = (visible, doMeasure) => {
      const status = shallowRef(null);
      const rafRef = shallowRef();
      const destroyRef = shallowRef(false);
      function setStatus(nextStatus) {
        if (!destroyRef.value) {
          status.value = nextStatus;
        }
      }
      function cancelRaf() {
        wrapperRaf.cancel(rafRef.value);
      }
      function goNextStatus(callback) {
        cancelRaf();
        rafRef.value = wrapperRaf(() => {
          let newStatus = status.value;
          switch (status.value) {
            case "align":
              newStatus = "motion";
              break;
            case "motion":
              newStatus = "stable";
              break;
          }
          setStatus(newStatus);
          callback === null || callback === void 0 ? void 0 : callback();
        });
      }
      watch(visible, () => {
        setStatus("measure");
      }, {
        immediate: true,
        flush: "post"
      });
      onMounted(() => {
        watch(status, () => {
          switch (status.value) {
            case "measure":
              doMeasure();
              break;
          }
          if (status.value) {
            rafRef.value = wrapperRaf(() => __awaiter$1(void 0, void 0, void 0, function* () {
              const index2 = StatusQueue.indexOf(status.value);
              const nextStatus = StatusQueue[index2 + 1];
              if (nextStatus && index2 !== -1) {
                setStatus(nextStatus);
              }
            }));
          }
        }, {
          immediate: true,
          flush: "post"
        });
      });
      onBeforeUnmount(() => {
        destroyRef.value = true;
        cancelRaf();
      });
      return [status, goNextStatus];
    };
    const useStretchStyle = (stretch) => {
      const targetSize = shallowRef({
        width: 0,
        height: 0
      });
      function measureStretch(element) {
        targetSize.value = {
          width: element.offsetWidth,
          height: element.offsetHeight
        };
      }
      const style = computed(() => {
        const sizeStyle = {};
        if (stretch.value) {
          const {
            width,
            height
          } = targetSize.value;
          if (stretch.value.indexOf("height") !== -1 && height) {
            sizeStyle.height = `${height}px`;
          } else if (stretch.value.indexOf("minHeight") !== -1 && height) {
            sizeStyle.minHeight = `${height}px`;
          }
          if (stretch.value.indexOf("width") !== -1 && width) {
            sizeStyle.width = `${width}px`;
          } else if (stretch.value.indexOf("minWidth") !== -1 && width) {
            sizeStyle.minWidth = `${width}px`;
          }
        }
        return sizeStyle;
      });
      return [style, measureStretch];
    };
    function ownKeys(object, enumerableOnly) {
      var keys2 = Object.keys(object);
      if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        enumerableOnly && (symbols = symbols.filter(function(sym) {
          return Object.getOwnPropertyDescriptor(object, sym).enumerable;
        })), keys2.push.apply(keys2, symbols);
      }
      return keys2;
    }
    function _objectSpread2(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = null != arguments[i2] ? arguments[i2] : {};
        i2 % 2 ? ownKeys(Object(source), true).forEach(function(key2) {
          _defineProperty$n(target, key2, source[key2]);
        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key2) {
          Object.defineProperty(target, key2, Object.getOwnPropertyDescriptor(source, key2));
        });
      }
      return target;
    }
    function _typeof(obj) {
      "@babel/helpers - typeof";
      return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
        return typeof obj2;
      } : function(obj2) {
        return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
      }, _typeof(obj);
    }
    function _defineProperty$n(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, {
          value,
          enumerable: true,
          configurable: true,
          writable: true
        });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var vendorPrefix;
    var jsCssMap = {
      Webkit: "-webkit-",
      Moz: "-moz-",
      // IE did it wrong again ...
      ms: "-ms-",
      O: "-o-"
    };
    function getVendorPrefix() {
      if (vendorPrefix !== void 0) {
        return vendorPrefix;
      }
      vendorPrefix = "";
      var style = document.createElement("p").style;
      var testProp = "Transform";
      for (var key2 in jsCssMap) {
        if (key2 + testProp in style) {
          vendorPrefix = key2;
        }
      }
      return vendorPrefix;
    }
    function getTransitionName$1() {
      return getVendorPrefix() ? "".concat(getVendorPrefix(), "TransitionProperty") : "transitionProperty";
    }
    function getTransformName() {
      return getVendorPrefix() ? "".concat(getVendorPrefix(), "Transform") : "transform";
    }
    function setTransitionProperty(node2, value) {
      var name = getTransitionName$1();
      if (name) {
        node2.style[name] = value;
        if (name !== "transitionProperty") {
          node2.style.transitionProperty = value;
        }
      }
    }
    function setTransform(node2, value) {
      var name = getTransformName();
      if (name) {
        node2.style[name] = value;
        if (name !== "transform") {
          node2.style.transform = value;
        }
      }
    }
    function getTransitionProperty(node2) {
      return node2.style.transitionProperty || node2.style[getTransitionName$1()];
    }
    function getTransformXY(node2) {
      var style = window.getComputedStyle(node2, null);
      var transform = style.getPropertyValue("transform") || style.getPropertyValue(getTransformName());
      if (transform && transform !== "none") {
        var matrix = transform.replace(/[^0-9\-.,]/g, "").split(",");
        return {
          x: parseFloat(matrix[12] || matrix[4], 0),
          y: parseFloat(matrix[13] || matrix[5], 0)
        };
      }
      return {
        x: 0,
        y: 0
      };
    }
    var matrix2d = /matrix\((.*)\)/;
    var matrix3d = /matrix3d\((.*)\)/;
    function setTransformXY(node2, xy) {
      var style = window.getComputedStyle(node2, null);
      var transform = style.getPropertyValue("transform") || style.getPropertyValue(getTransformName());
      if (transform && transform !== "none") {
        var arr;
        var match2d = transform.match(matrix2d);
        if (match2d) {
          match2d = match2d[1];
          arr = match2d.split(",").map(function(item) {
            return parseFloat(item, 10);
          });
          arr[4] = xy.x;
          arr[5] = xy.y;
          setTransform(node2, "matrix(".concat(arr.join(","), ")"));
        } else {
          var match3d = transform.match(matrix3d)[1];
          arr = match3d.split(",").map(function(item) {
            return parseFloat(item, 10);
          });
          arr[12] = xy.x;
          arr[13] = xy.y;
          setTransform(node2, "matrix3d(".concat(arr.join(","), ")"));
        }
      } else {
        setTransform(node2, "translateX(".concat(xy.x, "px) translateY(").concat(xy.y, "px) translateZ(0)"));
      }
    }
    var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;
    var getComputedStyleX;
    function forceRelayout(elem) {
      var originalStyle = elem.style.display;
      elem.style.display = "none";
      elem.offsetHeight;
      elem.style.display = originalStyle;
    }
    function css(el, name, v2) {
      var value = v2;
      if (_typeof(name) === "object") {
        for (var i2 in name) {
          if (name.hasOwnProperty(i2)) {
            css(el, i2, name[i2]);
          }
        }
        return void 0;
      }
      if (typeof value !== "undefined") {
        if (typeof value === "number") {
          value = "".concat(value, "px");
        }
        el.style[name] = value;
        return void 0;
      }
      return getComputedStyleX(el, name);
    }
    function getClientPosition(elem) {
      var box;
      var x2;
      var y2;
      var doc2 = elem.ownerDocument;
      var body = doc2.body;
      var docElem = doc2 && doc2.documentElement;
      box = elem.getBoundingClientRect();
      x2 = Math.floor(box.left);
      y2 = Math.floor(box.top);
      x2 -= docElem.clientLeft || body.clientLeft || 0;
      y2 -= docElem.clientTop || body.clientTop || 0;
      return {
        left: x2,
        top: y2
      };
    }
    function getScroll(w2, top) {
      var ret = w2["page".concat(top ? "Y" : "X", "Offset")];
      var method = "scroll".concat(top ? "Top" : "Left");
      if (typeof ret !== "number") {
        var d2 = w2.document;
        ret = d2.documentElement[method];
        if (typeof ret !== "number") {
          ret = d2.body[method];
        }
      }
      return ret;
    }
    function getScrollLeft(w2) {
      return getScroll(w2);
    }
    function getScrollTop(w2) {
      return getScroll(w2, true);
    }
    function getOffset(el) {
      var pos = getClientPosition(el);
      var doc2 = el.ownerDocument;
      var w2 = doc2.defaultView || doc2.parentWindow;
      pos.left += getScrollLeft(w2);
      pos.top += getScrollTop(w2);
      return pos;
    }
    function isWindow(obj) {
      return obj !== null && obj !== void 0 && obj == obj.window;
    }
    function getDocument(node2) {
      if (isWindow(node2)) {
        return node2.document;
      }
      if (node2.nodeType === 9) {
        return node2;
      }
      return node2.ownerDocument;
    }
    function _getComputedStyle(elem, name, cs) {
      var computedStyle = cs;
      var val = "";
      var d2 = getDocument(elem);
      computedStyle = computedStyle || d2.defaultView.getComputedStyle(elem, null);
      if (computedStyle) {
        val = computedStyle.getPropertyValue(name) || computedStyle[name];
      }
      return val;
    }
    var _RE_NUM_NO_PX = new RegExp("^(".concat(RE_NUM, ")(?!px)[a-z%]+$"), "i");
    var RE_POS = /^(top|right|bottom|left)$/;
    var CURRENT_STYLE = "currentStyle";
    var RUNTIME_STYLE = "runtimeStyle";
    var LEFT = "left";
    var PX = "px";
    function _getComputedStyleIE(elem, name) {
      var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];
      if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {
        var style = elem.style;
        var left = style[LEFT];
        var rsLeft = elem[RUNTIME_STYLE][LEFT];
        elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];
        style[LEFT] = name === "fontSize" ? "1em" : ret || 0;
        ret = style.pixelLeft + PX;
        style[LEFT] = left;
        elem[RUNTIME_STYLE][LEFT] = rsLeft;
      }
      return ret === "" ? "auto" : ret;
    }
    if (typeof window !== "undefined") {
      getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;
    }
    function getOffsetDirection(dir, option) {
      if (dir === "left") {
        return option.useCssRight ? "right" : dir;
      }
      return option.useCssBottom ? "bottom" : dir;
    }
    function oppositeOffsetDirection(dir) {
      if (dir === "left") {
        return "right";
      } else if (dir === "right") {
        return "left";
      } else if (dir === "top") {
        return "bottom";
      } else if (dir === "bottom") {
        return "top";
      }
    }
    function setLeftTop(elem, offset, option) {
      if (css(elem, "position") === "static") {
        elem.style.position = "relative";
      }
      var presetH = -999;
      var presetV = -999;
      var horizontalProperty = getOffsetDirection("left", option);
      var verticalProperty = getOffsetDirection("top", option);
      var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty);
      var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty);
      if (horizontalProperty !== "left") {
        presetH = 999;
      }
      if (verticalProperty !== "top") {
        presetV = 999;
      }
      var originalTransition = "";
      var originalOffset = getOffset(elem);
      if ("left" in offset || "top" in offset) {
        originalTransition = getTransitionProperty(elem) || "";
        setTransitionProperty(elem, "none");
      }
      if ("left" in offset) {
        elem.style[oppositeHorizontalProperty] = "";
        elem.style[horizontalProperty] = "".concat(presetH, "px");
      }
      if ("top" in offset) {
        elem.style[oppositeVerticalProperty] = "";
        elem.style[verticalProperty] = "".concat(presetV, "px");
      }
      forceRelayout(elem);
      var old = getOffset(elem);
      var originalStyle = {};
      for (var key2 in offset) {
        if (offset.hasOwnProperty(key2)) {
          var dir = getOffsetDirection(key2, option);
          var preset = key2 === "left" ? presetH : presetV;
          var off = originalOffset[key2] - old[key2];
          if (dir === key2) {
            originalStyle[dir] = preset + off;
          } else {
            originalStyle[dir] = preset - off;
          }
        }
      }
      css(elem, originalStyle);
      forceRelayout(elem);
      if ("left" in offset || "top" in offset) {
        setTransitionProperty(elem, originalTransition);
      }
      var ret = {};
      for (var _key in offset) {
        if (offset.hasOwnProperty(_key)) {
          var _dir = getOffsetDirection(_key, option);
          var _off = offset[_key] - originalOffset[_key];
          if (_key === _dir) {
            ret[_dir] = originalStyle[_dir] + _off;
          } else {
            ret[_dir] = originalStyle[_dir] - _off;
          }
        }
      }
      css(elem, ret);
    }
    function setTransform$1(elem, offset) {
      var originalOffset = getOffset(elem);
      var originalXY = getTransformXY(elem);
      var resultXY = {
        x: originalXY.x,
        y: originalXY.y
      };
      if ("left" in offset) {
        resultXY.x = originalXY.x + offset.left - originalOffset.left;
      }
      if ("top" in offset) {
        resultXY.y = originalXY.y + offset.top - originalOffset.top;
      }
      setTransformXY(elem, resultXY);
    }
    function setOffset(elem, offset, option) {
      if (option.ignoreShake) {
        var oriOffset = getOffset(elem);
        var oLeft = oriOffset.left.toFixed(0);
        var oTop = oriOffset.top.toFixed(0);
        var tLeft = offset.left.toFixed(0);
        var tTop = offset.top.toFixed(0);
        if (oLeft === tLeft && oTop === tTop) {
          return;
        }
      }
      if (option.useCssRight || option.useCssBottom) {
        setLeftTop(elem, offset, option);
      } else if (option.useCssTransform && getTransformName() in document.body.style) {
        setTransform$1(elem, offset);
      } else {
        setLeftTop(elem, offset, option);
      }
    }
    function each(arr, fn) {
      for (var i2 = 0; i2 < arr.length; i2++) {
        fn(arr[i2]);
      }
    }
    function isBorderBoxFn(elem) {
      return getComputedStyleX(elem, "boxSizing") === "border-box";
    }
    var BOX_MODELS = ["margin", "border", "padding"];
    var CONTENT_INDEX = -1;
    var PADDING_INDEX = 2;
    var BORDER_INDEX = 1;
    var MARGIN_INDEX = 0;
    function swap(elem, options, callback) {
      var old = {};
      var style = elem.style;
      var name;
      for (name in options) {
        if (options.hasOwnProperty(name)) {
          old[name] = style[name];
          style[name] = options[name];
        }
      }
      callback.call(elem);
      for (name in options) {
        if (options.hasOwnProperty(name)) {
          style[name] = old[name];
        }
      }
    }
    function getPBMWidth(elem, props2, which) {
      var value = 0;
      var prop;
      var j2;
      var i2;
      for (j2 = 0; j2 < props2.length; j2++) {
        prop = props2[j2];
        if (prop) {
          for (i2 = 0; i2 < which.length; i2++) {
            var cssProp = void 0;
            if (prop === "border") {
              cssProp = "".concat(prop).concat(which[i2], "Width");
            } else {
              cssProp = prop + which[i2];
            }
            value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;
          }
        }
      }
      return value;
    }
    var domUtils = {
      getParent: function getParent2(element) {
        var parent2 = element;
        do {
          if (parent2.nodeType === 11 && parent2.host) {
            parent2 = parent2.host;
          } else {
            parent2 = parent2.parentNode;
          }
        } while (parent2 && parent2.nodeType !== 1 && parent2.nodeType !== 9);
        return parent2;
      }
    };
    each(["Width", "Height"], function(name) {
      domUtils["doc".concat(name)] = function(refWin) {
        var d2 = refWin.document;
        return Math.max(
          // firefox chrome documentElement.scrollHeight< body.scrollHeight
          // ie standard mode : documentElement.scrollHeight> body.scrollHeight
          d2.documentElement["scroll".concat(name)],
          // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
          d2.body["scroll".concat(name)],
          domUtils["viewport".concat(name)](d2)
        );
      };
      domUtils["viewport".concat(name)] = function(win) {
        var prop = "client".concat(name);
        var doc2 = win.document;
        var body = doc2.body;
        var documentElement = doc2.documentElement;
        var documentElementProp = documentElement[prop];
        return doc2.compatMode === "CSS1Compat" && documentElementProp || body && body[prop] || documentElementProp;
      };
    });
    function getWH(elem, name, ex) {
      var extra = ex;
      if (isWindow(elem)) {
        return name === "width" ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);
      } else if (elem.nodeType === 9) {
        return name === "width" ? domUtils.docWidth(elem) : domUtils.docHeight(elem);
      }
      var which = name === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
      var borderBoxValue = name === "width" ? Math.floor(elem.getBoundingClientRect().width) : Math.floor(elem.getBoundingClientRect().height);
      var isBorderBox = isBorderBoxFn(elem);
      var cssBoxValue = 0;
      if (borderBoxValue === null || borderBoxValue === void 0 || borderBoxValue <= 0) {
        borderBoxValue = void 0;
        cssBoxValue = getComputedStyleX(elem, name);
        if (cssBoxValue === null || cssBoxValue === void 0 || Number(cssBoxValue) < 0) {
          cssBoxValue = elem.style[name] || 0;
        }
        cssBoxValue = Math.floor(parseFloat(cssBoxValue)) || 0;
      }
      if (extra === void 0) {
        extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;
      }
      var borderBoxValueOrIsBorderBox = borderBoxValue !== void 0 || isBorderBox;
      var val = borderBoxValue || cssBoxValue;
      if (extra === CONTENT_INDEX) {
        if (borderBoxValueOrIsBorderBox) {
          return val - getPBMWidth(elem, ["border", "padding"], which);
        }
        return cssBoxValue;
      } else if (borderBoxValueOrIsBorderBox) {
        if (extra === BORDER_INDEX) {
          return val;
        }
        return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ["border"], which) : getPBMWidth(elem, ["margin"], which));
      }
      return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which);
    }
    var cssShow = {
      position: "absolute",
      visibility: "hidden",
      display: "block"
    };
    function getWHIgnoreDisplay() {
      for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {
        args[_key2] = arguments[_key2];
      }
      var val;
      var elem = args[0];
      if (elem.offsetWidth !== 0) {
        val = getWH.apply(void 0, args);
      } else {
        swap(elem, cssShow, function() {
          val = getWH.apply(void 0, args);
        });
      }
      return val;
    }
    each(["width", "height"], function(name) {
      var first = name.charAt(0).toUpperCase() + name.slice(1);
      domUtils["outer".concat(first)] = function(el, includeMargin) {
        return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);
      };
      var which = name === "width" ? ["Left", "Right"] : ["Top", "Bottom"];
      domUtils[name] = function(elem, v2) {
        var val = v2;
        if (val !== void 0) {
          if (elem) {
            var isBorderBox = isBorderBoxFn(elem);
            if (isBorderBox) {
              val += getPBMWidth(elem, ["padding", "border"], which);
            }
            return css(elem, name, val);
          }
          return void 0;
        }
        return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);
      };
    });
    function mix(to, from2) {
      for (var i2 in from2) {
        if (from2.hasOwnProperty(i2)) {
          to[i2] = from2[i2];
        }
      }
      return to;
    }
    var utils = {
      getWindow: function getWindow(node2) {
        if (node2 && node2.document && node2.setTimeout) {
          return node2;
        }
        var doc2 = node2.ownerDocument || node2;
        return doc2.defaultView || doc2.parentWindow;
      },
      getDocument,
      offset: function offset(el, value, option) {
        if (typeof value !== "undefined") {
          setOffset(el, value, option || {});
        } else {
          return getOffset(el);
        }
      },
      isWindow,
      each,
      css,
      clone: function clone(obj) {
        var i2;
        var ret = {};
        for (i2 in obj) {
          if (obj.hasOwnProperty(i2)) {
            ret[i2] = obj[i2];
          }
        }
        var overflow = obj.overflow;
        if (overflow) {
          for (i2 in obj) {
            if (obj.hasOwnProperty(i2)) {
              ret.overflow[i2] = obj.overflow[i2];
            }
          }
        }
        return ret;
      },
      mix,
      getWindowScrollLeft: function getWindowScrollLeft(w2) {
        return getScrollLeft(w2);
      },
      getWindowScrollTop: function getWindowScrollTop(w2) {
        return getScrollTop(w2);
      },
      merge: function merge2() {
        var ret = {};
        for (var i2 = 0; i2 < arguments.length; i2++) {
          utils.mix(ret, i2 < 0 || arguments.length <= i2 ? void 0 : arguments[i2]);
        }
        return ret;
      },
      viewportWidth: 0,
      viewportHeight: 0
    };
    mix(utils, domUtils);
    var getParent$1 = utils.getParent;
    function getOffsetParent(element) {
      if (utils.isWindow(element) || element.nodeType === 9) {
        return null;
      }
      var doc2 = utils.getDocument(element);
      var body = doc2.body;
      var parent2;
      var positionStyle = utils.css(element, "position");
      var skipStatic = positionStyle === "fixed" || positionStyle === "absolute";
      if (!skipStatic) {
        return element.nodeName.toLowerCase() === "html" ? null : getParent$1(element);
      }
      for (parent2 = getParent$1(element); parent2 && parent2 !== body && parent2.nodeType !== 9; parent2 = getParent$1(parent2)) {
        positionStyle = utils.css(parent2, "position");
        if (positionStyle !== "static") {
          return parent2;
        }
      }
      return null;
    }
    var getParent$1$1 = utils.getParent;
    function isAncestorFixed(element) {
      if (utils.isWindow(element) || element.nodeType === 9) {
        return false;
      }
      var doc2 = utils.getDocument(element);
      var body = doc2.body;
      var parent2 = null;
      for (
        parent2 = getParent$1$1(element);
        // 修复元素位于 document.documentElement 下导致崩溃问题
        parent2 && parent2 !== body && parent2 !== doc2;
        parent2 = getParent$1$1(parent2)
      ) {
        var positionStyle = utils.css(parent2, "position");
        if (positionStyle === "fixed") {
          return true;
        }
      }
      return false;
    }
    function getVisibleRectForElement(element, alwaysByViewport) {
      var visibleRect = {
        left: 0,
        right: Infinity,
        top: 0,
        bottom: Infinity
      };
      var el = getOffsetParent(element);
      var doc2 = utils.getDocument(element);
      var win = doc2.defaultView || doc2.parentWindow;
      var body = doc2.body;
      var documentElement = doc2.documentElement;
      while (el) {
        if ((navigator.userAgent.indexOf("MSIE") === -1 || el.clientWidth !== 0) && // body may have overflow set on it, yet we still get the entire
        // viewport. In some browsers, el.offsetParent may be
        // document.documentElement, so check for that too.
        el !== body && el !== documentElement && utils.css(el, "overflow") !== "visible") {
          var pos = utils.offset(el);
          pos.left += el.clientLeft;
          pos.top += el.clientTop;
          visibleRect.top = Math.max(visibleRect.top, pos.top);
          visibleRect.right = Math.min(
            visibleRect.right,
            // consider area without scrollBar
            pos.left + el.clientWidth
          );
          visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight);
          visibleRect.left = Math.max(visibleRect.left, pos.left);
        } else if (el === body || el === documentElement) {
          break;
        }
        el = getOffsetParent(el);
      }
      var originalPosition = null;
      if (!utils.isWindow(element) && element.nodeType !== 9) {
        originalPosition = element.style.position;
        var position2 = utils.css(element, "position");
        if (position2 === "absolute") {
          element.style.position = "fixed";
        }
      }
      var scrollX = utils.getWindowScrollLeft(win);
      var scrollY = utils.getWindowScrollTop(win);
      var viewportWidth = utils.viewportWidth(win);
      var viewportHeight = utils.viewportHeight(win);
      var documentWidth = documentElement.scrollWidth;
      var documentHeight = documentElement.scrollHeight;
      var bodyStyle = window.getComputedStyle(body);
      if (bodyStyle.overflowX === "hidden") {
        documentWidth = win.innerWidth;
      }
      if (bodyStyle.overflowY === "hidden") {
        documentHeight = win.innerHeight;
      }
      if (element.style) {
        element.style.position = originalPosition;
      }
      if (alwaysByViewport || isAncestorFixed(element)) {
        visibleRect.left = Math.max(visibleRect.left, scrollX);
        visibleRect.top = Math.max(visibleRect.top, scrollY);
        visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth);
        visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight);
      } else {
        var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth);
        visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth);
        var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight);
        visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight);
      }
      return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null;
    }
    function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) {
      var pos = utils.clone(elFuturePos);
      var size2 = {
        width: elRegion.width,
        height: elRegion.height
      };
      if (overflow.adjustX && pos.left < visibleRect.left) {
        pos.left = visibleRect.left;
      }
      if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size2.width > visibleRect.right) {
        size2.width -= pos.left + size2.width - visibleRect.right;
      }
      if (overflow.adjustX && pos.left + size2.width > visibleRect.right) {
        pos.left = Math.max(visibleRect.right - size2.width, visibleRect.left);
      }
      if (overflow.adjustY && pos.top < visibleRect.top) {
        pos.top = visibleRect.top;
      }
      if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size2.height > visibleRect.bottom) {
        size2.height -= pos.top + size2.height - visibleRect.bottom;
      }
      if (overflow.adjustY && pos.top + size2.height > visibleRect.bottom) {
        pos.top = Math.max(visibleRect.bottom - size2.height, visibleRect.top);
      }
      return utils.mix(pos, size2);
    }
    function getRegion(node2) {
      var offset;
      var w2;
      var h2;
      if (!utils.isWindow(node2) && node2.nodeType !== 9) {
        offset = utils.offset(node2);
        w2 = utils.outerWidth(node2);
        h2 = utils.outerHeight(node2);
      } else {
        var win = utils.getWindow(node2);
        offset = {
          left: utils.getWindowScrollLeft(win),
          top: utils.getWindowScrollTop(win)
        };
        w2 = utils.viewportWidth(win);
        h2 = utils.viewportHeight(win);
      }
      offset.width = w2;
      offset.height = h2;
      return offset;
    }
    function getAlignOffset(region, align) {
      var V2 = align.charAt(0);
      var H = align.charAt(1);
      var w2 = region.width;
      var h2 = region.height;
      var x2 = region.left;
      var y2 = region.top;
      if (V2 === "c") {
        y2 += h2 / 2;
      } else if (V2 === "b") {
        y2 += h2;
      }
      if (H === "c") {
        x2 += w2 / 2;
      } else if (H === "r") {
        x2 += w2;
      }
      return {
        left: x2,
        top: y2
      };
    }
    function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset2) {
      var p1 = getAlignOffset(refNodeRegion, points[1]);
      var p2 = getAlignOffset(elRegion, points[0]);
      var diff = [p2.left - p1.left, p2.top - p1.top];
      return {
        left: Math.round(elRegion.left - diff[0] + offset[0] - targetOffset2[0]),
        top: Math.round(elRegion.top - diff[1] + offset[1] - targetOffset2[1])
      };
    }
    function isFailX(elFuturePos, elRegion, visibleRect) {
      return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right;
    }
    function isFailY(elFuturePos, elRegion, visibleRect) {
      return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom;
    }
    function isCompleteFailX(elFuturePos, elRegion, visibleRect) {
      return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left;
    }
    function isCompleteFailY(elFuturePos, elRegion, visibleRect) {
      return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;
    }
    function flip(points, reg, map) {
      var ret = [];
      utils.each(points, function(p2) {
        ret.push(p2.replace(reg, function(m2) {
          return map[m2];
        }));
      });
      return ret;
    }
    function flipOffset(offset, index2) {
      offset[index2] = -offset[index2];
      return offset;
    }
    function convertOffset(str, offsetLen) {
      var n2;
      if (/%$/.test(str)) {
        n2 = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen;
      } else {
        n2 = parseInt(str, 10);
      }
      return n2 || 0;
    }
    function normalizeOffset(offset, el) {
      offset[0] = convertOffset(offset[0], el.width);
      offset[1] = convertOffset(offset[1], el.height);
    }
    function doAlign(el, tgtRegion, align, isTgtRegionVisible) {
      var points = align.points;
      var offset = align.offset || [0, 0];
      var targetOffset2 = align.targetOffset || [0, 0];
      var overflow = align.overflow;
      var source = align.source || el;
      offset = [].concat(offset);
      targetOffset2 = [].concat(targetOffset2);
      overflow = overflow || {};
      var newOverflowCfg = {};
      var fail = 0;
      var alwaysByViewport = !!(overflow && overflow.alwaysByViewport);
      var visibleRect = getVisibleRectForElement(source, alwaysByViewport);
      var elRegion = getRegion(source);
      normalizeOffset(offset, elRegion);
      normalizeOffset(targetOffset2, tgtRegion);
      var elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset2);
      var newElRegion = utils.merge(elRegion, elFuturePos);
      if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) {
        if (overflow.adjustX) {
          if (isFailX(elFuturePos, elRegion, visibleRect)) {
            var newPoints = flip(points, /[lr]/gi, {
              l: "r",
              r: "l"
            });
            var newOffset = flipOffset(offset, 0);
            var newTargetOffset = flipOffset(targetOffset2, 0);
            var newElFuturePos = getElFuturePos(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset);
            if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {
              fail = 1;
              points = newPoints;
              offset = newOffset;
              targetOffset2 = newTargetOffset;
            }
          }
        }
        if (overflow.adjustY) {
          if (isFailY(elFuturePos, elRegion, visibleRect)) {
            var _newPoints = flip(points, /[tb]/gi, {
              t: "b",
              b: "t"
            });
            var _newOffset = flipOffset(offset, 1);
            var _newTargetOffset = flipOffset(targetOffset2, 1);
            var _newElFuturePos = getElFuturePos(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset);
            if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) {
              fail = 1;
              points = _newPoints;
              offset = _newOffset;
              targetOffset2 = _newTargetOffset;
            }
          }
        }
        if (fail) {
          elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset2);
          utils.mix(newElRegion, elFuturePos);
        }
        var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect);
        var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect);
        if (isStillFailX || isStillFailY) {
          var _newPoints2 = points;
          if (isStillFailX) {
            _newPoints2 = flip(points, /[lr]/gi, {
              l: "r",
              r: "l"
            });
          }
          if (isStillFailY) {
            _newPoints2 = flip(points, /[tb]/gi, {
              t: "b",
              b: "t"
            });
          }
          points = _newPoints2;
          offset = align.offset || [0, 0];
          targetOffset2 = align.targetOffset || [0, 0];
        }
        newOverflowCfg.adjustX = overflow.adjustX && isStillFailX;
        newOverflowCfg.adjustY = overflow.adjustY && isStillFailY;
        if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {
          newElRegion = adjustForViewport(elFuturePos, elRegion, visibleRect, newOverflowCfg);
        }
      }
      if (newElRegion.width !== elRegion.width) {
        utils.css(source, "width", utils.width(source) + newElRegion.width - elRegion.width);
      }
      if (newElRegion.height !== elRegion.height) {
        utils.css(source, "height", utils.height(source) + newElRegion.height - elRegion.height);
      }
      utils.offset(source, {
        left: newElRegion.left,
        top: newElRegion.top
      }, {
        useCssRight: align.useCssRight,
        useCssBottom: align.useCssBottom,
        useCssTransform: align.useCssTransform,
        ignoreShake: align.ignoreShake
      });
      return {
        points,
        offset,
        targetOffset: targetOffset2,
        overflow: newOverflowCfg
      };
    }
    function isOutOfVisibleRect(target, alwaysByViewport) {
      var visibleRect = getVisibleRectForElement(target, alwaysByViewport);
      var targetRegion = getRegion(target);
      return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom;
    }
    function alignElement(el, refNode, align) {
      var target = align.target || refNode;
      var refNodeRegion = getRegion(target);
      var isTargetNotOutOfVisible = !isOutOfVisibleRect(target, align.overflow && align.overflow.alwaysByViewport);
      return doAlign(el, refNodeRegion, align, isTargetNotOutOfVisible);
    }
    alignElement.__getOffsetParent = getOffsetParent;
    alignElement.__getVisibleRectForElement = getVisibleRectForElement;
    function alignPoint(el, tgtPoint, align) {
      var pageX;
      var pageY;
      var doc2 = utils.getDocument(el);
      var win = doc2.defaultView || doc2.parentWindow;
      var scrollX = utils.getWindowScrollLeft(win);
      var scrollY = utils.getWindowScrollTop(win);
      var viewportWidth = utils.viewportWidth(win);
      var viewportHeight = utils.viewportHeight(win);
      if ("pageX" in tgtPoint) {
        pageX = tgtPoint.pageX;
      } else {
        pageX = scrollX + tgtPoint.clientX;
      }
      if ("pageY" in tgtPoint) {
        pageY = tgtPoint.pageY;
      } else {
        pageY = scrollY + tgtPoint.clientY;
      }
      var tgtRegion = {
        left: pageX,
        top: pageY,
        width: 0,
        height: 0
      };
      var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight;
      var points = [align.points[0], "cc"];
      return doAlign(el, tgtRegion, _objectSpread2(_objectSpread2({}, align), {}, {
        points
      }), pointInView);
    }
    function cloneElement(vnode) {
      let nodeProps = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      let override = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
      let mergeRef = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
      let ele = vnode;
      if (Array.isArray(vnode)) {
        ele = filterEmpty(vnode)[0];
      }
      if (!ele) {
        return null;
      }
      const node2 = cloneVNode(ele, nodeProps, mergeRef);
      node2.props = override ? _extends$1(_extends$1({}, node2.props), nodeProps) : node2.props;
      warning$2(typeof node2.props.class !== "object");
      return node2;
    }
    const isVisible = (element) => {
      if (!element) {
        return false;
      }
      if (element.offsetParent) {
        return true;
      }
      if (element.getBBox) {
        const box = element.getBBox();
        if (box.width || box.height) {
          return true;
        }
      }
      if (element.getBoundingClientRect) {
        const box = element.getBoundingClientRect();
        if (box.width || box.height) {
          return true;
        }
      }
      return false;
    };
    function isSamePoint(prev2, next2) {
      if (prev2 === next2) return true;
      if (!prev2 || !next2) return false;
      if ("pageX" in next2 && "pageY" in next2) {
        return prev2.pageX === next2.pageX && prev2.pageY === next2.pageY;
      }
      if ("clientX" in next2 && "clientY" in next2) {
        return prev2.clientX === next2.clientX && prev2.clientY === next2.clientY;
      }
      return false;
    }
    function restoreFocus(activeElement, container) {
      if (activeElement !== document.activeElement && contains$1(container, activeElement) && typeof activeElement.focus === "function") {
        activeElement.focus();
      }
    }
    function monitorResize(element, callback) {
      let prevWidth = null;
      let prevHeight = null;
      function onResize(_ref) {
        let [{
          target
        }] = _ref;
        if (!document.documentElement.contains(target)) return;
        const {
          width,
          height
        } = target.getBoundingClientRect();
        const fixedWidth = Math.floor(width);
        const fixedHeight = Math.floor(height);
        if (prevWidth !== fixedWidth || prevHeight !== fixedHeight) {
          Promise.resolve().then(() => {
            callback({
              width: fixedWidth,
              height: fixedHeight
            });
          });
        }
        prevWidth = fixedWidth;
        prevHeight = fixedHeight;
      }
      const resizeObserver = new index(onResize);
      if (element) {
        resizeObserver.observe(element);
      }
      return () => {
        resizeObserver.disconnect();
      };
    }
    const useBuffer = (callback, buffer) => {
      let called = false;
      let timeout = null;
      function cancelTrigger() {
        clearTimeout(timeout);
      }
      function trigger2(force) {
        if (!called || force === true) {
          if (callback() === false) {
            return;
          }
          called = true;
          cancelTrigger();
          timeout = setTimeout(() => {
            called = false;
          }, buffer.value);
        } else {
          cancelTrigger();
          timeout = setTimeout(() => {
            called = false;
            trigger2();
          }, buffer.value);
        }
      }
      return [trigger2, () => {
        called = false;
        cancelTrigger();
      }];
    };
    const alignProps = {
      align: Object,
      target: [Object, Function],
      onAlign: Function,
      monitorBufferTime: Number,
      monitorWindowResize: Boolean,
      disabled: Boolean
    };
    function getElement(func) {
      if (typeof func !== "function") return null;
      return func();
    }
    function getPoint(point) {
      if (typeof point !== "object" || !point) return null;
      return point;
    }
    const Align = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "Align",
      props: alignProps,
      emits: ["align"],
      setup(props2, _ref) {
        let {
          expose,
          slots
        } = _ref;
        const cacheRef = ref({});
        const nodeRef = ref();
        const [forceAlign, cancelForceAlign] = useBuffer(() => {
          const {
            disabled: latestDisabled,
            target: latestTarget,
            align: latestAlign,
            onAlign: latestOnAlign
          } = props2;
          if (!latestDisabled && latestTarget && nodeRef.value) {
            const source = nodeRef.value;
            let result;
            const element = getElement(latestTarget);
            const point = getPoint(latestTarget);
            cacheRef.value.element = element;
            cacheRef.value.point = point;
            cacheRef.value.align = latestAlign;
            const {
              activeElement
            } = document;
            if (element && isVisible(element)) {
              result = alignElement(source, element, latestAlign);
            } else if (point) {
              result = alignPoint(source, point, latestAlign);
            }
            restoreFocus(activeElement, source);
            if (latestOnAlign && result) {
              latestOnAlign(source, result);
            }
            return true;
          }
          return false;
        }, computed(() => props2.monitorBufferTime));
        const resizeMonitor = ref({
          cancel: () => {
          }
        });
        const sourceResizeMonitor = ref({
          cancel: () => {
          }
        });
        const goAlign = () => {
          const target = props2.target;
          const element = getElement(target);
          const point = getPoint(target);
          if (nodeRef.value !== sourceResizeMonitor.value.element) {
            sourceResizeMonitor.value.cancel();
            sourceResizeMonitor.value.element = nodeRef.value;
            sourceResizeMonitor.value.cancel = monitorResize(nodeRef.value, forceAlign);
          }
          if (cacheRef.value.element !== element || !isSamePoint(cacheRef.value.point, point) || !isEqual(cacheRef.value.align, props2.align)) {
            forceAlign();
            if (resizeMonitor.value.element !== element) {
              resizeMonitor.value.cancel();
              resizeMonitor.value.element = element;
              resizeMonitor.value.cancel = monitorResize(element, forceAlign);
            }
          }
        };
        onMounted(() => {
          nextTick(() => {
            goAlign();
          });
        });
        onUpdated(() => {
          nextTick(() => {
            goAlign();
          });
        });
        watch(() => props2.disabled, (disabled) => {
          if (!disabled) {
            forceAlign();
          } else {
            cancelForceAlign();
          }
        }, {
          immediate: true,
          flush: "post"
        });
        const winResizeRef = ref(null);
        watch(() => props2.monitorWindowResize, (monitorWindowResize) => {
          if (monitorWindowResize) {
            if (!winResizeRef.value) {
              winResizeRef.value = addEventListenerWrap(window, "resize", forceAlign);
            }
          } else if (winResizeRef.value) {
            winResizeRef.value.remove();
            winResizeRef.value = null;
          }
        }, {
          flush: "post"
        });
        onUnmounted(() => {
          resizeMonitor.value.cancel();
          sourceResizeMonitor.value.cancel();
          if (winResizeRef.value) winResizeRef.value.remove();
          cancelForceAlign();
        });
        expose({
          forceAlign: () => forceAlign(true)
        });
        return () => {
          const child = slots === null || slots === void 0 ? void 0 : slots.default();
          if (child) {
            return cloneElement(child[0], {
              ref: nodeRef
            }, true, true);
          }
          return null;
        };
      }
    });
    tuple("bottomLeft", "bottomRight", "topLeft", "topRight");
    const getTransitionDirection = (placement) => {
      if (placement !== void 0 && (placement === "topLeft" || placement === "topRight")) {
        return `slide-down`;
      }
      return `slide-up`;
    };
    const getTransitionProps = function(transitionName2) {
      let opt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const transitionProps = transitionName2 ? _extends$1({
        name: transitionName2,
        appear: true,
        // type: 'animation',
        // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
        // appearActiveClass: `antdv-base-transtion`,
        // appearToClass: `${transitionName}-appear ${transitionName}-appear-active`,
        enterFromClass: `${transitionName2}-enter ${transitionName2}-enter-prepare ${transitionName2}-enter-start`,
        enterActiveClass: `${transitionName2}-enter ${transitionName2}-enter-prepare`,
        enterToClass: `${transitionName2}-enter ${transitionName2}-enter-active`,
        leaveFromClass: ` ${transitionName2}-leave`,
        leaveActiveClass: `${transitionName2}-leave ${transitionName2}-leave-active`,
        leaveToClass: `${transitionName2}-leave ${transitionName2}-leave-active`
      }, opt) : _extends$1({
        css: false
      }, opt);
      return transitionProps;
    };
    const getTransitionGroupProps = function(transitionName2) {
      let opt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const transitionProps = transitionName2 ? _extends$1({
        name: transitionName2,
        appear: true,
        // appearFromClass: `${transitionName}-appear ${transitionName}-appear-prepare`,
        appearActiveClass: `${transitionName2}`,
        appearToClass: `${transitionName2}-appear ${transitionName2}-appear-active`,
        enterFromClass: `${transitionName2}-appear ${transitionName2}-enter ${transitionName2}-appear-prepare ${transitionName2}-enter-prepare`,
        enterActiveClass: `${transitionName2}`,
        enterToClass: `${transitionName2}-enter ${transitionName2}-appear ${transitionName2}-appear-active ${transitionName2}-enter-active`,
        leaveActiveClass: `${transitionName2} ${transitionName2}-leave`,
        leaveToClass: `${transitionName2}-leave-active`
      }, opt) : _extends$1({
        css: false
      }, opt);
      return transitionProps;
    };
    const getTransitionName = (rootPrefixCls, motion, transitionName2) => {
      if (transitionName2 !== void 0) {
        return transitionName2;
      }
      return `${rootPrefixCls}-${motion}`;
    };
    const PopupInner = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "PopupInner",
      inheritAttrs: false,
      props: innerProps,
      emits: ["mouseenter", "mouseleave", "mousedown", "touchstart", "align"],
      setup(props2, _ref) {
        let {
          expose,
          attrs,
          slots
        } = _ref;
        const alignRef = shallowRef();
        const elementRef = shallowRef();
        const alignedClassName = shallowRef();
        const [stretchStyle, measureStretchStyle] = useStretchStyle(toRef(props2, "stretch"));
        const doMeasure = () => {
          if (props2.stretch) {
            measureStretchStyle(props2.getRootDomNode());
          }
        };
        const visible = shallowRef(false);
        let timeoutId;
        watch(() => props2.visible, (val) => {
          clearTimeout(timeoutId);
          if (val) {
            timeoutId = setTimeout(() => {
              visible.value = props2.visible;
            });
          } else {
            visible.value = false;
          }
        }, {
          immediate: true
        });
        const [status, goNextStatus] = useVisibleStatus(visible, doMeasure);
        const prepareResolveRef = shallowRef();
        const getAlignTarget = () => {
          if (props2.point) {
            return props2.point;
          }
          return props2.getRootDomNode;
        };
        const forceAlign = () => {
          var _a;
          (_a = alignRef.value) === null || _a === void 0 ? void 0 : _a.forceAlign();
        };
        const onInternalAlign = (popupDomNode, matchAlign) => {
          var _a;
          const nextAlignedClassName = props2.getClassNameFromAlign(matchAlign);
          const preAlignedClassName = alignedClassName.value;
          if (alignedClassName.value !== nextAlignedClassName) {
            alignedClassName.value = nextAlignedClassName;
          }
          if (status.value === "align") {
            if (preAlignedClassName !== nextAlignedClassName) {
              Promise.resolve().then(() => {
                forceAlign();
              });
            } else {
              goNextStatus(() => {
                var _a2;
                (_a2 = prepareResolveRef.value) === null || _a2 === void 0 ? void 0 : _a2.call(prepareResolveRef);
              });
            }
            (_a = props2.onAlign) === null || _a === void 0 ? void 0 : _a.call(props2, popupDomNode, matchAlign);
          }
        };
        const motion = computed(() => {
          const m2 = typeof props2.animation === "object" ? props2.animation : getMotion$1(props2);
          ["onAfterEnter", "onAfterLeave"].forEach((eventName) => {
            const originFn = m2[eventName];
            m2[eventName] = (node2) => {
              goNextStatus();
              status.value = "stable";
              originFn === null || originFn === void 0 ? void 0 : originFn(node2);
            };
          });
          return m2;
        });
        const onShowPrepare = () => {
          return new Promise((resolve2) => {
            prepareResolveRef.value = resolve2;
          });
        };
        watch([motion, status], () => {
          if (!motion.value && status.value === "motion") {
            goNextStatus();
          }
        }, {
          immediate: true
        });
        expose({
          forceAlign,
          getElement: () => {
            return elementRef.value.$el || elementRef.value;
          }
        });
        const alignDisabled = computed(() => {
          var _a;
          if (((_a = props2.align) === null || _a === void 0 ? void 0 : _a.points) && (status.value === "align" || status.value === "stable")) {
            return false;
          }
          return true;
        });
        return () => {
          var _a;
          const {
            zIndex,
            align,
            prefixCls,
            destroyPopupOnHide,
            onMouseenter,
            onMouseleave,
            onTouchstart = () => {
            },
            onMousedown
          } = props2;
          const statusValue = status.value;
          const mergedStyle = [_extends$1(_extends$1({}, stretchStyle.value), {
            zIndex,
            opacity: statusValue === "motion" || statusValue === "stable" || !visible.value ? null : 0,
            // pointerEvents: statusValue === 'stable' ? null : 'none',
            pointerEvents: !visible.value && statusValue !== "stable" ? "none" : null
          }), attrs.style];
          let childNode = flattenChildren((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots, {
            visible: props2.visible
          }));
          if (childNode.length > 1) {
            childNode = createVNode("div", {
              "class": `${prefixCls}-content`
            }, [childNode]);
          }
          const mergedClassName = classNames(prefixCls, attrs.class, alignedClassName.value, !props2.arrow && `${prefixCls}-arrow-hidden`);
          const hasAnimate = visible.value || !props2.visible;
          const transitionProps = hasAnimate ? getTransitionProps(motion.value.name, motion.value) : {};
          return createVNode(Transition, _objectSpread2$1(_objectSpread2$1({
            "ref": elementRef
          }, transitionProps), {}, {
            "onBeforeEnter": onShowPrepare
          }), {
            default: () => {
              return !destroyPopupOnHide || props2.visible ? withDirectives(createVNode(Align, {
                "target": getAlignTarget(),
                "key": "popup",
                "ref": alignRef,
                "monitorWindowResize": true,
                "disabled": alignDisabled.value,
                "align": align,
                "onAlign": onInternalAlign
              }, {
                default: () => createVNode("div", {
                  "class": mergedClassName,
                  "onMouseenter": onMouseenter,
                  "onMouseleave": onMouseleave,
                  "onMousedown": withModifiers(onMousedown, ["capture"]),
                  [supportsPassive ? "onTouchstartPassive" : "onTouchstart"]: withModifiers(onTouchstart, ["capture"]),
                  "style": mergedStyle
                }, [childNode])
              }), [[vShow, visible.value]]) : null;
            }
          });
        };
      }
    });
    const Popup = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "Popup",
      inheritAttrs: false,
      props: popupProps,
      setup(props2, _ref) {
        let {
          attrs,
          slots,
          expose
        } = _ref;
        const innerVisible = shallowRef(false);
        const inMobile = shallowRef(false);
        const popupRef = shallowRef();
        const rootRef = shallowRef();
        watch([() => props2.visible, () => props2.mobile], () => {
          innerVisible.value = props2.visible;
          if (props2.visible && props2.mobile) {
            inMobile.value = true;
          }
        }, {
          immediate: true,
          flush: "post"
        });
        expose({
          forceAlign: () => {
            var _a;
            (_a = popupRef.value) === null || _a === void 0 ? void 0 : _a.forceAlign();
          },
          getElement: () => {
            var _a;
            return (_a = popupRef.value) === null || _a === void 0 ? void 0 : _a.getElement();
          }
        });
        return () => {
          const cloneProps = _extends$1(_extends$1(_extends$1({}, props2), attrs), {
            visible: innerVisible.value
          });
          const popupNode = inMobile.value ? createVNode(MobilePopupInner, _objectSpread2$1(_objectSpread2$1({}, cloneProps), {}, {
            "mobile": props2.mobile,
            "ref": popupRef
          }), {
            default: slots.default
          }) : createVNode(PopupInner, _objectSpread2$1(_objectSpread2$1({}, cloneProps), {}, {
            "ref": popupRef
          }), {
            default: slots.default
          });
          return createVNode("div", {
            "ref": rootRef
          }, [createVNode(Mask, cloneProps, null), popupNode]);
        };
      }
    });
    function isPointsEq(a1, a2, isAlignPoint) {
      if (isAlignPoint) {
        return a1[0] === a2[0];
      }
      return a1[0] === a2[0] && a1[1] === a2[1];
    }
    function getAlignFromPlacement(builtinPlacements, placementStr, align) {
      const baseAlign = builtinPlacements[placementStr] || {};
      return _extends$1(_extends$1({}, baseAlign), align);
    }
    function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {
      const {
        points
      } = align;
      const placements2 = Object.keys(builtinPlacements);
      for (let i2 = 0; i2 < placements2.length; i2 += 1) {
        const placement = placements2[i2];
        if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {
          return `${prefixCls}-placement-${placement}`;
        }
      }
      return "";
    }
    const BaseMixin = {
      methods: {
        setState() {
          let state = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
          let callback = arguments.length > 1 ? arguments[1] : void 0;
          let newState = typeof state === "function" ? state(this.$data, this.$props) : state;
          if (this.getDerivedStateFromProps) {
            const s2 = this.getDerivedStateFromProps(getOptionProps(this), _extends$1(_extends$1({}, this.$data), newState));
            if (s2 === null) {
              return;
            } else {
              newState = _extends$1(_extends$1({}, newState), s2 || {});
            }
          }
          _extends$1(this.$data, newState);
          if (this._.isMounted) {
            this.$forceUpdate();
          }
          nextTick(() => {
            callback && callback();
          });
        },
        __emit() {
          const args = [].slice.call(arguments, 0);
          let eventName = args[0];
          eventName = `on${eventName[0].toUpperCase()}${eventName.substring(1)}`;
          const event = this.$props[eventName] || this.$attrs[eventName];
          if (args.length && event) {
            if (Array.isArray(event)) {
              for (let i2 = 0, l2 = event.length; i2 < l2; i2++) {
                event[i2](...args.slice(1));
              }
            } else {
              event(...args.slice(1));
            }
          }
        }
      }
    };
    const PortalContextKey = Symbol("PortalContextKey");
    const useProvidePortal = function(instance) {
      let config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
        inTriggerContext: true
      };
      provide(PortalContextKey, {
        inTriggerContext: config.inTriggerContext,
        shouldRender: computed(() => {
          const {
            sPopupVisible,
            popupRef,
            forceRender,
            autoDestroy
          } = instance || {};
          let shouldRender = false;
          if (sPopupVisible || popupRef || forceRender) {
            shouldRender = true;
          }
          if (!sPopupVisible && autoDestroy) {
            shouldRender = false;
          }
          return shouldRender;
        })
      });
    };
    const useInjectPortal = () => {
      useProvidePortal({}, {
        inTriggerContext: false
      });
      const portalContext = inject(PortalContextKey, {
        shouldRender: computed(() => false),
        inTriggerContext: false
      });
      return {
        shouldRender: computed(() => portalContext.shouldRender.value || portalContext.inTriggerContext === false)
      };
    };
    const Portal$1 = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "Portal",
      inheritAttrs: false,
      props: {
        getContainer: PropTypes.func.isRequired,
        didUpdate: Function
      },
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        let isSSR = true;
        let container;
        const {
          shouldRender
        } = useInjectPortal();
        function setContainer() {
          if (shouldRender.value) {
            container = props2.getContainer();
          }
        }
        onBeforeMount(() => {
          isSSR = false;
          setContainer();
        });
        onMounted(() => {
          if (container) return;
          setContainer();
        });
        const stopWatch = watch(shouldRender, () => {
          if (shouldRender.value && !container) {
            container = props2.getContainer();
          }
          if (container) {
            stopWatch();
          }
        });
        onUpdated(() => {
          nextTick(() => {
            var _a;
            if (shouldRender.value) {
              (_a = props2.didUpdate) === null || _a === void 0 ? void 0 : _a.call(props2, props2);
            }
          });
        });
        return () => {
          var _a;
          if (!shouldRender.value) return null;
          if (isSSR) {
            return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
          }
          return container ? createVNode(Teleport, {
            "to": container
          }, slots) : null;
        };
      }
    });
    let cached;
    function getScrollBarSize(fresh) {
      if (typeof document === "undefined") {
        return 0;
      }
      if (cached === void 0) {
        const inner = document.createElement("div");
        inner.style.width = "100%";
        inner.style.height = "200px";
        const outer = document.createElement("div");
        const outerStyle = outer.style;
        outerStyle.position = "absolute";
        outerStyle.top = "0";
        outerStyle.left = "0";
        outerStyle.pointerEvents = "none";
        outerStyle.visibility = "hidden";
        outerStyle.width = "200px";
        outerStyle.height = "150px";
        outerStyle.overflow = "hidden";
        outer.appendChild(inner);
        document.body.appendChild(outer);
        const widthContained = inner.offsetWidth;
        outer.style.overflow = "scroll";
        let widthScroll = inner.offsetWidth;
        if (widthContained === widthScroll) {
          widthScroll = outer.clientWidth;
        }
        document.body.removeChild(outer);
        cached = widthContained - widthScroll;
      }
      return cached;
    }
    const UNIQUE_ID = `vc-util-locker-${Date.now()}`;
    let uuid$1 = 0;
    function isBodyOverflowing() {
      return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
    }
    function useScrollLocker(lock) {
      const mergedLock = computed(() => !!lock && !!lock.value);
      uuid$1 += 1;
      const id = `${UNIQUE_ID}_${uuid$1}`;
      watchEffect((onClear) => {
        if (!canUseDom$1()) {
          return;
        }
        if (mergedLock.value) {
          const scrollbarSize = getScrollBarSize();
          const isOverflow = isBodyOverflowing();
          updateCSS$1(`
html body {
  overflow-y: hidden;
  ${isOverflow ? `width: calc(100% - ${scrollbarSize}px);` : ""}
}`, id);
        } else {
          removeCSS(id);
        }
        onClear(() => {
          removeCSS(id);
        });
      }, {
        flush: "post"
      });
    }
    let openCount = 0;
    const supportDom = canUseDom$1();
    const getParent = (getContainer2) => {
      if (!supportDom) {
        return null;
      }
      if (getContainer2) {
        if (typeof getContainer2 === "string") {
          return document.querySelectorAll(getContainer2)[0];
        }
        if (typeof getContainer2 === "function") {
          return getContainer2();
        }
        if (typeof getContainer2 === "object" && getContainer2 instanceof window.HTMLElement) {
          return getContainer2;
        }
      }
      return document.body;
    };
    const Portal = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "PortalWrapper",
      inheritAttrs: false,
      props: {
        wrapperClassName: String,
        forceRender: {
          type: Boolean,
          default: void 0
        },
        getContainer: PropTypes.any,
        visible: {
          type: Boolean,
          default: void 0
        },
        autoLock: booleanType(),
        didUpdate: Function
      },
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        const container = shallowRef();
        const componentRef = shallowRef();
        const rafId = shallowRef();
        const triggerUpdate = shallowRef(1);
        const defaultContainer = canUseDom$1() && document.createElement("div");
        const removeCurrentContainer = () => {
          var _a, _b;
          if (container.value === defaultContainer) {
            (_b = (_a = container.value) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(container.value);
          }
          container.value = null;
        };
        let parent2 = null;
        const attachToParent = function() {
          let force = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
          if (force || container.value && !container.value.parentNode) {
            parent2 = getParent(props2.getContainer);
            if (parent2) {
              parent2.appendChild(container.value);
              return true;
            }
            return false;
          }
          return true;
        };
        const getContainer2 = () => {
          if (!supportDom) {
            return null;
          }
          if (!container.value) {
            container.value = defaultContainer;
            attachToParent(true);
          }
          setWrapperClassName();
          return container.value;
        };
        const setWrapperClassName = () => {
          const {
            wrapperClassName
          } = props2;
          if (container.value && wrapperClassName && wrapperClassName !== container.value.className) {
            container.value.className = wrapperClassName;
          }
        };
        onUpdated(() => {
          setWrapperClassName();
          attachToParent();
        });
        useScrollLocker(computed(() => {
          return props2.autoLock && props2.visible && canUseDom$1() && (container.value === document.body || container.value === defaultContainer);
        }));
        onMounted(() => {
          let init = false;
          watch([() => props2.visible, () => props2.getContainer], (_ref2, _ref3) => {
            let [visible, getContainer22] = _ref2;
            let [prevVisible, prevGetContainer] = _ref3;
            if (supportDom) {
              parent2 = getParent(props2.getContainer);
              if (parent2 === document.body) {
                if (visible && !prevVisible) {
                  openCount += 1;
                } else if (init) {
                  openCount -= 1;
                }
              }
            }
            if (init) {
              const getContainerIsFunc = typeof getContainer22 === "function" && typeof prevGetContainer === "function";
              if (getContainerIsFunc ? getContainer22.toString() !== prevGetContainer.toString() : getContainer22 !== prevGetContainer) {
                removeCurrentContainer();
              }
            }
            init = true;
          }, {
            immediate: true,
            flush: "post"
          });
          nextTick(() => {
            if (!attachToParent()) {
              rafId.value = wrapperRaf(() => {
                triggerUpdate.value += 1;
              });
            }
          });
        });
        onBeforeUnmount(() => {
          const {
            visible
          } = props2;
          if (supportDom && parent2 === document.body) {
            openCount = visible && openCount ? openCount - 1 : openCount;
          }
          removeCurrentContainer();
          wrapperRaf.cancel(rafId.value);
        });
        return () => {
          const {
            forceRender,
            visible
          } = props2;
          let portal = null;
          const childProps = {
            getOpenCount: () => openCount,
            getContainer: getContainer2
          };
          if (triggerUpdate.value && (forceRender || visible || componentRef.value)) {
            portal = createVNode(Portal$1, {
              "getContainer": getContainer2,
              "ref": componentRef,
              "didUpdate": props2.didUpdate
            }, {
              default: () => {
                var _a;
                return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots, childProps);
              }
            });
          }
          return portal;
        };
      }
    });
    const ALL_HANDLERS = ["onClick", "onMousedown", "onTouchstart", "onMouseenter", "onMouseleave", "onFocus", "onBlur", "onContextmenu"];
    const Trigger = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "Trigger",
      mixins: [BaseMixin],
      inheritAttrs: false,
      props: triggerProps(),
      setup(props2) {
        const align = computed(() => {
          const {
            popupPlacement,
            popupAlign,
            builtinPlacements
          } = props2;
          if (popupPlacement && builtinPlacements) {
            return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);
          }
          return popupAlign;
        });
        const popupRef = shallowRef(null);
        const setPopupRef = (val) => {
          popupRef.value = val;
        };
        return {
          vcTriggerContext: inject("vcTriggerContext", {}),
          popupRef,
          setPopupRef,
          triggerRef: shallowRef(null),
          align,
          focusTime: null,
          clickOutsideHandler: null,
          contextmenuOutsideHandler1: null,
          contextmenuOutsideHandler2: null,
          touchOutsideHandler: null,
          attachId: null,
          delayTimer: null,
          hasPopupMouseDown: false,
          preClickTime: null,
          preTouchTime: null,
          mouseDownTimeout: null,
          childOriginEvents: {}
        };
      },
      data() {
        const props2 = this.$props;
        let popupVisible;
        if (this.popupVisible !== void 0) {
          popupVisible = !!props2.popupVisible;
        } else {
          popupVisible = !!props2.defaultPopupVisible;
        }
        ALL_HANDLERS.forEach((h2) => {
          this[`fire${h2}`] = (e2) => {
            this.fireEvents(h2, e2);
          };
        });
        return {
          prevPopupVisible: popupVisible,
          sPopupVisible: popupVisible,
          point: null
        };
      },
      watch: {
        popupVisible(val) {
          if (val !== void 0) {
            this.prevPopupVisible = this.sPopupVisible;
            this.sPopupVisible = val;
          }
        }
      },
      created() {
        provide("vcTriggerContext", {
          onPopupMouseDown: this.onPopupMouseDown,
          onPopupMouseenter: this.onPopupMouseenter,
          onPopupMouseleave: this.onPopupMouseleave
        });
        useProvidePortal(this);
      },
      deactivated() {
        this.setPopupVisible(false);
      },
      mounted() {
        this.$nextTick(() => {
          this.updatedCal();
        });
      },
      updated() {
        this.$nextTick(() => {
          this.updatedCal();
        });
      },
      beforeUnmount() {
        this.clearDelayTimer();
        this.clearOutsideHandler();
        clearTimeout(this.mouseDownTimeout);
        wrapperRaf.cancel(this.attachId);
      },
      methods: {
        updatedCal() {
          const props2 = this.$props;
          const state = this.$data;
          if (state.sPopupVisible) {
            let currentDocument;
            if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow())) {
              currentDocument = props2.getDocument(this.getRootDomNode());
              this.clickOutsideHandler = addEventListenerWrap(currentDocument, "mousedown", this.onDocumentClick);
            }
            if (!this.touchOutsideHandler) {
              currentDocument = currentDocument || props2.getDocument(this.getRootDomNode());
              this.touchOutsideHandler = addEventListenerWrap(currentDocument, "touchstart", this.onDocumentClick, supportsPassive ? {
                passive: false
              } : false);
            }
            if (!this.contextmenuOutsideHandler1 && this.isContextmenuToShow()) {
              currentDocument = currentDocument || props2.getDocument(this.getRootDomNode());
              this.contextmenuOutsideHandler1 = addEventListenerWrap(currentDocument, "scroll", this.onContextmenuClose);
            }
            if (!this.contextmenuOutsideHandler2 && this.isContextmenuToShow()) {
              this.contextmenuOutsideHandler2 = addEventListenerWrap(window, "blur", this.onContextmenuClose);
            }
          } else {
            this.clearOutsideHandler();
          }
        },
        onMouseenter(e2) {
          const {
            mouseEnterDelay
          } = this.$props;
          this.fireEvents("onMouseenter", e2);
          this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e2);
        },
        onMouseMove(e2) {
          this.fireEvents("onMousemove", e2);
          this.setPoint(e2);
        },
        onMouseleave(e2) {
          this.fireEvents("onMouseleave", e2);
          this.delaySetPopupVisible(false, this.$props.mouseLeaveDelay);
        },
        onPopupMouseenter() {
          const {
            vcTriggerContext = {}
          } = this;
          if (vcTriggerContext.onPopupMouseenter) {
            vcTriggerContext.onPopupMouseenter();
          }
          this.clearDelayTimer();
        },
        onPopupMouseleave(e2) {
          var _a;
          if (e2 && e2.relatedTarget && !e2.relatedTarget.setTimeout && contains$1((_a = this.popupRef) === null || _a === void 0 ? void 0 : _a.getElement(), e2.relatedTarget)) {
            return;
          }
          if (this.isMouseLeaveToHide()) {
            this.delaySetPopupVisible(false, this.$props.mouseLeaveDelay);
          }
          const {
            vcTriggerContext = {}
          } = this;
          if (vcTriggerContext.onPopupMouseleave) {
            vcTriggerContext.onPopupMouseleave(e2);
          }
        },
        onFocus(e2) {
          this.fireEvents("onFocus", e2);
          this.clearDelayTimer();
          if (this.isFocusToShow()) {
            this.focusTime = Date.now();
            this.delaySetPopupVisible(true, this.$props.focusDelay);
          }
        },
        onMousedown(e2) {
          this.fireEvents("onMousedown", e2);
          this.preClickTime = Date.now();
        },
        onTouchstart(e2) {
          this.fireEvents("onTouchstart", e2);
          this.preTouchTime = Date.now();
        },
        onBlur(e2) {
          if (!contains$1(e2.target, e2.relatedTarget || document.activeElement)) {
            this.fireEvents("onBlur", e2);
            this.clearDelayTimer();
            if (this.isBlurToHide()) {
              this.delaySetPopupVisible(false, this.$props.blurDelay);
            }
          }
        },
        onContextmenu(e2) {
          e2.preventDefault();
          this.fireEvents("onContextmenu", e2);
          this.setPopupVisible(true, e2);
        },
        onContextmenuClose() {
          if (this.isContextmenuToShow()) {
            this.close();
          }
        },
        onClick(event) {
          this.fireEvents("onClick", event);
          if (this.focusTime) {
            let preTime;
            if (this.preClickTime && this.preTouchTime) {
              preTime = Math.min(this.preClickTime, this.preTouchTime);
            } else if (this.preClickTime) {
              preTime = this.preClickTime;
            } else if (this.preTouchTime) {
              preTime = this.preTouchTime;
            }
            if (Math.abs(preTime - this.focusTime) < 20) {
              return;
            }
            this.focusTime = 0;
          }
          this.preClickTime = 0;
          this.preTouchTime = 0;
          if (this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && event && event.preventDefault) {
            event.preventDefault();
          }
          if (event && event.domEvent) {
            event.domEvent.preventDefault();
          }
          const nextVisible = !this.$data.sPopupVisible;
          if (this.isClickToHide() && !nextVisible || nextVisible && this.isClickToShow()) {
            this.setPopupVisible(!this.$data.sPopupVisible, event);
          }
        },
        onPopupMouseDown() {
          const {
            vcTriggerContext = {}
          } = this;
          this.hasPopupMouseDown = true;
          clearTimeout(this.mouseDownTimeout);
          this.mouseDownTimeout = setTimeout(() => {
            this.hasPopupMouseDown = false;
          }, 0);
          if (vcTriggerContext.onPopupMouseDown) {
            vcTriggerContext.onPopupMouseDown(...arguments);
          }
        },
        onDocumentClick(event) {
          if (this.$props.mask && !this.$props.maskClosable) {
            return;
          }
          const target = event.target;
          const root2 = this.getRootDomNode();
          const popupNode = this.getPopupDomNode();
          if (
            // mousedown on the target should also close popup when action is contextMenu.
            // https://github.com/ant-design/ant-design/issues/29853
            (!contains$1(root2, target) || this.isContextMenuOnly()) && !contains$1(popupNode, target) && !this.hasPopupMouseDown
          ) {
            this.delaySetPopupVisible(false, 0.1);
          }
        },
        getPopupDomNode() {
          var _a;
          return ((_a = this.popupRef) === null || _a === void 0 ? void 0 : _a.getElement()) || null;
        },
        getRootDomNode() {
          var _a, _b, _c, _d;
          const {
            getTriggerDOMNode
          } = this.$props;
          if (getTriggerDOMNode) {
            const domNode = ((_b = (_a = this.triggerRef) === null || _a === void 0 ? void 0 : _a.$el) === null || _b === void 0 ? void 0 : _b.nodeName) === "#comment" ? null : findDOMNode(this.triggerRef);
            return findDOMNode(getTriggerDOMNode(domNode));
          }
          try {
            const domNode = ((_d = (_c = this.triggerRef) === null || _c === void 0 ? void 0 : _c.$el) === null || _d === void 0 ? void 0 : _d.nodeName) === "#comment" ? null : findDOMNode(this.triggerRef);
            if (domNode) {
              return domNode;
            }
          } catch (err) {
          }
          return findDOMNode(this);
        },
        handleGetPopupClassFromAlign(align) {
          const className = [];
          const props2 = this.$props;
          const {
            popupPlacement,
            builtinPlacements,
            prefixCls,
            alignPoint: alignPoint2,
            getPopupClassNameFromAlign
          } = props2;
          if (popupPlacement && builtinPlacements) {
            className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint2));
          }
          if (getPopupClassNameFromAlign) {
            className.push(getPopupClassNameFromAlign(align));
          }
          return className.join(" ");
        },
        getPopupAlign() {
          const props2 = this.$props;
          const {
            popupPlacement,
            popupAlign,
            builtinPlacements
          } = props2;
          if (popupPlacement && builtinPlacements) {
            return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);
          }
          return popupAlign;
        },
        getComponent() {
          const mouseProps = {};
          if (this.isMouseEnterToShow()) {
            mouseProps.onMouseenter = this.onPopupMouseenter;
          }
          if (this.isMouseLeaveToHide()) {
            mouseProps.onMouseleave = this.onPopupMouseleave;
          }
          mouseProps.onMousedown = this.onPopupMouseDown;
          mouseProps[supportsPassive ? "onTouchstartPassive" : "onTouchstart"] = this.onPopupMouseDown;
          const {
            handleGetPopupClassFromAlign,
            getRootDomNode,
            $attrs
          } = this;
          const {
            prefixCls,
            destroyPopupOnHide,
            popupClassName,
            popupAnimation,
            popupTransitionName,
            popupStyle,
            mask,
            maskAnimation,
            maskTransitionName,
            zIndex,
            stretch,
            alignPoint: alignPoint2,
            mobile,
            arrow,
            forceRender
          } = this.$props;
          const {
            sPopupVisible,
            point
          } = this.$data;
          const popupProps2 = _extends$1(_extends$1({
            prefixCls,
            arrow,
            destroyPopupOnHide,
            visible: sPopupVisible,
            point: alignPoint2 ? point : null,
            align: this.align,
            animation: popupAnimation,
            getClassNameFromAlign: handleGetPopupClassFromAlign,
            stretch,
            getRootDomNode,
            mask,
            zIndex,
            transitionName: popupTransitionName,
            maskAnimation,
            maskTransitionName,
            class: popupClassName,
            style: popupStyle,
            onAlign: $attrs.onPopupAlign || noop$1
          }, mouseProps), {
            ref: this.setPopupRef,
            mobile,
            forceRender
          });
          return createVNode(Popup, popupProps2, {
            default: this.$slots.popup || (() => getComponent(this, "popup"))
          });
        },
        attachParent(popupContainer) {
          wrapperRaf.cancel(this.attachId);
          const {
            getPopupContainer,
            getDocument: getDocument2
          } = this.$props;
          const domNode = this.getRootDomNode();
          let mountNode;
          if (!getPopupContainer) {
            mountNode = getDocument2(this.getRootDomNode()).body;
          } else if (domNode || getPopupContainer.length === 0) {
            mountNode = getPopupContainer(domNode);
          }
          if (mountNode) {
            mountNode.appendChild(popupContainer);
          } else {
            this.attachId = wrapperRaf(() => {
              this.attachParent(popupContainer);
            });
          }
        },
        getContainer() {
          const {
            $props: props2
          } = this;
          const {
            getDocument: getDocument2
          } = props2;
          const popupContainer = getDocument2(this.getRootDomNode()).createElement("div");
          popupContainer.style.position = "absolute";
          popupContainer.style.top = "0";
          popupContainer.style.left = "0";
          popupContainer.style.width = "100%";
          this.attachParent(popupContainer);
          return popupContainer;
        },
        setPopupVisible(sPopupVisible, event) {
          const {
            alignPoint: alignPoint2,
            sPopupVisible: prevPopupVisible,
            onPopupVisibleChange
          } = this;
          this.clearDelayTimer();
          if (prevPopupVisible !== sPopupVisible) {
            if (!hasProp(this, "popupVisible")) {
              this.setState({
                sPopupVisible,
                prevPopupVisible
              });
            }
            onPopupVisibleChange && onPopupVisibleChange(sPopupVisible);
          }
          if (alignPoint2 && event && sPopupVisible) {
            this.setPoint(event);
          }
        },
        setPoint(point) {
          const {
            alignPoint: alignPoint2
          } = this.$props;
          if (!alignPoint2 || !point) return;
          this.setState({
            point: {
              pageX: point.pageX,
              pageY: point.pageY
            }
          });
        },
        handlePortalUpdate() {
          if (this.prevPopupVisible !== this.sPopupVisible) {
            this.afterPopupVisibleChange(this.sPopupVisible);
          }
        },
        delaySetPopupVisible(visible, delayS, event) {
          const delay = delayS * 1e3;
          this.clearDelayTimer();
          if (delay) {
            const point = event ? {
              pageX: event.pageX,
              pageY: event.pageY
            } : null;
            this.delayTimer = setTimeout(() => {
              this.setPopupVisible(visible, point);
              this.clearDelayTimer();
            }, delay);
          } else {
            this.setPopupVisible(visible, event);
          }
        },
        clearDelayTimer() {
          if (this.delayTimer) {
            clearTimeout(this.delayTimer);
            this.delayTimer = null;
          }
        },
        clearOutsideHandler() {
          if (this.clickOutsideHandler) {
            this.clickOutsideHandler.remove();
            this.clickOutsideHandler = null;
          }
          if (this.contextmenuOutsideHandler1) {
            this.contextmenuOutsideHandler1.remove();
            this.contextmenuOutsideHandler1 = null;
          }
          if (this.contextmenuOutsideHandler2) {
            this.contextmenuOutsideHandler2.remove();
            this.contextmenuOutsideHandler2 = null;
          }
          if (this.touchOutsideHandler) {
            this.touchOutsideHandler.remove();
            this.touchOutsideHandler = null;
          }
        },
        createTwoChains(event) {
          let fn = () => {
          };
          const events = getEvents(this);
          if (this.childOriginEvents[event] && events[event]) {
            return this[`fire${event}`];
          }
          fn = this.childOriginEvents[event] || events[event] || fn;
          return fn;
        },
        isClickToShow() {
          const {
            action,
            showAction
          } = this.$props;
          return action.indexOf("click") !== -1 || showAction.indexOf("click") !== -1;
        },
        isContextMenuOnly() {
          const {
            action
          } = this.$props;
          return action === "contextmenu" || action.length === 1 && action[0] === "contextmenu";
        },
        isContextmenuToShow() {
          const {
            action,
            showAction
          } = this.$props;
          return action.indexOf("contextmenu") !== -1 || showAction.indexOf("contextmenu") !== -1;
        },
        isClickToHide() {
          const {
            action,
            hideAction
          } = this.$props;
          return action.indexOf("click") !== -1 || hideAction.indexOf("click") !== -1;
        },
        isMouseEnterToShow() {
          const {
            action,
            showAction
          } = this.$props;
          return action.indexOf("hover") !== -1 || showAction.indexOf("mouseenter") !== -1;
        },
        isMouseLeaveToHide() {
          const {
            action,
            hideAction
          } = this.$props;
          return action.indexOf("hover") !== -1 || hideAction.indexOf("mouseleave") !== -1;
        },
        isFocusToShow() {
          const {
            action,
            showAction
          } = this.$props;
          return action.indexOf("focus") !== -1 || showAction.indexOf("focus") !== -1;
        },
        isBlurToHide() {
          const {
            action,
            hideAction
          } = this.$props;
          return action.indexOf("focus") !== -1 || hideAction.indexOf("blur") !== -1;
        },
        forcePopupAlign() {
          var _a;
          if (this.$data.sPopupVisible) {
            (_a = this.popupRef) === null || _a === void 0 ? void 0 : _a.forceAlign();
          }
        },
        fireEvents(type, e2) {
          if (this.childOriginEvents[type]) {
            this.childOriginEvents[type](e2);
          }
          const event = this.$props[type] || this.$attrs[type];
          if (event) {
            event(e2);
          }
        },
        close() {
          this.setPopupVisible(false);
        }
      },
      render() {
        const {
          $attrs
        } = this;
        const children = filterEmpty(getSlot(this));
        const {
          alignPoint: alignPoint2,
          getPopupContainer
        } = this.$props;
        const child = children[0];
        this.childOriginEvents = getEvents(child);
        const newChildProps = {
          key: "trigger"
        };
        if (this.isContextmenuToShow()) {
          newChildProps.onContextmenu = this.onContextmenu;
        } else {
          newChildProps.onContextmenu = this.createTwoChains("onContextmenu");
        }
        if (this.isClickToHide() || this.isClickToShow()) {
          newChildProps.onClick = this.onClick;
          newChildProps.onMousedown = this.onMousedown;
          newChildProps[supportsPassive ? "onTouchstartPassive" : "onTouchstart"] = this.onTouchstart;
        } else {
          newChildProps.onClick = this.createTwoChains("onClick");
          newChildProps.onMousedown = this.createTwoChains("onMousedown");
          newChildProps[supportsPassive ? "onTouchstartPassive" : "onTouchstart"] = this.createTwoChains("onTouchstart");
        }
        if (this.isMouseEnterToShow()) {
          newChildProps.onMouseenter = this.onMouseenter;
          if (alignPoint2) {
            newChildProps.onMousemove = this.onMouseMove;
          }
        } else {
          newChildProps.onMouseenter = this.createTwoChains("onMouseenter");
        }
        if (this.isMouseLeaveToHide()) {
          newChildProps.onMouseleave = this.onMouseleave;
        } else {
          newChildProps.onMouseleave = this.createTwoChains("onMouseleave");
        }
        if (this.isFocusToShow() || this.isBlurToHide()) {
          newChildProps.onFocus = this.onFocus;
          newChildProps.onBlur = this.onBlur;
        } else {
          newChildProps.onFocus = this.createTwoChains("onFocus");
          newChildProps.onBlur = (e2) => {
            if (e2 && (!e2.relatedTarget || !contains$1(e2.target, e2.relatedTarget))) {
              this.createTwoChains("onBlur")(e2);
            }
          };
        }
        const childrenClassName = classNames(child && child.props && child.props.class, $attrs.class);
        if (childrenClassName) {
          newChildProps.class = childrenClassName;
        }
        const trigger2 = cloneElement(child, _extends$1(_extends$1({}, newChildProps), {
          ref: "triggerRef"
        }), true, true);
        const portal = createVNode(Portal, {
          "key": "portal",
          "getContainer": getPopupContainer && (() => getPopupContainer(this.getRootDomNode())),
          "didUpdate": this.handlePortalUpdate,
          "visible": this.$data.sPopupVisible
        }, {
          default: this.getComponent
        });
        return createVNode(Fragment, null, [trigger2, portal]);
      }
    });
    var __rest$k = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const getBuiltInPlacements = (dropdownMatchSelectWidth) => {
      const adjustX = dropdownMatchSelectWidth === true ? 0 : 1;
      return {
        bottomLeft: {
          points: ["tl", "bl"],
          offset: [0, 4],
          overflow: {
            adjustX,
            adjustY: 1
          }
        },
        bottomRight: {
          points: ["tr", "br"],
          offset: [0, 4],
          overflow: {
            adjustX,
            adjustY: 1
          }
        },
        topLeft: {
          points: ["bl", "tl"],
          offset: [0, -4],
          overflow: {
            adjustX,
            adjustY: 1
          }
        },
        topRight: {
          points: ["br", "tr"],
          offset: [0, -4],
          overflow: {
            adjustX,
            adjustY: 1
          }
        }
      };
    };
    const SelectTrigger = /* @__PURE__ */ defineComponent({
      name: "SelectTrigger",
      inheritAttrs: false,
      props: {
        dropdownAlign: Object,
        visible: {
          type: Boolean,
          default: void 0
        },
        disabled: {
          type: Boolean,
          default: void 0
        },
        dropdownClassName: String,
        dropdownStyle: PropTypes.object,
        placement: String,
        empty: {
          type: Boolean,
          default: void 0
        },
        prefixCls: String,
        popupClassName: String,
        animation: String,
        transitionName: String,
        getPopupContainer: Function,
        dropdownRender: Function,
        containerWidth: Number,
        dropdownMatchSelectWidth: PropTypes.oneOfType([Number, Boolean]).def(true),
        popupElement: PropTypes.any,
        direction: String,
        getTriggerDOMNode: Function,
        onPopupVisibleChange: Function,
        onPopupMouseEnter: Function,
        onPopupFocusin: Function,
        onPopupFocusout: Function
      },
      setup(props2, _ref) {
        let {
          slots,
          attrs,
          expose
        } = _ref;
        const builtInPlacements = computed(() => {
          const {
            dropdownMatchSelectWidth
          } = props2;
          return getBuiltInPlacements(dropdownMatchSelectWidth);
        });
        const popupRef = ref();
        expose({
          getPopupElement: () => {
            return popupRef.value;
          }
        });
        return () => {
          const _a = _extends$1(_extends$1({}, props2), attrs), {
            empty = false
          } = _a, restProps = __rest$k(_a, ["empty"]);
          const {
            visible,
            dropdownAlign,
            prefixCls,
            popupElement,
            dropdownClassName,
            dropdownStyle,
            direction = "ltr",
            placement,
            dropdownMatchSelectWidth,
            containerWidth,
            dropdownRender,
            animation,
            transitionName: transitionName2,
            getPopupContainer,
            getTriggerDOMNode,
            onPopupVisibleChange,
            onPopupMouseEnter,
            onPopupFocusin,
            onPopupFocusout
          } = restProps;
          const dropdownPrefixCls = `${prefixCls}-dropdown`;
          let popupNode = popupElement;
          if (dropdownRender) {
            popupNode = dropdownRender({
              menuNode: popupElement,
              props: props2
            });
          }
          const mergedTransitionName = animation ? `${dropdownPrefixCls}-${animation}` : transitionName2;
          const popupStyle = _extends$1({
            minWidth: `${containerWidth}px`
          }, dropdownStyle);
          if (typeof dropdownMatchSelectWidth === "number") {
            popupStyle.width = `${dropdownMatchSelectWidth}px`;
          } else if (dropdownMatchSelectWidth) {
            popupStyle.width = `${containerWidth}px`;
          }
          return createVNode(Trigger, _objectSpread2$1(_objectSpread2$1({}, props2), {}, {
            "showAction": onPopupVisibleChange ? ["click"] : [],
            "hideAction": onPopupVisibleChange ? ["click"] : [],
            "popupPlacement": placement || (direction === "rtl" ? "bottomRight" : "bottomLeft"),
            "builtinPlacements": builtInPlacements.value,
            "prefixCls": dropdownPrefixCls,
            "popupTransitionName": mergedTransitionName,
            "popupAlign": dropdownAlign,
            "popupVisible": visible,
            "getPopupContainer": getPopupContainer,
            "popupClassName": classNames(dropdownClassName, {
              [`${dropdownPrefixCls}-empty`]: empty
            }),
            "popupStyle": popupStyle,
            "getTriggerDOMNode": getTriggerDOMNode,
            "onPopupVisibleChange": onPopupVisibleChange
          }), {
            default: slots.default,
            popup: () => createVNode("div", {
              "ref": popupRef,
              "onMouseenter": onPopupMouseEnter,
              "onFocusin": onPopupFocusin,
              "onFocusout": onPopupFocusout
            }, [popupNode])
          });
        };
      }
    });
    const KeyCode = {
      /**
       * MAC_ENTER
       */
      MAC_ENTER: 3,
      /**
       * BACKSPACE
       */
      BACKSPACE: 8,
      /**
       * TAB
       */
      TAB: 9,
      /**
       * NUMLOCK on FF/Safari Mac
       */
      NUM_CENTER: 12,
      /**
       * ENTER
       */
      ENTER: 13,
      /**
       * SHIFT
       */
      SHIFT: 16,
      /**
       * CTRL
       */
      CTRL: 17,
      /**
       * ALT
       */
      ALT: 18,
      /**
       * PAUSE
       */
      PAUSE: 19,
      /**
       * CAPS_LOCK
       */
      CAPS_LOCK: 20,
      /**
       * ESC
       */
      ESC: 27,
      /**
       * SPACE
       */
      SPACE: 32,
      /**
       * PAGE_UP
       */
      PAGE_UP: 33,
      /**
       * PAGE_DOWN
       */
      PAGE_DOWN: 34,
      /**
       * END
       */
      END: 35,
      /**
       * HOME
       */
      HOME: 36,
      /**
       * LEFT
       */
      LEFT: 37,
      /**
       * UP
       */
      UP: 38,
      /**
       * RIGHT
       */
      RIGHT: 39,
      /**
       * DOWN
       */
      DOWN: 40,
      /**
       * PRINT_SCREEN
       */
      PRINT_SCREEN: 44,
      /**
       * INSERT
       */
      INSERT: 45,
      /**
       * DELETE
       */
      DELETE: 46,
      /**
       * ZERO
       */
      ZERO: 48,
      /**
       * ONE
       */
      ONE: 49,
      /**
       * TWO
       */
      TWO: 50,
      /**
       * THREE
       */
      THREE: 51,
      /**
       * FOUR
       */
      FOUR: 52,
      /**
       * FIVE
       */
      FIVE: 53,
      /**
       * SIX
       */
      SIX: 54,
      /**
       * SEVEN
       */
      SEVEN: 55,
      /**
       * EIGHT
       */
      EIGHT: 56,
      /**
       * NINE
       */
      NINE: 57,
      /**
       * QUESTION_MARK
       */
      QUESTION_MARK: 63,
      /**
       * A
       */
      A: 65,
      /**
       * B
       */
      B: 66,
      /**
       * C
       */
      C: 67,
      /**
       * D
       */
      D: 68,
      /**
       * E
       */
      E: 69,
      /**
       * F
       */
      F: 70,
      /**
       * G
       */
      G: 71,
      /**
       * H
       */
      H: 72,
      /**
       * I
       */
      I: 73,
      /**
       * J
       */
      J: 74,
      /**
       * K
       */
      K: 75,
      /**
       * L
       */
      L: 76,
      /**
       * M
       */
      M: 77,
      /**
       * N
       */
      N: 78,
      /**
       * O
       */
      O: 79,
      /**
       * P
       */
      P: 80,
      /**
       * Q
       */
      Q: 81,
      /**
       * R
       */
      R: 82,
      /**
       * S
       */
      S: 83,
      /**
       * T
       */
      T: 84,
      /**
       * U
       */
      U: 85,
      /**
       * V
       */
      V: 86,
      /**
       * W
       */
      W: 87,
      /**
       * X
       */
      X: 88,
      /**
       * Y
       */
      Y: 89,
      /**
       * Z
       */
      Z: 90,
      /**
       * META
       */
      META: 91,
      /**
       * WIN_KEY_RIGHT
       */
      WIN_KEY_RIGHT: 92,
      /**
       * CONTEXT_MENU
       */
      CONTEXT_MENU: 93,
      /**
       * NUM_ZERO
       */
      NUM_ZERO: 96,
      /**
       * NUM_ONE
       */
      NUM_ONE: 97,
      /**
       * NUM_TWO
       */
      NUM_TWO: 98,
      /**
       * NUM_THREE
       */
      NUM_THREE: 99,
      /**
       * NUM_FOUR
       */
      NUM_FOUR: 100,
      /**
       * NUM_FIVE
       */
      NUM_FIVE: 101,
      /**
       * NUM_SIX
       */
      NUM_SIX: 102,
      /**
       * NUM_SEVEN
       */
      NUM_SEVEN: 103,
      /**
       * NUM_EIGHT
       */
      NUM_EIGHT: 104,
      /**
       * NUM_NINE
       */
      NUM_NINE: 105,
      /**
       * NUM_MULTIPLY
       */
      NUM_MULTIPLY: 106,
      /**
       * NUM_PLUS
       */
      NUM_PLUS: 107,
      /**
       * NUM_MINUS
       */
      NUM_MINUS: 109,
      /**
       * NUM_PERIOD
       */
      NUM_PERIOD: 110,
      /**
       * NUM_DIVISION
       */
      NUM_DIVISION: 111,
      /**
       * F1
       */
      F1: 112,
      /**
       * F2
       */
      F2: 113,
      /**
       * F3
       */
      F3: 114,
      /**
       * F4
       */
      F4: 115,
      /**
       * F5
       */
      F5: 116,
      /**
       * F6
       */
      F6: 117,
      /**
       * F7
       */
      F7: 118,
      /**
       * F8
       */
      F8: 119,
      /**
       * F9
       */
      F9: 120,
      /**
       * F10
       */
      F10: 121,
      /**
       * F11
       */
      F11: 122,
      /**
       * F12
       */
      F12: 123,
      /**
       * NUMLOCK
       */
      NUMLOCK: 144,
      /**
       * SEMICOLON
       */
      SEMICOLON: 186,
      /**
       * DASH
       */
      DASH: 189,
      /**
       * EQUALS
       */
      EQUALS: 187,
      /**
       * COMMA
       */
      COMMA: 188,
      /**
       * PERIOD
       */
      PERIOD: 190,
      /**
       * SLASH
       */
      SLASH: 191,
      /**
       * APOSTROPHE
       */
      APOSTROPHE: 192,
      /**
       * SINGLE_QUOTE
       */
      SINGLE_QUOTE: 222,
      /**
       * OPEN_SQUARE_BRACKET
       */
      OPEN_SQUARE_BRACKET: 219,
      /**
       * BACKSLASH
       */
      BACKSLASH: 220,
      /**
       * CLOSE_SQUARE_BRACKET
       */
      CLOSE_SQUARE_BRACKET: 221,
      /**
       * WIN_KEY
       */
      WIN_KEY: 224,
      /**
       * MAC_FF_META
       */
      MAC_FF_META: 224,
      /**
       * WIN_IME
       */
      WIN_IME: 229,
      // ======================== Function ========================
      /**
       * whether text and modified key is entered at the same time.
       */
      isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e2) {
        const {
          keyCode
        } = e2;
        if (e2.altKey && !e2.ctrlKey || e2.metaKey || // Function keys don't generate text
        keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
          return false;
        }
        switch (keyCode) {
          case KeyCode.ALT:
          case KeyCode.CAPS_LOCK:
          case KeyCode.CONTEXT_MENU:
          case KeyCode.CTRL:
          case KeyCode.DOWN:
          case KeyCode.END:
          case KeyCode.ESC:
          case KeyCode.HOME:
          case KeyCode.INSERT:
          case KeyCode.LEFT:
          case KeyCode.MAC_FF_META:
          case KeyCode.META:
          case KeyCode.NUMLOCK:
          case KeyCode.NUM_CENTER:
          case KeyCode.PAGE_DOWN:
          case KeyCode.PAGE_UP:
          case KeyCode.PAUSE:
          case KeyCode.PRINT_SCREEN:
          case KeyCode.RIGHT:
          case KeyCode.SHIFT:
          case KeyCode.UP:
          case KeyCode.WIN_KEY:
          case KeyCode.WIN_KEY_RIGHT:
            return false;
          default:
            return true;
        }
      },
      /**
       * whether character is entered.
       */
      isCharacterKey: function isCharacterKey(keyCode) {
        if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
          return true;
        }
        if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
          return true;
        }
        if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
          return true;
        }
        if (window.navigator.userAgent.indexOf("WebKit") !== -1 && keyCode === 0) {
          return true;
        }
        switch (keyCode) {
          case KeyCode.SPACE:
          case KeyCode.QUESTION_MARK:
          case KeyCode.NUM_PLUS:
          case KeyCode.NUM_MINUS:
          case KeyCode.NUM_PERIOD:
          case KeyCode.NUM_DIVISION:
          case KeyCode.SEMICOLON:
          case KeyCode.DASH:
          case KeyCode.EQUALS:
          case KeyCode.COMMA:
          case KeyCode.PERIOD:
          case KeyCode.SLASH:
          case KeyCode.APOSTROPHE:
          case KeyCode.SINGLE_QUOTE:
          case KeyCode.OPEN_SQUARE_BRACKET:
          case KeyCode.BACKSLASH:
          case KeyCode.CLOSE_SQUARE_BRACKET:
            return true;
          default:
            return false;
        }
      }
    };
    const TransBtn = (props2, _ref) => {
      let {
        slots
      } = _ref;
      var _a;
      const {
        class: className,
        customizeIcon,
        customizeIconProps,
        onMousedown,
        onClick
      } = props2;
      let icon;
      if (typeof customizeIcon === "function") {
        icon = customizeIcon(customizeIconProps);
      } else {
        icon = isVNode(customizeIcon) ? cloneVNode(customizeIcon) : customizeIcon;
      }
      return createVNode("span", {
        "class": className,
        "onMousedown": (event) => {
          event.preventDefault();
          if (onMousedown) {
            onMousedown(event);
          }
        },
        "style": {
          userSelect: "none",
          WebkitUserSelect: "none"
        },
        "unselectable": "on",
        "onClick": onClick,
        "aria-hidden": true
      }, [icon !== void 0 ? icon : createVNode("span", {
        "class": className.split(/\s+/).map((cls) => `${cls}-icon`)
      }, [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)])]);
    };
    TransBtn.inheritAttrs = false;
    TransBtn.displayName = "TransBtn";
    TransBtn.props = {
      class: String,
      customizeIcon: PropTypes.any,
      customizeIconProps: PropTypes.any,
      onMousedown: Function,
      onClick: Function
    };
    var __rest$j = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const BaseInputInner = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      // inheritAttrs: false,
      props: {
        disabled: PropTypes.looseBool,
        type: PropTypes.string,
        value: PropTypes.any,
        tag: {
          type: String,
          default: "input"
        },
        size: PropTypes.string,
        onChange: Function,
        onInput: Function,
        onBlur: Function,
        onFocus: Function,
        onKeydown: Function,
        onCompositionstart: Function,
        onCompositionend: Function,
        onKeyup: Function,
        onPaste: Function,
        onMousedown: Function
      },
      emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
      setup(props2, _ref) {
        let {
          expose
        } = _ref;
        const inputRef = shallowRef(null);
        const focus = () => {
          if (inputRef.value) {
            inputRef.value.focus();
          }
        };
        const blur = () => {
          if (inputRef.value) {
            inputRef.value.blur();
          }
        };
        const setSelectionRange = (start, end, direction) => {
          var _a;
          (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end, direction);
        };
        const select = () => {
          var _a;
          (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.select();
        };
        expose({
          focus,
          blur,
          input: inputRef,
          setSelectionRange,
          select,
          getSelectionStart: () => {
            var _a;
            return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.selectionStart;
          },
          getSelectionEnd: () => {
            var _a;
            return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.selectionEnd;
          },
          getScrollTop: () => {
            var _a;
            return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.scrollTop;
          }
        });
        return () => {
          const {
            tag: Tag2,
            value
          } = props2, restProps = __rest$j(props2, ["tag", "value"]);
          return createVNode(Tag2, _objectSpread2$1(_objectSpread2$1({}, restProps), {}, {
            "ref": inputRef,
            "value": value
          }), null);
        };
      }
    });
    function styleObjectToString(style) {
      return Object.keys(style).reduce((acc, name) => {
        const styleValue = style[name];
        if (typeof styleValue === "undefined" || styleValue === null) {
          return acc;
        }
        acc += `${name}: ${style[name]};`;
        return acc;
      }, "");
    }
    var __rest$i = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const BaseInput = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      inheritAttrs: false,
      props: {
        disabled: PropTypes.looseBool,
        type: PropTypes.string,
        value: PropTypes.any,
        lazy: PropTypes.bool.def(true),
        tag: {
          type: String,
          default: "input"
        },
        size: PropTypes.string,
        style: PropTypes.oneOfType([String, Object]),
        class: PropTypes.string
      },
      emits: ["change", "input", "blur", "keydown", "focus", "compositionstart", "compositionend", "keyup", "paste", "mousedown"],
      setup(props2, _ref) {
        let {
          emit: emit2,
          attrs,
          expose
        } = _ref;
        const inputRef = shallowRef(null);
        const renderValue = ref();
        const isComposing = ref(false);
        watch([() => props2.value, isComposing], () => {
          if (isComposing.value) return;
          renderValue.value = props2.value;
        }, {
          immediate: true
        });
        const handleChange = (e2) => {
          emit2("change", e2);
        };
        const onCompositionstart = (e2) => {
          isComposing.value = true;
          e2.target.composing = true;
          emit2("compositionstart", e2);
        };
        const onCompositionend = (e2) => {
          isComposing.value = false;
          e2.target.composing = false;
          emit2("compositionend", e2);
          const event = document.createEvent("HTMLEvents");
          event.initEvent("input", true, true);
          e2.target.dispatchEvent(event);
          handleChange(e2);
        };
        const handleInput = (e2) => {
          if (isComposing.value && props2.lazy) {
            renderValue.value = e2.target.value;
            return;
          }
          emit2("input", e2);
        };
        const handleBlur = (e2) => {
          emit2("blur", e2);
        };
        const handleFocus = (e2) => {
          emit2("focus", e2);
        };
        const focus = () => {
          if (inputRef.value) {
            inputRef.value.focus();
          }
        };
        const blur = () => {
          if (inputRef.value) {
            inputRef.value.blur();
          }
        };
        const handleKeyDown = (e2) => {
          emit2("keydown", e2);
        };
        const handleKeyUp = (e2) => {
          emit2("keyup", e2);
        };
        const setSelectionRange = (start, end, direction) => {
          var _a;
          (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end, direction);
        };
        const select = () => {
          var _a;
          (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.select();
        };
        expose({
          focus,
          blur,
          input: computed(() => {
            var _a;
            return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.input;
          }),
          setSelectionRange,
          select,
          getSelectionStart: () => {
            var _a;
            return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.getSelectionStart();
          },
          getSelectionEnd: () => {
            var _a;
            return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.getSelectionEnd();
          },
          getScrollTop: () => {
            var _a;
            return (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.getScrollTop();
          }
        });
        const handleMousedown = (e2) => {
          emit2("mousedown", e2);
        };
        const handlePaste = (e2) => {
          emit2("paste", e2);
        };
        const styleString = computed(() => {
          return props2.style && typeof props2.style !== "string" ? styleObjectToString(props2.style) : props2.style;
        });
        return () => {
          const restProps = __rest$i(props2, ["style", "lazy"]);
          return createVNode(BaseInputInner, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, restProps), attrs), {}, {
            "style": styleString.value,
            "onInput": handleInput,
            "onChange": handleChange,
            "onBlur": handleBlur,
            "onFocus": handleFocus,
            "ref": inputRef,
            "value": renderValue.value,
            "onCompositionstart": onCompositionstart,
            "onCompositionend": onCompositionend,
            "onKeyup": handleKeyUp,
            "onKeydown": handleKeyDown,
            "onPaste": handlePaste,
            "onMousedown": handleMousedown
          }), null);
        };
      }
    });
    const inputProps = {
      inputRef: PropTypes.any,
      prefixCls: String,
      id: String,
      inputElement: PropTypes.VueNode,
      disabled: {
        type: Boolean,
        default: void 0
      },
      autofocus: {
        type: Boolean,
        default: void 0
      },
      autocomplete: String,
      editable: {
        type: Boolean,
        default: void 0
      },
      activeDescendantId: String,
      value: String,
      open: {
        type: Boolean,
        default: void 0
      },
      tabindex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
      /** Pass accessibility props to input */
      attrs: PropTypes.object,
      onKeydown: {
        type: Function
      },
      onMousedown: {
        type: Function
      },
      onChange: {
        type: Function
      },
      onPaste: {
        type: Function
      },
      onCompositionstart: {
        type: Function
      },
      onCompositionend: {
        type: Function
      },
      onFocus: {
        type: Function
      },
      onBlur: {
        type: Function
      }
    };
    const Input = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "SelectInput",
      inheritAttrs: false,
      props: inputProps,
      setup(props2) {
        let blurTimeout = null;
        const VCSelectContainerEvent = inject("VCSelectContainerEvent");
        return () => {
          var _a;
          const {
            prefixCls,
            id,
            inputElement,
            disabled,
            tabindex,
            autofocus,
            autocomplete,
            editable,
            activeDescendantId,
            value,
            onKeydown,
            onMousedown,
            onChange,
            onPaste,
            onCompositionstart,
            onCompositionend,
            onFocus,
            onBlur,
            open: open2,
            inputRef,
            attrs
          } = props2;
          let inputNode = inputElement || createVNode(BaseInput, null, null);
          const inputProps2 = inputNode.props || {};
          const {
            onKeydown: onOriginKeyDown,
            onInput: onOriginInput,
            onFocus: onOriginFocus,
            onBlur: onOriginBlur,
            onMousedown: onOriginMouseDown,
            onCompositionstart: onOriginCompositionStart,
            onCompositionend: onOriginCompositionEnd,
            style
          } = inputProps2;
          inputNode = cloneElement(inputNode, _extends$1(_extends$1(_extends$1(_extends$1(_extends$1({
            type: "search"
          }, inputProps2), {
            id,
            ref: inputRef,
            disabled,
            tabindex,
            lazy: false,
            autocomplete: autocomplete || "off",
            autofocus,
            class: classNames(`${prefixCls}-selection-search-input`, (_a = inputNode === null || inputNode === void 0 ? void 0 : inputNode.props) === null || _a === void 0 ? void 0 : _a.class),
            role: "combobox",
            "aria-expanded": open2,
            "aria-haspopup": "listbox",
            "aria-owns": `${id}_list`,
            "aria-autocomplete": "list",
            "aria-controls": `${id}_list`,
            "aria-activedescendant": activeDescendantId
          }), attrs), {
            value: editable ? value : "",
            readonly: !editable,
            unselectable: !editable ? "on" : null,
            style: _extends$1(_extends$1({}, style), {
              opacity: editable ? null : 0
            }),
            onKeydown: (event) => {
              onKeydown(event);
              if (onOriginKeyDown) {
                onOriginKeyDown(event);
              }
            },
            onMousedown: (event) => {
              onMousedown(event);
              if (onOriginMouseDown) {
                onOriginMouseDown(event);
              }
            },
            onInput: (event) => {
              onChange(event);
              if (onOriginInput) {
                onOriginInput(event);
              }
            },
            onCompositionstart(event) {
              onCompositionstart(event);
              if (onOriginCompositionStart) {
                onOriginCompositionStart(event);
              }
            },
            onCompositionend(event) {
              onCompositionend(event);
              if (onOriginCompositionEnd) {
                onOriginCompositionEnd(event);
              }
            },
            onPaste,
            onFocus: function() {
              clearTimeout(blurTimeout);
              onOriginFocus && onOriginFocus(arguments.length <= 0 ? void 0 : arguments[0]);
              onFocus && onFocus(arguments.length <= 0 ? void 0 : arguments[0]);
              VCSelectContainerEvent === null || VCSelectContainerEvent === void 0 ? void 0 : VCSelectContainerEvent.focus(arguments.length <= 0 ? void 0 : arguments[0]);
            },
            onBlur: function() {
              for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
              }
              blurTimeout = setTimeout(() => {
                onOriginBlur && onOriginBlur(args[0]);
                onBlur && onBlur(args[0]);
                VCSelectContainerEvent === null || VCSelectContainerEvent === void 0 ? void 0 : VCSelectContainerEvent.blur(args[0]);
              }, 100);
            }
          }), inputNode.type === "textarea" ? {} : {
            type: "search"
          }), true, true);
          return inputNode;
        };
      }
    });
    const attributes = `accept acceptcharset accesskey action allowfullscreen allowtransparency
alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
charset checked classid classname colspan cols content contenteditable contextmenu
controls coords crossorigin data datetime default defer dir disabled download draggable
enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
mediagroup method min minlength multiple muted name novalidate nonce open
optimum pattern placeholder poster preload radiogroup readonly rel required
reversed role rowspan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellcheck src srcdoc srclang srcset start step style
summary tabindex target title type usemap value width wmode wrap`;
    const eventsName = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
    onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
    onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
    onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
    onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
    onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
    onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`;
    const propList = `${attributes} ${eventsName}`.split(/[\s\n]+/);
    const ariaPrefix = "aria-";
    const dataPrefix = "data-";
    function match(key2, prefix) {
      return key2.indexOf(prefix) === 0;
    }
    function pickAttrs(props2) {
      let ariaOnly = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
      let mergedConfig;
      if (ariaOnly === false) {
        mergedConfig = {
          aria: true,
          data: true,
          attr: true
        };
      } else if (ariaOnly === true) {
        mergedConfig = {
          aria: true
        };
      } else {
        mergedConfig = _extends$1({}, ariaOnly);
      }
      const attrs = {};
      Object.keys(props2).forEach((key2) => {
        if (
          // Aria
          mergedConfig.aria && (key2 === "role" || match(key2, ariaPrefix)) || // Data
          mergedConfig.data && match(key2, dataPrefix) || // Attr
          mergedConfig.attr && (propList.includes(key2) || propList.includes(key2.toLowerCase()))
        ) {
          attrs[key2] = props2[key2];
        }
      });
      return attrs;
    }
    const OverflowContextProviderKey = Symbol("OverflowContextProviderKey");
    const OverflowContextProvider = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "OverflowContextProvider",
      inheritAttrs: false,
      props: {
        value: {
          type: Object
        }
      },
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        provide(OverflowContextProviderKey, computed(() => props2.value));
        return () => {
          var _a;
          return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
        };
      }
    });
    const useInjectOverflowContext = () => {
      return inject(OverflowContextProviderKey, computed(() => null));
    };
    var __rest$h = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const UNDEFINED = void 0;
    const Item$1 = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "Item",
      props: {
        prefixCls: String,
        item: PropTypes.any,
        renderItem: Function,
        responsive: Boolean,
        itemKey: {
          type: [String, Number]
        },
        registerSize: Function,
        display: Boolean,
        order: Number,
        component: PropTypes.any,
        invalidate: Boolean
      },
      setup(props2, _ref) {
        let {
          slots,
          expose
        } = _ref;
        const mergedHidden = computed(() => props2.responsive && !props2.display);
        const itemNodeRef = ref();
        expose({
          itemNodeRef
        });
        function internalRegisterSize(width) {
          props2.registerSize(props2.itemKey, width);
        }
        onUnmounted(() => {
          internalRegisterSize(null);
        });
        return () => {
          var _a;
          const {
            prefixCls,
            invalidate,
            item,
            renderItem,
            responsive,
            registerSize,
            itemKey,
            display,
            order,
            component: Component = "div"
          } = props2, restProps = __rest$h(props2, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]);
          const children = (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
          const childNode = renderItem && item !== UNDEFINED ? renderItem(item) : children;
          let overflowStyle;
          if (!invalidate) {
            overflowStyle = {
              opacity: mergedHidden.value ? 0 : 1,
              height: mergedHidden.value ? 0 : UNDEFINED,
              overflowY: mergedHidden.value ? "hidden" : UNDEFINED,
              order: responsive ? order : UNDEFINED,
              pointerEvents: mergedHidden.value ? "none" : UNDEFINED,
              position: mergedHidden.value ? "absolute" : UNDEFINED
            };
          }
          const overflowProps2 = {};
          if (mergedHidden.value) {
            overflowProps2["aria-hidden"] = true;
          }
          return createVNode(ResizeObserver$1, {
            "disabled": !responsive,
            "onResize": (_ref2) => {
              let {
                offsetWidth
              } = _ref2;
              internalRegisterSize(offsetWidth);
            }
          }, {
            default: () => createVNode(Component, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({
              "class": classNames(!invalidate && prefixCls),
              "style": overflowStyle
            }, overflowProps2), restProps), {}, {
              "ref": itemNodeRef
            }), {
              default: () => [childNode]
            })
          });
        };
      }
    });
    var __rest$g = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const RawItem = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "RawItem",
      inheritAttrs: false,
      props: {
        component: PropTypes.any,
        title: PropTypes.any,
        id: String,
        onMouseenter: {
          type: Function
        },
        onMouseleave: {
          type: Function
        },
        onClick: {
          type: Function
        },
        onKeydown: {
          type: Function
        },
        onFocus: {
          type: Function
        },
        role: String,
        tabindex: Number
      },
      setup(props2, _ref) {
        let {
          slots,
          attrs
        } = _ref;
        const context = useInjectOverflowContext();
        return () => {
          var _a;
          if (!context.value) {
            const {
              component: Component = "div"
            } = props2, restProps2 = __rest$g(props2, ["component"]);
            return createVNode(Component, _objectSpread2$1(_objectSpread2$1({}, restProps2), attrs), {
              default: () => [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]
            });
          }
          const _b = context.value, {
            className: contextClassName
          } = _b, restContext = __rest$g(_b, ["className"]);
          const {
            class: className
          } = attrs, restProps = __rest$g(attrs, ["class"]);
          return createVNode(OverflowContextProvider, {
            "value": null
          }, {
            default: () => [createVNode(Item$1, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({
              "class": classNames(contextClassName, className)
            }, restContext), restProps), props2), slots)]
          });
        };
      }
    });
    var __rest$f = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const RESPONSIVE = "responsive";
    const INVALIDATE = "invalidate";
    function defaultRenderRest(omittedItems) {
      return `+ ${omittedItems.length} ...`;
    }
    const overflowProps = () => {
      return {
        id: String,
        prefixCls: String,
        data: Array,
        itemKey: [String, Number, Function],
        /** Used for `responsive`. It will limit render node to avoid perf issue */
        itemWidth: {
          type: Number,
          default: 10
        },
        renderItem: Function,
        /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
        renderRawItem: Function,
        maxCount: [Number, String],
        renderRest: Function,
        /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
        renderRawRest: Function,
        suffix: PropTypes.any,
        component: String,
        itemComponent: PropTypes.any,
        /** @private This API may be refactor since not well design */
        onVisibleChange: Function,
        /** When set to `full`, ssr will render full items by default and remove at client side */
        ssr: String,
        onMousedown: Function
      };
    };
    const Overflow = /* @__PURE__ */ defineComponent({
      name: "Overflow",
      inheritAttrs: false,
      props: overflowProps(),
      emits: ["visibleChange"],
      setup(props2, _ref) {
        let {
          attrs,
          emit: emit2,
          slots
        } = _ref;
        const fullySSR = computed(() => props2.ssr === "full");
        const containerWidth = shallowRef(null);
        const mergedContainerWidth = computed(() => containerWidth.value || 0);
        const itemWidths = shallowRef(/* @__PURE__ */ new Map());
        const prevRestWidth = shallowRef(0);
        const restWidth = shallowRef(0);
        const suffixWidth = shallowRef(0);
        const suffixFixedStart = shallowRef(null);
        const displayCount = shallowRef(null);
        const mergedDisplayCount = computed(() => {
          if (displayCount.value === null && fullySSR.value) {
            return Number.MAX_SAFE_INTEGER;
          }
          return displayCount.value || 0;
        });
        const restReady = shallowRef(false);
        const itemPrefixCls = computed(() => `${props2.prefixCls}-item`);
        const mergedRestWidth = computed(() => Math.max(prevRestWidth.value, restWidth.value));
        const isResponsive = computed(() => !!(props2.data.length && props2.maxCount === RESPONSIVE));
        const invalidate = computed(() => props2.maxCount === INVALIDATE);
        const showRest = computed(() => isResponsive.value || typeof props2.maxCount === "number" && props2.data.length > props2.maxCount);
        const mergedData = computed(() => {
          let items = props2.data;
          if (isResponsive.value) {
            if (containerWidth.value === null && fullySSR.value) {
              items = props2.data;
            } else {
              items = props2.data.slice(0, Math.min(props2.data.length, mergedContainerWidth.value / props2.itemWidth));
            }
          } else if (typeof props2.maxCount === "number") {
            items = props2.data.slice(0, props2.maxCount);
          }
          return items;
        });
        const omittedItems = computed(() => {
          if (isResponsive.value) {
            return props2.data.slice(mergedDisplayCount.value + 1);
          }
          return props2.data.slice(mergedData.value.length);
        });
        const getKey2 = (item, index2) => {
          var _a;
          if (typeof props2.itemKey === "function") {
            return props2.itemKey(item);
          }
          return (_a = props2.itemKey && (item === null || item === void 0 ? void 0 : item[props2.itemKey])) !== null && _a !== void 0 ? _a : index2;
        };
        const mergedRenderItem = computed(() => props2.renderItem || ((item) => item));
        const updateDisplayCount = (count, notReady) => {
          displayCount.value = count;
          if (!notReady) {
            restReady.value = count < props2.data.length - 1;
            emit2("visibleChange", count);
          }
        };
        const onOverflowResize = (_2, element) => {
          containerWidth.value = element.clientWidth;
        };
        const registerSize = (key2, width) => {
          const clone = new Map(itemWidths.value);
          if (width === null) {
            clone.delete(key2);
          } else {
            clone.set(key2, width);
          }
          itemWidths.value = clone;
        };
        const registerOverflowSize = (_2, width) => {
          prevRestWidth.value = restWidth.value;
          restWidth.value = width;
        };
        const registerSuffixSize = (_2, width) => {
          suffixWidth.value = width;
        };
        const getItemWidth = (index2) => {
          return itemWidths.value.get(getKey2(mergedData.value[index2], index2));
        };
        watch([mergedContainerWidth, itemWidths, restWidth, suffixWidth, () => props2.itemKey, mergedData], () => {
          if (mergedContainerWidth.value && mergedRestWidth.value && mergedData.value) {
            let totalWidth = suffixWidth.value;
            const len = mergedData.value.length;
            const lastIndex = len - 1;
            if (!len) {
              updateDisplayCount(0);
              suffixFixedStart.value = null;
              return;
            }
            for (let i2 = 0; i2 < len; i2 += 1) {
              const currentItemWidth = getItemWidth(i2);
              if (currentItemWidth === void 0) {
                updateDisplayCount(i2 - 1, true);
                break;
              }
              totalWidth += currentItemWidth;
              if (
                // Only one means `totalWidth` is the final width
                lastIndex === 0 && totalWidth <= mergedContainerWidth.value || // Last two width will be the final width
                i2 === lastIndex - 1 && totalWidth + getItemWidth(lastIndex) <= mergedContainerWidth.value
              ) {
                updateDisplayCount(lastIndex);
                suffixFixedStart.value = null;
                break;
              } else if (totalWidth + mergedRestWidth.value > mergedContainerWidth.value) {
                updateDisplayCount(i2 - 1);
                suffixFixedStart.value = totalWidth - currentItemWidth - suffixWidth.value + restWidth.value;
                break;
              }
            }
            if (props2.suffix && getItemWidth(0) + suffixWidth.value > mergedContainerWidth.value) {
              suffixFixedStart.value = null;
            }
          }
        });
        return () => {
          const displayRest = restReady.value && !!omittedItems.value.length;
          const {
            itemComponent,
            renderRawItem,
            renderRawRest,
            renderRest,
            prefixCls = "rc-overflow",
            suffix,
            component: Component = "div",
            id,
            onMousedown
          } = props2;
          const {
            class: className,
            style
          } = attrs, restAttrs = __rest$f(attrs, ["class", "style"]);
          let suffixStyle = {};
          if (suffixFixedStart.value !== null && isResponsive.value) {
            suffixStyle = {
              position: "absolute",
              left: `${suffixFixedStart.value}px`,
              top: 0
            };
          }
          const itemSharedProps = {
            prefixCls: itemPrefixCls.value,
            responsive: isResponsive.value,
            component: itemComponent,
            invalidate: invalidate.value
          };
          const internalRenderItemNode = renderRawItem ? (item, index2) => {
            const key2 = getKey2(item, index2);
            return createVNode(OverflowContextProvider, {
              "key": key2,
              "value": _extends$1(_extends$1({}, itemSharedProps), {
                order: index2,
                item,
                itemKey: key2,
                registerSize,
                display: index2 <= mergedDisplayCount.value
              })
            }, {
              default: () => [renderRawItem(item, index2)]
            });
          } : (item, index2) => {
            const key2 = getKey2(item, index2);
            return createVNode(Item$1, _objectSpread2$1(_objectSpread2$1({}, itemSharedProps), {}, {
              "order": index2,
              "key": key2,
              "item": item,
              "renderItem": mergedRenderItem.value,
              "itemKey": key2,
              "registerSize": registerSize,
              "display": index2 <= mergedDisplayCount.value
            }), null);
          };
          let restNode = () => null;
          const restContextProps = {
            order: displayRest ? mergedDisplayCount.value : Number.MAX_SAFE_INTEGER,
            className: `${itemPrefixCls.value} ${itemPrefixCls.value}-rest`,
            registerSize: registerOverflowSize,
            display: displayRest
          };
          if (!renderRawRest) {
            const mergedRenderRest = renderRest || defaultRenderRest;
            restNode = () => createVNode(Item$1, _objectSpread2$1(_objectSpread2$1({}, itemSharedProps), restContextProps), {
              default: () => typeof mergedRenderRest === "function" ? mergedRenderRest(omittedItems.value) : mergedRenderRest
            });
          } else if (renderRawRest) {
            restNode = () => createVNode(OverflowContextProvider, {
              "value": _extends$1(_extends$1({}, itemSharedProps), restContextProps)
            }, {
              default: () => [renderRawRest(omittedItems.value)]
            });
          }
          const overflowNode = () => {
            var _a;
            return createVNode(Component, _objectSpread2$1({
              "id": id,
              "class": classNames(!invalidate.value && prefixCls, className),
              "style": style,
              "onMousedown": onMousedown
            }, restAttrs), {
              default: () => [mergedData.value.map(internalRenderItemNode), showRest.value ? restNode() : null, suffix && createVNode(Item$1, _objectSpread2$1(_objectSpread2$1({}, itemSharedProps), {}, {
                "order": mergedDisplayCount.value,
                "class": `${itemPrefixCls.value}-suffix`,
                "registerSize": registerSuffixSize,
                "display": true,
                "style": suffixStyle
              }), {
                default: () => suffix
              }), (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]
            });
          };
          return createVNode(ResizeObserver$1, {
            "disabled": !isResponsive.value,
            "onResize": onOverflowResize
          }, {
            default: overflowNode
          });
        };
      }
    });
    Overflow.Item = RawItem;
    Overflow.RESPONSIVE = RESPONSIVE;
    Overflow.INVALIDATE = INVALIDATE;
    const TreeSelectLegacyContextPropsKey = Symbol("TreeSelectLegacyContextPropsKey");
    function useInjectLegacySelectContext() {
      return inject(TreeSelectLegacyContextPropsKey, {});
    }
    const props$2 = {
      id: String,
      prefixCls: String,
      values: PropTypes.array,
      open: {
        type: Boolean,
        default: void 0
      },
      searchValue: String,
      inputRef: PropTypes.any,
      placeholder: PropTypes.any,
      disabled: {
        type: Boolean,
        default: void 0
      },
      mode: String,
      showSearch: {
        type: Boolean,
        default: void 0
      },
      autofocus: {
        type: Boolean,
        default: void 0
      },
      autocomplete: String,
      activeDescendantId: String,
      tabindex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
      compositionStatus: Boolean,
      removeIcon: PropTypes.any,
      choiceTransitionName: String,
      maxTagCount: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
      maxTagTextLength: Number,
      maxTagPlaceholder: PropTypes.any.def(() => (omittedValues) => `+ ${omittedValues.length} ...`),
      tagRender: Function,
      onToggleOpen: {
        type: Function
      },
      onRemove: Function,
      onInputChange: Function,
      onInputPaste: Function,
      onInputKeyDown: Function,
      onInputMouseDown: Function,
      onInputCompositionStart: Function,
      onInputCompositionEnd: Function
    };
    const onPreventMouseDown = (event) => {
      event.preventDefault();
      event.stopPropagation();
    };
    const SelectSelector = /* @__PURE__ */ defineComponent({
      name: "MultipleSelectSelector",
      inheritAttrs: false,
      props: props$2,
      setup(props2) {
        const measureRef = shallowRef();
        const inputWidth = shallowRef(0);
        const focused = shallowRef(false);
        const legacyTreeSelectContext = useInjectLegacySelectContext();
        const selectionPrefixCls = computed(() => `${props2.prefixCls}-selection`);
        const inputValue = computed(() => props2.open || props2.mode === "tags" ? props2.searchValue : "");
        const inputEditable = computed(() => props2.mode === "tags" || props2.showSearch && (props2.open || focused.value));
        const targetValue = ref("");
        watchEffect(() => {
          targetValue.value = inputValue.value;
        });
        onMounted(() => {
          watch(targetValue, () => {
            inputWidth.value = measureRef.value.scrollWidth;
          }, {
            flush: "post",
            immediate: true
          });
        });
        function defaultRenderSelector(title, content, itemDisabled, closable, onClose) {
          return createVNode("span", {
            "class": classNames(`${selectionPrefixCls.value}-item`, {
              [`${selectionPrefixCls.value}-item-disabled`]: itemDisabled
            }),
            "title": typeof title === "string" || typeof title === "number" ? title.toString() : void 0
          }, [createVNode("span", {
            "class": `${selectionPrefixCls.value}-item-content`
          }, [content]), closable && createVNode(TransBtn, {
            "class": `${selectionPrefixCls.value}-item-remove`,
            "onMousedown": onPreventMouseDown,
            "onClick": onClose,
            "customizeIcon": props2.removeIcon
          }, {
            default: () => [createTextVNode("×")]
          })]);
        }
        function customizeRenderSelector(value, content, itemDisabled, closable, onClose, option) {
          var _a;
          const onMouseDown = (e2) => {
            onPreventMouseDown(e2);
            props2.onToggleOpen(!open);
          };
          let originData = option;
          if (legacyTreeSelectContext.keyEntities) {
            originData = ((_a = legacyTreeSelectContext.keyEntities[value]) === null || _a === void 0 ? void 0 : _a.node) || {};
          }
          return createVNode("span", {
            "key": value,
            "onMousedown": onMouseDown
          }, [props2.tagRender({
            label: content,
            value,
            disabled: itemDisabled,
            closable,
            onClose,
            option: originData
          })]);
        }
        function renderItem(valueItem) {
          const {
            disabled: itemDisabled,
            label,
            value,
            option
          } = valueItem;
          const closable = !props2.disabled && !itemDisabled;
          let displayLabel = label;
          if (typeof props2.maxTagTextLength === "number") {
            if (typeof label === "string" || typeof label === "number") {
              const strLabel = String(displayLabel);
              if (strLabel.length > props2.maxTagTextLength) {
                displayLabel = `${strLabel.slice(0, props2.maxTagTextLength)}...`;
              }
            }
          }
          const onClose = (event) => {
            var _a;
            if (event) event.stopPropagation();
            (_a = props2.onRemove) === null || _a === void 0 ? void 0 : _a.call(props2, valueItem);
          };
          return typeof props2.tagRender === "function" ? customizeRenderSelector(value, displayLabel, itemDisabled, closable, onClose, option) : defaultRenderSelector(label, displayLabel, itemDisabled, closable, onClose);
        }
        function renderRest(omittedValues) {
          const {
            maxTagPlaceholder = (omittedValues2) => `+ ${omittedValues2.length} ...`
          } = props2;
          const content = typeof maxTagPlaceholder === "function" ? maxTagPlaceholder(omittedValues) : maxTagPlaceholder;
          return defaultRenderSelector(content, content, false);
        }
        const handleInput = (e2) => {
          const composing = e2.target.composing;
          targetValue.value = e2.target.value;
          if (!composing) {
            props2.onInputChange(e2);
          }
        };
        return () => {
          const {
            id,
            prefixCls,
            values,
            open: open2,
            inputRef,
            placeholder,
            disabled,
            autofocus,
            autocomplete,
            activeDescendantId,
            tabindex,
            compositionStatus,
            onInputPaste,
            onInputKeyDown,
            onInputMouseDown,
            onInputCompositionStart,
            onInputCompositionEnd
          } = props2;
          const inputNode = createVNode("div", {
            "class": `${selectionPrefixCls.value}-search`,
            "style": {
              width: inputWidth.value + "px"
            },
            "key": "input"
          }, [createVNode(Input, {
            "inputRef": inputRef,
            "open": open2,
            "prefixCls": prefixCls,
            "id": id,
            "inputElement": null,
            "disabled": disabled,
            "autofocus": autofocus,
            "autocomplete": autocomplete,
            "editable": inputEditable.value,
            "activeDescendantId": activeDescendantId,
            "value": targetValue.value,
            "onKeydown": onInputKeyDown,
            "onMousedown": onInputMouseDown,
            "onChange": handleInput,
            "onPaste": onInputPaste,
            "onCompositionstart": onInputCompositionStart,
            "onCompositionend": onInputCompositionEnd,
            "tabindex": tabindex,
            "attrs": pickAttrs(props2, true),
            "onFocus": () => focused.value = true,
            "onBlur": () => focused.value = false
          }, null), createVNode("span", {
            "ref": measureRef,
            "class": `${selectionPrefixCls.value}-search-mirror`,
            "aria-hidden": true
          }, [targetValue.value, createTextVNode(" ")])]);
          const selectionNode = createVNode(Overflow, {
            "prefixCls": `${selectionPrefixCls.value}-overflow`,
            "data": values,
            "renderItem": renderItem,
            "renderRest": renderRest,
            "suffix": inputNode,
            "itemKey": "key",
            "maxCount": props2.maxTagCount,
            "key": "overflow"
          }, null);
          return createVNode(Fragment, null, [selectionNode, !values.length && !inputValue.value && !compositionStatus && createVNode("span", {
            "class": `${selectionPrefixCls.value}-placeholder`
          }, [placeholder])]);
        };
      }
    });
    const props$1 = {
      inputElement: PropTypes.any,
      id: String,
      prefixCls: String,
      values: PropTypes.array,
      open: {
        type: Boolean,
        default: void 0
      },
      searchValue: String,
      inputRef: PropTypes.any,
      placeholder: PropTypes.any,
      compositionStatus: {
        type: Boolean,
        default: void 0
      },
      disabled: {
        type: Boolean,
        default: void 0
      },
      mode: String,
      showSearch: {
        type: Boolean,
        default: void 0
      },
      autofocus: {
        type: Boolean,
        default: void 0
      },
      autocomplete: String,
      activeDescendantId: String,
      tabindex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
      activeValue: String,
      backfill: {
        type: Boolean,
        default: void 0
      },
      optionLabelRender: Function,
      onInputChange: Function,
      onInputPaste: Function,
      onInputKeyDown: Function,
      onInputMouseDown: Function,
      onInputCompositionStart: Function,
      onInputCompositionEnd: Function
    };
    const SingleSelector = /* @__PURE__ */ defineComponent({
      name: "SingleSelector",
      setup(props2) {
        const inputChanged = shallowRef(false);
        const combobox = computed(() => props2.mode === "combobox");
        const inputEditable = computed(() => combobox.value || props2.showSearch);
        const inputValue = computed(() => {
          let inputValue2 = props2.searchValue || "";
          if (combobox.value && props2.activeValue && !inputChanged.value) {
            inputValue2 = props2.activeValue;
          }
          return inputValue2;
        });
        const legacyTreeSelectContext = useInjectLegacySelectContext();
        watch([combobox, () => props2.activeValue], () => {
          if (combobox.value) {
            inputChanged.value = false;
          }
        }, {
          immediate: true
        });
        const hasTextInput = computed(() => props2.mode !== "combobox" && !props2.open && !props2.showSearch ? false : !!inputValue.value || props2.compositionStatus);
        const title = computed(() => {
          const item = props2.values[0];
          return item && (typeof item.label === "string" || typeof item.label === "number") ? item.label.toString() : void 0;
        });
        const renderPlaceholder = () => {
          if (props2.values[0]) {
            return null;
          }
          const hiddenStyle = hasTextInput.value ? {
            visibility: "hidden"
          } : void 0;
          return createVNode("span", {
            "class": `${props2.prefixCls}-selection-placeholder`,
            "style": hiddenStyle
          }, [props2.placeholder]);
        };
        const handleInput = (e2) => {
          const composing = e2.target.composing;
          if (!composing) {
            inputChanged.value = true;
            props2.onInputChange(e2);
          }
        };
        return () => {
          var _a, _b, _c, _d;
          const {
            inputElement,
            prefixCls,
            id,
            values,
            inputRef,
            disabled,
            autofocus,
            autocomplete,
            activeDescendantId,
            open: open2,
            tabindex,
            optionLabelRender,
            onInputKeyDown,
            onInputMouseDown,
            onInputPaste,
            onInputCompositionStart,
            onInputCompositionEnd
          } = props2;
          const item = values[0];
          let titleNode = null;
          if (item && legacyTreeSelectContext.customSlots) {
            const key2 = (_a = item.key) !== null && _a !== void 0 ? _a : item.value;
            const originData = ((_b = legacyTreeSelectContext.keyEntities[key2]) === null || _b === void 0 ? void 0 : _b.node) || {};
            titleNode = legacyTreeSelectContext.customSlots[(_c = originData.slots) === null || _c === void 0 ? void 0 : _c.title] || legacyTreeSelectContext.customSlots.title || item.label;
            if (typeof titleNode === "function") {
              titleNode = titleNode(originData);
            }
          } else {
            titleNode = optionLabelRender && item ? optionLabelRender(item.option) : item === null || item === void 0 ? void 0 : item.label;
          }
          return createVNode(Fragment, null, [createVNode("span", {
            "class": `${prefixCls}-selection-search`
          }, [createVNode(Input, {
            "inputRef": inputRef,
            "prefixCls": prefixCls,
            "id": id,
            "open": open2,
            "inputElement": inputElement,
            "disabled": disabled,
            "autofocus": autofocus,
            "autocomplete": autocomplete,
            "editable": inputEditable.value,
            "activeDescendantId": activeDescendantId,
            "value": inputValue.value,
            "onKeydown": onInputKeyDown,
            "onMousedown": onInputMouseDown,
            "onChange": handleInput,
            "onPaste": onInputPaste,
            "onCompositionstart": onInputCompositionStart,
            "onCompositionend": onInputCompositionEnd,
            "tabindex": tabindex,
            "attrs": pickAttrs(props2, true)
          }, null)]), !combobox.value && item && !hasTextInput.value && createVNode("span", {
            "class": `${prefixCls}-selection-item`,
            "title": title.value
          }, [createVNode(Fragment, {
            "key": (_d = item.key) !== null && _d !== void 0 ? _d : item.value
          }, [titleNode])]), renderPlaceholder()]);
        };
      }
    });
    SingleSelector.props = props$1;
    SingleSelector.inheritAttrs = false;
    function isValidateOpenKey(currentKeyCode) {
      return ![
        // System function button
        KeyCode.ESC,
        KeyCode.SHIFT,
        KeyCode.BACKSPACE,
        KeyCode.TAB,
        KeyCode.WIN_KEY,
        KeyCode.ALT,
        KeyCode.META,
        KeyCode.WIN_KEY_RIGHT,
        KeyCode.CTRL,
        KeyCode.SEMICOLON,
        KeyCode.EQUALS,
        KeyCode.CAPS_LOCK,
        KeyCode.CONTEXT_MENU,
        // F1-F12
        KeyCode.F1,
        KeyCode.F2,
        KeyCode.F3,
        KeyCode.F4,
        KeyCode.F5,
        KeyCode.F6,
        KeyCode.F7,
        KeyCode.F8,
        KeyCode.F9,
        KeyCode.F10,
        KeyCode.F11,
        KeyCode.F12
      ].includes(currentKeyCode);
    }
    function useLock() {
      let duration = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250;
      let lock = null;
      let timeout;
      onBeforeUnmount(() => {
        clearTimeout(timeout);
      });
      function doLock(locked) {
        if (locked || lock === null) {
          lock = locked;
        }
        clearTimeout(timeout);
        timeout = setTimeout(() => {
          lock = null;
        }, duration);
      }
      return [() => lock, doLock];
    }
    function createRef() {
      const func = (node2) => {
        func.current = node2;
      };
      return func;
    }
    const Selector = /* @__PURE__ */ defineComponent({
      name: "Selector",
      inheritAttrs: false,
      props: {
        id: String,
        prefixCls: String,
        showSearch: {
          type: Boolean,
          default: void 0
        },
        open: {
          type: Boolean,
          default: void 0
        },
        /** Display in the Selector value, it's not same as `value` prop */
        values: PropTypes.array,
        multiple: {
          type: Boolean,
          default: void 0
        },
        mode: String,
        searchValue: String,
        activeValue: String,
        inputElement: PropTypes.any,
        autofocus: {
          type: Boolean,
          default: void 0
        },
        activeDescendantId: String,
        tabindex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
        disabled: {
          type: Boolean,
          default: void 0
        },
        placeholder: PropTypes.any,
        removeIcon: PropTypes.any,
        // Tags
        maxTagCount: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
        maxTagTextLength: Number,
        maxTagPlaceholder: PropTypes.any,
        tagRender: Function,
        optionLabelRender: Function,
        /** Check if `tokenSeparators` contains `\n` or `\r\n` */
        tokenWithEnter: {
          type: Boolean,
          default: void 0
        },
        // Motion
        choiceTransitionName: String,
        onToggleOpen: {
          type: Function
        },
        /** `onSearch` returns go next step boolean to check if need do toggle open */
        onSearch: Function,
        onSearchSubmit: Function,
        onRemove: Function,
        onInputKeyDown: {
          type: Function
        },
        /**
         * @private get real dom for trigger align.
         * This may be removed after React provides replacement of `findDOMNode`
         */
        domRef: Function
      },
      setup(props2, _ref) {
        let {
          expose
        } = _ref;
        const inputRef = createRef();
        const compositionStatus = ref(false);
        const [getInputMouseDown, setInputMouseDown] = useLock(0);
        const onInternalInputKeyDown = (event) => {
          const {
            which
          } = event;
          if (which === KeyCode.UP || which === KeyCode.DOWN) {
            event.preventDefault();
          }
          if (props2.onInputKeyDown) {
            props2.onInputKeyDown(event);
          }
          if (which === KeyCode.ENTER && props2.mode === "tags" && !compositionStatus.value && !props2.open) {
            props2.onSearchSubmit(event.target.value);
          }
          if (isValidateOpenKey(which)) {
            props2.onToggleOpen(true);
          }
        };
        const onInternalInputMouseDown = () => {
          setInputMouseDown(true);
        };
        let pastedText = null;
        const triggerOnSearch = (value) => {
          if (props2.onSearch(value, true, compositionStatus.value) !== false) {
            props2.onToggleOpen(true);
          }
        };
        const onInputCompositionStart = () => {
          compositionStatus.value = true;
        };
        const onInputCompositionEnd = (e2) => {
          compositionStatus.value = false;
          if (props2.mode !== "combobox") {
            triggerOnSearch(e2.target.value);
          }
        };
        const onInputChange = (event) => {
          let {
            target: {
              value
            }
          } = event;
          if (props2.tokenWithEnter && pastedText && /[\r\n]/.test(pastedText)) {
            const replacedText = pastedText.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
            value = value.replace(replacedText, pastedText);
          }
          pastedText = null;
          triggerOnSearch(value);
        };
        const onInputPaste = (e2) => {
          const {
            clipboardData
          } = e2;
          const value = clipboardData.getData("text");
          pastedText = value;
        };
        const onClick = (_ref2) => {
          let {
            target
          } = _ref2;
          if (target !== inputRef.current) {
            const isIE = document.body.style.msTouchAction !== void 0;
            if (isIE) {
              setTimeout(() => {
                inputRef.current.focus();
              });
            } else {
              inputRef.current.focus();
            }
          }
        };
        const onMousedown = (event) => {
          const inputMouseDown = getInputMouseDown();
          if (event.target !== inputRef.current && !inputMouseDown) {
            event.preventDefault();
          }
          if (props2.mode !== "combobox" && (!props2.showSearch || !inputMouseDown) || !props2.open) {
            if (props2.open) {
              props2.onSearch("", true, false);
            }
            props2.onToggleOpen();
          }
        };
        expose({
          focus: () => {
            inputRef.current.focus();
          },
          blur: () => {
            inputRef.current.blur();
          }
        });
        return () => {
          const {
            prefixCls,
            domRef,
            mode
          } = props2;
          const sharedProps = {
            inputRef,
            onInputKeyDown: onInternalInputKeyDown,
            onInputMouseDown: onInternalInputMouseDown,
            onInputChange,
            onInputPaste,
            compositionStatus: compositionStatus.value,
            onInputCompositionStart,
            onInputCompositionEnd
          };
          const selectNode = mode === "multiple" || mode === "tags" ? createVNode(SelectSelector, _objectSpread2$1(_objectSpread2$1({}, props2), sharedProps), null) : createVNode(SingleSelector, _objectSpread2$1(_objectSpread2$1({}, props2), sharedProps), null);
          return createVNode("div", {
            "ref": domRef,
            "class": `${prefixCls}-selector`,
            "onClick": onClick,
            "onMousedown": onMousedown
          }, [selectNode]);
        };
      }
    });
    function useSelectTriggerControl(refs, open2, triggerOpen) {
      function onGlobalMouseDown(event) {
        var _a, _b, _c;
        let target = event.target;
        if (target.shadowRoot && event.composed) {
          target = event.composedPath()[0] || target;
        }
        const elements = [(_a = refs[0]) === null || _a === void 0 ? void 0 : _a.value, (_c = (_b = refs[1]) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.getPopupElement()];
        if (open2.value && elements.every((element) => element && !element.contains(target) && element !== target)) {
          triggerOpen(false);
        }
      }
      onMounted(() => {
        window.addEventListener("mousedown", onGlobalMouseDown);
      });
      onBeforeUnmount(() => {
        window.removeEventListener("mousedown", onGlobalMouseDown);
      });
    }
    function useDelayReset() {
      let timeout = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
      const bool = shallowRef(false);
      let delay;
      const cancelLatest = () => {
        clearTimeout(delay);
      };
      onMounted(() => {
        cancelLatest();
      });
      const delaySetBool = (value, callback) => {
        cancelLatest();
        delay = setTimeout(() => {
          bool.value = value;
          if (callback) {
            callback();
          }
        }, timeout);
      };
      return [bool, delaySetBool, cancelLatest];
    }
    const BaseSelectContextKey = Symbol("BaseSelectContextKey");
    function useProvideBaseSelectProps(props2) {
      return provide(BaseSelectContextKey, props2);
    }
    function useBaseProps() {
      return inject(BaseSelectContextKey, {});
    }
    const isMobile = () => {
      if (typeof navigator === "undefined" || typeof window === "undefined") {
        return false;
      }
      const agent = navigator.userAgent || navigator.vendor || window.opera;
      return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent === null || agent === void 0 ? void 0 : agent.substring(0, 4));
    };
    function toReactive(objectRef) {
      if (!isRef(objectRef)) return reactive(objectRef);
      const proxy = new Proxy({}, {
        get(_2, p2, receiver) {
          return Reflect.get(objectRef.value, p2, receiver);
        },
        set(_2, p2, value) {
          objectRef.value[p2] = value;
          return true;
        },
        deleteProperty(_2, p2) {
          return Reflect.deleteProperty(objectRef.value, p2);
        },
        has(_2, p2) {
          return Reflect.has(objectRef.value, p2);
        },
        ownKeys() {
          return Object.keys(objectRef.value);
        },
        getOwnPropertyDescriptor() {
          return {
            enumerable: true,
            configurable: true
          };
        }
      });
      return reactive(proxy);
    }
    var __rest$e = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const DEFAULT_OMIT_PROPS = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"];
    const baseSelectPrivateProps = () => {
      return {
        prefixCls: String,
        id: String,
        omitDomProps: Array,
        // >>> Value
        displayValues: Array,
        onDisplayValuesChange: Function,
        // >>> Active
        /** Current dropdown list active item string value */
        activeValue: String,
        /** Link search input with target element */
        activeDescendantId: String,
        onActiveValueChange: Function,
        // >>> Search
        searchValue: String,
        /** Trigger onSearch, return false to prevent trigger open event */
        onSearch: Function,
        /** Trigger when search text match the `tokenSeparators`. Will provide split content */
        onSearchSplit: Function,
        maxLength: Number,
        OptionList: PropTypes.any,
        /** Tell if provided `options` is empty */
        emptyOptions: Boolean
      };
    };
    const baseSelectPropsWithoutPrivate = () => {
      return {
        showSearch: {
          type: Boolean,
          default: void 0
        },
        tagRender: {
          type: Function
        },
        optionLabelRender: {
          type: Function
        },
        direction: {
          type: String
        },
        // MISC
        tabindex: Number,
        autofocus: Boolean,
        notFoundContent: PropTypes.any,
        placeholder: PropTypes.any,
        onClear: Function,
        choiceTransitionName: String,
        // >>> Mode
        mode: String,
        // >>> Status
        disabled: {
          type: Boolean,
          default: void 0
        },
        loading: {
          type: Boolean,
          default: void 0
        },
        // >>> Open
        open: {
          type: Boolean,
          default: void 0
        },
        defaultOpen: {
          type: Boolean,
          default: void 0
        },
        onDropdownVisibleChange: {
          type: Function
        },
        // >>> Customize Input
        /** @private Internal usage. Do not use in your production. */
        getInputElement: {
          type: Function
        },
        /** @private Internal usage. Do not use in your production. */
        getRawInputElement: {
          type: Function
        },
        // >>> Selector
        maxTagTextLength: Number,
        maxTagCount: {
          type: [String, Number]
        },
        maxTagPlaceholder: PropTypes.any,
        // >>> Search
        tokenSeparators: {
          type: Array
        },
        // >>> Icons
        allowClear: {
          type: Boolean,
          default: void 0
        },
        showArrow: {
          type: Boolean,
          default: void 0
        },
        inputIcon: PropTypes.any,
        /** Clear all icon */
        clearIcon: PropTypes.any,
        /** Selector remove icon */
        removeIcon: PropTypes.any,
        // >>> Dropdown
        animation: String,
        transitionName: String,
        dropdownStyle: {
          type: Object
        },
        dropdownClassName: String,
        dropdownMatchSelectWidth: {
          type: [Boolean, Number],
          default: void 0
        },
        dropdownRender: {
          type: Function
        },
        dropdownAlign: Object,
        placement: {
          type: String
        },
        getPopupContainer: {
          type: Function
        },
        // >>> Focus
        showAction: {
          type: Array
        },
        onBlur: {
          type: Function
        },
        onFocus: {
          type: Function
        },
        // >>> Rest Events
        onKeyup: Function,
        onKeydown: Function,
        onMousedown: Function,
        onPopupScroll: Function,
        onInputKeyDown: Function,
        onMouseenter: Function,
        onMouseleave: Function,
        onClick: Function
      };
    };
    const baseSelectProps = () => {
      return _extends$1(_extends$1({}, baseSelectPrivateProps()), baseSelectPropsWithoutPrivate());
    };
    function isMultiple(mode) {
      return mode === "tags" || mode === "multiple";
    }
    const BaseSelect = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "BaseSelect",
      inheritAttrs: false,
      props: initDefaultProps(baseSelectProps(), {
        showAction: [],
        notFoundContent: "Not Found"
      }),
      setup(props2, _ref) {
        let {
          attrs,
          expose,
          slots
        } = _ref;
        const multiple = computed(() => isMultiple(props2.mode));
        const mergedShowSearch = computed(() => props2.showSearch !== void 0 ? props2.showSearch : multiple.value || props2.mode === "combobox");
        const mobile = shallowRef(false);
        onMounted(() => {
          mobile.value = isMobile();
        });
        const legacyTreeSelectContext = useInjectLegacySelectContext();
        const containerRef = shallowRef(null);
        const selectorDomRef = createRef();
        const triggerRef2 = shallowRef(null);
        const selectorRef = shallowRef(null);
        const listRef = shallowRef(null);
        const blurRef = ref(false);
        const [mockFocused, setMockFocused, cancelSetMockFocused] = useDelayReset();
        const focus = () => {
          var _a;
          (_a = selectorRef.value) === null || _a === void 0 ? void 0 : _a.focus();
        };
        const blur = () => {
          var _a;
          (_a = selectorRef.value) === null || _a === void 0 ? void 0 : _a.blur();
        };
        expose({
          focus,
          blur,
          scrollTo: (arg) => {
            var _a;
            return (_a = listRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(arg);
          }
        });
        const mergedSearchValue = computed(() => {
          var _a;
          if (props2.mode !== "combobox") {
            return props2.searchValue;
          }
          const val = (_a = props2.displayValues[0]) === null || _a === void 0 ? void 0 : _a.value;
          return typeof val === "string" || typeof val === "number" ? String(val) : "";
        });
        const initOpen = props2.open !== void 0 ? props2.open : props2.defaultOpen;
        const innerOpen = shallowRef(initOpen);
        const mergedOpen = shallowRef(initOpen);
        const setInnerOpen = (val) => {
          innerOpen.value = props2.open !== void 0 ? props2.open : val;
          mergedOpen.value = innerOpen.value;
        };
        watch(() => props2.open, () => {
          setInnerOpen(props2.open);
        });
        const emptyListContent = computed(() => !props2.notFoundContent && props2.emptyOptions);
        watchEffect(() => {
          mergedOpen.value = innerOpen.value;
          if (props2.disabled || emptyListContent.value && mergedOpen.value && props2.mode === "combobox") {
            mergedOpen.value = false;
          }
        });
        const triggerOpen = computed(() => emptyListContent.value ? false : mergedOpen.value);
        const onToggleOpen = (newOpen) => {
          const nextOpen = newOpen !== void 0 ? newOpen : !mergedOpen.value;
          if (mergedOpen.value !== nextOpen && !props2.disabled) {
            setInnerOpen(nextOpen);
            props2.onDropdownVisibleChange && props2.onDropdownVisibleChange(nextOpen);
          }
        };
        const tokenWithEnter = computed(() => (props2.tokenSeparators || []).some((tokenSeparator) => ["\n", "\r\n"].includes(tokenSeparator)));
        const onInternalSearch = (searchText, fromTyping, isCompositing) => {
          var _a, _b;
          let ret = true;
          let newSearchText = searchText;
          (_a = props2.onActiveValueChange) === null || _a === void 0 ? void 0 : _a.call(props2, null);
          const patchLabels = isCompositing ? null : getSeparatedContent(searchText, props2.tokenSeparators);
          if (props2.mode !== "combobox" && patchLabels) {
            newSearchText = "";
            (_b = props2.onSearchSplit) === null || _b === void 0 ? void 0 : _b.call(props2, patchLabels);
            onToggleOpen(false);
            ret = false;
          }
          if (props2.onSearch && mergedSearchValue.value !== newSearchText) {
            props2.onSearch(newSearchText, {
              source: fromTyping ? "typing" : "effect"
            });
          }
          return ret;
        };
        const onInternalSearchSubmit = (searchText) => {
          var _a;
          if (!searchText || !searchText.trim()) {
            return;
          }
          (_a = props2.onSearch) === null || _a === void 0 ? void 0 : _a.call(props2, searchText, {
            source: "submit"
          });
        };
        watch(mergedOpen, () => {
          if (!mergedOpen.value && !multiple.value && props2.mode !== "combobox") {
            onInternalSearch("", false, false);
          }
        }, {
          immediate: true,
          flush: "post"
        });
        watch(() => props2.disabled, () => {
          if (innerOpen.value && !!props2.disabled) {
            setInnerOpen(false);
          }
          if (props2.disabled && !blurRef.value) {
            setMockFocused(false);
          }
        }, {
          immediate: true
        });
        const [getClearLock, setClearLock] = useLock();
        const onInternalKeyDown = function(event) {
          var _a;
          const clearLock = getClearLock();
          const {
            which
          } = event;
          if (which === KeyCode.ENTER) {
            if (props2.mode !== "combobox") {
              event.preventDefault();
            }
            if (!mergedOpen.value) {
              onToggleOpen(true);
            }
          }
          setClearLock(!!mergedSearchValue.value);
          if (which === KeyCode.BACKSPACE && !clearLock && multiple.value && !mergedSearchValue.value && props2.displayValues.length) {
            const cloneDisplayValues = [...props2.displayValues];
            let removedDisplayValue = null;
            for (let i2 = cloneDisplayValues.length - 1; i2 >= 0; i2 -= 1) {
              const current = cloneDisplayValues[i2];
              if (!current.disabled) {
                cloneDisplayValues.splice(i2, 1);
                removedDisplayValue = current;
                break;
              }
            }
            if (removedDisplayValue) {
              props2.onDisplayValuesChange(cloneDisplayValues, {
                type: "remove",
                values: [removedDisplayValue]
              });
            }
          }
          for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
            rest[_key - 1] = arguments[_key];
          }
          if (mergedOpen.value && listRef.value) {
            listRef.value.onKeydown(event, ...rest);
          }
          (_a = props2.onKeydown) === null || _a === void 0 ? void 0 : _a.call(props2, event, ...rest);
        };
        const onInternalKeyUp = function(event) {
          for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
            rest[_key2 - 1] = arguments[_key2];
          }
          if (mergedOpen.value && listRef.value) {
            listRef.value.onKeyup(event, ...rest);
          }
          if (props2.onKeyup) {
            props2.onKeyup(event, ...rest);
          }
        };
        const onSelectorRemove = (val) => {
          const newValues = props2.displayValues.filter((i2) => i2 !== val);
          props2.onDisplayValuesChange(newValues, {
            type: "remove",
            values: [val]
          });
        };
        const focusRef = shallowRef(false);
        const onContainerFocus = function() {
          setMockFocused(true);
          if (!props2.disabled) {
            if (props2.onFocus && !focusRef.value) {
              props2.onFocus(...arguments);
            }
            if (props2.showAction && props2.showAction.includes("focus")) {
              onToggleOpen(true);
            }
          }
          focusRef.value = true;
        };
        const popupFocused = ref(false);
        const onContainerBlur = function() {
          if (popupFocused.value) {
            return;
          }
          blurRef.value = true;
          setMockFocused(false, () => {
            focusRef.value = false;
            blurRef.value = false;
            onToggleOpen(false);
          });
          if (props2.disabled) {
            return;
          }
          const searchVal = mergedSearchValue.value;
          if (searchVal) {
            if (props2.mode === "tags") {
              props2.onSearch(searchVal, {
                source: "submit"
              });
            } else if (props2.mode === "multiple") {
              props2.onSearch("", {
                source: "blur"
              });
            }
          }
          if (props2.onBlur) {
            props2.onBlur(...arguments);
          }
        };
        const onPopupFocusin = () => {
          popupFocused.value = true;
        };
        const onPopupFocusout = () => {
          popupFocused.value = false;
        };
        provide("VCSelectContainerEvent", {
          focus: onContainerFocus,
          blur: onContainerBlur
        });
        const activeTimeoutIds = [];
        onMounted(() => {
          activeTimeoutIds.forEach((timeoutId) => clearTimeout(timeoutId));
          activeTimeoutIds.splice(0, activeTimeoutIds.length);
        });
        onBeforeUnmount(() => {
          activeTimeoutIds.forEach((timeoutId) => clearTimeout(timeoutId));
          activeTimeoutIds.splice(0, activeTimeoutIds.length);
        });
        const onInternalMouseDown = function(event) {
          var _a, _b;
          const {
            target
          } = event;
          const popupElement = (_a = triggerRef2.value) === null || _a === void 0 ? void 0 : _a.getPopupElement();
          if (popupElement && popupElement.contains(target)) {
            const timeoutId = setTimeout(() => {
              var _a2;
              const index2 = activeTimeoutIds.indexOf(timeoutId);
              if (index2 !== -1) {
                activeTimeoutIds.splice(index2, 1);
              }
              cancelSetMockFocused();
              if (!mobile.value && !popupElement.contains(document.activeElement)) {
                (_a2 = selectorRef.value) === null || _a2 === void 0 ? void 0 : _a2.focus();
              }
            });
            activeTimeoutIds.push(timeoutId);
          }
          for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
            restArgs[_key3 - 1] = arguments[_key3];
          }
          (_b = props2.onMousedown) === null || _b === void 0 ? void 0 : _b.call(props2, event, ...restArgs);
        };
        const containerWidth = shallowRef(null);
        const onPopupMouseEnter = () => {
        };
        onMounted(() => {
          watch(triggerOpen, () => {
            var _a;
            if (triggerOpen.value) {
              const newWidth = Math.ceil((_a = containerRef.value) === null || _a === void 0 ? void 0 : _a.offsetWidth);
              if (containerWidth.value !== newWidth && !Number.isNaN(newWidth)) {
                containerWidth.value = newWidth;
              }
            }
          }, {
            immediate: true,
            flush: "post"
          });
        });
        useSelectTriggerControl([containerRef, triggerRef2], triggerOpen, onToggleOpen);
        useProvideBaseSelectProps(toReactive(_extends$1(_extends$1({}, toRefs(props2)), {
          open: mergedOpen,
          triggerOpen,
          showSearch: mergedShowSearch,
          multiple,
          toggleOpen: onToggleOpen
        })));
        return () => {
          const _a = _extends$1(_extends$1({}, props2), attrs), {
            prefixCls,
            id,
            open: open2,
            defaultOpen,
            mode,
            // Search related
            showSearch,
            searchValue,
            onSearch,
            // Icons
            allowClear,
            clearIcon,
            showArrow,
            inputIcon,
            // Others
            disabled,
            loading,
            getInputElement,
            getPopupContainer,
            placement,
            // Dropdown
            animation,
            transitionName: transitionName2,
            dropdownStyle,
            dropdownClassName,
            dropdownMatchSelectWidth,
            dropdownRender,
            dropdownAlign,
            showAction,
            direction,
            // Tags
            tokenSeparators,
            tagRender,
            optionLabelRender,
            // Events
            onPopupScroll,
            onDropdownVisibleChange,
            onFocus,
            onBlur,
            onKeyup,
            onKeydown,
            onMousedown,
            onClear,
            omitDomProps,
            getRawInputElement,
            displayValues,
            onDisplayValuesChange,
            emptyOptions,
            activeDescendantId,
            activeValue,
            OptionList: OptionList2
          } = _a, restProps = __rest$e(_a, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]);
          const customizeInputElement = mode === "combobox" && getInputElement && getInputElement() || null;
          const customizeRawInputElement = typeof getRawInputElement === "function" && getRawInputElement();
          const domProps = _extends$1({}, restProps);
          let onTriggerVisibleChange;
          if (customizeRawInputElement) {
            onTriggerVisibleChange = (newOpen) => {
              onToggleOpen(newOpen);
            };
          }
          DEFAULT_OMIT_PROPS.forEach((propName) => {
            delete domProps[propName];
          });
          omitDomProps === null || omitDomProps === void 0 ? void 0 : omitDomProps.forEach((propName) => {
            delete domProps[propName];
          });
          const mergedShowArrow = showArrow !== void 0 ? showArrow : loading || !multiple.value && mode !== "combobox";
          let arrowNode;
          if (mergedShowArrow) {
            arrowNode = createVNode(TransBtn, {
              "class": classNames(`${prefixCls}-arrow`, {
                [`${prefixCls}-arrow-loading`]: loading
              }),
              "customizeIcon": inputIcon,
              "customizeIconProps": {
                loading,
                searchValue: mergedSearchValue.value,
                open: mergedOpen.value,
                focused: mockFocused.value,
                showSearch: mergedShowSearch.value
              }
            }, null);
          }
          let clearNode;
          const onClearMouseDown = () => {
            onClear === null || onClear === void 0 ? void 0 : onClear();
            onDisplayValuesChange([], {
              type: "clear",
              values: displayValues
            });
            onInternalSearch("", false, false);
          };
          if (!disabled && allowClear && (displayValues.length || mergedSearchValue.value)) {
            clearNode = createVNode(TransBtn, {
              "class": `${prefixCls}-clear`,
              "onMousedown": onClearMouseDown,
              "customizeIcon": clearIcon
            }, {
              default: () => [createTextVNode("×")]
            });
          }
          const optionList = createVNode(OptionList2, {
            "ref": listRef
          }, _extends$1(_extends$1({}, legacyTreeSelectContext.customSlots), {
            option: slots.option
          }));
          const mergedClassName = classNames(prefixCls, attrs.class, {
            [`${prefixCls}-focused`]: mockFocused.value,
            [`${prefixCls}-multiple`]: multiple.value,
            [`${prefixCls}-single`]: !multiple.value,
            [`${prefixCls}-allow-clear`]: allowClear,
            [`${prefixCls}-show-arrow`]: mergedShowArrow,
            [`${prefixCls}-disabled`]: disabled,
            [`${prefixCls}-loading`]: loading,
            [`${prefixCls}-open`]: mergedOpen.value,
            [`${prefixCls}-customize-input`]: customizeInputElement,
            [`${prefixCls}-show-search`]: mergedShowSearch.value
          });
          const selectorNode = createVNode(SelectTrigger, {
            "ref": triggerRef2,
            "disabled": disabled,
            "prefixCls": prefixCls,
            "visible": triggerOpen.value,
            "popupElement": optionList,
            "containerWidth": containerWidth.value,
            "animation": animation,
            "transitionName": transitionName2,
            "dropdownStyle": dropdownStyle,
            "dropdownClassName": dropdownClassName,
            "direction": direction,
            "dropdownMatchSelectWidth": dropdownMatchSelectWidth,
            "dropdownRender": dropdownRender,
            "dropdownAlign": dropdownAlign,
            "placement": placement,
            "getPopupContainer": getPopupContainer,
            "empty": emptyOptions,
            "getTriggerDOMNode": () => selectorDomRef.current,
            "onPopupVisibleChange": onTriggerVisibleChange,
            "onPopupMouseEnter": onPopupMouseEnter,
            "onPopupFocusin": onPopupFocusin,
            "onPopupFocusout": onPopupFocusout
          }, {
            default: () => {
              return customizeRawInputElement ? isValidElement(customizeRawInputElement) && cloneElement(customizeRawInputElement, {
                ref: selectorDomRef
              }, false, true) : createVNode(Selector, _objectSpread2$1(_objectSpread2$1({}, props2), {}, {
                "domRef": selectorDomRef,
                "prefixCls": prefixCls,
                "inputElement": customizeInputElement,
                "ref": selectorRef,
                "id": id,
                "showSearch": mergedShowSearch.value,
                "mode": mode,
                "activeDescendantId": activeDescendantId,
                "tagRender": tagRender,
                "optionLabelRender": optionLabelRender,
                "values": displayValues,
                "open": mergedOpen.value,
                "onToggleOpen": onToggleOpen,
                "activeValue": activeValue,
                "searchValue": mergedSearchValue.value,
                "onSearch": onInternalSearch,
                "onSearchSubmit": onInternalSearchSubmit,
                "onRemove": onSelectorRemove,
                "tokenWithEnter": tokenWithEnter.value
              }), null);
            }
          });
          let renderNode;
          if (customizeRawInputElement) {
            renderNode = selectorNode;
          } else {
            renderNode = createVNode("div", _objectSpread2$1(_objectSpread2$1({}, domProps), {}, {
              "class": mergedClassName,
              "ref": containerRef,
              "onMousedown": onInternalMouseDown,
              "onKeydown": onInternalKeyDown,
              "onKeyup": onInternalKeyUp
            }), [mockFocused.value && !mergedOpen.value && createVNode("span", {
              "style": {
                width: 0,
                height: 0,
                position: "absolute",
                overflow: "hidden",
                opacity: 0
              },
              "aria-live": "polite"
            }, [`${displayValues.map((_ref2) => {
              let {
                label,
                value
              } = _ref2;
              return ["number", "string"].includes(typeof label) ? label : value;
            }).join(", ")}`]), selectorNode, arrowNode, clearNode]);
          }
          return renderNode;
        };
      }
    });
    const Filter = (_ref, _ref2) => {
      let {
        height,
        offset,
        prefixCls,
        onInnerResize
      } = _ref;
      let {
        slots
      } = _ref2;
      var _a;
      let outerStyle = {};
      let innerStyle = {
        display: "flex",
        flexDirection: "column"
      };
      if (offset !== void 0) {
        outerStyle = {
          height: `${height}px`,
          position: "relative",
          overflow: "hidden"
        };
        innerStyle = _extends$1(_extends$1({}, innerStyle), {
          transform: `translateY(${offset}px)`,
          position: "absolute",
          left: 0,
          right: 0,
          top: 0
        });
      }
      return createVNode("div", {
        "style": outerStyle
      }, [createVNode(ResizeObserver$1, {
        "onResize": (_ref3) => {
          let {
            offsetHeight
          } = _ref3;
          if (offsetHeight && onInnerResize) {
            onInnerResize();
          }
        }
      }, {
        default: () => [createVNode("div", {
          "style": innerStyle,
          "class": classNames({
            [`${prefixCls}-holder-inner`]: prefixCls
          })
        }, [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)])]
      })]);
    };
    Filter.displayName = "Filter";
    Filter.inheritAttrs = false;
    Filter.props = {
      prefixCls: String,
      /** Virtual filler height. Should be `count * itemMinHeight` */
      height: Number,
      /** Set offset of visible items. Should be the top of start item position */
      offset: Number,
      onInnerResize: Function
    };
    const Item = (_ref, _ref2) => {
      let {
        setRef: setRef2
      } = _ref;
      let {
        slots
      } = _ref2;
      var _a;
      const children = flattenChildren((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
      return children && children.length ? cloneVNode(children[0], {
        ref: setRef2
      }) : children;
    };
    Item.props = {
      setRef: {
        type: Function,
        default: () => {
        }
      }
    };
    const MIN_SIZE = 20;
    function getPageY(e2) {
      return "touches" in e2 ? e2.touches[0].pageY : e2.pageY;
    }
    const ScrollBar = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ScrollBar",
      inheritAttrs: false,
      props: {
        prefixCls: String,
        scrollTop: Number,
        scrollHeight: Number,
        height: Number,
        count: Number,
        onScroll: {
          type: Function
        },
        onStartMove: {
          type: Function
        },
        onStopMove: {
          type: Function
        }
      },
      setup() {
        return {
          moveRaf: null,
          scrollbarRef: createRef(),
          thumbRef: createRef(),
          visibleTimeout: null,
          state: reactive({
            dragging: false,
            pageY: null,
            startTop: null,
            visible: false
          })
        };
      },
      watch: {
        scrollTop: {
          handler() {
            this.delayHidden();
          },
          flush: "post"
        }
      },
      mounted() {
        var _a, _b;
        (_a = this.scrollbarRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener("touchstart", this.onScrollbarTouchStart, supportsPassive ? {
          passive: false
        } : false);
        (_b = this.thumbRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener("touchstart", this.onMouseDown, supportsPassive ? {
          passive: false
        } : false);
      },
      beforeUnmount() {
        this.removeEvents();
        clearTimeout(this.visibleTimeout);
      },
      methods: {
        delayHidden() {
          clearTimeout(this.visibleTimeout);
          this.state.visible = true;
          this.visibleTimeout = setTimeout(() => {
            this.state.visible = false;
          }, 2e3);
        },
        onScrollbarTouchStart(e2) {
          e2.preventDefault();
        },
        onContainerMouseDown(e2) {
          e2.stopPropagation();
          e2.preventDefault();
        },
        // ======================= Clean =======================
        patchEvents() {
          window.addEventListener("mousemove", this.onMouseMove);
          window.addEventListener("mouseup", this.onMouseUp);
          this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, supportsPassive ? {
            passive: false
          } : false);
          this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
        },
        removeEvents() {
          window.removeEventListener("mousemove", this.onMouseMove);
          window.removeEventListener("mouseup", this.onMouseUp);
          this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, supportsPassive ? {
            passive: false
          } : false);
          if (this.thumbRef.current) {
            this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, supportsPassive ? {
              passive: false
            } : false);
            this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, supportsPassive ? {
              passive: false
            } : false);
            this.thumbRef.current.removeEventListener("touchend", this.onMouseUp);
          }
          wrapperRaf.cancel(this.moveRaf);
        },
        // ======================= Thumb =======================
        onMouseDown(e2) {
          const {
            onStartMove
          } = this.$props;
          _extends$1(this.state, {
            dragging: true,
            pageY: getPageY(e2),
            startTop: this.getTop()
          });
          onStartMove();
          this.patchEvents();
          e2.stopPropagation();
          e2.preventDefault();
        },
        onMouseMove(e2) {
          const {
            dragging,
            pageY,
            startTop
          } = this.state;
          const {
            onScroll
          } = this.$props;
          wrapperRaf.cancel(this.moveRaf);
          if (dragging) {
            const offsetY = getPageY(e2) - pageY;
            const newTop = startTop + offsetY;
            const enableScrollRange = this.getEnableScrollRange();
            const enableHeightRange = this.getEnableHeightRange();
            const ptg = enableHeightRange ? newTop / enableHeightRange : 0;
            const newScrollTop = Math.ceil(ptg * enableScrollRange);
            this.moveRaf = wrapperRaf(() => {
              onScroll(newScrollTop);
            });
          }
        },
        onMouseUp() {
          const {
            onStopMove
          } = this.$props;
          this.state.dragging = false;
          onStopMove();
          this.removeEvents();
        },
        // ===================== Calculate =====================
        getSpinHeight() {
          const {
            height,
            scrollHeight
          } = this.$props;
          let baseHeight = height / scrollHeight * 100;
          baseHeight = Math.max(baseHeight, MIN_SIZE);
          baseHeight = Math.min(baseHeight, height / 2);
          return Math.floor(baseHeight);
        },
        getEnableScrollRange() {
          const {
            scrollHeight,
            height
          } = this.$props;
          return scrollHeight - height || 0;
        },
        getEnableHeightRange() {
          const {
            height
          } = this.$props;
          const spinHeight = this.getSpinHeight();
          return height - spinHeight || 0;
        },
        getTop() {
          const {
            scrollTop
          } = this.$props;
          const enableScrollRange = this.getEnableScrollRange();
          const enableHeightRange = this.getEnableHeightRange();
          if (scrollTop === 0 || enableScrollRange === 0) {
            return 0;
          }
          const ptg = scrollTop / enableScrollRange;
          return ptg * enableHeightRange;
        },
        // Not show scrollbar when height is large than scrollHeight
        showScroll() {
          const {
            height,
            scrollHeight
          } = this.$props;
          return scrollHeight > height;
        }
      },
      render() {
        const {
          dragging,
          visible
        } = this.state;
        const {
          prefixCls
        } = this.$props;
        const spinHeight = this.getSpinHeight() + "px";
        const top = this.getTop() + "px";
        const canScroll = this.showScroll();
        const mergedVisible = canScroll && visible;
        return createVNode("div", {
          "ref": this.scrollbarRef,
          "class": classNames(`${prefixCls}-scrollbar`, {
            [`${prefixCls}-scrollbar-show`]: canScroll
          }),
          "style": {
            width: "8px",
            top: 0,
            bottom: 0,
            right: 0,
            position: "absolute",
            display: mergedVisible ? void 0 : "none"
          },
          "onMousedown": this.onContainerMouseDown,
          "onMousemove": this.delayHidden
        }, [createVNode("div", {
          "ref": this.thumbRef,
          "class": classNames(`${prefixCls}-scrollbar-thumb`, {
            [`${prefixCls}-scrollbar-thumb-moving`]: dragging
          }),
          "style": {
            width: "100%",
            height: spinHeight,
            top,
            left: 0,
            position: "absolute",
            background: "rgba(0, 0, 0, 0.5)",
            borderRadius: "99px",
            cursor: "pointer",
            userSelect: "none"
          },
          "onMousedown": this.onMouseDown
        }, null)]);
      }
    });
    function useHeights(mergedData, getKey2, onItemAdd, onItemRemove) {
      const instance = /* @__PURE__ */ new Map();
      const heights = /* @__PURE__ */ new Map();
      const updatedMark = ref(Symbol("update"));
      watch(mergedData, () => {
        updatedMark.value = Symbol("update");
      });
      let collectRaf = void 0;
      function cancelRaf() {
        wrapperRaf.cancel(collectRaf);
      }
      function collectHeight() {
        cancelRaf();
        collectRaf = wrapperRaf(() => {
          instance.forEach((element, key2) => {
            if (element && element.offsetParent) {
              const {
                offsetHeight
              } = element;
              if (heights.get(key2) !== offsetHeight) {
                updatedMark.value = Symbol("update");
                heights.set(key2, element.offsetHeight);
              }
            }
          });
        });
      }
      function setInstance(item, ins) {
        const key2 = getKey2(item);
        instance.get(key2);
        if (ins) {
          instance.set(key2, ins.$el || ins);
          collectHeight();
        } else {
          instance.delete(key2);
        }
      }
      onUnmounted(() => {
        cancelRaf();
      });
      return [setInstance, collectHeight, heights, updatedMark];
    }
    function useScrollTo(containerRef, mergedData, heights, props2, getKey2, collectHeight, syncScrollTop, triggerFlash) {
      let scroll;
      return (arg) => {
        if (arg === null || arg === void 0) {
          triggerFlash();
          return;
        }
        wrapperRaf.cancel(scroll);
        const data = mergedData.value;
        const itemHeight = props2.itemHeight;
        if (typeof arg === "number") {
          syncScrollTop(arg);
        } else if (arg && typeof arg === "object") {
          let index2;
          const {
            align
          } = arg;
          if ("index" in arg) {
            ({
              index: index2
            } = arg);
          } else {
            index2 = data.findIndex((item) => getKey2(item) === arg.key);
          }
          const {
            offset = 0
          } = arg;
          const syncScroll = (times, targetAlign) => {
            if (times < 0 || !containerRef.value) return;
            const height = containerRef.value.clientHeight;
            let needCollectHeight = false;
            let newTargetAlign = targetAlign;
            if (height) {
              const mergedAlign = targetAlign || align;
              let stackTop = 0;
              let itemTop = 0;
              let itemBottom = 0;
              const maxLen = Math.min(data.length, index2);
              for (let i2 = 0; i2 <= maxLen; i2 += 1) {
                const key2 = getKey2(data[i2]);
                itemTop = stackTop;
                const cacheHeight = heights.get(key2);
                itemBottom = itemTop + (cacheHeight === void 0 ? itemHeight : cacheHeight);
                stackTop = itemBottom;
                if (i2 === index2 && cacheHeight === void 0) {
                  needCollectHeight = true;
                }
              }
              const scrollTop = containerRef.value.scrollTop;
              let targetTop = null;
              switch (mergedAlign) {
                case "top":
                  targetTop = itemTop - offset;
                  break;
                case "bottom":
                  targetTop = itemBottom - height + offset;
                  break;
                default: {
                  const scrollBottom = scrollTop + height;
                  if (itemTop < scrollTop) {
                    newTargetAlign = "top";
                  } else if (itemBottom > scrollBottom) {
                    newTargetAlign = "bottom";
                  }
                }
              }
              if (targetTop !== null && targetTop !== scrollTop) {
                syncScrollTop(targetTop);
              }
            }
            scroll = wrapperRaf(() => {
              if (needCollectHeight) {
                collectHeight();
              }
              syncScroll(times - 1, newTargetAlign);
            }, 2);
          };
          syncScroll(5);
        }
      };
    }
    const isFF = typeof navigator === "object" && /Firefox/i.test(navigator.userAgent);
    const useOriginScroll = (isScrollAtTop, isScrollAtBottom) => {
      let lock = false;
      let lockTimeout = null;
      function lockScroll() {
        clearTimeout(lockTimeout);
        lock = true;
        lockTimeout = setTimeout(() => {
          lock = false;
        }, 50);
      }
      return function(deltaY) {
        let smoothOffset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
        const originScroll = (
          // Pass origin wheel when on the top
          deltaY < 0 && isScrollAtTop.value || // Pass origin wheel when on the bottom
          deltaY > 0 && isScrollAtBottom.value
        );
        if (smoothOffset && originScroll) {
          clearTimeout(lockTimeout);
          lock = false;
        } else if (!originScroll || lock) {
          lockScroll();
        }
        return !lock && originScroll;
      };
    };
    function useFrameWheel(inVirtual, isScrollAtTop, isScrollAtBottom, onWheelDelta) {
      let offsetRef = 0;
      let nextFrame2 = null;
      let wheelValue = null;
      let isMouseScroll = false;
      const originScroll = useOriginScroll(isScrollAtTop, isScrollAtBottom);
      function onWheel(event) {
        if (!inVirtual.value) return;
        wrapperRaf.cancel(nextFrame2);
        const {
          deltaY
        } = event;
        offsetRef += deltaY;
        wheelValue = deltaY;
        if (originScroll(deltaY)) return;
        if (!isFF) {
          event.preventDefault();
        }
        nextFrame2 = wrapperRaf(() => {
          const patchMultiple = isMouseScroll ? 10 : 1;
          onWheelDelta(offsetRef * patchMultiple);
          offsetRef = 0;
        });
      }
      function onFireFoxScroll(event) {
        if (!inVirtual.value) return;
        isMouseScroll = event.detail === wheelValue;
      }
      return [onWheel, onFireFoxScroll];
    }
    const SMOOTH_PTG = 14 / 15;
    function useMobileTouchMove(inVirtual, listRef, callback) {
      let touched = false;
      let touchY = 0;
      let element = null;
      let interval = null;
      const cleanUpEvents = () => {
        if (element) {
          element.removeEventListener("touchmove", onTouchMove);
          element.removeEventListener("touchend", onTouchEnd);
        }
      };
      const onTouchMove = (e2) => {
        if (touched) {
          const currentY = Math.ceil(e2.touches[0].pageY);
          let offsetY = touchY - currentY;
          touchY = currentY;
          if (callback(offsetY)) {
            e2.preventDefault();
          }
          clearInterval(interval);
          interval = setInterval(() => {
            offsetY *= SMOOTH_PTG;
            if (!callback(offsetY, true) || Math.abs(offsetY) <= 0.1) {
              clearInterval(interval);
            }
          }, 16);
        }
      };
      const onTouchEnd = () => {
        touched = false;
        cleanUpEvents();
      };
      const onTouchStart = (e2) => {
        cleanUpEvents();
        if (e2.touches.length === 1 && !touched) {
          touched = true;
          touchY = Math.ceil(e2.touches[0].pageY);
          element = e2.target;
          element.addEventListener("touchmove", onTouchMove, {
            passive: false
          });
          element.addEventListener("touchend", onTouchEnd);
        }
      };
      const noop2 = () => {
      };
      onMounted(() => {
        document.addEventListener("touchmove", noop2, {
          passive: false
        });
        watch(inVirtual, (val) => {
          listRef.value.removeEventListener("touchstart", onTouchStart);
          cleanUpEvents();
          clearInterval(interval);
          if (val) {
            listRef.value.addEventListener("touchstart", onTouchStart, {
              passive: false
            });
          }
        }, {
          immediate: true
        });
      });
      onBeforeUnmount(() => {
        document.removeEventListener("touchmove", noop2);
      });
    }
    var __rest$d = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const EMPTY_DATA = [];
    const ScrollStyle = {
      overflowY: "auto",
      overflowAnchor: "none"
    };
    function renderChildren(list, startIndex, endIndex, setNodeRef, renderFunc, _ref) {
      let {
        getKey: getKey2
      } = _ref;
      return list.slice(startIndex, endIndex + 1).map((item, index2) => {
        const eleIndex = startIndex + index2;
        const node2 = renderFunc(item, eleIndex, {
          // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
        });
        const key2 = getKey2(item);
        return createVNode(Item, {
          "key": key2,
          "setRef": (ele) => setNodeRef(item, ele)
        }, {
          default: () => [node2]
        });
      });
    }
    const List = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "List",
      inheritAttrs: false,
      props: {
        prefixCls: String,
        data: PropTypes.array,
        height: Number,
        itemHeight: Number,
        /** If not match virtual scroll condition, Set List still use height of container. */
        fullHeight: {
          type: Boolean,
          default: void 0
        },
        itemKey: {
          type: [String, Number, Function],
          required: true
        },
        component: {
          type: [String, Object]
        },
        /** Set `false` will always use real scroll instead of virtual one */
        virtual: {
          type: Boolean,
          default: void 0
        },
        children: Function,
        onScroll: Function,
        onMousedown: Function,
        onMouseenter: Function,
        onVisibleChange: Function
      },
      setup(props2, _ref2) {
        let {
          expose
        } = _ref2;
        const useVirtual = computed(() => {
          const {
            height,
            itemHeight,
            virtual
          } = props2;
          return !!(virtual !== false && height && itemHeight);
        });
        const inVirtual = computed(() => {
          const {
            height,
            itemHeight,
            data: data2
          } = props2;
          return useVirtual.value && data2 && itemHeight * data2.length > height;
        });
        const state = reactive({
          scrollTop: 0,
          scrollMoving: false
        });
        const data = computed(() => {
          return props2.data || EMPTY_DATA;
        });
        const mergedData = shallowRef([]);
        watch(data, () => {
          mergedData.value = toRaw(data.value).slice();
        }, {
          immediate: true
        });
        const itemKey = shallowRef((_item) => void 0);
        watch(() => props2.itemKey, (val) => {
          if (typeof val === "function") {
            itemKey.value = val;
          } else {
            itemKey.value = (item) => item === null || item === void 0 ? void 0 : item[val];
          }
        }, {
          immediate: true
        });
        const componentRef = shallowRef();
        const fillerInnerRef = shallowRef();
        const scrollBarRef = shallowRef();
        const getKey2 = (item) => {
          return itemKey.value(item);
        };
        const sharedConfig = {
          getKey: getKey2
        };
        function syncScrollTop(newTop) {
          let value;
          if (typeof newTop === "function") {
            value = newTop(state.scrollTop);
          } else {
            value = newTop;
          }
          const alignedTop = keepInRange(value);
          if (componentRef.value) {
            componentRef.value.scrollTop = alignedTop;
          }
          state.scrollTop = alignedTop;
        }
        const [setInstance, collectHeight, heights, updatedMark] = useHeights(mergedData, getKey2);
        const calRes = reactive({
          scrollHeight: void 0,
          start: 0,
          end: 0,
          offset: void 0
        });
        const offsetHeight = shallowRef(0);
        onMounted(() => {
          nextTick(() => {
            var _a;
            offsetHeight.value = ((_a = fillerInnerRef.value) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0;
          });
        });
        onUpdated(() => {
          nextTick(() => {
            var _a;
            offsetHeight.value = ((_a = fillerInnerRef.value) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0;
          });
        });
        watch([useVirtual, mergedData], () => {
          if (!useVirtual.value) {
            _extends$1(calRes, {
              scrollHeight: void 0,
              start: 0,
              end: mergedData.value.length - 1,
              offset: void 0
            });
          }
        }, {
          immediate: true
        });
        watch([useVirtual, mergedData, offsetHeight, inVirtual], () => {
          if (useVirtual.value && !inVirtual.value) {
            _extends$1(calRes, {
              scrollHeight: offsetHeight.value,
              start: 0,
              end: mergedData.value.length - 1,
              offset: void 0
            });
          }
          if (componentRef.value) {
            state.scrollTop = componentRef.value.scrollTop;
          }
        }, {
          immediate: true
        });
        watch([inVirtual, useVirtual, () => state.scrollTop, mergedData, updatedMark, () => props2.height, offsetHeight], () => {
          if (!useVirtual.value || !inVirtual.value) {
            return;
          }
          let itemTop = 0;
          let startIndex;
          let startOffset;
          let endIndex;
          const dataLen = mergedData.value.length;
          const data2 = mergedData.value;
          const scrollTop = state.scrollTop;
          const {
            itemHeight,
            height
          } = props2;
          const scrollTopHeight = scrollTop + height;
          for (let i2 = 0; i2 < dataLen; i2 += 1) {
            const item = data2[i2];
            const key2 = getKey2(item);
            let cacheHeight = heights.get(key2);
            if (cacheHeight === void 0) {
              cacheHeight = itemHeight;
            }
            const currentItemBottom = itemTop + cacheHeight;
            if (startIndex === void 0 && currentItemBottom >= scrollTop) {
              startIndex = i2;
              startOffset = itemTop;
            }
            if (endIndex === void 0 && currentItemBottom > scrollTopHeight) {
              endIndex = i2;
            }
            itemTop = currentItemBottom;
          }
          if (startIndex === void 0) {
            startIndex = 0;
            startOffset = 0;
            endIndex = Math.ceil(height / itemHeight);
          }
          if (endIndex === void 0) {
            endIndex = dataLen - 1;
          }
          endIndex = Math.min(endIndex + 1, dataLen);
          _extends$1(calRes, {
            scrollHeight: itemTop,
            start: startIndex,
            end: endIndex,
            offset: startOffset
          });
        }, {
          immediate: true
        });
        const maxScrollHeight = computed(() => calRes.scrollHeight - props2.height);
        function keepInRange(newScrollTop) {
          let newTop = newScrollTop;
          if (!Number.isNaN(maxScrollHeight.value)) {
            newTop = Math.min(newTop, maxScrollHeight.value);
          }
          newTop = Math.max(newTop, 0);
          return newTop;
        }
        const isScrollAtTop = computed(() => state.scrollTop <= 0);
        const isScrollAtBottom = computed(() => state.scrollTop >= maxScrollHeight.value);
        const originScroll = useOriginScroll(isScrollAtTop, isScrollAtBottom);
        function onScrollBar(newScrollTop) {
          const newTop = newScrollTop;
          syncScrollTop(newTop);
        }
        function onFallbackScroll(e2) {
          var _a;
          const {
            scrollTop: newScrollTop
          } = e2.currentTarget;
          if (newScrollTop !== state.scrollTop) {
            syncScrollTop(newScrollTop);
          }
          (_a = props2.onScroll) === null || _a === void 0 ? void 0 : _a.call(props2, e2);
        }
        const [onRawWheel, onFireFoxScroll] = useFrameWheel(useVirtual, isScrollAtTop, isScrollAtBottom, (offsetY) => {
          syncScrollTop((top) => {
            const newTop = top + offsetY;
            return newTop;
          });
        });
        useMobileTouchMove(useVirtual, componentRef, (deltaY, smoothOffset) => {
          if (originScroll(deltaY, smoothOffset)) {
            return false;
          }
          onRawWheel({
            preventDefault() {
            },
            deltaY
          });
          return true;
        });
        function onMozMousePixelScroll(e2) {
          if (useVirtual.value) {
            e2.preventDefault();
          }
        }
        const removeEventListener2 = () => {
          if (componentRef.value) {
            componentRef.value.removeEventListener("wheel", onRawWheel, supportsPassive ? {
              passive: false
            } : false);
            componentRef.value.removeEventListener("DOMMouseScroll", onFireFoxScroll);
            componentRef.value.removeEventListener("MozMousePixelScroll", onMozMousePixelScroll);
          }
        };
        watchEffect(() => {
          nextTick(() => {
            if (componentRef.value) {
              removeEventListener2();
              componentRef.value.addEventListener("wheel", onRawWheel, supportsPassive ? {
                passive: false
              } : false);
              componentRef.value.addEventListener("DOMMouseScroll", onFireFoxScroll);
              componentRef.value.addEventListener("MozMousePixelScroll", onMozMousePixelScroll);
            }
          });
        });
        onBeforeUnmount(() => {
          removeEventListener2();
        });
        const scrollTo = useScrollTo(componentRef, mergedData, heights, props2, getKey2, collectHeight, syncScrollTop, () => {
          var _a;
          (_a = scrollBarRef.value) === null || _a === void 0 ? void 0 : _a.delayHidden();
        });
        expose({
          scrollTo
        });
        const componentStyle = computed(() => {
          let cs = null;
          if (props2.height) {
            cs = _extends$1({
              [props2.fullHeight ? "height" : "maxHeight"]: props2.height + "px"
            }, ScrollStyle);
            if (useVirtual.value) {
              cs.overflowY = "hidden";
              if (state.scrollMoving) {
                cs.pointerEvents = "none";
              }
            }
          }
          return cs;
        });
        watch([() => calRes.start, () => calRes.end, mergedData], () => {
          if (props2.onVisibleChange) {
            const renderList2 = mergedData.value.slice(calRes.start, calRes.end + 1);
            props2.onVisibleChange(renderList2, mergedData.value);
          }
        }, {
          flush: "post"
        });
        const delayHideScrollBar = () => {
          var _a;
          (_a = scrollBarRef.value) === null || _a === void 0 ? void 0 : _a.delayHidden();
        };
        return {
          state,
          mergedData,
          componentStyle,
          onFallbackScroll,
          onScrollBar,
          componentRef,
          useVirtual,
          calRes,
          collectHeight,
          setInstance,
          sharedConfig,
          scrollBarRef,
          fillerInnerRef,
          delayHideScrollBar
        };
      },
      render() {
        const _a = _extends$1(_extends$1({}, this.$props), this.$attrs), {
          prefixCls = "rc-virtual-list",
          height,
          itemHeight,
          // eslint-disable-next-line no-unused-vars
          fullHeight,
          data,
          itemKey,
          virtual,
          component: Component = "div",
          onScroll,
          children = this.$slots.default,
          style,
          class: className
        } = _a, restProps = __rest$d(_a, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]);
        const mergedClassName = classNames(prefixCls, className);
        const {
          scrollTop
        } = this.state;
        const {
          scrollHeight,
          offset,
          start,
          end
        } = this.calRes;
        const {
          componentStyle,
          onFallbackScroll,
          onScrollBar,
          useVirtual,
          collectHeight,
          sharedConfig,
          setInstance,
          mergedData,
          delayHideScrollBar
        } = this;
        return createVNode("div", _objectSpread2$1({
          "style": _extends$1(_extends$1({}, style), {
            position: "relative"
          }),
          "class": mergedClassName
        }, restProps), [createVNode(Component, {
          "class": `${prefixCls}-holder`,
          "style": componentStyle,
          "ref": "componentRef",
          "onScroll": onFallbackScroll,
          "onMouseenter": delayHideScrollBar
        }, {
          default: () => [createVNode(Filter, {
            "prefixCls": prefixCls,
            "height": scrollHeight,
            "offset": offset,
            "onInnerResize": collectHeight,
            "ref": "fillerInnerRef"
          }, {
            default: () => renderChildren(mergedData, start, end, setInstance, children, sharedConfig)
          })]
        }), useVirtual && createVNode(ScrollBar, {
          "ref": "scrollBarRef",
          "prefixCls": prefixCls,
          "scrollTop": scrollTop,
          "height": height,
          "scrollHeight": scrollHeight,
          "count": mergedData.length,
          "onScroll": onScrollBar,
          "onStartMove": () => {
            this.state.scrollMoving = true;
          },
          "onStopMove": () => {
            this.state.scrollMoving = false;
          }
        }, null)]);
      }
    });
    function useMemo(getValue2, condition, shouldUpdate) {
      const cacheRef = ref(getValue2());
      watch(condition, (next2, pre) => {
        if (shouldUpdate) {
          if (shouldUpdate(next2, pre)) {
            cacheRef.value = getValue2();
          }
        } else {
          cacheRef.value = getValue2();
        }
      });
      return cacheRef;
    }
    function isPlatformMac() {
      return /(mac\sos|macintosh)/i.test(navigator.appVersion);
    }
    const SelectContextKey = Symbol("SelectContextKey");
    function useProvideSelectProps(props2) {
      return provide(SelectContextKey, props2);
    }
    function useSelectProps() {
      return inject(SelectContextKey, {});
    }
    var __rest$c = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    function isTitleType(content) {
      return typeof content === "string" || typeof content === "number";
    }
    const OptionList = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "OptionList",
      inheritAttrs: false,
      setup(_2, _ref) {
        let {
          expose,
          slots
        } = _ref;
        const baseProps = useBaseProps();
        const props2 = useSelectProps();
        const itemPrefixCls = computed(() => `${baseProps.prefixCls}-item`);
        const memoFlattenOptions = useMemo(() => props2.flattenOptions, [() => baseProps.open, () => props2.flattenOptions], (next2) => next2[0]);
        const listRef = createRef();
        const onListMouseDown = (event) => {
          event.preventDefault();
        };
        const scrollIntoView2 = (args) => {
          if (listRef.current) {
            listRef.current.scrollTo(typeof args === "number" ? {
              index: args
            } : args);
          }
        };
        const getEnabledActiveIndex = function(index2) {
          let offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
          const len = memoFlattenOptions.value.length;
          for (let i2 = 0; i2 < len; i2 += 1) {
            const current = (index2 + i2 * offset + len) % len;
            const {
              group,
              data
            } = memoFlattenOptions.value[current];
            if (!group && !data.disabled) {
              return current;
            }
          }
          return -1;
        };
        const state = reactive({
          activeIndex: getEnabledActiveIndex(0)
        });
        const setActive = function(index2) {
          let fromKeyboard = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
          state.activeIndex = index2;
          const info = {
            source: fromKeyboard ? "keyboard" : "mouse"
          };
          const flattenItem = memoFlattenOptions.value[index2];
          if (!flattenItem) {
            props2.onActiveValue(null, -1, info);
            return;
          }
          props2.onActiveValue(flattenItem.value, index2, info);
        };
        watch([() => memoFlattenOptions.value.length, () => baseProps.searchValue], () => {
          setActive(props2.defaultActiveFirstOption !== false ? getEnabledActiveIndex(0) : -1);
        }, {
          immediate: true
        });
        const isSelected = (value) => props2.rawValues.has(value) && baseProps.mode !== "combobox";
        watch([() => baseProps.open, () => baseProps.searchValue], () => {
          if (!baseProps.multiple && baseProps.open && props2.rawValues.size === 1) {
            const value = Array.from(props2.rawValues)[0];
            const index2 = toRaw(memoFlattenOptions.value).findIndex((_ref2) => {
              let {
                data
              } = _ref2;
              return data[props2.fieldNames.value] === value;
            });
            if (index2 !== -1) {
              setActive(index2);
              nextTick(() => {
                scrollIntoView2(index2);
              });
            }
          }
          if (baseProps.open) {
            nextTick(() => {
              var _a;
              (_a = listRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo(void 0);
            });
          }
        }, {
          immediate: true,
          flush: "post"
        });
        const onSelectValue = (value) => {
          if (value !== void 0) {
            props2.onSelect(value, {
              selected: !props2.rawValues.has(value)
            });
          }
          if (!baseProps.multiple) {
            baseProps.toggleOpen(false);
          }
        };
        const getLabel = (item) => typeof item.label === "function" ? item.label() : item.label;
        function renderItem(index2) {
          const item = memoFlattenOptions.value[index2];
          if (!item) return null;
          const itemData = item.data || {};
          const {
            value
          } = itemData;
          const {
            group
          } = item;
          const attrs = pickAttrs(itemData, true);
          const mergedLabel = getLabel(item);
          return item ? createVNode("div", _objectSpread2$1(_objectSpread2$1({
            "aria-label": typeof mergedLabel === "string" && !group ? mergedLabel : null
          }, attrs), {}, {
            "key": index2,
            "role": group ? "presentation" : "option",
            "id": `${baseProps.id}_list_${index2}`,
            "aria-selected": isSelected(value)
          }), [value]) : null;
        }
        const onKeydown = (event) => {
          const {
            which,
            ctrlKey
          } = event;
          switch (which) {
            case KeyCode.N:
            case KeyCode.P:
            case KeyCode.UP:
            case KeyCode.DOWN: {
              let offset = 0;
              if (which === KeyCode.UP) {
                offset = -1;
              } else if (which === KeyCode.DOWN) {
                offset = 1;
              } else if (isPlatformMac() && ctrlKey) {
                if (which === KeyCode.N) {
                  offset = 1;
                } else if (which === KeyCode.P) {
                  offset = -1;
                }
              }
              if (offset !== 0) {
                const nextActiveIndex = getEnabledActiveIndex(state.activeIndex + offset, offset);
                scrollIntoView2(nextActiveIndex);
                setActive(nextActiveIndex, true);
              }
              break;
            }
            case KeyCode.ENTER: {
              const item = memoFlattenOptions.value[state.activeIndex];
              if (item && !item.data.disabled) {
                onSelectValue(item.value);
              } else {
                onSelectValue(void 0);
              }
              if (baseProps.open) {
                event.preventDefault();
              }
              break;
            }
            case KeyCode.ESC: {
              baseProps.toggleOpen(false);
              if (baseProps.open) {
                event.stopPropagation();
              }
            }
          }
        };
        const onKeyup = () => {
        };
        const scrollTo = (index2) => {
          scrollIntoView2(index2);
        };
        expose({
          onKeydown,
          onKeyup,
          scrollTo
        });
        return () => {
          const {
            id,
            notFoundContent,
            onPopupScroll
          } = baseProps;
          const {
            menuItemSelectedIcon,
            fieldNames,
            virtual,
            listHeight,
            listItemHeight
          } = props2;
          const renderOption = slots.option;
          const {
            activeIndex
          } = state;
          const omitFieldNameList = Object.keys(fieldNames).map((key2) => fieldNames[key2]);
          if (memoFlattenOptions.value.length === 0) {
            return createVNode("div", {
              "role": "listbox",
              "id": `${id}_list`,
              "class": `${itemPrefixCls.value}-empty`,
              "onMousedown": onListMouseDown
            }, [notFoundContent]);
          }
          return createVNode(Fragment, null, [createVNode("div", {
            "role": "listbox",
            "id": `${id}_list`,
            "style": {
              height: 0,
              width: 0,
              overflow: "hidden"
            }
          }, [renderItem(activeIndex - 1), renderItem(activeIndex), renderItem(activeIndex + 1)]), createVNode(List, {
            "itemKey": "key",
            "ref": listRef,
            "data": memoFlattenOptions.value,
            "height": listHeight,
            "itemHeight": listItemHeight,
            "fullHeight": false,
            "onMousedown": onListMouseDown,
            "onScroll": onPopupScroll,
            "virtual": virtual
          }, {
            default: (item, itemIndex) => {
              var _a;
              const {
                group,
                groupOption,
                data,
                value
              } = item;
              const {
                key: key2
              } = data;
              const label = typeof item.label === "function" ? item.label() : item.label;
              if (group) {
                const groupTitle = (_a = data.title) !== null && _a !== void 0 ? _a : isTitleType(label) && label;
                return createVNode("div", {
                  "class": classNames(itemPrefixCls.value, `${itemPrefixCls.value}-group`),
                  "title": groupTitle
                }, [renderOption ? renderOption(data) : label !== void 0 ? label : key2]);
              }
              const {
                disabled,
                title,
                children,
                style,
                class: cls,
                className
              } = data, otherProps = __rest$c(data, ["disabled", "title", "children", "style", "class", "className"]);
              const passedProps = omit(otherProps, omitFieldNameList);
              const selected = isSelected(value);
              const optionPrefixCls = `${itemPrefixCls.value}-option`;
              const optionClassName = classNames(itemPrefixCls.value, optionPrefixCls, cls, className, {
                [`${optionPrefixCls}-grouped`]: groupOption,
                [`${optionPrefixCls}-active`]: activeIndex === itemIndex && !disabled,
                [`${optionPrefixCls}-disabled`]: disabled,
                [`${optionPrefixCls}-selected`]: selected
              });
              const mergedLabel = getLabel(item);
              const iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === "function" || selected;
              const content = typeof mergedLabel === "number" ? mergedLabel : mergedLabel || value;
              let optionTitle = isTitleType(content) ? content.toString() : void 0;
              if (title !== void 0) {
                optionTitle = title;
              }
              return createVNode("div", _objectSpread2$1(_objectSpread2$1({}, passedProps), {}, {
                "aria-selected": selected,
                "class": optionClassName,
                "title": optionTitle,
                "onMousemove": (e2) => {
                  if (otherProps.onMousemove) {
                    otherProps.onMousemove(e2);
                  }
                  if (activeIndex === itemIndex || disabled) {
                    return;
                  }
                  setActive(itemIndex);
                },
                "onClick": (e2) => {
                  if (!disabled) {
                    onSelectValue(value);
                  }
                  if (otherProps.onClick) {
                    otherProps.onClick(e2);
                  }
                },
                "style": style
              }), [createVNode("div", {
                "class": `${optionPrefixCls}-content`
              }, [renderOption ? renderOption(data) : content]), isValidElement(menuItemSelectedIcon) || selected, iconVisible && createVNode(TransBtn, {
                "class": `${itemPrefixCls.value}-option-state`,
                "customizeIcon": menuItemSelectedIcon,
                "customizeIconProps": {
                  isSelected: selected
                }
              }, {
                default: () => [selected ? "✓" : null]
              })]);
            }
          })]);
        };
      }
    });
    var __rest$b = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    function convertNodeToOption(node2) {
      const _a = node2, {
        key: key2,
        children
      } = _a, _b = _a.props, {
        value,
        disabled
      } = _b, restProps = __rest$b(_b, ["value", "disabled"]);
      const child = children === null || children === void 0 ? void 0 : children.default;
      return _extends$1({
        key: key2,
        value: value !== void 0 ? value : key2,
        children: child,
        disabled: disabled || disabled === ""
      }, restProps);
    }
    function convertChildrenToData(nodes) {
      let optionOnly = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
      const dd = flattenChildren(nodes).map((node2, index2) => {
        var _a;
        if (!isValidElement(node2) || !node2.type) {
          return null;
        }
        const {
          type: {
            isSelectOptGroup
          },
          key: key2,
          children,
          props: props2
        } = node2;
        if (optionOnly || !isSelectOptGroup) {
          return convertNodeToOption(node2);
        }
        const child = children && children.default ? children.default() : void 0;
        const label = (props2 === null || props2 === void 0 ? void 0 : props2.label) || ((_a = children.label) === null || _a === void 0 ? void 0 : _a.call(children)) || key2;
        return _extends$1(_extends$1({
          key: `__RC_SELECT_GRP__${key2 === null ? index2 : String(key2)}__`
        }, props2), {
          label,
          options: convertChildrenToData(child || [])
        });
      }).filter((data) => data);
      return dd;
    }
    function useOptions(options, children, fieldNames) {
      const mergedOptions = shallowRef();
      const valueOptions = shallowRef();
      const labelOptions = shallowRef();
      const tempMergedOptions = shallowRef([]);
      watch([options, children], () => {
        if (options.value) {
          tempMergedOptions.value = toRaw(options.value).slice();
        } else {
          tempMergedOptions.value = convertChildrenToData(children.value);
        }
      }, {
        immediate: true,
        deep: true
      });
      watchEffect(() => {
        const newOptions = tempMergedOptions.value;
        const newValueOptions = /* @__PURE__ */ new Map();
        const newLabelOptions = /* @__PURE__ */ new Map();
        const fieldNamesValue = fieldNames.value;
        function dig(optionList) {
          let isChildren = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
          for (let i2 = 0; i2 < optionList.length; i2 += 1) {
            const option = optionList[i2];
            if (!option[fieldNamesValue.options] || isChildren) {
              newValueOptions.set(option[fieldNamesValue.value], option);
              newLabelOptions.set(option[fieldNamesValue.label], option);
            } else {
              dig(option[fieldNamesValue.options], true);
            }
          }
        }
        dig(newOptions);
        mergedOptions.value = newOptions;
        valueOptions.value = newValueOptions;
        labelOptions.value = newLabelOptions;
      });
      return {
        options: mergedOptions,
        valueOptions,
        labelOptions
      };
    }
    let uuid = 0;
    const isBrowserClient = canUseDom$1();
    function getUUID() {
      let retId;
      if (isBrowserClient) {
        retId = uuid;
        uuid += 1;
      } else {
        retId = "TEST_OR_SSR";
      }
      return retId;
    }
    function useId() {
      let id = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ref("");
      const innerId = `rc_select_${getUUID()}`;
      return id.value || innerId;
    }
    function toArray$2(value) {
      if (Array.isArray(value)) {
        return value;
      }
      return value !== void 0 ? [value] : [];
    }
    function includes(test, search) {
      return toArray$2(test).join("").toUpperCase().includes(search);
    }
    const useFilterOptions = (options, fieldNames, searchValue, filterOption, optionFilterProp) => computed(() => {
      const searchValueVal = searchValue.value;
      const optionFilterPropValue = optionFilterProp === null || optionFilterProp === void 0 ? void 0 : optionFilterProp.value;
      const filterOptionValue = filterOption === null || filterOption === void 0 ? void 0 : filterOption.value;
      if (!searchValueVal || filterOptionValue === false) {
        return options.value;
      }
      const {
        options: fieldOptions,
        label: fieldLabel,
        value: fieldValue
      } = fieldNames.value;
      const filteredOptions = [];
      const customizeFilter = typeof filterOptionValue === "function";
      const upperSearch = searchValueVal.toUpperCase();
      const filterFunc = customizeFilter ? filterOptionValue : (_2, option) => {
        if (optionFilterPropValue) {
          return includes(option[optionFilterPropValue], upperSearch);
        }
        if (option[fieldOptions]) {
          return includes(option[fieldLabel !== "children" ? fieldLabel : "label"], upperSearch);
        }
        return includes(option[fieldValue], upperSearch);
      };
      const wrapOption = customizeFilter ? (opt) => injectPropsWithOption(opt) : (opt) => opt;
      options.value.forEach((item) => {
        if (item[fieldOptions]) {
          const matchGroup = filterFunc(searchValueVal, wrapOption(item));
          if (matchGroup) {
            filteredOptions.push(item);
          } else {
            const subOptions = item[fieldOptions].filter((subItem) => filterFunc(searchValueVal, wrapOption(subItem)));
            if (subOptions.length) {
              filteredOptions.push(_extends$1(_extends$1({}, item), {
                [fieldOptions]: subOptions
              }));
            }
          }
          return;
        }
        if (filterFunc(searchValueVal, wrapOption(item))) {
          filteredOptions.push(item);
        }
      });
      return filteredOptions;
    });
    const useCache = (labeledValues, valueOptions) => {
      const cacheRef = shallowRef({
        values: /* @__PURE__ */ new Map(),
        options: /* @__PURE__ */ new Map()
      });
      const filledLabeledValues = computed(() => {
        const {
          values: prevValueCache,
          options: prevOptionCache
        } = cacheRef.value;
        const patchedValues = labeledValues.value.map((item) => {
          var _a;
          if (item.label === void 0) {
            return _extends$1(_extends$1({}, item), {
              label: (_a = prevValueCache.get(item.value)) === null || _a === void 0 ? void 0 : _a.label
            });
          }
          return item;
        });
        const valueCache = /* @__PURE__ */ new Map();
        const optionCache = /* @__PURE__ */ new Map();
        patchedValues.forEach((item) => {
          valueCache.set(item.value, item);
          optionCache.set(item.value, valueOptions.value.get(item.value) || prevOptionCache.get(item.value));
        });
        cacheRef.value.values = valueCache;
        cacheRef.value.options = optionCache;
        return patchedValues;
      });
      const getOption = (val) => valueOptions.value.get(val) || cacheRef.value.options.get(val);
      return [filledLabeledValues, getOption];
    };
    function useMergedState(defaultStateValue, option) {
      const {
        defaultValue,
        value = ref()
      } = option || {};
      let initValue = typeof defaultStateValue === "function" ? defaultStateValue() : defaultStateValue;
      if (value.value !== void 0) {
        initValue = unref(value);
      }
      if (defaultValue !== void 0) {
        initValue = typeof defaultValue === "function" ? defaultValue() : defaultValue;
      }
      const innerValue = ref(initValue);
      const mergedValue = ref(initValue);
      watchEffect(() => {
        let val = value.value !== void 0 ? value.value : innerValue.value;
        if (option.postState) {
          val = option.postState(val);
        }
        mergedValue.value = val;
      });
      function triggerChange(newValue) {
        const preVal = mergedValue.value;
        innerValue.value = newValue;
        if (toRaw(mergedValue.value) !== newValue && option.onChange) {
          option.onChange(newValue, preVal);
        }
      }
      watch(value, () => {
        innerValue.value = value.value;
      });
      return [mergedValue, triggerChange];
    }
    function useState(defaultStateValue) {
      const initValue = typeof defaultStateValue === "function" ? defaultStateValue() : defaultStateValue;
      const innerValue = ref(initValue);
      function triggerChange(newValue) {
        innerValue.value = newValue;
      }
      return [innerValue, triggerChange];
    }
    const OMIT_DOM_PROPS = ["inputValue"];
    function selectProps$1() {
      return _extends$1(_extends$1({}, baseSelectPropsWithoutPrivate()), {
        prefixCls: String,
        id: String,
        backfill: {
          type: Boolean,
          default: void 0
        },
        // >>> Field Names
        fieldNames: Object,
        // >>> Search
        /** @deprecated Use `searchValue` instead */
        inputValue: String,
        searchValue: String,
        onSearch: Function,
        autoClearSearchValue: {
          type: Boolean,
          default: void 0
        },
        // >>> Select
        onSelect: Function,
        onDeselect: Function,
        // >>> Options
        /**
         * In Select, `false` means do nothing.
         * In TreeSelect, `false` will highlight match item.
         * It's by design.
         */
        filterOption: {
          type: [Boolean, Function],
          default: void 0
        },
        filterSort: Function,
        optionFilterProp: String,
        optionLabelProp: String,
        options: Array,
        defaultActiveFirstOption: {
          type: Boolean,
          default: void 0
        },
        virtual: {
          type: Boolean,
          default: void 0
        },
        listHeight: Number,
        listItemHeight: Number,
        // >>> Icon
        menuItemSelectedIcon: PropTypes.any,
        mode: String,
        labelInValue: {
          type: Boolean,
          default: void 0
        },
        value: PropTypes.any,
        defaultValue: PropTypes.any,
        onChange: Function,
        children: Array
      });
    }
    function isRawValue(value) {
      return !value || typeof value !== "object";
    }
    const Select$1 = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "VcSelect",
      inheritAttrs: false,
      props: initDefaultProps(selectProps$1(), {
        prefixCls: "vc-select",
        autoClearSearchValue: true,
        listHeight: 200,
        listItemHeight: 20,
        dropdownMatchSelectWidth: true
      }),
      setup(props2, _ref) {
        let {
          expose,
          attrs,
          slots
        } = _ref;
        const mergedId = useId(toRef(props2, "id"));
        const multiple = computed(() => isMultiple(props2.mode));
        const childrenAsData = computed(() => !!(!props2.options && props2.children));
        const mergedFilterOption = computed(() => {
          if (props2.filterOption === void 0 && props2.mode === "combobox") {
            return false;
          }
          return props2.filterOption;
        });
        const mergedFieldNames = computed(() => fillFieldNames(props2.fieldNames, childrenAsData.value));
        const [mergedSearchValue, setSearchValue] = useMergedState("", {
          value: computed(() => props2.searchValue !== void 0 ? props2.searchValue : props2.inputValue),
          postState: (search) => search || ""
        });
        const parsedOptions = useOptions(toRef(props2, "options"), toRef(props2, "children"), mergedFieldNames);
        const {
          valueOptions,
          labelOptions,
          options: mergedOptions
        } = parsedOptions;
        const convert2LabelValues = (draftValues) => {
          const valueList = toArray$2(draftValues);
          return valueList.map((val) => {
            var _a, _b;
            let rawValue;
            let rawLabel;
            let rawKey;
            let rawDisabled;
            if (isRawValue(val)) {
              rawValue = val;
            } else {
              rawKey = val.key;
              rawLabel = val.label;
              rawValue = (_a = val.value) !== null && _a !== void 0 ? _a : rawKey;
            }
            const option = valueOptions.value.get(rawValue);
            if (option) {
              if (rawLabel === void 0) rawLabel = option === null || option === void 0 ? void 0 : option[props2.optionLabelProp || mergedFieldNames.value.label];
              if (rawKey === void 0) rawKey = (_b = option === null || option === void 0 ? void 0 : option.key) !== null && _b !== void 0 ? _b : rawValue;
              rawDisabled = option === null || option === void 0 ? void 0 : option.disabled;
            }
            return {
              label: rawLabel,
              value: rawValue,
              key: rawKey,
              disabled: rawDisabled,
              option
            };
          });
        };
        const [internalValue, setInternalValue] = useMergedState(props2.defaultValue, {
          value: toRef(props2, "value")
        });
        const rawLabeledValues = computed(() => {
          var _a;
          const values = convert2LabelValues(internalValue.value);
          if (props2.mode === "combobox" && !((_a = values[0]) === null || _a === void 0 ? void 0 : _a.value)) {
            return [];
          }
          return values;
        });
        const [mergedValues, getMixedOption] = useCache(rawLabeledValues, valueOptions);
        const displayValues = computed(() => {
          if (!props2.mode && mergedValues.value.length === 1) {
            const firstValue = mergedValues.value[0];
            if (firstValue.value === null && (firstValue.label === null || firstValue.label === void 0)) {
              return [];
            }
          }
          return mergedValues.value.map((item) => {
            var _a;
            return _extends$1(_extends$1({}, item), {
              label: (_a = typeof item.label === "function" ? item.label() : item.label) !== null && _a !== void 0 ? _a : item.value
            });
          });
        });
        const rawValues = computed(() => new Set(mergedValues.value.map((val) => val.value)));
        watchEffect(() => {
          var _a;
          if (props2.mode === "combobox") {
            const strValue = (_a = mergedValues.value[0]) === null || _a === void 0 ? void 0 : _a.value;
            if (strValue !== void 0 && strValue !== null) {
              setSearchValue(String(strValue));
            }
          }
        }, {
          flush: "post"
        });
        const createTagOption = (val, label) => {
          const mergedLabel = label !== null && label !== void 0 ? label : val;
          return {
            [mergedFieldNames.value.value]: val,
            [mergedFieldNames.value.label]: mergedLabel
          };
        };
        const filledTagOptions = shallowRef();
        watchEffect(() => {
          if (props2.mode !== "tags") {
            filledTagOptions.value = mergedOptions.value;
            return;
          }
          const cloneOptions = mergedOptions.value.slice();
          const existOptions = (val) => valueOptions.value.has(val);
          [...mergedValues.value].sort((a2, b2) => a2.value < b2.value ? -1 : 1).forEach((item) => {
            const val = item.value;
            if (!existOptions(val)) {
              cloneOptions.push(createTagOption(val, item.label));
            }
          });
          filledTagOptions.value = cloneOptions;
        });
        const filteredOptions = useFilterOptions(filledTagOptions, mergedFieldNames, mergedSearchValue, mergedFilterOption, toRef(props2, "optionFilterProp"));
        const filledSearchOptions = computed(() => {
          if (props2.mode !== "tags" || !mergedSearchValue.value || filteredOptions.value.some((item) => item[props2.optionFilterProp || "value"] === mergedSearchValue.value)) {
            return filteredOptions.value;
          }
          return [createTagOption(mergedSearchValue.value), ...filteredOptions.value];
        });
        const orderedFilteredOptions = computed(() => {
          if (!props2.filterSort) {
            return filledSearchOptions.value;
          }
          return [...filledSearchOptions.value].sort((a2, b2) => props2.filterSort(a2, b2));
        });
        const displayOptions = computed(() => flattenOptions(orderedFilteredOptions.value, {
          fieldNames: mergedFieldNames.value,
          childrenAsData: childrenAsData.value
        }));
        const triggerChange = (values) => {
          const labeledValues = convert2LabelValues(values);
          setInternalValue(labeledValues);
          if (props2.onChange && // Trigger event only when value changed
          (labeledValues.length !== mergedValues.value.length || labeledValues.some((newVal, index2) => {
            var _a;
            return ((_a = mergedValues.value[index2]) === null || _a === void 0 ? void 0 : _a.value) !== (newVal === null || newVal === void 0 ? void 0 : newVal.value);
          }))) {
            const returnValues = props2.labelInValue ? labeledValues.map((v2) => {
              return _extends$1(_extends$1({}, v2), {
                originLabel: v2.label,
                label: typeof v2.label === "function" ? v2.label() : v2.label
              });
            }) : labeledValues.map((v2) => v2.value);
            const returnOptions = labeledValues.map((v2) => injectPropsWithOption(getMixedOption(v2.value)));
            props2.onChange(
              // Value
              multiple.value ? returnValues : returnValues[0],
              // Option
              multiple.value ? returnOptions : returnOptions[0]
            );
          }
        };
        const [activeValue, setActiveValue] = useState(null);
        const [accessibilityIndex, setAccessibilityIndex] = useState(0);
        const mergedDefaultActiveFirstOption = computed(() => props2.defaultActiveFirstOption !== void 0 ? props2.defaultActiveFirstOption : props2.mode !== "combobox");
        const onActiveValue = function(active, index2) {
          let {
            source = "keyboard"
          } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
          setAccessibilityIndex(index2);
          if (props2.backfill && props2.mode === "combobox" && active !== null && source === "keyboard") {
            setActiveValue(String(active));
          }
        };
        const triggerSelect = (val, selected) => {
          const getSelectEnt = () => {
            var _a;
            const option = getMixedOption(val);
            const originLabel = option === null || option === void 0 ? void 0 : option[mergedFieldNames.value.label];
            return [props2.labelInValue ? {
              label: typeof originLabel === "function" ? originLabel() : originLabel,
              originLabel,
              value: val,
              key: (_a = option === null || option === void 0 ? void 0 : option.key) !== null && _a !== void 0 ? _a : val
            } : val, injectPropsWithOption(option)];
          };
          if (selected && props2.onSelect) {
            const [wrappedValue, option] = getSelectEnt();
            props2.onSelect(wrappedValue, option);
          } else if (!selected && props2.onDeselect) {
            const [wrappedValue, option] = getSelectEnt();
            props2.onDeselect(wrappedValue, option);
          }
        };
        const onInternalSelect = (val, info) => {
          let cloneValues;
          const mergedSelect = multiple.value ? info.selected : true;
          if (mergedSelect) {
            cloneValues = multiple.value ? [...mergedValues.value, val] : [val];
          } else {
            cloneValues = mergedValues.value.filter((v2) => v2.value !== val);
          }
          triggerChange(cloneValues);
          triggerSelect(val, mergedSelect);
          if (props2.mode === "combobox") {
            setActiveValue("");
          } else if (!multiple.value || props2.autoClearSearchValue) {
            setSearchValue("");
            setActiveValue("");
          }
        };
        const onDisplayValuesChange = (nextValues, info) => {
          triggerChange(nextValues);
          if (info.type === "remove" || info.type === "clear") {
            info.values.forEach((item) => {
              triggerSelect(item.value, false);
            });
          }
        };
        const onInternalSearch = (searchText, info) => {
          var _a;
          setSearchValue(searchText);
          setActiveValue(null);
          if (info.source === "submit") {
            const formatted = (searchText || "").trim();
            if (formatted) {
              const newRawValues = Array.from(/* @__PURE__ */ new Set([...rawValues.value, formatted]));
              triggerChange(newRawValues);
              triggerSelect(formatted, true);
              setSearchValue("");
            }
            return;
          }
          if (info.source !== "blur") {
            if (props2.mode === "combobox") {
              triggerChange(searchText);
            }
            (_a = props2.onSearch) === null || _a === void 0 ? void 0 : _a.call(props2, searchText);
          }
        };
        const onInternalSearchSplit = (words) => {
          let patchValues = words;
          if (props2.mode !== "tags") {
            patchValues = words.map((word) => {
              const opt = labelOptions.value.get(word);
              return opt === null || opt === void 0 ? void 0 : opt.value;
            }).filter((val) => val !== void 0);
          }
          const newRawValues = Array.from(/* @__PURE__ */ new Set([...rawValues.value, ...patchValues]));
          triggerChange(newRawValues);
          newRawValues.forEach((newRawValue) => {
            triggerSelect(newRawValue, true);
          });
        };
        const realVirtual = computed(() => props2.virtual !== false && props2.dropdownMatchSelectWidth !== false);
        useProvideSelectProps(toReactive(_extends$1(_extends$1({}, parsedOptions), {
          flattenOptions: displayOptions,
          onActiveValue,
          defaultActiveFirstOption: mergedDefaultActiveFirstOption,
          onSelect: onInternalSelect,
          menuItemSelectedIcon: toRef(props2, "menuItemSelectedIcon"),
          rawValues,
          fieldNames: mergedFieldNames,
          virtual: realVirtual,
          listHeight: toRef(props2, "listHeight"),
          listItemHeight: toRef(props2, "listItemHeight"),
          childrenAsData
        })));
        const selectRef = ref();
        expose({
          focus() {
            var _a;
            (_a = selectRef.value) === null || _a === void 0 ? void 0 : _a.focus();
          },
          blur() {
            var _a;
            (_a = selectRef.value) === null || _a === void 0 ? void 0 : _a.blur();
          },
          scrollTo(arg) {
            var _a;
            (_a = selectRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(arg);
          }
        });
        const pickProps = computed(() => {
          return omit(props2, [
            "id",
            "mode",
            "prefixCls",
            "backfill",
            "fieldNames",
            // Search
            "inputValue",
            "searchValue",
            "onSearch",
            "autoClearSearchValue",
            // Select
            "onSelect",
            "onDeselect",
            "dropdownMatchSelectWidth",
            // Options
            "filterOption",
            "filterSort",
            "optionFilterProp",
            "optionLabelProp",
            "options",
            "children",
            "defaultActiveFirstOption",
            "menuItemSelectedIcon",
            "virtual",
            "listHeight",
            "listItemHeight",
            // Value
            "value",
            "defaultValue",
            "labelInValue",
            "onChange"
          ]);
        });
        return () => {
          return createVNode(BaseSelect, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, pickProps.value), attrs), {}, {
            "id": mergedId,
            "prefixCls": props2.prefixCls,
            "ref": selectRef,
            "omitDomProps": OMIT_DOM_PROPS,
            "mode": props2.mode,
            "displayValues": displayValues.value,
            "onDisplayValuesChange": onDisplayValuesChange,
            "searchValue": mergedSearchValue.value,
            "onSearch": onInternalSearch,
            "onSearchSplit": onInternalSearchSplit,
            "dropdownMatchSelectWidth": props2.dropdownMatchSelectWidth,
            "OptionList": OptionList,
            "emptyOptions": !displayOptions.value.length,
            "activeValue": activeValue.value,
            "activeDescendantId": `${mergedId}_list_${accessibilityIndex.value}`
          }), slots);
        };
      }
    });
    const Option = () => null;
    Option.isSelectOption = true;
    Option.displayName = "ASelectOption";
    const OptGroup = () => null;
    OptGroup.isSelectOptGroup = true;
    OptGroup.displayName = "ASelectOptGroup";
    var DownOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
    var contextKey = Symbol("iconContext");
    var useInjectIconContext = function useInjectIconContext2() {
      return inject(contextKey, {
        prefixCls: ref("anticon"),
        rootClassName: ref(""),
        csp: ref()
      });
    };
    function canUseDom() {
      return !!(typeof window !== "undefined" && window.document && window.document.createElement);
    }
    function contains(root2, n2) {
      if (!root2) {
        return false;
      }
      if (root2.contains) {
        return root2.contains(n2);
      }
      return false;
    }
    var APPEND_ORDER = "data-vc-order";
    var MARK_KEY = "vc-icon-key";
    var containerCache = /* @__PURE__ */ new Map();
    function getMark() {
      var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, mark = _ref.mark;
      if (mark) {
        return mark.startsWith("data-") ? mark : "data-".concat(mark);
      }
      return MARK_KEY;
    }
    function getContainer$1(option) {
      if (option.attachTo) {
        return option.attachTo;
      }
      var head = document.querySelector("head");
      return head || document.body;
    }
    function getOrder(prepend) {
      if (prepend === "queue") {
        return "prependQueue";
      }
      return prepend ? "prepend" : "append";
    }
    function findStyles(container) {
      return Array.from((containerCache.get(container) || container).children).filter(function(node2) {
        return node2.tagName === "STYLE";
      });
    }
    function injectCSS(css2) {
      var option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      if (!canUseDom()) {
        return null;
      }
      var csp = option.csp, prepend = option.prepend;
      var styleNode = document.createElement("style");
      styleNode.setAttribute(APPEND_ORDER, getOrder(prepend));
      if (csp && csp.nonce) {
        styleNode.nonce = csp.nonce;
      }
      styleNode.innerHTML = css2;
      var container = getContainer$1(option);
      var firstChild = container.firstChild;
      if (prepend) {
        if (prepend === "queue") {
          var existStyle = findStyles(container).filter(function(node2) {
            return ["prepend", "prependQueue"].includes(node2.getAttribute(APPEND_ORDER));
          });
          if (existStyle.length) {
            container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);
            return styleNode;
          }
        }
        container.insertBefore(styleNode, firstChild);
      } else {
        container.appendChild(styleNode);
      }
      return styleNode;
    }
    function findExistNode(key2) {
      var option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      var container = getContainer$1(option);
      return findStyles(container).find(function(node2) {
        return node2.getAttribute(getMark(option)) === key2;
      });
    }
    function syncRealContainer(container, option) {
      var cachedRealContainer = containerCache.get(container);
      if (!cachedRealContainer || !contains(document, cachedRealContainer)) {
        var placeholderStyle = injectCSS("", option);
        var parentNode = placeholderStyle.parentNode;
        containerCache.set(container, parentNode);
        container.removeChild(placeholderStyle);
      }
    }
    function updateCSS(css2, key2) {
      var option = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      var container = getContainer$1(option);
      syncRealContainer(container, option);
      var existNode = findExistNode(key2, option);
      if (existNode) {
        if (option.csp && option.csp.nonce && existNode.nonce !== option.csp.nonce) {
          existNode.nonce = option.csp.nonce;
        }
        if (existNode.innerHTML !== css2) {
          existNode.innerHTML = css2;
        }
        return existNode;
      }
      var newNode = injectCSS(css2, option);
      newNode.setAttribute(getMark(option), key2);
      return newNode;
    }
    function _objectSpread$m(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$m(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$m(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    function warning$1(valid, message) {
    }
    function isIconDefinition(target) {
      return typeof target === "object" && typeof target.name === "string" && typeof target.theme === "string" && (typeof target.icon === "object" || typeof target.icon === "function");
    }
    function generate(node2, key2, rootProps) {
      if (!rootProps) {
        return h$1(node2.tag, _objectSpread$m({
          key: key2
        }, node2.attrs), (node2.children || []).map(function(child, index2) {
          return generate(child, "".concat(key2, "-").concat(node2.tag, "-").concat(index2));
        }));
      }
      return h$1(node2.tag, _objectSpread$m({
        key: key2
      }, rootProps, node2.attrs), (node2.children || []).map(function(child, index2) {
        return generate(child, "".concat(key2, "-").concat(node2.tag, "-").concat(index2));
      }));
    }
    function getSecondaryColor(primaryColor) {
      return generate$1(primaryColor)[0];
    }
    function normalizeTwoToneColors(twoToneColor) {
      if (!twoToneColor) {
        return [];
      }
      return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
    }
    var iconStyles = "\n.anticon {\n  display: inline-block;\n  color: inherit;\n  font-style: normal;\n  line-height: 0;\n  text-align: center;\n  text-transform: none;\n  vertical-align: -0.125em;\n  text-rendering: optimizeLegibility;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n  line-height: 1;\n}\n\n.anticon svg {\n  display: inline-block;\n}\n\n.anticon::before {\n  display: none;\n}\n\n.anticon .anticon-icon {\n  display: block;\n}\n\n.anticon[tabindex] {\n  cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n  display: inline-block;\n  -webkit-animation: loadingCircle 1s infinite linear;\n  animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n  100% {\n    -webkit-transform: rotate(360deg);\n    transform: rotate(360deg);\n  }\n}\n\n@keyframes loadingCircle {\n  100% {\n    -webkit-transform: rotate(360deg);\n    transform: rotate(360deg);\n  }\n}\n";
    function getRoot(ele) {
      return ele && ele.getRootNode && ele.getRootNode();
    }
    function inShadow(ele) {
      if (!canUseDom()) {
        return false;
      }
      return getRoot(ele) instanceof ShadowRoot;
    }
    function getShadowRoot(ele) {
      return inShadow(ele) ? getRoot(ele) : null;
    }
    var useInsertStyles = function useInsertStyles2() {
      var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls, csp = _useInjectIconContext.csp;
      var instance = getCurrentInstance();
      var mergedStyleStr = iconStyles;
      if (prefixCls) {
        mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls.value);
      }
      nextTick(function() {
        if (!canUseDom()) {
          return;
        }
        var ele = instance.vnode.el;
        var shadowRoot = getShadowRoot(ele);
        updateCSS(mergedStyleStr, "@ant-design-vue-icons", {
          prepend: true,
          csp: csp.value,
          attachTo: shadowRoot
        });
      });
    };
    var _excluded$1 = ["icon", "primaryColor", "secondaryColor"];
    function _objectWithoutProperties$1(source, excluded) {
      if (source == null) return {};
      var target = _objectWithoutPropertiesLoose$1(source, excluded);
      var key2, i2;
      if (Object.getOwnPropertySymbols) {
        var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
        for (i2 = 0; i2 < sourceSymbolKeys.length; i2++) {
          key2 = sourceSymbolKeys[i2];
          if (excluded.indexOf(key2) >= 0) continue;
          if (!Object.prototype.propertyIsEnumerable.call(source, key2)) continue;
          target[key2] = source[key2];
        }
      }
      return target;
    }
    function _objectWithoutPropertiesLoose$1(source, excluded) {
      if (source == null) return {};
      var target = {};
      var sourceKeys = Object.keys(source);
      var key2, i2;
      for (i2 = 0; i2 < sourceKeys.length; i2++) {
        key2 = sourceKeys[i2];
        if (excluded.indexOf(key2) >= 0) continue;
        target[key2] = source[key2];
      }
      return target;
    }
    function _objectSpread$l(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$l(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$l(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var twoToneColorPalette = reactive({
      primaryColor: "#333",
      secondaryColor: "#E6E6E6",
      calculated: false
    });
    function setTwoToneColors(_ref) {
      var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor;
      twoToneColorPalette.primaryColor = primaryColor;
      twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
      twoToneColorPalette.calculated = !!secondaryColor;
    }
    function getTwoToneColors() {
      return _objectSpread$l({}, twoToneColorPalette);
    }
    var IconBase = function IconBase2(props2, context) {
      var _props$context$attrs = _objectSpread$l({}, props2, context.attrs), icon = _props$context$attrs.icon, primaryColor = _props$context$attrs.primaryColor, secondaryColor = _props$context$attrs.secondaryColor, restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1);
      var colors = twoToneColorPalette;
      if (primaryColor) {
        colors = {
          primaryColor,
          secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
        };
      }
      warning$1(isIconDefinition(icon));
      if (!isIconDefinition(icon)) {
        return null;
      }
      var target = icon;
      if (target && typeof target.icon === "function") {
        target = _objectSpread$l({}, target, {
          icon: target.icon(colors.primaryColor, colors.secondaryColor)
        });
      }
      return generate(target.icon, "svg-".concat(target.name), _objectSpread$l({}, restProps, {
        "data-icon": target.name,
        width: "1em",
        height: "1em",
        fill: "currentColor",
        "aria-hidden": "true"
      }));
    };
    IconBase.props = {
      icon: Object,
      primaryColor: String,
      secondaryColor: String,
      focusable: String
    };
    IconBase.inheritAttrs = false;
    IconBase.displayName = "IconBase";
    IconBase.getTwoToneColors = getTwoToneColors;
    IconBase.setTwoToneColors = setTwoToneColors;
    function _slicedToArray$1(arr, i2) {
      return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i2) || _unsupportedIterableToArray$1(arr, i2) || _nonIterableRest$1();
    }
    function _nonIterableRest$1() {
      throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
    }
    function _unsupportedIterableToArray$1(o2, minLen) {
      if (!o2) return;
      if (typeof o2 === "string") return _arrayLikeToArray$1(o2, minLen);
      var n2 = Object.prototype.toString.call(o2).slice(8, -1);
      if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name;
      if (n2 === "Map" || n2 === "Set") return Array.from(o2);
      if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray$1(o2, minLen);
    }
    function _arrayLikeToArray$1(arr, len) {
      if (len == null || len > arr.length) len = arr.length;
      for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
        arr2[i2] = arr[i2];
      }
      return arr2;
    }
    function _iterableToArrayLimit$1(arr, i2) {
      var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
      if (_i == null) return;
      var _arr = [];
      var _n = true;
      var _d = false;
      var _s, _e;
      try {
        for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
          _arr.push(_s.value);
          if (i2 && _arr.length === i2) break;
        }
      } catch (err) {
        _d = true;
        _e = err;
      } finally {
        try {
          if (!_n && _i["return"] != null) _i["return"]();
        } finally {
          if (_d) throw _e;
        }
      }
      return _arr;
    }
    function _arrayWithHoles$1(arr) {
      if (Array.isArray(arr)) return arr;
    }
    function setTwoToneColor(twoToneColor) {
      var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
      return IconBase.setTwoToneColors({
        primaryColor,
        secondaryColor
      });
    }
    function getTwoToneColor() {
      var colors = IconBase.getTwoToneColors();
      if (!colors.calculated) {
        return colors.primaryColor;
      }
      return [colors.primaryColor, colors.secondaryColor];
    }
    var InsertStyles = /* @__PURE__ */ defineComponent({
      name: "InsertStyles",
      setup: function setup() {
        useInsertStyles();
        return function() {
          return null;
        };
      }
    });
    var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
    function _slicedToArray(arr, i2) {
      return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i2) || _unsupportedIterableToArray(arr, i2) || _nonIterableRest();
    }
    function _nonIterableRest() {
      throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
    }
    function _unsupportedIterableToArray(o2, minLen) {
      if (!o2) return;
      if (typeof o2 === "string") return _arrayLikeToArray(o2, minLen);
      var n2 = Object.prototype.toString.call(o2).slice(8, -1);
      if (n2 === "Object" && o2.constructor) n2 = o2.constructor.name;
      if (n2 === "Map" || n2 === "Set") return Array.from(o2);
      if (n2 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2)) return _arrayLikeToArray(o2, minLen);
    }
    function _arrayLikeToArray(arr, len) {
      if (len == null || len > arr.length) len = arr.length;
      for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) {
        arr2[i2] = arr[i2];
      }
      return arr2;
    }
    function _iterableToArrayLimit(arr, i2) {
      var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
      if (_i == null) return;
      var _arr = [];
      var _n = true;
      var _d = false;
      var _s, _e;
      try {
        for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
          _arr.push(_s.value);
          if (i2 && _arr.length === i2) break;
        }
      } catch (err) {
        _d = true;
        _e = err;
      } finally {
        try {
          if (!_n && _i["return"] != null) _i["return"]();
        } finally {
          if (_d) throw _e;
        }
      }
      return _arr;
    }
    function _arrayWithHoles(arr) {
      if (Array.isArray(arr)) return arr;
    }
    function _objectSpread$k(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$k(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$k(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    function _objectWithoutProperties(source, excluded) {
      if (source == null) return {};
      var target = _objectWithoutPropertiesLoose(source, excluded);
      var key2, i2;
      if (Object.getOwnPropertySymbols) {
        var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
        for (i2 = 0; i2 < sourceSymbolKeys.length; i2++) {
          key2 = sourceSymbolKeys[i2];
          if (excluded.indexOf(key2) >= 0) continue;
          if (!Object.prototype.propertyIsEnumerable.call(source, key2)) continue;
          target[key2] = source[key2];
        }
      }
      return target;
    }
    function _objectWithoutPropertiesLoose(source, excluded) {
      if (source == null) return {};
      var target = {};
      var sourceKeys = Object.keys(source);
      var key2, i2;
      for (i2 = 0; i2 < sourceKeys.length; i2++) {
        key2 = sourceKeys[i2];
        if (excluded.indexOf(key2) >= 0) continue;
        target[key2] = source[key2];
      }
      return target;
    }
    setTwoToneColor(blue.primary);
    var Icon = function Icon2(props2, context) {
      var _classObj;
      var _props$context$attrs = _objectSpread$k({}, props2, context.attrs), cls = _props$context$attrs["class"], icon = _props$context$attrs.icon, spin = _props$context$attrs.spin, rotate = _props$context$attrs.rotate, tabindex = _props$context$attrs.tabindex, twoToneColor = _props$context$attrs.twoToneColor, onClick = _props$context$attrs.onClick, restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
      var _useInjectIconContext = useInjectIconContext(), prefixCls = _useInjectIconContext.prefixCls, rootClassName = _useInjectIconContext.rootClassName;
      var classObj = (_classObj = {}, _defineProperty$k(_classObj, rootClassName.value, !!rootClassName.value), _defineProperty$k(_classObj, prefixCls.value, true), _defineProperty$k(_classObj, "".concat(prefixCls.value, "-").concat(icon.name), Boolean(icon.name)), _defineProperty$k(_classObj, "".concat(prefixCls.value, "-spin"), !!spin || icon.name === "loading"), _classObj);
      var iconTabIndex = tabindex;
      if (iconTabIndex === void 0 && onClick) {
        iconTabIndex = -1;
      }
      var svgStyle = rotate ? {
        msTransform: "rotate(".concat(rotate, "deg)"),
        transform: "rotate(".concat(rotate, "deg)")
      } : void 0;
      var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
      return createVNode("span", _objectSpread$k({
        "role": "img",
        "aria-label": icon.name
      }, restProps, {
        "onClick": onClick,
        "class": [classObj, cls],
        "tabindex": iconTabIndex
      }), [createVNode(IconBase, {
        "icon": icon,
        "primaryColor": primaryColor,
        "secondaryColor": secondaryColor,
        "style": svgStyle
      }, null), createVNode(InsertStyles, null, null)]);
    };
    Icon.props = {
      spin: Boolean,
      rotate: Number,
      icon: Object,
      twoToneColor: [String, Array]
    };
    Icon.displayName = "AntdIcon";
    Icon.inheritAttrs = false;
    Icon.getTwoToneColor = getTwoToneColor;
    Icon.setTwoToneColor = setTwoToneColor;
    function _objectSpread$j(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$j(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$j(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var DownOutlined = function DownOutlined2(props2, context) {
      var p2 = _objectSpread$j({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$j({}, p2, {
        "icon": DownOutlined$1
      }), null);
    };
    DownOutlined.displayName = "DownOutlined";
    DownOutlined.inheritAttrs = false;
    var LoadingOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" };
    function _objectSpread$i(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$i(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$i(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var LoadingOutlined = function LoadingOutlined2(props2, context) {
      var p2 = _objectSpread$i({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$i({}, p2, {
        "icon": LoadingOutlined$1
      }), null);
    };
    LoadingOutlined.displayName = "LoadingOutlined";
    LoadingOutlined.inheritAttrs = false;
    var CheckOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" };
    function _objectSpread$h(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$h(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$h(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var CheckOutlined = function CheckOutlined2(props2, context) {
      var p2 = _objectSpread$h({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$h({}, p2, {
        "icon": CheckOutlined$1
      }), null);
    };
    CheckOutlined.displayName = "CheckOutlined";
    CheckOutlined.inheritAttrs = false;
    var CloseOutlined$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" };
    function _objectSpread$g(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$g(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$g(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var CloseOutlined = function CloseOutlined2(props2, context) {
      var p2 = _objectSpread$g({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$g({}, p2, {
        "icon": CloseOutlined$1
      }), null);
    };
    CloseOutlined.displayName = "CloseOutlined";
    CloseOutlined.inheritAttrs = false;
    var CloseCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, "name": "close-circle", "theme": "filled" };
    function _objectSpread$f(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$f(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$f(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var CloseCircleFilled = function CloseCircleFilled2(props2, context) {
      var p2 = _objectSpread$f({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$f({}, p2, {
        "icon": CloseCircleFilled$1
      }), null);
    };
    CloseCircleFilled.displayName = "CloseCircleFilled";
    CloseCircleFilled.inheritAttrs = false;
    var SearchOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
    function _objectSpread$e(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$e(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$e(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var SearchOutlined = function SearchOutlined2(props2, context) {
      var p2 = _objectSpread$e({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$e({}, p2, {
        "icon": SearchOutlined$1
      }), null);
    };
    SearchOutlined.displayName = "SearchOutlined";
    SearchOutlined.inheritAttrs = false;
    function getIcons(props2) {
      let slots = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      const {
        loading,
        multiple,
        prefixCls,
        hasFeedback,
        feedbackIcon,
        showArrow
      } = props2;
      const suffixIcon = props2.suffixIcon || slots.suffixIcon && slots.suffixIcon();
      const clearIcon = props2.clearIcon || slots.clearIcon && slots.clearIcon();
      const menuItemSelectedIcon = props2.menuItemSelectedIcon || slots.menuItemSelectedIcon && slots.menuItemSelectedIcon();
      const removeIcon = props2.removeIcon || slots.removeIcon && slots.removeIcon();
      const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : createVNode(CloseCircleFilled, null, null);
      const getSuffixIconNode = (arrowIcon) => createVNode(Fragment, null, [showArrow !== false && arrowIcon, hasFeedback && feedbackIcon]);
      let mergedSuffixIcon = null;
      if (suffixIcon !== void 0) {
        mergedSuffixIcon = getSuffixIconNode(suffixIcon);
      } else if (loading) {
        mergedSuffixIcon = getSuffixIconNode(createVNode(LoadingOutlined, {
          "spin": true
        }, null));
      } else {
        const iconCls = `${prefixCls}-suffix`;
        mergedSuffixIcon = (_ref) => {
          let {
            open: open2,
            showSearch
          } = _ref;
          if (open2 && showSearch) {
            return getSuffixIconNode(createVNode(SearchOutlined, {
              "class": iconCls
            }, null));
          }
          return getSuffixIconNode(createVNode(DownOutlined, {
            "class": iconCls
          }, null));
        };
      }
      let mergedItemIcon = null;
      if (menuItemSelectedIcon !== void 0) {
        mergedItemIcon = menuItemSelectedIcon;
      } else if (multiple) {
        mergedItemIcon = createVNode(CheckOutlined, null, null);
      } else {
        mergedItemIcon = null;
      }
      let mergedRemoveIcon = null;
      if (removeIcon !== void 0) {
        mergedRemoveIcon = removeIcon;
      } else {
        mergedRemoveIcon = createVNode(CloseOutlined, null, null);
      }
      return {
        clearIcon: mergedClearIcon,
        suffixIcon: mergedSuffixIcon,
        itemIcon: mergedItemIcon,
        removeIcon: mergedRemoveIcon
      };
    }
    function createContext(defaultValue) {
      const contextKey2 = Symbol("contextKey");
      const useProvide = (props2, newProps) => {
        const mergedProps = reactive({});
        provide(contextKey2, mergedProps);
        watchEffect(() => {
          _extends$1(mergedProps, props2, newProps || {});
        });
        return mergedProps;
      };
      const useInject = () => {
        return inject(contextKey2, defaultValue) || {};
      };
      return {
        useProvide,
        useInject
      };
    }
    const ContextKey = Symbol("ContextProps");
    const InternalContextKey = Symbol("InternalContextProps");
    const useProvideFormItemContext = function(props2) {
      let useValidation = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : computed(() => true);
      const formItemFields = ref(/* @__PURE__ */ new Map());
      const addFormItemField = (key2, type) => {
        formItemFields.value.set(key2, type);
        formItemFields.value = new Map(formItemFields.value);
      };
      const removeFormItemField = (key2) => {
        formItemFields.value.delete(key2);
        formItemFields.value = new Map(formItemFields.value);
      };
      watch([useValidation, formItemFields], () => {
      });
      provide(ContextKey, props2);
      provide(InternalContextKey, {
        addFormItemField,
        removeFormItemField
      });
    };
    const defaultContext = {
      id: computed(() => void 0),
      onFieldBlur: () => {
      },
      onFieldChange: () => {
      },
      clearValidate: () => {
      }
    };
    const defaultInternalContext = {
      addFormItemField: () => {
      },
      removeFormItemField: () => {
      }
    };
    const useInjectFormItemContext = () => {
      const internalContext = inject(InternalContextKey, defaultInternalContext);
      const formItemFieldKey = Symbol("FormItemFieldKey");
      const instance = getCurrentInstance();
      internalContext.addFormItemField(formItemFieldKey, instance.type);
      onBeforeUnmount(() => {
        internalContext.removeFormItemField(formItemFieldKey);
      });
      provide(InternalContextKey, defaultInternalContext);
      provide(ContextKey, defaultContext);
      return inject(ContextKey, defaultContext);
    };
    const FormItemRest = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "AFormItemRest",
      setup(_2, _ref) {
        let {
          slots
        } = _ref;
        provide(InternalContextKey, defaultInternalContext);
        provide(ContextKey, defaultContext);
        return () => {
          var _a;
          return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
        };
      }
    });
    const FormItemInputContext = createContext({});
    function getStatusClassNames(prefixCls, status, hasFeedback) {
      return classNames({
        [`${prefixCls}-status-success`]: status === "success",
        [`${prefixCls}-status-warning`]: status === "warning",
        [`${prefixCls}-status-error`]: status === "error",
        [`${prefixCls}-status-validating`]: status === "validating",
        [`${prefixCls}-has-feedback`]: hasFeedback
      });
    }
    const getMergedStatus = (contextStatus, customStatus) => customStatus || contextStatus;
    const genSpaceCompactStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        [componentCls]: {
          display: "inline-flex",
          "&-block": {
            display: "flex",
            width: "100%"
          },
          "&-vertical": {
            flexDirection: "column"
          }
        }
      };
    };
    const genSpaceStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        [componentCls]: {
          display: "inline-flex",
          "&-rtl": {
            direction: "rtl"
          },
          "&-vertical": {
            flexDirection: "column"
          },
          "&-align": {
            flexDirection: "column",
            "&-center": {
              alignItems: "center"
            },
            "&-start": {
              alignItems: "flex-start"
            },
            "&-end": {
              alignItems: "flex-end"
            },
            "&-baseline": {
              alignItems: "baseline"
            }
          },
          [`${componentCls}-item`]: {
            "&:empty": {
              display: "none"
            }
          }
        }
      };
    };
    const useStyle$b = genComponentStyleHook("Space", (token2) => [genSpaceStyle(token2), genSpaceCompactStyle(token2)]);
    const spaceCompactItemProps = () => ({
      compactSize: String,
      compactDirection: PropTypes.oneOf(tuple("horizontal", "vertical")).def("horizontal"),
      isFirstItem: booleanType(),
      isLastItem: booleanType()
    });
    const SpaceCompactItemContext = createContext(null);
    const useCompactItemContext = (prefixCls, direction) => {
      const compactItemContext = SpaceCompactItemContext.useInject();
      const compactItemClassnames = computed(() => {
        if (!compactItemContext || isEmpty(compactItemContext)) return "";
        const {
          compactDirection,
          isFirstItem,
          isLastItem
        } = compactItemContext;
        const separator = compactDirection === "vertical" ? "-vertical-" : "-";
        return classNames({
          [`${prefixCls.value}-compact${separator}item`]: true,
          [`${prefixCls.value}-compact${separator}first-item`]: isFirstItem,
          [`${prefixCls.value}-compact${separator}last-item`]: isLastItem,
          [`${prefixCls.value}-compact${separator}item-rtl`]: direction.value === "rtl"
        });
      });
      return {
        compactSize: computed(() => compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize),
        compactDirection: computed(() => compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection),
        compactItemClassnames
      };
    };
    const NoCompactStyle = /* @__PURE__ */ defineComponent({
      name: "NoCompactStyle",
      setup(_2, _ref) {
        let {
          slots
        } = _ref;
        SpaceCompactItemContext.useProvide(null);
        return () => {
          var _a;
          return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
        };
      }
    });
    const spaceCompactProps = () => ({
      prefixCls: String,
      size: {
        type: String
      },
      direction: PropTypes.oneOf(tuple("horizontal", "vertical")).def("horizontal"),
      align: PropTypes.oneOf(tuple("start", "end", "center", "baseline")),
      block: {
        type: Boolean,
        default: void 0
      }
    });
    const CompactItem = /* @__PURE__ */ defineComponent({
      name: "CompactItem",
      props: spaceCompactItemProps(),
      setup(props2, _ref2) {
        let {
          slots
        } = _ref2;
        SpaceCompactItemContext.useProvide(props2);
        return () => {
          var _a;
          return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
        };
      }
    });
    const Compact = /* @__PURE__ */ defineComponent({
      name: "ASpaceCompact",
      inheritAttrs: false,
      props: spaceCompactProps(),
      setup(props2, _ref3) {
        let {
          attrs,
          slots
        } = _ref3;
        const {
          prefixCls,
          direction: directionConfig
        } = useConfigInject("space-compact", props2);
        const compactItemContext = SpaceCompactItemContext.useInject();
        const [wrapSSR, hashId] = useStyle$b(prefixCls);
        const clx = computed(() => {
          return classNames(prefixCls.value, hashId.value, {
            [`${prefixCls.value}-rtl`]: directionConfig.value === "rtl",
            [`${prefixCls.value}-block`]: props2.block,
            [`${prefixCls.value}-vertical`]: props2.direction === "vertical"
          });
        });
        return () => {
          var _a;
          const childNodes = flattenChildren(((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) || []);
          if (childNodes.length === 0) {
            return null;
          }
          return wrapSSR(createVNode("div", _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "class": [clx.value, attrs.class]
          }), [childNodes.map((child, i2) => {
            var _a2;
            const key2 = child && child.key || `${prefixCls.value}-item-${i2}`;
            const noCompactItemContext = !compactItemContext || isEmpty(compactItemContext);
            return createVNode(CompactItem, {
              "key": key2,
              "compactSize": (_a2 = props2.size) !== null && _a2 !== void 0 ? _a2 : "middle",
              "compactDirection": props2.direction,
              "isFirstItem": i2 === 0 && (noCompactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isFirstItem)),
              "isLastItem": i2 === childNodes.length - 1 && (noCompactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isLastItem))
            }, {
              default: () => [child]
            });
          })]));
        };
      }
    });
    const initMotionCommon = (duration) => ({
      animationDuration: duration,
      animationFillMode: "both"
    });
    const initMotionCommonLeave = (duration) => ({
      animationDuration: duration,
      animationFillMode: "both"
    });
    const initMotion = function(motionCls, inKeyframes, outKeyframes, duration) {
      let sameLevel = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
      const sameLevelPrefix = sameLevel ? "&" : "";
      return {
        [`
      ${sameLevelPrefix}${motionCls}-enter,
      ${sameLevelPrefix}${motionCls}-appear
    `]: _extends$1(_extends$1({}, initMotionCommon(duration)), {
          animationPlayState: "paused"
        }),
        [`${sameLevelPrefix}${motionCls}-leave`]: _extends$1(_extends$1({}, initMotionCommonLeave(duration)), {
          animationPlayState: "paused"
        }),
        [`
      ${sameLevelPrefix}${motionCls}-enter${motionCls}-enter-active,
      ${sameLevelPrefix}${motionCls}-appear${motionCls}-appear-active
    `]: {
          animationName: inKeyframes,
          animationPlayState: "running"
        },
        [`${sameLevelPrefix}${motionCls}-leave${motionCls}-leave-active`]: {
          animationName: outKeyframes,
          animationPlayState: "running",
          pointerEvents: "none"
        }
      };
    };
    const moveDownIn = new Keyframe("antMoveDownIn", {
      "0%": {
        transform: "translate3d(0, 100%, 0)",
        transformOrigin: "0 0",
        opacity: 0
      },
      "100%": {
        transform: "translate3d(0, 0, 0)",
        transformOrigin: "0 0",
        opacity: 1
      }
    });
    const moveDownOut = new Keyframe("antMoveDownOut", {
      "0%": {
        transform: "translate3d(0, 0, 0)",
        transformOrigin: "0 0",
        opacity: 1
      },
      "100%": {
        transform: "translate3d(0, 100%, 0)",
        transformOrigin: "0 0",
        opacity: 0
      }
    });
    const moveLeftIn = new Keyframe("antMoveLeftIn", {
      "0%": {
        transform: "translate3d(-100%, 0, 0)",
        transformOrigin: "0 0",
        opacity: 0
      },
      "100%": {
        transform: "translate3d(0, 0, 0)",
        transformOrigin: "0 0",
        opacity: 1
      }
    });
    const moveLeftOut = new Keyframe("antMoveLeftOut", {
      "0%": {
        transform: "translate3d(0, 0, 0)",
        transformOrigin: "0 0",
        opacity: 1
      },
      "100%": {
        transform: "translate3d(-100%, 0, 0)",
        transformOrigin: "0 0",
        opacity: 0
      }
    });
    const moveRightIn = new Keyframe("antMoveRightIn", {
      "0%": {
        transform: "translate3d(100%, 0, 0)",
        transformOrigin: "0 0",
        opacity: 0
      },
      "100%": {
        transform: "translate3d(0, 0, 0)",
        transformOrigin: "0 0",
        opacity: 1
      }
    });
    const moveRightOut = new Keyframe("antMoveRightOut", {
      "0%": {
        transform: "translate3d(0, 0, 0)",
        transformOrigin: "0 0",
        opacity: 1
      },
      "100%": {
        transform: "translate3d(100%, 0, 0)",
        transformOrigin: "0 0",
        opacity: 0
      }
    });
    const moveUpIn = new Keyframe("antMoveUpIn", {
      "0%": {
        transform: "translate3d(0, -100%, 0)",
        transformOrigin: "0 0",
        opacity: 0
      },
      "100%": {
        transform: "translate3d(0, 0, 0)",
        transformOrigin: "0 0",
        opacity: 1
      }
    });
    const moveUpOut = new Keyframe("antMoveUpOut", {
      "0%": {
        transform: "translate3d(0, 0, 0)",
        transformOrigin: "0 0",
        opacity: 1
      },
      "100%": {
        transform: "translate3d(0, -100%, 0)",
        transformOrigin: "0 0",
        opacity: 0
      }
    });
    const moveMotion = {
      "move-up": {
        inKeyframes: moveUpIn,
        outKeyframes: moveUpOut
      },
      "move-down": {
        inKeyframes: moveDownIn,
        outKeyframes: moveDownOut
      },
      "move-left": {
        inKeyframes: moveLeftIn,
        outKeyframes: moveLeftOut
      },
      "move-right": {
        inKeyframes: moveRightIn,
        outKeyframes: moveRightOut
      }
    };
    const initMoveMotion = (token2, motionName) => {
      const {
        antCls
      } = token2;
      const motionCls = `${antCls}-${motionName}`;
      const {
        inKeyframes,
        outKeyframes
      } = moveMotion[motionName];
      return [initMotion(motionCls, inKeyframes, outKeyframes, token2.motionDurationMid), {
        [`
        ${motionCls}-enter,
        ${motionCls}-appear
      `]: {
          opacity: 0,
          animationTimingFunction: token2.motionEaseOutCirc
        },
        [`${motionCls}-leave`]: {
          animationTimingFunction: token2.motionEaseInOutCirc
        }
      }];
    };
    const slideUpIn = new Keyframe("antSlideUpIn", {
      "0%": {
        transform: "scaleY(0.8)",
        transformOrigin: "0% 0%",
        opacity: 0
      },
      "100%": {
        transform: "scaleY(1)",
        transformOrigin: "0% 0%",
        opacity: 1
      }
    });
    const slideUpOut = new Keyframe("antSlideUpOut", {
      "0%": {
        transform: "scaleY(1)",
        transformOrigin: "0% 0%",
        opacity: 1
      },
      "100%": {
        transform: "scaleY(0.8)",
        transformOrigin: "0% 0%",
        opacity: 0
      }
    });
    const slideDownIn = new Keyframe("antSlideDownIn", {
      "0%": {
        transform: "scaleY(0.8)",
        transformOrigin: "100% 100%",
        opacity: 0
      },
      "100%": {
        transform: "scaleY(1)",
        transformOrigin: "100% 100%",
        opacity: 1
      }
    });
    const slideDownOut = new Keyframe("antSlideDownOut", {
      "0%": {
        transform: "scaleY(1)",
        transformOrigin: "100% 100%",
        opacity: 1
      },
      "100%": {
        transform: "scaleY(0.8)",
        transformOrigin: "100% 100%",
        opacity: 0
      }
    });
    const slideLeftIn = new Keyframe("antSlideLeftIn", {
      "0%": {
        transform: "scaleX(0.8)",
        transformOrigin: "0% 0%",
        opacity: 0
      },
      "100%": {
        transform: "scaleX(1)",
        transformOrigin: "0% 0%",
        opacity: 1
      }
    });
    const slideLeftOut = new Keyframe("antSlideLeftOut", {
      "0%": {
        transform: "scaleX(1)",
        transformOrigin: "0% 0%",
        opacity: 1
      },
      "100%": {
        transform: "scaleX(0.8)",
        transformOrigin: "0% 0%",
        opacity: 0
      }
    });
    const slideRightIn = new Keyframe("antSlideRightIn", {
      "0%": {
        transform: "scaleX(0.8)",
        transformOrigin: "100% 0%",
        opacity: 0
      },
      "100%": {
        transform: "scaleX(1)",
        transformOrigin: "100% 0%",
        opacity: 1
      }
    });
    const slideRightOut = new Keyframe("antSlideRightOut", {
      "0%": {
        transform: "scaleX(1)",
        transformOrigin: "100% 0%",
        opacity: 1
      },
      "100%": {
        transform: "scaleX(0.8)",
        transformOrigin: "100% 0%",
        opacity: 0
      }
    });
    const slideMotion = {
      "slide-up": {
        inKeyframes: slideUpIn,
        outKeyframes: slideUpOut
      },
      "slide-down": {
        inKeyframes: slideDownIn,
        outKeyframes: slideDownOut
      },
      "slide-left": {
        inKeyframes: slideLeftIn,
        outKeyframes: slideLeftOut
      },
      "slide-right": {
        inKeyframes: slideRightIn,
        outKeyframes: slideRightOut
      }
    };
    const initSlideMotion = (token2, motionName) => {
      const {
        antCls
      } = token2;
      const motionCls = `${antCls}-${motionName}`;
      const {
        inKeyframes,
        outKeyframes
      } = slideMotion[motionName];
      return [initMotion(motionCls, inKeyframes, outKeyframes, token2.motionDurationMid), {
        [`
      ${motionCls}-enter,
      ${motionCls}-appear
    `]: {
          transform: "scale(0)",
          transformOrigin: "0% 0%",
          opacity: 0,
          animationTimingFunction: token2.motionEaseOutQuint
        },
        [`${motionCls}-leave`]: {
          animationTimingFunction: token2.motionEaseInQuint
        }
      }];
    };
    const zoomIn = new Keyframe("antZoomIn", {
      "0%": {
        transform: "scale(0.2)",
        opacity: 0
      },
      "100%": {
        transform: "scale(1)",
        opacity: 1
      }
    });
    const zoomOut = new Keyframe("antZoomOut", {
      "0%": {
        transform: "scale(1)"
      },
      "100%": {
        transform: "scale(0.2)",
        opacity: 0
      }
    });
    const zoomBigIn = new Keyframe("antZoomBigIn", {
      "0%": {
        transform: "scale(0.8)",
        opacity: 0
      },
      "100%": {
        transform: "scale(1)",
        opacity: 1
      }
    });
    const zoomBigOut = new Keyframe("antZoomBigOut", {
      "0%": {
        transform: "scale(1)"
      },
      "100%": {
        transform: "scale(0.8)",
        opacity: 0
      }
    });
    const zoomUpIn = new Keyframe("antZoomUpIn", {
      "0%": {
        transform: "scale(0.8)",
        transformOrigin: "50% 0%",
        opacity: 0
      },
      "100%": {
        transform: "scale(1)",
        transformOrigin: "50% 0%"
      }
    });
    const zoomUpOut = new Keyframe("antZoomUpOut", {
      "0%": {
        transform: "scale(1)",
        transformOrigin: "50% 0%"
      },
      "100%": {
        transform: "scale(0.8)",
        transformOrigin: "50% 0%",
        opacity: 0
      }
    });
    const zoomLeftIn = new Keyframe("antZoomLeftIn", {
      "0%": {
        transform: "scale(0.8)",
        transformOrigin: "0% 50%",
        opacity: 0
      },
      "100%": {
        transform: "scale(1)",
        transformOrigin: "0% 50%"
      }
    });
    const zoomLeftOut = new Keyframe("antZoomLeftOut", {
      "0%": {
        transform: "scale(1)",
        transformOrigin: "0% 50%"
      },
      "100%": {
        transform: "scale(0.8)",
        transformOrigin: "0% 50%",
        opacity: 0
      }
    });
    const zoomRightIn = new Keyframe("antZoomRightIn", {
      "0%": {
        transform: "scale(0.8)",
        transformOrigin: "100% 50%",
        opacity: 0
      },
      "100%": {
        transform: "scale(1)",
        transformOrigin: "100% 50%"
      }
    });
    const zoomRightOut = new Keyframe("antZoomRightOut", {
      "0%": {
        transform: "scale(1)",
        transformOrigin: "100% 50%"
      },
      "100%": {
        transform: "scale(0.8)",
        transformOrigin: "100% 50%",
        opacity: 0
      }
    });
    const zoomDownIn = new Keyframe("antZoomDownIn", {
      "0%": {
        transform: "scale(0.8)",
        transformOrigin: "50% 100%",
        opacity: 0
      },
      "100%": {
        transform: "scale(1)",
        transformOrigin: "50% 100%"
      }
    });
    const zoomDownOut = new Keyframe("antZoomDownOut", {
      "0%": {
        transform: "scale(1)",
        transformOrigin: "50% 100%"
      },
      "100%": {
        transform: "scale(0.8)",
        transformOrigin: "50% 100%",
        opacity: 0
      }
    });
    const zoomMotion = {
      zoom: {
        inKeyframes: zoomIn,
        outKeyframes: zoomOut
      },
      "zoom-big": {
        inKeyframes: zoomBigIn,
        outKeyframes: zoomBigOut
      },
      "zoom-big-fast": {
        inKeyframes: zoomBigIn,
        outKeyframes: zoomBigOut
      },
      "zoom-left": {
        inKeyframes: zoomLeftIn,
        outKeyframes: zoomLeftOut
      },
      "zoom-right": {
        inKeyframes: zoomRightIn,
        outKeyframes: zoomRightOut
      },
      "zoom-up": {
        inKeyframes: zoomUpIn,
        outKeyframes: zoomUpOut
      },
      "zoom-down": {
        inKeyframes: zoomDownIn,
        outKeyframes: zoomDownOut
      }
    };
    const initZoomMotion = (token2, motionName) => {
      const {
        antCls
      } = token2;
      const motionCls = `${antCls}-${motionName}`;
      const {
        inKeyframes,
        outKeyframes
      } = zoomMotion[motionName];
      return [initMotion(motionCls, inKeyframes, outKeyframes, token2.motionDurationFast), {
        [`
        ${motionCls}-enter,
        ${motionCls}-appear
      `]: {
          transform: "scale(0)",
          opacity: 0,
          animationTimingFunction: token2.motionEaseOutCirc,
          "&-prepare": {
            transform: "none"
          }
        },
        [`${motionCls}-leave`]: {
          animationTimingFunction: token2.motionEaseInOutCirc
        }
      }];
    };
    const genCollapseMotion = (token2) => ({
      [token2.componentCls]: {
        // For common/openAnimation
        [`${token2.antCls}-motion-collapse-legacy`]: {
          overflow: "hidden",
          "&-active": {
            transition: `height ${token2.motionDurationMid} ${token2.motionEaseInOut},
        opacity ${token2.motionDurationMid} ${token2.motionEaseInOut} !important`
          }
        },
        [`${token2.antCls}-motion-collapse`]: {
          overflow: "hidden",
          transition: `height ${token2.motionDurationMid} ${token2.motionEaseInOut},
        opacity ${token2.motionDurationMid} ${token2.motionEaseInOut} !important`
        }
      }
    });
    const genItemStyle = (token2) => {
      const {
        controlPaddingHorizontal
      } = token2;
      return {
        position: "relative",
        display: "block",
        minHeight: token2.controlHeight,
        padding: `${(token2.controlHeight - token2.fontSize * token2.lineHeight) / 2}px ${controlPaddingHorizontal}px`,
        color: token2.colorText,
        fontWeight: "normal",
        fontSize: token2.fontSize,
        lineHeight: token2.lineHeight,
        boxSizing: "border-box"
      };
    };
    const genSingleStyle$1 = (token2) => {
      const {
        antCls,
        componentCls
      } = token2;
      const selectItemCls = `${componentCls}-item`;
      return [
        {
          [`${componentCls}-dropdown`]: _extends$1(_extends$1({}, resetComponent(token2)), {
            position: "absolute",
            top: -9999,
            zIndex: token2.zIndexPopup,
            boxSizing: "border-box",
            padding: token2.paddingXXS,
            overflow: "hidden",
            fontSize: token2.fontSize,
            // Fix select render lag of long text in chrome
            // https://github.com/ant-design/ant-design/issues/11456
            // https://github.com/ant-design/ant-design/issues/11843
            fontVariant: "initial",
            backgroundColor: token2.colorBgElevated,
            borderRadius: token2.borderRadiusLG,
            outline: "none",
            boxShadow: token2.boxShadowSecondary,
            [`
            &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomLeft,
            &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomLeft
          `]: {
              animationName: slideUpIn
            },
            [`
            &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topLeft,
            &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topLeft
          `]: {
              animationName: slideDownIn
            },
            [`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomLeft`]: {
              animationName: slideUpOut
            },
            [`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topLeft`]: {
              animationName: slideDownOut
            },
            "&-hidden": {
              display: "none"
            },
            "&-empty": {
              color: token2.colorTextDisabled
            },
            // ========================= Options =========================
            [`${selectItemCls}-empty`]: _extends$1(_extends$1({}, genItemStyle(token2)), {
              color: token2.colorTextDisabled
            }),
            [`${selectItemCls}`]: _extends$1(_extends$1({}, genItemStyle(token2)), {
              cursor: "pointer",
              transition: `background ${token2.motionDurationSlow} ease`,
              borderRadius: token2.borderRadiusSM,
              // =========== Group ============
              "&-group": {
                color: token2.colorTextDescription,
                fontSize: token2.fontSizeSM,
                cursor: "default"
              },
              // =========== Option ===========
              "&-option": {
                display: "flex",
                "&-content": _extends$1({
                  flex: "auto"
                }, textEllipsis),
                "&-state": {
                  flex: "none"
                },
                [`&-active:not(${selectItemCls}-option-disabled)`]: {
                  backgroundColor: token2.controlItemBgHover
                },
                [`&-selected:not(${selectItemCls}-option-disabled)`]: {
                  color: token2.colorText,
                  fontWeight: token2.fontWeightStrong,
                  backgroundColor: token2.controlItemBgActive,
                  [`${selectItemCls}-option-state`]: {
                    color: token2.colorPrimary
                  }
                },
                "&-disabled": {
                  [`&${selectItemCls}-option-selected`]: {
                    backgroundColor: token2.colorBgContainerDisabled
                  },
                  color: token2.colorTextDisabled,
                  cursor: "not-allowed"
                },
                "&-grouped": {
                  paddingInlineStart: token2.controlPaddingHorizontal * 2
                }
              }
            }),
            // =========================== RTL ===========================
            "&-rtl": {
              direction: "rtl"
            }
          })
        },
        // Follow code may reuse in other components
        initSlideMotion(token2, "slide-up"),
        initSlideMotion(token2, "slide-down"),
        initMoveMotion(token2, "move-up"),
        initMoveMotion(token2, "move-down")
      ];
    };
    const FIXED_ITEM_MARGIN = 2;
    function getSelectItemStyle(_ref) {
      let {
        controlHeightSM,
        controlHeight,
        lineWidth: borderWidth
      } = _ref;
      const selectItemDist = (controlHeight - controlHeightSM) / 2 - borderWidth;
      const selectItemMargin = Math.ceil(selectItemDist / 2);
      return [selectItemDist, selectItemMargin];
    }
    function genSizeStyle$1(token2, suffix) {
      const {
        componentCls,
        iconCls
      } = token2;
      const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;
      const selectItemHeight = token2.controlHeightSM;
      const [selectItemDist] = getSelectItemStyle(token2);
      const suffixCls = suffix ? `${componentCls}-${suffix}` : "";
      return {
        [`${componentCls}-multiple${suffixCls}`]: {
          fontSize: token2.fontSize,
          /**
           * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
           * may update to redesign with its align logic.
           */
          // =========================== Overflow ===========================
          [selectOverflowPrefixCls]: {
            position: "relative",
            display: "flex",
            flex: "auto",
            flexWrap: "wrap",
            maxWidth: "100%",
            "&-item": {
              flex: "none",
              alignSelf: "center",
              maxWidth: "100%",
              display: "inline-flex"
            }
          },
          // ========================= Selector =========================
          [`${componentCls}-selector`]: {
            display: "flex",
            flexWrap: "wrap",
            alignItems: "center",
            // Multiple is little different that horizontal is follow the vertical
            padding: `${selectItemDist - FIXED_ITEM_MARGIN}px ${FIXED_ITEM_MARGIN * 2}px`,
            borderRadius: token2.borderRadius,
            [`${componentCls}-show-search&`]: {
              cursor: "text"
            },
            [`${componentCls}-disabled&`]: {
              background: token2.colorBgContainerDisabled,
              cursor: "not-allowed"
            },
            "&:after": {
              display: "inline-block",
              width: 0,
              margin: `${FIXED_ITEM_MARGIN}px 0`,
              lineHeight: `${selectItemHeight}px`,
              content: '"\\a0"'
            }
          },
          [`
        &${componentCls}-show-arrow ${componentCls}-selector,
        &${componentCls}-allow-clear ${componentCls}-selector
      `]: {
            paddingInlineEnd: token2.fontSizeIcon + token2.controlPaddingHorizontal
          },
          // ======================== Selections ========================
          [`${componentCls}-selection-item`]: {
            position: "relative",
            display: "flex",
            flex: "none",
            boxSizing: "border-box",
            maxWidth: "100%",
            height: selectItemHeight,
            marginTop: FIXED_ITEM_MARGIN,
            marginBottom: FIXED_ITEM_MARGIN,
            lineHeight: `${selectItemHeight - token2.lineWidth * 2}px`,
            background: token2.colorFillSecondary,
            border: `${token2.lineWidth}px solid ${token2.colorSplit}`,
            borderRadius: token2.borderRadiusSM,
            cursor: "default",
            transition: `font-size ${token2.motionDurationSlow}, line-height ${token2.motionDurationSlow}, height ${token2.motionDurationSlow}`,
            userSelect: "none",
            marginInlineEnd: FIXED_ITEM_MARGIN * 2,
            paddingInlineStart: token2.paddingXS,
            paddingInlineEnd: token2.paddingXS / 2,
            [`${componentCls}-disabled&`]: {
              color: token2.colorTextDisabled,
              borderColor: token2.colorBorder,
              cursor: "not-allowed"
            },
            // It's ok not to do this, but 24px makes bottom narrow in view should adjust
            "&-content": {
              display: "inline-block",
              marginInlineEnd: token2.paddingXS / 2,
              overflow: "hidden",
              whiteSpace: "pre",
              textOverflow: "ellipsis"
            },
            "&-remove": _extends$1(_extends$1({}, resetIcon()), {
              display: "inline-block",
              color: token2.colorIcon,
              fontWeight: "bold",
              fontSize: 10,
              lineHeight: "inherit",
              cursor: "pointer",
              [`> ${iconCls}`]: {
                verticalAlign: "-0.2em"
              },
              "&:hover": {
                color: token2.colorIconHover
              }
            })
          },
          // ========================== Input ==========================
          [`${selectOverflowPrefixCls}-item + ${selectOverflowPrefixCls}-item`]: {
            [`${componentCls}-selection-search`]: {
              marginInlineStart: 0
            }
          },
          [`${componentCls}-selection-search`]: {
            display: "inline-flex",
            position: "relative",
            maxWidth: "100%",
            marginInlineStart: token2.inputPaddingHorizontalBase - selectItemDist,
            [`
          &-input,
          &-mirror
        `]: {
              height: selectItemHeight,
              fontFamily: token2.fontFamily,
              lineHeight: `${selectItemHeight}px`,
              transition: `all ${token2.motionDurationSlow}`
            },
            "&-input": {
              width: "100%",
              minWidth: 4.1
              // fix search cursor missing
            },
            "&-mirror": {
              position: "absolute",
              top: 0,
              insetInlineStart: 0,
              insetInlineEnd: "auto",
              zIndex: 999,
              whiteSpace: "pre",
              visibility: "hidden"
            }
          },
          // ======================= Placeholder =======================
          [`${componentCls}-selection-placeholder `]: {
            position: "absolute",
            top: "50%",
            insetInlineStart: token2.inputPaddingHorizontalBase,
            insetInlineEnd: token2.inputPaddingHorizontalBase,
            transform: "translateY(-50%)",
            transition: `all ${token2.motionDurationSlow}`
          }
        }
      };
    }
    function genMultipleStyle(token2) {
      const {
        componentCls
      } = token2;
      const smallToken = merge(token2, {
        controlHeight: token2.controlHeightSM,
        controlHeightSM: token2.controlHeightXS,
        borderRadius: token2.borderRadiusSM,
        borderRadiusSM: token2.borderRadiusXS
      });
      const [, smSelectItemMargin] = getSelectItemStyle(token2);
      return [
        genSizeStyle$1(token2),
        // ======================== Small ========================
        // Shared
        genSizeStyle$1(smallToken, "sm"),
        // Padding
        {
          [`${componentCls}-multiple${componentCls}-sm`]: {
            [`${componentCls}-selection-placeholder`]: {
              insetInlineStart: token2.controlPaddingHorizontalSM - token2.lineWidth,
              insetInlineEnd: "auto"
            },
            // https://github.com/ant-design/ant-design/issues/29559
            [`${componentCls}-selection-search`]: {
              marginInlineStart: smSelectItemMargin
            }
          }
        },
        // ======================== Large ========================
        // Shared
        genSizeStyle$1(merge(token2, {
          fontSize: token2.fontSizeLG,
          controlHeight: token2.controlHeightLG,
          controlHeightSM: token2.controlHeight,
          borderRadius: token2.borderRadiusLG,
          borderRadiusSM: token2.borderRadius
        }), "lg")
      ];
    }
    function genSizeStyle(token2, suffix) {
      const {
        componentCls,
        inputPaddingHorizontalBase,
        borderRadius
      } = token2;
      const selectHeightWithoutBorder = token2.controlHeight - token2.lineWidth * 2;
      const selectionItemPadding = Math.ceil(token2.fontSize * 1.25);
      const suffixCls = suffix ? `${componentCls}-${suffix}` : "";
      return {
        [`${componentCls}-single${suffixCls}`]: {
          fontSize: token2.fontSize,
          // ========================= Selector =========================
          [`${componentCls}-selector`]: _extends$1(_extends$1({}, resetComponent(token2)), {
            display: "flex",
            borderRadius,
            [`${componentCls}-selection-search`]: {
              position: "absolute",
              top: 0,
              insetInlineStart: inputPaddingHorizontalBase,
              insetInlineEnd: inputPaddingHorizontalBase,
              bottom: 0,
              "&-input": {
                width: "100%"
              }
            },
            [`
          ${componentCls}-selection-item,
          ${componentCls}-selection-placeholder
        `]: {
              padding: 0,
              lineHeight: `${selectHeightWithoutBorder}px`,
              transition: `all ${token2.motionDurationSlow}`,
              // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
              "@supports (-moz-appearance: meterbar)": {
                lineHeight: `${selectHeightWithoutBorder}px`
              }
            },
            [`${componentCls}-selection-item`]: {
              position: "relative",
              userSelect: "none"
            },
            [`${componentCls}-selection-placeholder`]: {
              transition: "none",
              pointerEvents: "none"
            },
            // For common baseline align
            [[
              "&:after",
              /* For '' value baseline align */
              `${componentCls}-selection-item:after`,
              /* For undefined value baseline align */
              `${componentCls}-selection-placeholder:after`
            ].join(",")]: {
              display: "inline-block",
              width: 0,
              visibility: "hidden",
              content: '"\\a0"'
            }
          }),
          [`
        &${componentCls}-show-arrow ${componentCls}-selection-item,
        &${componentCls}-show-arrow ${componentCls}-selection-placeholder
      `]: {
            paddingInlineEnd: selectionItemPadding
          },
          // Opacity selection if open
          [`&${componentCls}-open ${componentCls}-selection-item`]: {
            color: token2.colorTextPlaceholder
          },
          // ========================== Input ==========================
          // We only change the style of non-customize input which is only support by `combobox` mode.
          // Not customize
          [`&:not(${componentCls}-customize-input)`]: {
            [`${componentCls}-selector`]: {
              width: "100%",
              height: token2.controlHeight,
              padding: `0 ${inputPaddingHorizontalBase}px`,
              [`${componentCls}-selection-search-input`]: {
                height: selectHeightWithoutBorder
              },
              "&:after": {
                lineHeight: `${selectHeightWithoutBorder}px`
              }
            }
          },
          [`&${componentCls}-customize-input`]: {
            [`${componentCls}-selector`]: {
              "&:after": {
                display: "none"
              },
              [`${componentCls}-selection-search`]: {
                position: "static",
                width: "100%"
              },
              [`${componentCls}-selection-placeholder`]: {
                position: "absolute",
                insetInlineStart: 0,
                insetInlineEnd: 0,
                padding: `0 ${inputPaddingHorizontalBase}px`,
                "&:after": {
                  display: "none"
                }
              }
            }
          }
        }
      };
    }
    function genSingleStyle(token2) {
      const {
        componentCls
      } = token2;
      const inputPaddingHorizontalSM = token2.controlPaddingHorizontalSM - token2.lineWidth;
      return [
        genSizeStyle(token2),
        // ======================== Small ========================
        // Shared
        genSizeStyle(merge(token2, {
          controlHeight: token2.controlHeightSM,
          borderRadius: token2.borderRadiusSM
        }), "sm"),
        // padding
        {
          [`${componentCls}-single${componentCls}-sm`]: {
            [`&:not(${componentCls}-customize-input)`]: {
              [`${componentCls}-selection-search`]: {
                insetInlineStart: inputPaddingHorizontalSM,
                insetInlineEnd: inputPaddingHorizontalSM
              },
              [`${componentCls}-selector`]: {
                padding: `0 ${inputPaddingHorizontalSM}px`
              },
              // With arrow should provides `padding-right` to show the arrow
              [`&${componentCls}-show-arrow ${componentCls}-selection-search`]: {
                insetInlineEnd: inputPaddingHorizontalSM + token2.fontSize * 1.5
              },
              [`
            &${componentCls}-show-arrow ${componentCls}-selection-item,
            &${componentCls}-show-arrow ${componentCls}-selection-placeholder
          `]: {
                paddingInlineEnd: token2.fontSize * 1.5
              }
            }
          }
        },
        // ======================== Large ========================
        // Shared
        genSizeStyle(merge(token2, {
          controlHeight: token2.controlHeightLG,
          fontSize: token2.fontSizeLG,
          borderRadius: token2.borderRadiusLG
        }), "lg")
      ];
    }
    function compactItemBorder(token2, parentCls, options) {
      const {
        focusElCls,
        focus,
        borderElCls
      } = options;
      const childCombinator = borderElCls ? "> *" : "";
      const hoverEffects = ["hover", focus ? "focus" : null, "active"].filter(Boolean).map((n2) => `&:${n2} ${childCombinator}`).join(",");
      return {
        [`&-item:not(${parentCls}-last-item)`]: {
          marginInlineEnd: -token2.lineWidth
        },
        "&-item": _extends$1(_extends$1({
          [hoverEffects]: {
            zIndex: 2
          }
        }, focusElCls ? {
          [`&${focusElCls}`]: {
            zIndex: 2
          }
        } : {}), {
          [`&[disabled] ${childCombinator}`]: {
            zIndex: 0
          }
        })
      };
    }
    function compactItemBorderRadius(prefixCls, parentCls, options) {
      const {
        borderElCls
      } = options;
      const childCombinator = borderElCls ? `> ${borderElCls}` : "";
      return {
        [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item) ${childCombinator}`]: {
          borderRadius: 0
        },
        [`&-item:not(${parentCls}-last-item)${parentCls}-first-item`]: {
          [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {
            borderStartEndRadius: 0,
            borderEndEndRadius: 0
          }
        },
        [`&-item:not(${parentCls}-first-item)${parentCls}-last-item`]: {
          [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {
            borderStartStartRadius: 0,
            borderEndStartRadius: 0
          }
        }
      };
    }
    function genCompactItemStyle(token2) {
      let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
        focus: true
      };
      const {
        componentCls
      } = token2;
      const compactCls = `${componentCls}-compact`;
      return {
        [compactCls]: _extends$1(_extends$1({}, compactItemBorder(token2, compactCls, options)), compactItemBorderRadius(componentCls, compactCls, options))
      };
    }
    const genSelectorStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        position: "relative",
        backgroundColor: token2.colorBgContainer,
        border: `${token2.lineWidth}px ${token2.lineType} ${token2.colorBorder}`,
        transition: `all ${token2.motionDurationMid} ${token2.motionEaseInOut}`,
        input: {
          cursor: "pointer"
        },
        [`${componentCls}-show-search&`]: {
          cursor: "text",
          input: {
            cursor: "auto",
            color: "inherit"
          }
        },
        [`${componentCls}-disabled&`]: {
          color: token2.colorTextDisabled,
          background: token2.colorBgContainerDisabled,
          cursor: "not-allowed",
          [`${componentCls}-multiple&`]: {
            background: token2.colorBgContainerDisabled
          },
          input: {
            cursor: "not-allowed"
          }
        }
      };
    };
    const genStatusStyle = function(rootSelectCls, token2) {
      let overwriteDefaultBorder = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
      const {
        componentCls,
        borderHoverColor,
        outlineColor,
        antCls
      } = token2;
      const overwriteStyle = overwriteDefaultBorder ? {
        [`${componentCls}-selector`]: {
          borderColor: borderHoverColor
        }
      } : {};
      return {
        [rootSelectCls]: {
          [`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: _extends$1(_extends$1({}, overwriteStyle), {
            [`${componentCls}-focused& ${componentCls}-selector`]: {
              borderColor: borderHoverColor,
              boxShadow: `0 0 0 ${token2.controlOutlineWidth}px ${outlineColor}`,
              borderInlineEndWidth: `${token2.controlLineWidth}px !important`,
              outline: 0
            },
            [`&:hover ${componentCls}-selector`]: {
              borderColor: borderHoverColor,
              borderInlineEndWidth: `${token2.controlLineWidth}px !important`
            }
          })
        }
      };
    };
    const getSearchInputWithoutBorderStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        [`${componentCls}-selection-search-input`]: {
          margin: 0,
          padding: 0,
          background: "transparent",
          border: "none",
          outline: "none",
          appearance: "none",
          "&::-webkit-search-cancel-button": {
            display: "none",
            "-webkit-appearance": "none"
          }
        }
      };
    };
    const genBaseStyle$1 = (token2) => {
      const {
        componentCls,
        inputPaddingHorizontalBase,
        iconCls
      } = token2;
      return {
        [componentCls]: _extends$1(_extends$1({}, resetComponent(token2)), {
          position: "relative",
          display: "inline-block",
          cursor: "pointer",
          [`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: _extends$1(_extends$1({}, genSelectorStyle(token2)), getSearchInputWithoutBorderStyle(token2)),
          // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
          //   ...genHoverStyle(token),
          // },
          // ======================== Selection ========================
          [`${componentCls}-selection-item`]: _extends$1({
            flex: 1,
            fontWeight: "normal"
          }, textEllipsis),
          // ======================= Placeholder =======================
          [`${componentCls}-selection-placeholder`]: _extends$1(_extends$1({}, textEllipsis), {
            flex: 1,
            color: token2.colorTextPlaceholder,
            pointerEvents: "none"
          }),
          // ========================== Arrow ==========================
          [`${componentCls}-arrow`]: _extends$1(_extends$1({}, resetIcon()), {
            position: "absolute",
            top: "50%",
            insetInlineStart: "auto",
            insetInlineEnd: inputPaddingHorizontalBase,
            height: token2.fontSizeIcon,
            marginTop: -token2.fontSizeIcon / 2,
            color: token2.colorTextQuaternary,
            fontSize: token2.fontSizeIcon,
            lineHeight: 1,
            textAlign: "center",
            pointerEvents: "none",
            display: "flex",
            alignItems: "center",
            [iconCls]: {
              verticalAlign: "top",
              transition: `transform ${token2.motionDurationSlow}`,
              "> svg": {
                verticalAlign: "top"
              },
              [`&:not(${componentCls}-suffix)`]: {
                pointerEvents: "auto"
              }
            },
            [`${componentCls}-disabled &`]: {
              cursor: "not-allowed"
            },
            "> *:not(:last-child)": {
              marginInlineEnd: 8
              // FIXME: magic
            }
          }),
          // ========================== Clear ==========================
          [`${componentCls}-clear`]: {
            position: "absolute",
            top: "50%",
            insetInlineStart: "auto",
            insetInlineEnd: inputPaddingHorizontalBase,
            zIndex: 1,
            display: "inline-block",
            width: token2.fontSizeIcon,
            height: token2.fontSizeIcon,
            marginTop: -token2.fontSizeIcon / 2,
            color: token2.colorTextQuaternary,
            fontSize: token2.fontSizeIcon,
            fontStyle: "normal",
            lineHeight: 1,
            textAlign: "center",
            textTransform: "none",
            background: token2.colorBgContainer,
            cursor: "pointer",
            opacity: 0,
            transition: `color ${token2.motionDurationMid} ease, opacity ${token2.motionDurationSlow} ease`,
            textRendering: "auto",
            "&:before": {
              display: "block"
            },
            "&:hover": {
              color: token2.colorTextTertiary
            }
          },
          "&:hover": {
            [`${componentCls}-clear`]: {
              opacity: 1
            }
          }
        }),
        // ========================= Feedback ==========================
        [`${componentCls}-has-feedback`]: {
          [`${componentCls}-clear`]: {
            insetInlineEnd: inputPaddingHorizontalBase + token2.fontSize + token2.paddingXXS
          }
        }
      };
    };
    const genSelectStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return [
        {
          [componentCls]: {
            // ==================== BorderLess ====================
            [`&-borderless ${componentCls}-selector`]: {
              backgroundColor: `transparent !important`,
              borderColor: `transparent !important`,
              boxShadow: `none !important`
            },
            // ==================== In Form ====================
            [`&${componentCls}-in-form-item`]: {
              width: "100%"
            }
          }
        },
        // =====================================================
        // ==                       LTR                       ==
        // =====================================================
        // Base
        genBaseStyle$1(token2),
        // Single
        genSingleStyle(token2),
        // Multiple
        genMultipleStyle(token2),
        // Dropdown
        genSingleStyle$1(token2),
        // =====================================================
        // ==                       RTL                       ==
        // =====================================================
        {
          [`${componentCls}-rtl`]: {
            direction: "rtl"
          }
        },
        // =====================================================
        // ==                     Status                      ==
        // =====================================================
        genStatusStyle(componentCls, merge(token2, {
          borderHoverColor: token2.colorPrimaryHover,
          outlineColor: token2.controlOutline
        })),
        genStatusStyle(`${componentCls}-status-error`, merge(token2, {
          borderHoverColor: token2.colorErrorHover,
          outlineColor: token2.colorErrorOutline
        }), true),
        genStatusStyle(`${componentCls}-status-warning`, merge(token2, {
          borderHoverColor: token2.colorWarningHover,
          outlineColor: token2.colorWarningOutline
        }), true),
        // =====================================================
        // ==             Space Compact                       ==
        // =====================================================
        genCompactItemStyle(token2, {
          borderElCls: `${componentCls}-selector`,
          focusElCls: `${componentCls}-focused`
        })
      ];
    };
    const useSelectStyle = genComponentStyleHook("Select", (token2, _ref) => {
      let {
        rootPrefixCls
      } = _ref;
      const selectToken = merge(token2, {
        rootPrefixCls,
        inputPaddingHorizontalBase: token2.paddingSM - 1
      });
      return [genSelectStyle(selectToken)];
    }, (token2) => ({
      zIndexPopup: token2.zIndexPopupBase + 50
    }));
    const selectProps = () => _extends$1(_extends$1({}, omit(selectProps$1(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
      value: someType([Array, Object, String, Number]),
      defaultValue: someType([Array, Object, String, Number]),
      notFoundContent: PropTypes.any,
      suffixIcon: PropTypes.any,
      itemIcon: PropTypes.any,
      size: stringType(),
      mode: stringType(),
      bordered: booleanType(true),
      transitionName: String,
      choiceTransitionName: stringType(""),
      popupClassName: String,
      /** @deprecated Please use `popupClassName` instead */
      dropdownClassName: String,
      placement: stringType(),
      status: stringType(),
      "onUpdate:value": functionType()
    });
    const SECRET_COMBOBOX_MODE_DO_NOT_USE = "SECRET_COMBOBOX_MODE_DO_NOT_USE";
    const Select = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ASelect",
      Option,
      OptGroup,
      inheritAttrs: false,
      props: initDefaultProps(selectProps(), {
        listHeight: 256,
        listItemHeight: 24
      }),
      SECRET_COMBOBOX_MODE_DO_NOT_USE,
      slots: Object,
      setup(props2, _ref) {
        let {
          attrs,
          emit: emit2,
          slots,
          expose
        } = _ref;
        const selectRef = ref();
        const formItemContext = useInjectFormItemContext();
        const formItemInputContext = FormItemInputContext.useInject();
        const mergedStatus = computed(() => getMergedStatus(formItemInputContext.status, props2.status));
        const focus = () => {
          var _a;
          (_a = selectRef.value) === null || _a === void 0 ? void 0 : _a.focus();
        };
        const blur = () => {
          var _a;
          (_a = selectRef.value) === null || _a === void 0 ? void 0 : _a.blur();
        };
        const scrollTo = (arg) => {
          var _a;
          (_a = selectRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(arg);
        };
        const mode = computed(() => {
          const {
            mode: mode2
          } = props2;
          if (mode2 === "combobox") {
            return void 0;
          }
          if (mode2 === SECRET_COMBOBOX_MODE_DO_NOT_USE) {
            return "combobox";
          }
          return mode2;
        });
        const {
          prefixCls,
          direction,
          configProvider,
          renderEmpty: renderEmpty2,
          size: contextSize,
          getPrefixCls,
          getPopupContainer,
          disabled,
          select
        } = useConfigInject("select", props2);
        const {
          compactSize,
          compactItemClassnames
        } = useCompactItemContext(prefixCls, direction);
        const mergedSize = computed(() => compactSize.value || contextSize.value);
        const contextDisabled = useInjectDisabled();
        const mergedDisabled = computed(() => {
          var _a;
          return (_a = disabled.value) !== null && _a !== void 0 ? _a : contextDisabled.value;
        });
        const [wrapSSR, hashId] = useSelectStyle(prefixCls);
        const rootPrefixCls = computed(() => getPrefixCls());
        const placement = computed(() => {
          if (props2.placement !== void 0) {
            return props2.placement;
          }
          return direction.value === "rtl" ? "bottomRight" : "bottomLeft";
        });
        const transitionName2 = computed(() => getTransitionName(rootPrefixCls.value, getTransitionDirection(placement.value), props2.transitionName));
        const mergedClassName = computed(() => classNames({
          [`${prefixCls.value}-lg`]: mergedSize.value === "large",
          [`${prefixCls.value}-sm`]: mergedSize.value === "small",
          [`${prefixCls.value}-rtl`]: direction.value === "rtl",
          [`${prefixCls.value}-borderless`]: !props2.bordered,
          [`${prefixCls.value}-in-form-item`]: formItemInputContext.isFormItemInput
        }, getStatusClassNames(prefixCls.value, mergedStatus.value, formItemInputContext.hasFeedback), compactItemClassnames.value, hashId.value));
        const triggerChange = function() {
          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
          }
          emit2("update:value", args[0]);
          emit2("change", ...args);
          formItemContext.onFieldChange();
        };
        const handleBlur = (e2) => {
          emit2("blur", e2);
          formItemContext.onFieldBlur();
        };
        expose({
          blur,
          focus,
          scrollTo
        });
        const isMultiple2 = computed(() => mode.value === "multiple" || mode.value === "tags");
        const mergedShowArrow = computed(() => props2.showArrow !== void 0 ? props2.showArrow : props2.loading || !(isMultiple2.value || mode.value === "combobox"));
        return () => {
          var _a, _b, _c, _d;
          const {
            notFoundContent,
            listHeight = 256,
            listItemHeight = 24,
            popupClassName,
            dropdownClassName,
            virtual,
            dropdownMatchSelectWidth,
            id = formItemContext.id.value,
            placeholder = (_a = slots.placeholder) === null || _a === void 0 ? void 0 : _a.call(slots),
            showArrow
          } = props2;
          const {
            hasFeedback,
            feedbackIcon
          } = formItemInputContext;
          let mergedNotFound;
          if (notFoundContent !== void 0) {
            mergedNotFound = notFoundContent;
          } else if (slots.notFoundContent) {
            mergedNotFound = slots.notFoundContent();
          } else if (mode.value === "combobox") {
            mergedNotFound = null;
          } else {
            mergedNotFound = (renderEmpty2 === null || renderEmpty2 === void 0 ? void 0 : renderEmpty2("Select")) || createVNode(DefaultRenderEmpty, {
              "componentName": "Select"
            }, null);
          }
          const {
            suffixIcon,
            itemIcon,
            removeIcon,
            clearIcon
          } = getIcons(_extends$1(_extends$1({}, props2), {
            multiple: isMultiple2.value,
            prefixCls: prefixCls.value,
            hasFeedback,
            feedbackIcon,
            showArrow: mergedShowArrow.value
          }), slots);
          const selectProps2 = omit(props2, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]);
          const rcSelectRtlDropdownClassName = classNames(popupClassName || dropdownClassName, {
            [`${prefixCls.value}-dropdown-${direction.value}`]: direction.value === "rtl"
          }, hashId.value);
          return wrapSSR(createVNode(Select$1, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({
            "ref": selectRef,
            "virtual": virtual,
            "dropdownMatchSelectWidth": dropdownMatchSelectWidth
          }, selectProps2), attrs), {}, {
            "showSearch": (_b = props2.showSearch) !== null && _b !== void 0 ? _b : (_c = select === null || select === void 0 ? void 0 : select.value) === null || _c === void 0 ? void 0 : _c.showSearch,
            "placeholder": placeholder,
            "listHeight": listHeight,
            "listItemHeight": listItemHeight,
            "mode": mode.value,
            "prefixCls": prefixCls.value,
            "direction": direction.value,
            "inputIcon": suffixIcon,
            "menuItemSelectedIcon": itemIcon,
            "removeIcon": removeIcon,
            "clearIcon": clearIcon,
            "notFoundContent": mergedNotFound,
            "class": [mergedClassName.value, attrs.class],
            "getPopupContainer": getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer.value,
            "dropdownClassName": rcSelectRtlDropdownClassName,
            "onChange": triggerChange,
            "onBlur": handleBlur,
            "id": id,
            "dropdownRender": selectProps2.dropdownRender || slots.dropdownRender,
            "transitionName": transitionName2.value,
            "children": (_d = slots.default) === null || _d === void 0 ? void 0 : _d.call(slots),
            "tagRender": props2.tagRender || slots.tagRender,
            "optionLabelRender": slots.optionLabel,
            "maxTagPlaceholder": props2.maxTagPlaceholder || slots.maxTagPlaceholder,
            "showArrow": hasFeedback || showArrow,
            "disabled": mergedDisabled.value
          }), {
            option: slots.option
          }));
        };
      }
    });
    Select.install = function(app) {
      app.component(Select.name, Select);
      app.component(Select.Option.displayName, Select.Option);
      app.component(Select.OptGroup.displayName, Select.OptGroup);
      return app;
    };
    Select.Option;
    Select.OptGroup;
    var CheckCircleOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "check-circle", "theme": "outlined" };
    function _objectSpread$d(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$d(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$d(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var CheckCircleOutlined = function CheckCircleOutlined2(props2, context) {
      var p2 = _objectSpread$d({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$d({}, p2, {
        "icon": CheckCircleOutlined$1
      }), null);
    };
    CheckCircleOutlined.displayName = "CheckCircleOutlined";
    CheckCircleOutlined.inheritAttrs = false;
    var ExclamationCircleOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
    function _objectSpread$c(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$c(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$c(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var ExclamationCircleOutlined = function ExclamationCircleOutlined2(props2, context) {
      var p2 = _objectSpread$c({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$c({}, p2, {
        "icon": ExclamationCircleOutlined$1
      }), null);
    };
    ExclamationCircleOutlined.displayName = "ExclamationCircleOutlined";
    ExclamationCircleOutlined.inheritAttrs = false;
    var InfoCircleOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" };
    function _objectSpread$b(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$b(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$b(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var InfoCircleOutlined = function InfoCircleOutlined2(props2, context) {
      var p2 = _objectSpread$b({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$b({}, p2, {
        "icon": InfoCircleOutlined$1
      }), null);
    };
    InfoCircleOutlined.displayName = "InfoCircleOutlined";
    InfoCircleOutlined.inheritAttrs = false;
    var CloseCircleOutlined$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, "name": "close-circle", "theme": "outlined" };
    function _objectSpread$a(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$a(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$a(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var CloseCircleOutlined = function CloseCircleOutlined2(props2, context) {
      var p2 = _objectSpread$a({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$a({}, p2, {
        "icon": CloseCircleOutlined$1
      }), null);
    };
    CloseCircleOutlined.displayName = "CloseCircleOutlined";
    CloseCircleOutlined.inheritAttrs = false;
    var CheckCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-circle", "theme": "filled" };
    function _objectSpread$9(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$9(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$9(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var CheckCircleFilled = function CheckCircleFilled2(props2, context) {
      var p2 = _objectSpread$9({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$9({}, p2, {
        "icon": CheckCircleFilled$1
      }), null);
    };
    CheckCircleFilled.displayName = "CheckCircleFilled";
    CheckCircleFilled.inheritAttrs = false;
    var ExclamationCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" };
    function _objectSpread$8(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$8(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$8(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var ExclamationCircleFilled = function ExclamationCircleFilled2(props2, context) {
      var p2 = _objectSpread$8({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$8({}, p2, {
        "icon": ExclamationCircleFilled$1
      }), null);
    };
    ExclamationCircleFilled.displayName = "ExclamationCircleFilled";
    ExclamationCircleFilled.inheritAttrs = false;
    var InfoCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" };
    function _objectSpread$7(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$7(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$7(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var InfoCircleFilled = function InfoCircleFilled2(props2, context) {
      var p2 = _objectSpread$7({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$7({}, p2, {
        "icon": InfoCircleFilled$1
      }), null);
    };
    InfoCircleFilled.displayName = "InfoCircleFilled";
    InfoCircleFilled.inheritAttrs = false;
    const responsiveArray = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"];
    const getResponsiveMap = (token2) => ({
      xs: `(max-width: ${token2.screenXSMax}px)`,
      sm: `(min-width: ${token2.screenSM}px)`,
      md: `(min-width: ${token2.screenMD}px)`,
      lg: `(min-width: ${token2.screenLG}px)`,
      xl: `(min-width: ${token2.screenXL}px)`,
      xxl: `(min-width: ${token2.screenXXL}px)`,
      xxxl: `{min-width: ${token2.screenXXXL}px}`
    });
    function useResponsiveObserver() {
      const [, token2] = useToken();
      return computed(() => {
        const responsiveMap = getResponsiveMap(token2.value);
        const subscribers = /* @__PURE__ */ new Map();
        let subUid = -1;
        let screens = {};
        return {
          matchHandlers: {},
          dispatch(pointMap) {
            screens = pointMap;
            subscribers.forEach((func) => func(screens));
            return subscribers.size >= 1;
          },
          subscribe(func) {
            if (!subscribers.size) this.register();
            subUid += 1;
            subscribers.set(subUid, func);
            func(screens);
            return subUid;
          },
          unsubscribe(paramToken) {
            subscribers.delete(paramToken);
            if (!subscribers.size) this.unregister();
          },
          unregister() {
            Object.keys(responsiveMap).forEach((screen) => {
              const matchMediaQuery = responsiveMap[screen];
              const handler = this.matchHandlers[matchMediaQuery];
              handler === null || handler === void 0 ? void 0 : handler.mql.removeListener(handler === null || handler === void 0 ? void 0 : handler.listener);
            });
            subscribers.clear();
          },
          register() {
            Object.keys(responsiveMap).forEach((screen) => {
              const matchMediaQuery = responsiveMap[screen];
              const listener = (_ref) => {
                let {
                  matches
                } = _ref;
                this.dispatch(_extends$1(_extends$1({}, screens), {
                  [screen]: matches
                }));
              };
              const mql = window.matchMedia(matchMediaQuery);
              mql.addListener(listener);
              this.matchHandlers[matchMediaQuery] = {
                mql,
                listener
              };
              listener(mql);
            });
          },
          responsiveMap
        };
      });
    }
    const autoAdjustOverflow = {
      adjustX: 1,
      adjustY: 1
    };
    const targetOffset$1 = [0, 0];
    const placements = {
      left: {
        points: ["cr", "cl"],
        overflow: autoAdjustOverflow,
        offset: [-4, 0],
        targetOffset: targetOffset$1
      },
      right: {
        points: ["cl", "cr"],
        overflow: autoAdjustOverflow,
        offset: [4, 0],
        targetOffset: targetOffset$1
      },
      top: {
        points: ["bc", "tc"],
        overflow: autoAdjustOverflow,
        offset: [0, -4],
        targetOffset: targetOffset$1
      },
      bottom: {
        points: ["tc", "bc"],
        overflow: autoAdjustOverflow,
        offset: [0, 4],
        targetOffset: targetOffset$1
      },
      topLeft: {
        points: ["bl", "tl"],
        overflow: autoAdjustOverflow,
        offset: [0, -4],
        targetOffset: targetOffset$1
      },
      leftTop: {
        points: ["tr", "tl"],
        overflow: autoAdjustOverflow,
        offset: [-4, 0],
        targetOffset: targetOffset$1
      },
      topRight: {
        points: ["br", "tr"],
        overflow: autoAdjustOverflow,
        offset: [0, -4],
        targetOffset: targetOffset$1
      },
      rightTop: {
        points: ["tl", "tr"],
        overflow: autoAdjustOverflow,
        offset: [4, 0],
        targetOffset: targetOffset$1
      },
      bottomRight: {
        points: ["tr", "br"],
        overflow: autoAdjustOverflow,
        offset: [0, 4],
        targetOffset: targetOffset$1
      },
      rightBottom: {
        points: ["bl", "br"],
        overflow: autoAdjustOverflow,
        offset: [4, 0],
        targetOffset: targetOffset$1
      },
      bottomLeft: {
        points: ["tl", "bl"],
        overflow: autoAdjustOverflow,
        offset: [0, 4],
        targetOffset: targetOffset$1
      },
      leftBottom: {
        points: ["br", "bl"],
        overflow: autoAdjustOverflow,
        offset: [-4, 0],
        targetOffset: targetOffset$1
      }
    };
    const tooltipContentProps = {
      prefixCls: String,
      id: String,
      overlayInnerStyle: PropTypes.any
    };
    const Content = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "TooltipContent",
      props: tooltipContentProps,
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        return () => {
          var _a;
          return createVNode("div", {
            "class": `${props2.prefixCls}-inner`,
            "id": props2.id,
            "role": "tooltip",
            "style": props2.overlayInnerStyle
          }, [(_a = slots.overlay) === null || _a === void 0 ? void 0 : _a.call(slots)]);
        };
      }
    });
    var __rest$a = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    function noop() {
    }
    const Tooltip$1 = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "Tooltip",
      inheritAttrs: false,
      props: {
        trigger: PropTypes.any.def(["hover"]),
        defaultVisible: {
          type: Boolean,
          default: void 0
        },
        visible: {
          type: Boolean,
          default: void 0
        },
        placement: PropTypes.string.def("right"),
        transitionName: String,
        animation: PropTypes.any,
        afterVisibleChange: PropTypes.func.def(() => {
        }),
        overlayStyle: {
          type: Object,
          default: void 0
        },
        overlayClassName: String,
        prefixCls: PropTypes.string.def("rc-tooltip"),
        mouseEnterDelay: PropTypes.number.def(0.1),
        mouseLeaveDelay: PropTypes.number.def(0.1),
        getPopupContainer: Function,
        destroyTooltipOnHide: {
          type: Boolean,
          default: false
        },
        align: PropTypes.object.def(() => ({})),
        arrowContent: PropTypes.any.def(null),
        tipId: String,
        builtinPlacements: PropTypes.object,
        overlayInnerStyle: {
          type: Object,
          default: void 0
        },
        popupVisible: {
          type: Boolean,
          default: void 0
        },
        onVisibleChange: Function,
        onPopupAlign: Function,
        arrow: {
          type: Boolean,
          default: true
        }
      },
      setup(props2, _ref) {
        let {
          slots,
          attrs,
          expose
        } = _ref;
        const triggerDOM = shallowRef();
        const getPopupElement = () => {
          const {
            prefixCls,
            tipId,
            overlayInnerStyle
          } = props2;
          return [!!props2.arrow ? createVNode("div", {
            "class": `${prefixCls}-arrow`,
            "key": "arrow"
          }, [getPropsSlot(slots, props2, "arrowContent")]) : null, createVNode(Content, {
            "key": "content",
            "prefixCls": prefixCls,
            "id": tipId,
            "overlayInnerStyle": overlayInnerStyle
          }, {
            overlay: slots.overlay
          })];
        };
        const getPopupDomNode = () => {
          return triggerDOM.value.getPopupDomNode();
        };
        expose({
          getPopupDomNode,
          triggerDOM,
          forcePopupAlign: () => {
            var _a;
            return (_a = triggerDOM.value) === null || _a === void 0 ? void 0 : _a.forcePopupAlign();
          }
        });
        const destroyTooltip = shallowRef(false);
        const autoDestroy = shallowRef(false);
        watchEffect(() => {
          const {
            destroyTooltipOnHide
          } = props2;
          if (typeof destroyTooltipOnHide === "boolean") {
            destroyTooltip.value = destroyTooltipOnHide;
          } else if (destroyTooltipOnHide && typeof destroyTooltipOnHide === "object") {
            const {
              keepParent
            } = destroyTooltipOnHide;
            destroyTooltip.value = keepParent === true;
            autoDestroy.value = keepParent === false;
          }
        });
        return () => {
          const {
            overlayClassName,
            trigger: trigger2,
            mouseEnterDelay,
            mouseLeaveDelay,
            overlayStyle,
            prefixCls,
            afterVisibleChange,
            transitionName: transitionName2,
            animation,
            placement,
            align,
            destroyTooltipOnHide,
            defaultVisible
          } = props2, restProps = __rest$a(props2, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible"]);
          const extraProps = _extends$1({}, restProps);
          if (props2.visible !== void 0) {
            extraProps.popupVisible = props2.visible;
          }
          const triggerProps2 = _extends$1(_extends$1(_extends$1({
            popupClassName: overlayClassName,
            prefixCls,
            action: trigger2,
            builtinPlacements: placements,
            popupPlacement: placement,
            popupAlign: align,
            afterPopupVisibleChange: afterVisibleChange,
            popupTransitionName: transitionName2,
            popupAnimation: animation,
            defaultPopupVisible: defaultVisible,
            destroyPopupOnHide: destroyTooltip.value,
            autoDestroy: autoDestroy.value,
            mouseLeaveDelay,
            popupStyle: overlayStyle,
            mouseEnterDelay
          }, extraProps), attrs), {
            onPopupVisibleChange: props2.onVisibleChange || noop,
            onPopupAlign: props2.onPopupAlign || noop,
            ref: triggerDOM,
            arrow: !!props2.arrow,
            popup: getPopupElement()
          });
          return createVNode(Trigger, triggerProps2, {
            default: slots.default
          });
        };
      }
    });
    const abstractTooltipProps = () => ({
      trigger: [String, Array],
      open: {
        type: Boolean,
        default: void 0
      },
      /** @deprecated Please use `open` instead. */
      visible: {
        type: Boolean,
        default: void 0
      },
      placement: String,
      color: String,
      transitionName: String,
      overlayStyle: objectType(),
      overlayInnerStyle: objectType(),
      overlayClassName: String,
      openClassName: String,
      prefixCls: String,
      mouseEnterDelay: Number,
      mouseLeaveDelay: Number,
      getPopupContainer: Function,
      /**@deprecated Please use `arrow={{ pointAtCenter: true }}` instead. */
      arrowPointAtCenter: {
        type: Boolean,
        default: void 0
      },
      arrow: {
        type: [Boolean, Object],
        default: true
      },
      autoAdjustOverflow: {
        type: [Boolean, Object],
        default: void 0
      },
      destroyTooltipOnHide: {
        type: Boolean,
        default: void 0
      },
      align: objectType(),
      builtinPlacements: objectType(),
      children: Array,
      /** @deprecated Please use `onOpenChange` instead. */
      onVisibleChange: Function,
      /** @deprecated Please use `onUpdate:open` instead. */
      "onUpdate:visible": Function,
      onOpenChange: Function,
      "onUpdate:open": Function
    });
    const autoAdjustOverflowEnabled = {
      adjustX: 1,
      adjustY: 1
    };
    const autoAdjustOverflowDisabled = {
      adjustX: 0,
      adjustY: 0
    };
    const targetOffset = [0, 0];
    function getOverflowOptions(autoAdjustOverflow2) {
      if (typeof autoAdjustOverflow2 === "boolean") {
        return autoAdjustOverflow2 ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled;
      }
      return _extends$1(_extends$1({}, autoAdjustOverflowDisabled), autoAdjustOverflow2);
    }
    function getPlacements(config) {
      const {
        arrowWidth = 4,
        horizontalArrowShift = 16,
        verticalArrowShift = 8,
        autoAdjustOverflow: autoAdjustOverflow2,
        arrowPointAtCenter
      } = config;
      const placementMap = {
        left: {
          points: ["cr", "cl"],
          offset: [-4, 0]
        },
        right: {
          points: ["cl", "cr"],
          offset: [4, 0]
        },
        top: {
          points: ["bc", "tc"],
          offset: [0, -4]
        },
        bottom: {
          points: ["tc", "bc"],
          offset: [0, 4]
        },
        topLeft: {
          points: ["bl", "tc"],
          offset: [-(horizontalArrowShift + arrowWidth), -4]
        },
        leftTop: {
          points: ["tr", "cl"],
          offset: [-4, -(verticalArrowShift + arrowWidth)]
        },
        topRight: {
          points: ["br", "tc"],
          offset: [horizontalArrowShift + arrowWidth, -4]
        },
        rightTop: {
          points: ["tl", "cr"],
          offset: [4, -(verticalArrowShift + arrowWidth)]
        },
        bottomRight: {
          points: ["tr", "bc"],
          offset: [horizontalArrowShift + arrowWidth, 4]
        },
        rightBottom: {
          points: ["bl", "cr"],
          offset: [4, verticalArrowShift + arrowWidth]
        },
        bottomLeft: {
          points: ["tl", "bc"],
          offset: [-(horizontalArrowShift + arrowWidth), 4]
        },
        leftBottom: {
          points: ["br", "cl"],
          offset: [-4, verticalArrowShift + arrowWidth]
        }
      };
      Object.keys(placementMap).forEach((key2) => {
        placementMap[key2] = arrowPointAtCenter ? _extends$1(_extends$1({}, placementMap[key2]), {
          overflow: getOverflowOptions(autoAdjustOverflow2),
          targetOffset
        }) : _extends$1(_extends$1({}, placements[key2]), {
          overflow: getOverflowOptions(autoAdjustOverflow2)
        });
        placementMap[key2].ignoreShake = true;
      });
      return placementMap;
    }
    function firstNotUndefined() {
      let arr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
      for (let i2 = 0, len = arr.length; i2 < len; i2++) {
        if (arr[i2] !== void 0) {
          return arr[i2];
        }
      }
      return void 0;
    }
    const inverseColors = PresetColors.map((color) => `${color}-inverse`);
    const PresetStatusColorTypes = ["success", "processing", "error", "default", "warning"];
    function isPresetColor(color) {
      let includeInverse = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
      if (includeInverse) {
        return [...inverseColors, ...PresetColors].includes(color);
      }
      return PresetColors.includes(color);
    }
    function isPresetStatusColor(color) {
      return PresetStatusColorTypes.includes(color);
    }
    function parseColor(prefixCls, color) {
      const isInternalColor = isPresetColor(color);
      const className = classNames({
        [`${prefixCls}-${color}`]: color && isInternalColor
      });
      const overlayStyle = {};
      const arrowStyle = {};
      if (color && !isInternalColor) {
        overlayStyle.background = color;
        arrowStyle["--antd-arrow-background-color"] = color;
      }
      return {
        className,
        overlayStyle,
        arrowStyle
      };
    }
    function connectArrowCls(classList) {
      let showArrowCls = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
      return classList.map((cls) => `${showArrowCls}${cls}`).join(",");
    }
    const MAX_VERTICAL_CONTENT_RADIUS = 8;
    function getArrowOffset(options) {
      const maxVerticalContentRadius = MAX_VERTICAL_CONTENT_RADIUS;
      const {
        sizePopupArrow,
        contentRadius,
        borderRadiusOuter,
        limitVerticalRadius
      } = options;
      const arrowInnerOffset = sizePopupArrow / 2 - Math.ceil(borderRadiusOuter * (Math.sqrt(2) - 1));
      const dropdownArrowOffset = (contentRadius > 12 ? contentRadius + 2 : 12) - arrowInnerOffset;
      const dropdownArrowOffsetVertical = limitVerticalRadius ? maxVerticalContentRadius - arrowInnerOffset : dropdownArrowOffset;
      return {
        dropdownArrowOffset,
        dropdownArrowOffsetVertical
      };
    }
    function getArrowStyle(token2, options) {
      const {
        componentCls,
        sizePopupArrow,
        marginXXS,
        borderRadiusXS,
        borderRadiusOuter,
        boxShadowPopoverArrow
      } = token2;
      const {
        colorBg,
        showArrowCls,
        contentRadius = token2.borderRadiusLG,
        limitVerticalRadius
      } = options;
      const {
        dropdownArrowOffsetVertical,
        dropdownArrowOffset
      } = getArrowOffset({
        sizePopupArrow,
        contentRadius,
        borderRadiusOuter,
        limitVerticalRadius
      });
      const dropdownArrowDistance = sizePopupArrow / 2 + marginXXS;
      return {
        [componentCls]: {
          // ============================ Basic ============================
          [`${componentCls}-arrow`]: [_extends$1(_extends$1({
            position: "absolute",
            zIndex: 1,
            display: "block"
          }, roundedArrow(sizePopupArrow, borderRadiusXS, borderRadiusOuter, colorBg, boxShadowPopoverArrow)), {
            "&:before": {
              background: colorBg
            }
          })],
          // ========================== Placement ==========================
          // Here handle the arrow position and rotate stuff
          // >>>>> Top
          [[`&-placement-top ${componentCls}-arrow`, `&-placement-topLeft ${componentCls}-arrow`, `&-placement-topRight ${componentCls}-arrow`].join(",")]: {
            bottom: 0,
            transform: "translateY(100%) rotate(180deg)"
          },
          [`&-placement-top ${componentCls}-arrow`]: {
            left: {
              _skip_check_: true,
              value: "50%"
            },
            transform: "translateX(-50%) translateY(100%) rotate(180deg)"
          },
          [`&-placement-topLeft ${componentCls}-arrow`]: {
            left: {
              _skip_check_: true,
              value: dropdownArrowOffset
            }
          },
          [`&-placement-topRight ${componentCls}-arrow`]: {
            right: {
              _skip_check_: true,
              value: dropdownArrowOffset
            }
          },
          // >>>>> Bottom
          [[`&-placement-bottom ${componentCls}-arrow`, `&-placement-bottomLeft ${componentCls}-arrow`, `&-placement-bottomRight ${componentCls}-arrow`].join(",")]: {
            top: 0,
            transform: `translateY(-100%)`
          },
          [`&-placement-bottom ${componentCls}-arrow`]: {
            left: {
              _skip_check_: true,
              value: "50%"
            },
            transform: `translateX(-50%) translateY(-100%)`
          },
          [`&-placement-bottomLeft ${componentCls}-arrow`]: {
            left: {
              _skip_check_: true,
              value: dropdownArrowOffset
            }
          },
          [`&-placement-bottomRight ${componentCls}-arrow`]: {
            right: {
              _skip_check_: true,
              value: dropdownArrowOffset
            }
          },
          // >>>>> Left
          [[`&-placement-left ${componentCls}-arrow`, `&-placement-leftTop ${componentCls}-arrow`, `&-placement-leftBottom ${componentCls}-arrow`].join(",")]: {
            right: {
              _skip_check_: true,
              value: 0
            },
            transform: "translateX(100%) rotate(90deg)"
          },
          [`&-placement-left ${componentCls}-arrow`]: {
            top: {
              _skip_check_: true,
              value: "50%"
            },
            transform: "translateY(-50%) translateX(100%) rotate(90deg)"
          },
          [`&-placement-leftTop ${componentCls}-arrow`]: {
            top: dropdownArrowOffsetVertical
          },
          [`&-placement-leftBottom ${componentCls}-arrow`]: {
            bottom: dropdownArrowOffsetVertical
          },
          // >>>>> Right
          [[`&-placement-right ${componentCls}-arrow`, `&-placement-rightTop ${componentCls}-arrow`, `&-placement-rightBottom ${componentCls}-arrow`].join(",")]: {
            left: {
              _skip_check_: true,
              value: 0
            },
            transform: "translateX(-100%) rotate(-90deg)"
          },
          [`&-placement-right ${componentCls}-arrow`]: {
            top: {
              _skip_check_: true,
              value: "50%"
            },
            transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
          },
          [`&-placement-rightTop ${componentCls}-arrow`]: {
            top: dropdownArrowOffsetVertical
          },
          [`&-placement-rightBottom ${componentCls}-arrow`]: {
            bottom: dropdownArrowOffsetVertical
          },
          // =========================== Offset ============================
          // Offset the popover to account for the dropdown arrow
          // >>>>> Top
          [connectArrowCls([`&-placement-topLeft`, `&-placement-top`, `&-placement-topRight`].map((cls) => cls += ":not(&-arrow-hidden)"), showArrowCls)]: {
            paddingBottom: dropdownArrowDistance
          },
          // >>>>> Bottom
          [connectArrowCls([`&-placement-bottomLeft`, `&-placement-bottom`, `&-placement-bottomRight`].map((cls) => cls += ":not(&-arrow-hidden)"), showArrowCls)]: {
            paddingTop: dropdownArrowDistance
          },
          // >>>>> Left
          [connectArrowCls([`&-placement-leftTop`, `&-placement-left`, `&-placement-leftBottom`].map((cls) => cls += ":not(&-arrow-hidden)"), showArrowCls)]: {
            paddingRight: {
              _skip_check_: true,
              value: dropdownArrowDistance
            }
          },
          // >>>>> Right
          [connectArrowCls([`&-placement-rightTop`, `&-placement-right`, `&-placement-rightBottom`].map((cls) => cls += ":not(&-arrow-hidden)"), showArrowCls)]: {
            paddingLeft: {
              _skip_check_: true,
              value: dropdownArrowDistance
            }
          }
        }
      };
    }
    const genTooltipStyle = (token2) => {
      const {
        componentCls,
        // ant-tooltip
        tooltipMaxWidth,
        tooltipColor,
        tooltipBg,
        tooltipBorderRadius,
        zIndexPopup,
        controlHeight,
        boxShadowSecondary,
        paddingSM,
        paddingXS,
        tooltipRadiusOuter
      } = token2;
      return [
        {
          [componentCls]: _extends$1(_extends$1(_extends$1(_extends$1({}, resetComponent(token2)), {
            position: "absolute",
            zIndex: zIndexPopup,
            display: "block",
            "&": [{
              width: "max-content"
            }, {
              width: "intrinsic"
            }],
            maxWidth: tooltipMaxWidth,
            visibility: "visible",
            "&-hidden": {
              display: "none"
            },
            "--antd-arrow-background-color": tooltipBg,
            // Wrapper for the tooltip content
            [`${componentCls}-inner`]: {
              minWidth: controlHeight,
              minHeight: controlHeight,
              padding: `${paddingSM / 2}px ${paddingXS}px`,
              color: tooltipColor,
              textAlign: "start",
              textDecoration: "none",
              wordWrap: "break-word",
              backgroundColor: tooltipBg,
              borderRadius: tooltipBorderRadius,
              boxShadow: boxShadowSecondary
            },
            // Limit left and right placement radius
            [[`&-placement-left`, `&-placement-leftTop`, `&-placement-leftBottom`, `&-placement-right`, `&-placement-rightTop`, `&-placement-rightBottom`].join(",")]: {
              [`${componentCls}-inner`]: {
                borderRadius: Math.min(tooltipBorderRadius, MAX_VERTICAL_CONTENT_RADIUS)
              }
            },
            [`${componentCls}-content`]: {
              position: "relative"
            }
          }), genPresetColor(token2, (colorKey, _ref) => {
            let {
              darkColor
            } = _ref;
            return {
              [`&${componentCls}-${colorKey}`]: {
                [`${componentCls}-inner`]: {
                  backgroundColor: darkColor
                },
                [`${componentCls}-arrow`]: {
                  "--antd-arrow-background-color": darkColor
                }
              }
            };
          })), {
            // RTL
            "&-rtl": {
              direction: "rtl"
            }
          })
        },
        // Arrow Style
        getArrowStyle(merge(token2, {
          borderRadiusOuter: tooltipRadiusOuter
        }), {
          colorBg: "var(--antd-arrow-background-color)",
          showArrowCls: "",
          contentRadius: tooltipBorderRadius,
          limitVerticalRadius: true
        }),
        // Pure Render
        {
          [`${componentCls}-pure`]: {
            position: "relative",
            maxWidth: "none"
          }
        }
      ];
    };
    const useStyle$a = (prefixCls, injectStyle) => {
      const useOriginHook = genComponentStyleHook("Tooltip", (token2) => {
        if ((injectStyle === null || injectStyle === void 0 ? void 0 : injectStyle.value) === false) {
          return [];
        }
        const {
          borderRadius,
          colorTextLightSolid,
          colorBgDefault,
          borderRadiusOuter
        } = token2;
        const TooltipToken = merge(token2, {
          // default variables
          tooltipMaxWidth: 250,
          tooltipColor: colorTextLightSolid,
          tooltipBorderRadius: borderRadius,
          tooltipBg: colorBgDefault,
          tooltipRadiusOuter: borderRadiusOuter > 4 ? 4 : borderRadiusOuter
        });
        return [genTooltipStyle(TooltipToken), initZoomMotion(token2, "zoom-big-fast")];
      }, (_ref2) => {
        let {
          zIndexPopupBase,
          colorBgSpotlight
        } = _ref2;
        return {
          zIndexPopup: zIndexPopupBase + 70,
          colorBgDefault: colorBgSpotlight
        };
      });
      return useOriginHook(prefixCls);
    };
    const splitObject = (obj, keys2) => {
      const picked = {};
      const omitted = _extends$1({}, obj);
      keys2.forEach((key2) => {
        if (obj && key2 in obj) {
          picked[key2] = obj[key2];
          delete omitted[key2];
        }
      });
      return {
        picked,
        omitted
      };
    };
    const tooltipProps = () => _extends$1(_extends$1({}, abstractTooltipProps()), {
      title: PropTypes.any
    });
    const ToolTip = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ATooltip",
      inheritAttrs: false,
      props: initDefaultProps(tooltipProps(), {
        trigger: "hover",
        align: {},
        placement: "top",
        mouseEnterDelay: 0.1,
        mouseLeaveDelay: 0.1,
        arrowPointAtCenter: false,
        autoAdjustOverflow: true
      }),
      slots: Object,
      // emits: ['update:visible', 'visibleChange'],
      setup(props2, _ref) {
        let {
          slots,
          emit: emit2,
          attrs,
          expose
        } = _ref;
        const {
          prefixCls,
          getPopupContainer,
          direction,
          rootPrefixCls
        } = useConfigInject("tooltip", props2);
        const mergedOpen = computed(() => {
          var _a;
          return (_a = props2.open) !== null && _a !== void 0 ? _a : props2.visible;
        });
        const innerOpen = ref(firstNotUndefined([props2.open, props2.visible]));
        const tooltip = ref();
        let rafId;
        watch(mergedOpen, (val) => {
          wrapperRaf.cancel(rafId);
          rafId = wrapperRaf(() => {
            innerOpen.value = !!val;
          });
        });
        const isNoTitle = () => {
          var _a;
          const title = (_a = props2.title) !== null && _a !== void 0 ? _a : slots.title;
          return !title && title !== 0;
        };
        const handleVisibleChange = (val) => {
          const noTitle = isNoTitle();
          if (mergedOpen.value === void 0) {
            innerOpen.value = noTitle ? false : val;
          }
          if (!noTitle) {
            emit2("update:visible", val);
            emit2("visibleChange", val);
            emit2("update:open", val);
            emit2("openChange", val);
          }
        };
        const getPopupDomNode = () => {
          return tooltip.value.getPopupDomNode();
        };
        expose({
          getPopupDomNode,
          open: innerOpen,
          forcePopupAlign: () => {
            var _a;
            return (_a = tooltip.value) === null || _a === void 0 ? void 0 : _a.forcePopupAlign();
          }
        });
        const tooltipPlacements = computed(() => {
          var _a;
          const {
            builtinPlacements,
            autoAdjustOverflow: autoAdjustOverflow2,
            arrow,
            arrowPointAtCenter
          } = props2;
          let mergedArrowPointAtCenter = arrowPointAtCenter;
          if (typeof arrow === "object") {
            mergedArrowPointAtCenter = (_a = arrow.pointAtCenter) !== null && _a !== void 0 ? _a : arrowPointAtCenter;
          }
          return builtinPlacements || getPlacements({
            arrowPointAtCenter: mergedArrowPointAtCenter,
            autoAdjustOverflow: autoAdjustOverflow2
          });
        });
        const isTrueProps = (val) => {
          return val || val === "";
        };
        const getDisabledCompatibleChildren = (ele) => {
          const elementType = ele.type;
          if (typeof elementType === "object" && ele.props) {
            if ((elementType.__ANT_BUTTON === true || elementType === "button") && isTrueProps(ele.props.disabled) || elementType.__ANT_SWITCH === true && (isTrueProps(ele.props.disabled) || isTrueProps(ele.props.loading)) || elementType.__ANT_RADIO === true && isTrueProps(ele.props.disabled)) {
              const {
                picked,
                omitted
              } = splitObject(getStyle$1(ele), ["position", "left", "right", "top", "bottom", "float", "display", "zIndex"]);
              const spanStyle = _extends$1(_extends$1({
                display: "inline-block"
              }, picked), {
                cursor: "not-allowed",
                lineHeight: 1,
                width: ele.props && ele.props.block ? "100%" : void 0
              });
              const buttonStyle = _extends$1(_extends$1({}, omitted), {
                pointerEvents: "none"
              });
              const child = cloneElement(ele, {
                style: buttonStyle
              }, true);
              return createVNode("span", {
                "style": spanStyle,
                "class": `${prefixCls.value}-disabled-compatible-wrapper`
              }, [child]);
            }
          }
          return ele;
        };
        const getOverlay = () => {
          var _a, _b;
          return (_a = props2.title) !== null && _a !== void 0 ? _a : (_b = slots.title) === null || _b === void 0 ? void 0 : _b.call(slots);
        };
        const onPopupAlign = (domNode, align) => {
          const placements2 = tooltipPlacements.value;
          const placement = Object.keys(placements2).find((key2) => {
            var _a, _b;
            return placements2[key2].points[0] === ((_a = align.points) === null || _a === void 0 ? void 0 : _a[0]) && placements2[key2].points[1] === ((_b = align.points) === null || _b === void 0 ? void 0 : _b[1]);
          });
          if (placement) {
            const rect = domNode.getBoundingClientRect();
            const transformOrigin = {
              top: "50%",
              left: "50%"
            };
            if (placement.indexOf("top") >= 0 || placement.indexOf("Bottom") >= 0) {
              transformOrigin.top = `${rect.height - align.offset[1]}px`;
            } else if (placement.indexOf("Top") >= 0 || placement.indexOf("bottom") >= 0) {
              transformOrigin.top = `${-align.offset[1]}px`;
            }
            if (placement.indexOf("left") >= 0 || placement.indexOf("Right") >= 0) {
              transformOrigin.left = `${rect.width - align.offset[0]}px`;
            } else if (placement.indexOf("right") >= 0 || placement.indexOf("Left") >= 0) {
              transformOrigin.left = `${-align.offset[0]}px`;
            }
            domNode.style.transformOrigin = `${transformOrigin.left} ${transformOrigin.top}`;
          }
        };
        const colorInfo = computed(() => parseColor(prefixCls.value, props2.color));
        const injectFromPopover = computed(() => attrs["data-popover-inject"]);
        const [wrapSSR, hashId] = useStyle$a(prefixCls, computed(() => !injectFromPopover.value));
        return () => {
          var _a, _b;
          const {
            openClassName,
            overlayClassName,
            overlayStyle,
            overlayInnerStyle
          } = props2;
          let children = (_b = filterEmpty((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots))) !== null && _b !== void 0 ? _b : null;
          children = children.length === 1 ? children[0] : children;
          let tempVisible = innerOpen.value;
          if (mergedOpen.value === void 0 && isNoTitle()) {
            tempVisible = false;
          }
          if (!children) {
            return null;
          }
          const child = getDisabledCompatibleChildren(isValidElement(children) && !isFragment(children) ? children : createVNode("span", null, [children]));
          const childCls = classNames({
            [openClassName || `${prefixCls.value}-open`]: true,
            [child.props && child.props.class]: child.props && child.props.class
          });
          const customOverlayClassName = classNames(overlayClassName, {
            [`${prefixCls.value}-rtl`]: direction.value === "rtl"
          }, colorInfo.value.className, hashId.value);
          const formattedOverlayInnerStyle = _extends$1(_extends$1({}, colorInfo.value.overlayStyle), overlayInnerStyle);
          const arrowContentStyle = colorInfo.value.arrowStyle;
          const vcTooltipProps = _extends$1(_extends$1(_extends$1({}, attrs), props2), {
            prefixCls: prefixCls.value,
            arrow: !!props2.arrow,
            getPopupContainer: getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer.value,
            builtinPlacements: tooltipPlacements.value,
            visible: tempVisible,
            ref: tooltip,
            overlayClassName: customOverlayClassName,
            overlayStyle: _extends$1(_extends$1({}, arrowContentStyle), overlayStyle),
            overlayInnerStyle: formattedOverlayInnerStyle,
            onVisibleChange: handleVisibleChange,
            onPopupAlign,
            transitionName: getTransitionName(rootPrefixCls.value, "zoom-big-fast", props2.transitionName)
          });
          return wrapSSR(createVNode(Tooltip$1, vcTooltipProps, {
            default: () => [innerOpen.value ? cloneElement(child, {
              class: childCls
            }) : child],
            arrowContent: () => createVNode("span", {
              "class": `${prefixCls.value}-arrow-content`
            }, null),
            overlay: getOverlay
          }));
        };
      }
    });
    const Tooltip = withInstall(ToolTip);
    const isNumeric = (value) => {
      return !isNaN(parseFloat(value)) && isFinite(value);
    };
    const genWaveStyle = (token2) => {
      const {
        componentCls,
        colorPrimary
      } = token2;
      return {
        [componentCls]: {
          position: "absolute",
          background: "transparent",
          pointerEvents: "none",
          boxSizing: "border-box",
          color: `var(--wave-color, ${colorPrimary})`,
          boxShadow: `0 0 0 0 currentcolor`,
          opacity: 0.2,
          // =================== Motion ===================
          "&.wave-motion-appear": {
            transition: [`box-shadow 0.4s ${token2.motionEaseOutCirc}`, `opacity 2s ${token2.motionEaseOutCirc}`].join(","),
            "&-active": {
              boxShadow: `0 0 0 6px currentcolor`,
              opacity: 0
            }
          }
        }
      };
    };
    const useStyle$9 = genComponentStyleHook("Wave", (token2) => [genWaveStyle(token2)]);
    function isNotGrey(color) {
      const match2 = (color || "").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
      if (match2 && match2[1] && match2[2] && match2[3]) {
        return !(match2[1] === match2[2] && match2[2] === match2[3]);
      }
      return true;
    }
    function isValidWaveColor(color) {
      return color && color !== "#fff" && color !== "#ffffff" && color !== "rgb(255, 255, 255)" && color !== "rgba(255, 255, 255, 1)" && isNotGrey(color) && !/rgba\((?:\d*, ){3}0\)/.test(color) && // any transparent rgba color
      color !== "transparent";
    }
    function getTargetWaveColor(node2) {
      const {
        borderTopColor,
        borderColor,
        backgroundColor
      } = getComputedStyle(node2);
      if (isValidWaveColor(borderTopColor)) {
        return borderTopColor;
      }
      if (isValidWaveColor(borderColor)) {
        return borderColor;
      }
      if (isValidWaveColor(backgroundColor)) {
        return backgroundColor;
      }
      return null;
    }
    function validateNum(value) {
      return Number.isNaN(value) ? 0 : value;
    }
    const WaveEffect = /* @__PURE__ */ defineComponent({
      props: {
        target: objectType(),
        className: String
      },
      setup(props2) {
        const divRef = shallowRef(null);
        const [color, setWaveColor] = useState(null);
        const [borderRadius, setBorderRadius] = useState([]);
        const [left, setLeft] = useState(0);
        const [top, setTop] = useState(0);
        const [width, setWidth] = useState(0);
        const [height, setHeight] = useState(0);
        const [enabled, setEnabled] = useState(false);
        function syncPos() {
          const {
            target
          } = props2;
          const nodeStyle = getComputedStyle(target);
          setWaveColor(getTargetWaveColor(target));
          const isStatic = nodeStyle.position === "static";
          const {
            borderLeftWidth,
            borderTopWidth
          } = nodeStyle;
          setLeft(isStatic ? target.offsetLeft : validateNum(-parseFloat(borderLeftWidth)));
          setTop(isStatic ? target.offsetTop : validateNum(-parseFloat(borderTopWidth)));
          setWidth(target.offsetWidth);
          setHeight(target.offsetHeight);
          const {
            borderTopLeftRadius,
            borderTopRightRadius,
            borderBottomLeftRadius,
            borderBottomRightRadius
          } = nodeStyle;
          setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map((radius) => validateNum(parseFloat(radius))));
        }
        let resizeObserver;
        let rafId;
        let timeoutId;
        const clear2 = () => {
          clearTimeout(timeoutId);
          wrapperRaf.cancel(rafId);
          resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
        };
        const removeDom = () => {
          var _a;
          const holder = (_a = divRef.value) === null || _a === void 0 ? void 0 : _a.parentElement;
          if (holder) {
            render(null, holder);
            if (holder.parentElement) {
              holder.parentElement.removeChild(holder);
            }
          }
        };
        onMounted(() => {
          clear2();
          timeoutId = setTimeout(() => {
            removeDom();
          }, 5e3);
          const {
            target
          } = props2;
          if (target) {
            rafId = wrapperRaf(() => {
              syncPos();
              setEnabled(true);
            });
            if (typeof ResizeObserver !== "undefined") {
              resizeObserver = new ResizeObserver(syncPos);
              resizeObserver.observe(target);
            }
          }
        });
        onBeforeUnmount(() => {
          clear2();
        });
        const onTransitionend = (e2) => {
          if (e2.propertyName === "opacity") {
            removeDom();
          }
        };
        return () => {
          if (!enabled.value) {
            return null;
          }
          const waveStyle = {
            left: `${left.value}px`,
            top: `${top.value}px`,
            width: `${width.value}px`,
            height: `${height.value}px`,
            borderRadius: borderRadius.value.map((radius) => `${radius}px`).join(" ")
          };
          if (color) {
            waveStyle["--wave-color"] = color.value;
          }
          return createVNode(Transition, {
            "appear": true,
            "name": "wave-motion",
            "appearFromClass": "wave-motion-appear",
            "appearActiveClass": "wave-motion-appear",
            "appearToClass": "wave-motion-appear wave-motion-appear-active"
          }, {
            default: () => [createVNode("div", {
              "ref": divRef,
              "class": props2.className,
              "style": waveStyle,
              "onTransitionend": onTransitionend
            }, null)]
          });
        };
      }
    });
    function showWaveEffect(node2, className) {
      const holder = document.createElement("div");
      holder.style.position = "absolute";
      holder.style.left = `0px`;
      holder.style.top = `0px`;
      node2 === null || node2 === void 0 ? void 0 : node2.insertBefore(holder, node2 === null || node2 === void 0 ? void 0 : node2.firstChild);
      render(createVNode(WaveEffect, {
        "target": node2,
        "className": className
      }, null), holder);
    }
    function useWave(instance, className, wave) {
      function showWave() {
        var _a;
        const node2 = findDOMNode(instance);
        if (((_a = wave === null || wave === void 0 ? void 0 : wave.value) === null || _a === void 0 ? void 0 : _a.disabled) || !node2) {
          return;
        }
        showWaveEffect(node2, className.value);
      }
      return showWave;
    }
    const Wave = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "Wave",
      props: {
        disabled: Boolean
      },
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        const instance = getCurrentInstance();
        const {
          prefixCls,
          wave
        } = useConfigInject("wave", props2);
        const [, hashId] = useStyle$9(prefixCls);
        const showWave = useWave(instance, computed(() => classNames(prefixCls.value, hashId.value)), wave);
        let onClick;
        const clear2 = () => {
          const node2 = findDOMNode(instance);
          node2.removeEventListener("click", onClick, true);
        };
        onMounted(() => {
          watch(() => props2.disabled, () => {
            clear2();
            nextTick(() => {
              const node2 = findDOMNode(instance);
              node2 === null || node2 === void 0 ? void 0 : node2.removeEventListener("click", onClick, true);
              if (!node2 || node2.nodeType !== 1 || props2.disabled) {
                return;
              }
              onClick = (e2) => {
                if (e2.target.tagName === "INPUT" || !isVisible(e2.target) || // No need wave
                !node2.getAttribute || node2.getAttribute("disabled") || node2.disabled || node2.className.includes("disabled") || node2.className.includes("-leave")) {
                  return;
                }
                showWave();
              };
              node2.addEventListener("click", onClick, true);
            });
          }, {
            immediate: true,
            flush: "post"
          });
        });
        onBeforeUnmount(() => {
          clear2();
        });
        return () => {
          var _a;
          const children = (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)[0];
          return children;
        };
      }
    });
    const buttonProps = () => ({
      prefixCls: String,
      type: String,
      htmlType: {
        type: String,
        default: "button"
      },
      shape: {
        type: String
      },
      size: {
        type: String
      },
      loading: {
        type: [Boolean, Object],
        default: () => false
      },
      disabled: {
        type: Boolean,
        default: void 0
      },
      ghost: {
        type: Boolean,
        default: void 0
      },
      block: {
        type: Boolean,
        default: void 0
      },
      danger: {
        type: Boolean,
        default: void 0
      },
      icon: PropTypes.any,
      href: String,
      target: String,
      title: String,
      onClick: eventType(),
      onMousedown: eventType()
    });
    const getCollapsedWidth = (node2) => {
      if (node2) {
        node2.style.width = "0px";
        node2.style.opacity = "0";
        node2.style.transform = "scale(0)";
      }
    };
    const getRealWidth = (node2) => {
      nextTick(() => {
        if (node2) {
          node2.style.width = `${node2.scrollWidth}px`;
          node2.style.opacity = "1";
          node2.style.transform = "scale(1)";
        }
      });
    };
    const resetStyle = (node2) => {
      if (node2 && node2.style) {
        node2.style.width = null;
        node2.style.opacity = null;
        node2.style.transform = null;
      }
    };
    const LoadingIcon = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "LoadingIcon",
      props: {
        prefixCls: String,
        loading: [Boolean, Object],
        existIcon: Boolean
      },
      setup(props2) {
        return () => {
          const {
            existIcon,
            prefixCls,
            loading
          } = props2;
          if (existIcon) {
            return createVNode("span", {
              "class": `${prefixCls}-loading-icon`
            }, [createVNode(LoadingOutlined, null, null)]);
          }
          const visible = !!loading;
          return createVNode(Transition, {
            "name": `${prefixCls}-loading-icon-motion`,
            "onBeforeEnter": getCollapsedWidth,
            "onEnter": getRealWidth,
            "onAfterEnter": resetStyle,
            "onBeforeLeave": getRealWidth,
            "onLeave": (node2) => {
              setTimeout(() => {
                getCollapsedWidth(node2);
              });
            },
            "onAfterLeave": resetStyle
          }, {
            default: () => [visible ? createVNode("span", {
              "class": `${prefixCls}-loading-icon`
            }, [createVNode(LoadingOutlined, null, null)]) : null]
          });
        };
      }
    });
    const genButtonBorderStyle = (buttonTypeCls, borderColor) => ({
      // Border
      [`> span, > ${buttonTypeCls}`]: {
        "&:not(:last-child)": {
          [`&, & > ${buttonTypeCls}`]: {
            "&:not(:disabled)": {
              borderInlineEndColor: borderColor
            }
          }
        },
        "&:not(:first-child)": {
          [`&, & > ${buttonTypeCls}`]: {
            "&:not(:disabled)": {
              borderInlineStartColor: borderColor
            }
          }
        }
      }
    });
    const genGroupStyle = (token2) => {
      const {
        componentCls,
        fontSize,
        lineWidth,
        colorPrimaryHover,
        colorErrorHover
      } = token2;
      return {
        [`${componentCls}-group`]: [
          {
            position: "relative",
            display: "inline-flex",
            // Border
            [`> span, > ${componentCls}`]: {
              "&:not(:last-child)": {
                [`&, & > ${componentCls}`]: {
                  borderStartEndRadius: 0,
                  borderEndEndRadius: 0
                }
              },
              "&:not(:first-child)": {
                marginInlineStart: -lineWidth,
                [`&, & > ${componentCls}`]: {
                  borderStartStartRadius: 0,
                  borderEndStartRadius: 0
                }
              }
            },
            [componentCls]: {
              position: "relative",
              zIndex: 1,
              [`&:hover,
          &:focus,
          &:active`]: {
                zIndex: 2
              },
              "&[disabled]": {
                zIndex: 0
              }
            },
            [`${componentCls}-icon-only`]: {
              fontSize
            }
          },
          // Border Color
          genButtonBorderStyle(`${componentCls}-primary`, colorPrimaryHover),
          genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)
        ]
      };
    };
    function compactItemVerticalBorder(token2, parentCls) {
      return {
        // border collapse
        [`&-item:not(${parentCls}-last-item)`]: {
          marginBottom: -token2.lineWidth
        },
        "&-item": {
          "&:hover,&:focus,&:active": {
            zIndex: 2
          },
          "&[disabled]": {
            zIndex: 0
          }
        }
      };
    }
    function compactItemBorderVerticalRadius(prefixCls, parentCls) {
      return {
        [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item)`]: {
          borderRadius: 0
        },
        [`&-item${parentCls}-first-item:not(${parentCls}-last-item)`]: {
          [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
            borderEndEndRadius: 0,
            borderEndStartRadius: 0
          }
        },
        [`&-item${parentCls}-last-item:not(${parentCls}-first-item)`]: {
          [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
            borderStartStartRadius: 0,
            borderStartEndRadius: 0
          }
        }
      };
    }
    function genCompactItemVerticalStyle(token2) {
      const compactCls = `${token2.componentCls}-compact-vertical`;
      return {
        [compactCls]: _extends$1(_extends$1({}, compactItemVerticalBorder(token2, compactCls)), compactItemBorderVerticalRadius(token2.componentCls, compactCls))
      };
    }
    const genSharedButtonStyle = (token2) => {
      const {
        componentCls,
        iconCls
      } = token2;
      return {
        [componentCls]: {
          outline: "none",
          position: "relative",
          display: "inline-block",
          fontWeight: 400,
          whiteSpace: "nowrap",
          textAlign: "center",
          backgroundImage: "none",
          backgroundColor: "transparent",
          border: `${token2.lineWidth}px ${token2.lineType} transparent`,
          cursor: "pointer",
          transition: `all ${token2.motionDurationMid} ${token2.motionEaseInOut}`,
          userSelect: "none",
          touchAction: "manipulation",
          lineHeight: token2.lineHeight,
          color: token2.colorText,
          "> span": {
            display: "inline-block"
          },
          // Leave a space between icon and text.
          [`> ${iconCls} + span, > span + ${iconCls}`]: {
            marginInlineStart: token2.marginXS
          },
          "> a": {
            color: "currentColor"
          },
          "&:not(:disabled)": _extends$1({}, genFocusStyle(token2)),
          // make `btn-icon-only` not too narrow
          [`&-icon-only${componentCls}-compact-item`]: {
            flex: "none"
          },
          // Special styles for Primary Button
          [`&-compact-item${componentCls}-primary`]: {
            [`&:not([disabled]) + ${componentCls}-compact-item${componentCls}-primary:not([disabled])`]: {
              position: "relative",
              "&:before": {
                position: "absolute",
                top: -token2.lineWidth,
                insetInlineStart: -token2.lineWidth,
                display: "inline-block",
                width: token2.lineWidth,
                height: `calc(100% + ${token2.lineWidth * 2}px)`,
                backgroundColor: token2.colorPrimaryHover,
                content: '""'
              }
            }
          },
          // Special styles for Primary Button
          "&-compact-vertical-item": {
            [`&${componentCls}-primary`]: {
              [`&:not([disabled]) + ${componentCls}-compact-vertical-item${componentCls}-primary:not([disabled])`]: {
                position: "relative",
                "&:before": {
                  position: "absolute",
                  top: -token2.lineWidth,
                  insetInlineStart: -token2.lineWidth,
                  display: "inline-block",
                  width: `calc(100% + ${token2.lineWidth * 2}px)`,
                  height: token2.lineWidth,
                  backgroundColor: token2.colorPrimaryHover,
                  content: '""'
                }
              }
            }
          }
        }
      };
    };
    const genHoverActiveButtonStyle = (hoverStyle, activeStyle) => ({
      "&:not(:disabled)": {
        "&:hover": hoverStyle,
        "&:active": activeStyle
      }
    });
    const genCircleButtonStyle = (token2) => ({
      minWidth: token2.controlHeight,
      paddingInlineStart: 0,
      paddingInlineEnd: 0,
      borderRadius: "50%"
    });
    const genRoundButtonStyle = (token2) => ({
      borderRadius: token2.controlHeight,
      paddingInlineStart: token2.controlHeight / 2,
      paddingInlineEnd: token2.controlHeight / 2
    });
    const genDisabledStyle = (token2) => ({
      cursor: "not-allowed",
      borderColor: token2.colorBorder,
      color: token2.colorTextDisabled,
      backgroundColor: token2.colorBgContainerDisabled,
      boxShadow: "none"
    });
    const genGhostButtonStyle = (btnCls, textColor, borderColor, textColorDisabled, borderColorDisabled, hoverStyle, activeStyle) => ({
      [`&${btnCls}-background-ghost`]: _extends$1(_extends$1({
        color: textColor || void 0,
        backgroundColor: "transparent",
        borderColor: borderColor || void 0,
        boxShadow: "none"
      }, genHoverActiveButtonStyle(_extends$1({
        backgroundColor: "transparent"
      }, hoverStyle), _extends$1({
        backgroundColor: "transparent"
      }, activeStyle))), {
        "&:disabled": {
          cursor: "not-allowed",
          color: textColorDisabled || void 0,
          borderColor: borderColorDisabled || void 0
        }
      })
    });
    const genSolidDisabledButtonStyle = (token2) => ({
      "&:disabled": _extends$1({}, genDisabledStyle(token2))
    });
    const genSolidButtonStyle = (token2) => _extends$1({}, genSolidDisabledButtonStyle(token2));
    const genPureDisabledButtonStyle = (token2) => ({
      "&:disabled": {
        cursor: "not-allowed",
        color: token2.colorTextDisabled
      }
    });
    const genDefaultButtonStyle = (token2) => _extends$1(_extends$1(_extends$1(_extends$1(_extends$1({}, genSolidButtonStyle(token2)), {
      backgroundColor: token2.colorBgContainer,
      borderColor: token2.colorBorder,
      boxShadow: `0 ${token2.controlOutlineWidth}px 0 ${token2.controlTmpOutline}`
    }), genHoverActiveButtonStyle({
      color: token2.colorPrimaryHover,
      borderColor: token2.colorPrimaryHover
    }, {
      color: token2.colorPrimaryActive,
      borderColor: token2.colorPrimaryActive
    })), genGhostButtonStyle(token2.componentCls, token2.colorBgContainer, token2.colorBgContainer, token2.colorTextDisabled, token2.colorBorder)), {
      [`&${token2.componentCls}-dangerous`]: _extends$1(_extends$1(_extends$1({
        color: token2.colorError,
        borderColor: token2.colorError
      }, genHoverActiveButtonStyle({
        color: token2.colorErrorHover,
        borderColor: token2.colorErrorBorderHover
      }, {
        color: token2.colorErrorActive,
        borderColor: token2.colorErrorActive
      })), genGhostButtonStyle(token2.componentCls, token2.colorError, token2.colorError, token2.colorTextDisabled, token2.colorBorder)), genSolidDisabledButtonStyle(token2))
    });
    const genPrimaryButtonStyle = (token2) => _extends$1(_extends$1(_extends$1(_extends$1(_extends$1({}, genSolidButtonStyle(token2)), {
      color: token2.colorTextLightSolid,
      backgroundColor: token2.colorPrimary,
      boxShadow: `0 ${token2.controlOutlineWidth}px 0 ${token2.controlOutline}`
    }), genHoverActiveButtonStyle({
      color: token2.colorTextLightSolid,
      backgroundColor: token2.colorPrimaryHover
    }, {
      color: token2.colorTextLightSolid,
      backgroundColor: token2.colorPrimaryActive
    })), genGhostButtonStyle(token2.componentCls, token2.colorPrimary, token2.colorPrimary, token2.colorTextDisabled, token2.colorBorder, {
      color: token2.colorPrimaryHover,
      borderColor: token2.colorPrimaryHover
    }, {
      color: token2.colorPrimaryActive,
      borderColor: token2.colorPrimaryActive
    })), {
      [`&${token2.componentCls}-dangerous`]: _extends$1(_extends$1(_extends$1({
        backgroundColor: token2.colorError,
        boxShadow: `0 ${token2.controlOutlineWidth}px 0 ${token2.colorErrorOutline}`
      }, genHoverActiveButtonStyle({
        backgroundColor: token2.colorErrorHover
      }, {
        backgroundColor: token2.colorErrorActive
      })), genGhostButtonStyle(token2.componentCls, token2.colorError, token2.colorError, token2.colorTextDisabled, token2.colorBorder, {
        color: token2.colorErrorHover,
        borderColor: token2.colorErrorHover
      }, {
        color: token2.colorErrorActive,
        borderColor: token2.colorErrorActive
      })), genSolidDisabledButtonStyle(token2))
    });
    const genDashedButtonStyle = (token2) => _extends$1(_extends$1({}, genDefaultButtonStyle(token2)), {
      borderStyle: "dashed"
    });
    const genLinkButtonStyle = (token2) => _extends$1(_extends$1(_extends$1({
      color: token2.colorLink
    }, genHoverActiveButtonStyle({
      color: token2.colorLinkHover
    }, {
      color: token2.colorLinkActive
    })), genPureDisabledButtonStyle(token2)), {
      [`&${token2.componentCls}-dangerous`]: _extends$1(_extends$1({
        color: token2.colorError
      }, genHoverActiveButtonStyle({
        color: token2.colorErrorHover
      }, {
        color: token2.colorErrorActive
      })), genPureDisabledButtonStyle(token2))
    });
    const genTextButtonStyle = (token2) => _extends$1(_extends$1(_extends$1({}, genHoverActiveButtonStyle({
      color: token2.colorText,
      backgroundColor: token2.colorBgTextHover
    }, {
      color: token2.colorText,
      backgroundColor: token2.colorBgTextActive
    })), genPureDisabledButtonStyle(token2)), {
      [`&${token2.componentCls}-dangerous`]: _extends$1(_extends$1({
        color: token2.colorError
      }, genPureDisabledButtonStyle(token2)), genHoverActiveButtonStyle({
        color: token2.colorErrorHover,
        backgroundColor: token2.colorErrorBg
      }, {
        color: token2.colorErrorHover,
        backgroundColor: token2.colorErrorBg
      }))
    });
    const genDisabledButtonStyle = (token2) => _extends$1(_extends$1({}, genDisabledStyle(token2)), {
      [`&${token2.componentCls}:hover`]: _extends$1({}, genDisabledStyle(token2))
    });
    const genTypeButtonStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        [`${componentCls}-default`]: genDefaultButtonStyle(token2),
        [`${componentCls}-primary`]: genPrimaryButtonStyle(token2),
        [`${componentCls}-dashed`]: genDashedButtonStyle(token2),
        [`${componentCls}-link`]: genLinkButtonStyle(token2),
        [`${componentCls}-text`]: genTextButtonStyle(token2),
        [`${componentCls}-disabled`]: genDisabledButtonStyle(token2)
      };
    };
    const genSizeButtonStyle = function(token2) {
      let sizePrefixCls = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
      const {
        componentCls,
        iconCls,
        controlHeight,
        fontSize,
        lineHeight,
        lineWidth,
        borderRadius,
        buttonPaddingHorizontal
      } = token2;
      const paddingVertical = Math.max(0, (controlHeight - fontSize * lineHeight) / 2 - lineWidth);
      const paddingHorizontal = buttonPaddingHorizontal - lineWidth;
      const iconOnlyCls = `${componentCls}-icon-only`;
      return [
        // Size
        {
          [`${componentCls}${sizePrefixCls}`]: {
            fontSize,
            height: controlHeight,
            padding: `${paddingVertical}px ${paddingHorizontal}px`,
            borderRadius,
            [`&${iconOnlyCls}`]: {
              width: controlHeight,
              paddingInlineStart: 0,
              paddingInlineEnd: 0,
              [`&${componentCls}-round`]: {
                width: "auto"
              },
              "> span": {
                transform: "scale(1.143)"
                // 14px -> 16px
              }
            },
            // Loading
            [`&${componentCls}-loading`]: {
              opacity: token2.opacityLoading,
              cursor: "default"
            },
            [`${componentCls}-loading-icon`]: {
              transition: `width ${token2.motionDurationSlow} ${token2.motionEaseInOut}, opacity ${token2.motionDurationSlow} ${token2.motionEaseInOut}`
            },
            [`&:not(${iconOnlyCls}) ${componentCls}-loading-icon > ${iconCls}`]: {
              marginInlineEnd: token2.marginXS
            }
          }
        },
        // Shape - patch prefixCls again to override solid border radius style
        {
          [`${componentCls}${componentCls}-circle${sizePrefixCls}`]: genCircleButtonStyle(token2)
        },
        {
          [`${componentCls}${componentCls}-round${sizePrefixCls}`]: genRoundButtonStyle(token2)
        }
      ];
    };
    const genSizeBaseButtonStyle = (token2) => genSizeButtonStyle(token2);
    const genSizeSmallButtonStyle = (token2) => {
      const smallToken = merge(token2, {
        controlHeight: token2.controlHeightSM,
        padding: token2.paddingXS,
        buttonPaddingHorizontal: 8,
        borderRadius: token2.borderRadiusSM
      });
      return genSizeButtonStyle(smallToken, `${token2.componentCls}-sm`);
    };
    const genSizeLargeButtonStyle = (token2) => {
      const largeToken = merge(token2, {
        controlHeight: token2.controlHeightLG,
        fontSize: token2.fontSizeLG,
        borderRadius: token2.borderRadiusLG
      });
      return genSizeButtonStyle(largeToken, `${token2.componentCls}-lg`);
    };
    const genBlockButtonStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        [componentCls]: {
          [`&${componentCls}-block`]: {
            width: "100%"
          }
        }
      };
    };
    const useStyle$8 = genComponentStyleHook("Button", (token2) => {
      const {
        controlTmpOutline,
        paddingContentHorizontal
      } = token2;
      const buttonToken = merge(token2, {
        colorOutlineDefault: controlTmpOutline,
        buttonPaddingHorizontal: paddingContentHorizontal
      });
      return [
        // Shared
        genSharedButtonStyle(buttonToken),
        // Size
        genSizeSmallButtonStyle(buttonToken),
        genSizeBaseButtonStyle(buttonToken),
        genSizeLargeButtonStyle(buttonToken),
        // Block
        genBlockButtonStyle(buttonToken),
        // Group (type, ghost, danger, disabled, loading)
        genTypeButtonStyle(buttonToken),
        // Button Group
        genGroupStyle(buttonToken),
        // Space Compact
        genCompactItemStyle(token2, {
          focus: false
        }),
        genCompactItemVerticalStyle(token2)
      ];
    });
    const buttonGroupProps = () => ({
      prefixCls: String,
      size: {
        type: String
      }
    });
    const GroupSizeContext = createContext();
    const ButtonGroup = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "AButtonGroup",
      props: buttonGroupProps(),
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        const {
          prefixCls,
          direction
        } = useConfigInject("btn-group", props2);
        const [, , hashId] = useToken();
        GroupSizeContext.useProvide(reactive({
          size: computed(() => props2.size)
        }));
        const classes = computed(() => {
          const {
            size: size2
          } = props2;
          let sizeCls = "";
          switch (size2) {
            case "large":
              sizeCls = "lg";
              break;
            case "small":
              sizeCls = "sm";
              break;
            case "middle":
            case void 0:
              break;
            default:
              devWarning(!size2, "Button.Group", "Invalid prop `size`.");
          }
          return {
            [`${prefixCls.value}`]: true,
            [`${prefixCls.value}-${sizeCls}`]: sizeCls,
            [`${prefixCls.value}-rtl`]: direction.value === "rtl",
            [hashId.value]: true
          };
        });
        return () => {
          var _a;
          return createVNode("div", {
            "class": classes.value
          }, [flattenChildren((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots))]);
        };
      }
    });
    const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
    const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
    function isUnBorderedButtonType(type) {
      return type === "text" || type === "link";
    }
    const Button = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "AButton",
      inheritAttrs: false,
      __ANT_BUTTON: true,
      props: initDefaultProps(buttonProps(), {
        type: "default"
      }),
      slots: Object,
      // emits: ['click', 'mousedown'],
      setup(props2, _ref) {
        let {
          slots,
          attrs,
          emit: emit2,
          expose
        } = _ref;
        const {
          prefixCls,
          autoInsertSpaceInButton,
          direction,
          size: size2
        } = useConfigInject("btn", props2);
        const [wrapSSR, hashId] = useStyle$8(prefixCls);
        const groupSizeContext = GroupSizeContext.useInject();
        const disabledContext = useInjectDisabled();
        const mergedDisabled = computed(() => {
          var _a;
          return (_a = props2.disabled) !== null && _a !== void 0 ? _a : disabledContext.value;
        });
        const buttonNodeRef = shallowRef(null);
        const delayTimeoutRef = shallowRef(void 0);
        let isNeedInserted = false;
        const innerLoading = shallowRef(false);
        const hasTwoCNChar = shallowRef(false);
        const autoInsertSpace = computed(() => autoInsertSpaceInButton.value !== false);
        const {
          compactSize,
          compactItemClassnames
        } = useCompactItemContext(prefixCls, direction);
        const loadingOrDelay = computed(() => typeof props2.loading === "object" && props2.loading.delay ? props2.loading.delay || true : !!props2.loading);
        watch(loadingOrDelay, (val) => {
          clearTimeout(delayTimeoutRef.value);
          if (typeof loadingOrDelay.value === "number") {
            delayTimeoutRef.value = setTimeout(() => {
              innerLoading.value = val;
            }, loadingOrDelay.value);
          } else {
            innerLoading.value = val;
          }
        }, {
          immediate: true
        });
        const classes = computed(() => {
          const {
            type,
            shape = "default",
            ghost,
            block,
            danger
          } = props2;
          const pre = prefixCls.value;
          const sizeClassNameMap = {
            large: "lg",
            small: "sm",
            middle: void 0
          };
          const sizeFullname = compactSize.value || (groupSizeContext === null || groupSizeContext === void 0 ? void 0 : groupSizeContext.size) || size2.value;
          const sizeCls = sizeFullname ? sizeClassNameMap[sizeFullname] || "" : "";
          return [compactItemClassnames.value, {
            [hashId.value]: true,
            [`${pre}`]: true,
            [`${pre}-${shape}`]: shape !== "default" && shape,
            [`${pre}-${type}`]: type,
            [`${pre}-${sizeCls}`]: sizeCls,
            [`${pre}-loading`]: innerLoading.value,
            [`${pre}-background-ghost`]: ghost && !isUnBorderedButtonType(type),
            [`${pre}-two-chinese-chars`]: hasTwoCNChar.value && autoInsertSpace.value,
            [`${pre}-block`]: block,
            [`${pre}-dangerous`]: !!danger,
            [`${pre}-rtl`]: direction.value === "rtl"
          }];
        });
        const fixTwoCNChar = () => {
          const node2 = buttonNodeRef.value;
          if (!node2 || autoInsertSpaceInButton.value === false) {
            return;
          }
          const buttonText = node2.textContent;
          if (isNeedInserted && isTwoCNChar(buttonText)) {
            if (!hasTwoCNChar.value) {
              hasTwoCNChar.value = true;
            }
          } else if (hasTwoCNChar.value) {
            hasTwoCNChar.value = false;
          }
        };
        const handleClick = (event) => {
          if (innerLoading.value || mergedDisabled.value) {
            event.preventDefault();
            return;
          }
          emit2("click", event);
        };
        const handleMousedown = (event) => {
          emit2("mousedown", event);
        };
        const insertSpace = (child, needInserted) => {
          const SPACE = needInserted ? " " : "";
          if (child.type === Text) {
            let text = child.children.trim();
            if (isTwoCNChar(text)) {
              text = text.split("").join(SPACE);
            }
            return createVNode("span", null, [text]);
          }
          return child;
        };
        watchEffect(() => {
          devWarning(!(props2.ghost && isUnBorderedButtonType(props2.type)), "Button", "`link` or `text` button can't be a `ghost` button.");
        });
        onMounted(fixTwoCNChar);
        onUpdated(fixTwoCNChar);
        onBeforeUnmount(() => {
          delayTimeoutRef.value && clearTimeout(delayTimeoutRef.value);
        });
        const focus = () => {
          var _a;
          (_a = buttonNodeRef.value) === null || _a === void 0 ? void 0 : _a.focus();
        };
        const blur = () => {
          var _a;
          (_a = buttonNodeRef.value) === null || _a === void 0 ? void 0 : _a.blur();
        };
        expose({
          focus,
          blur
        });
        return () => {
          var _a, _b;
          const {
            icon = (_a = slots.icon) === null || _a === void 0 ? void 0 : _a.call(slots)
          } = props2;
          const children = flattenChildren((_b = slots.default) === null || _b === void 0 ? void 0 : _b.call(slots));
          isNeedInserted = children.length === 1 && !icon && !isUnBorderedButtonType(props2.type);
          const {
            type,
            htmlType,
            href,
            title,
            target
          } = props2;
          const iconType = innerLoading.value ? "loading" : icon;
          const buttonProps2 = _extends$1(_extends$1({}, attrs), {
            title,
            disabled: mergedDisabled.value,
            class: [classes.value, attrs.class, {
              [`${prefixCls.value}-icon-only`]: children.length === 0 && !!iconType
            }],
            onClick: handleClick,
            onMousedown: handleMousedown
          });
          if (!mergedDisabled.value) {
            delete buttonProps2.disabled;
          }
          const iconNode = icon && !innerLoading.value ? icon : createVNode(LoadingIcon, {
            "existIcon": !!icon,
            "prefixCls": prefixCls.value,
            "loading": !!innerLoading.value
          }, null);
          const kids = children.map((child) => insertSpace(child, isNeedInserted && autoInsertSpace.value));
          if (href !== void 0) {
            return wrapSSR(createVNode("a", _objectSpread2$1(_objectSpread2$1({}, buttonProps2), {}, {
              "href": href,
              "target": target,
              "ref": buttonNodeRef
            }), [iconNode, kids]));
          }
          let buttonNode = createVNode("button", _objectSpread2$1(_objectSpread2$1({}, buttonProps2), {}, {
            "ref": buttonNodeRef,
            "type": htmlType
          }), [iconNode, kids]);
          if (!isUnBorderedButtonType(type)) {
            const _buttonNode = /* @__PURE__ */ function() {
              return buttonNode;
            }();
            buttonNode = createVNode(Wave, {
              "ref": "wave",
              "disabled": !!innerLoading.value
            }, {
              default: () => [_buttonNode]
            });
          }
          return wrapSSR(buttonNode);
        };
      }
    });
    Button.Group = ButtonGroup;
    Button.install = function(app) {
      app.component(Button.name, Button);
      app.component(ButtonGroup.name, ButtonGroup);
      return app;
    };
    function hasClass(node2, className) {
      if (node2.classList) {
        return node2.classList.contains(className);
      }
      const originClass = node2.className;
      return ` ${originClass} `.indexOf(` ${className} `) > -1;
    }
    function addClass(node2, className) {
      if (node2.classList) {
        node2.classList.add(className);
      } else {
        if (!hasClass(node2, className)) {
          node2.className = `${node2.className} ${className}`;
        }
      }
    }
    function removeClass(node2, className) {
      if (node2.classList) {
        node2.classList.remove(className);
      } else {
        if (hasClass(node2, className)) {
          const originClass = node2.className;
          node2.className = ` ${originClass} `.replace(` ${className} `, " ");
        }
      }
    }
    const collapseMotion = function() {
      let name = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "ant-motion-collapse";
      let appear = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
      return {
        name,
        appear,
        css: true,
        onBeforeEnter: (node2) => {
          node2.style.height = "0px";
          node2.style.opacity = "0";
          addClass(node2, name);
        },
        onEnter: (node2) => {
          nextTick(() => {
            node2.style.height = `${node2.scrollHeight}px`;
            node2.style.opacity = "1";
          });
        },
        onAfterEnter: (node2) => {
          if (node2) {
            removeClass(node2, name);
            node2.style.height = null;
            node2.style.opacity = null;
          }
        },
        onBeforeLeave: (node2) => {
          addClass(node2, name);
          node2.style.height = `${node2.offsetHeight}px`;
          node2.style.opacity = null;
        },
        onLeave: (node2) => {
          setTimeout(() => {
            node2.style.height = "0px";
            node2.style.opacity = "0";
          });
        },
        onAfterLeave: (node2) => {
          if (node2) {
            removeClass(node2, name);
            if (node2.style) {
              node2.style.height = null;
              node2.style.opacity = null;
            }
          }
        }
      };
    };
    var __rest$9 = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const checkboxProps = {
      prefixCls: String,
      name: String,
      id: String,
      type: String,
      defaultChecked: {
        type: [Boolean, Number],
        default: void 0
      },
      checked: {
        type: [Boolean, Number],
        default: void 0
      },
      disabled: Boolean,
      tabindex: {
        type: [Number, String]
      },
      readonly: Boolean,
      autofocus: Boolean,
      value: PropTypes.any,
      required: Boolean
    };
    const VcCheckbox = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "Checkbox",
      inheritAttrs: false,
      props: initDefaultProps(checkboxProps, {
        prefixCls: "rc-checkbox",
        type: "checkbox",
        defaultChecked: false
      }),
      emits: ["click", "change"],
      setup(props2, _ref) {
        let {
          attrs,
          emit: emit2,
          expose
        } = _ref;
        const checked = ref(props2.checked === void 0 ? props2.defaultChecked : props2.checked);
        const inputRef = ref();
        watch(() => props2.checked, () => {
          checked.value = props2.checked;
        });
        expose({
          focus() {
            var _a;
            (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.focus();
          },
          blur() {
            var _a;
            (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.blur();
          }
        });
        const eventShiftKey = ref();
        const handleChange = (e2) => {
          if (props2.disabled) {
            return;
          }
          if (props2.checked === void 0) {
            checked.value = e2.target.checked;
          }
          e2.shiftKey = eventShiftKey.value;
          const eventObj = {
            target: _extends$1(_extends$1({}, props2), {
              checked: e2.target.checked
            }),
            stopPropagation() {
              e2.stopPropagation();
            },
            preventDefault() {
              e2.preventDefault();
            },
            nativeEvent: e2
          };
          if (props2.checked !== void 0) {
            inputRef.value.checked = !!props2.checked;
          }
          emit2("change", eventObj);
          eventShiftKey.value = false;
        };
        const onClick = (e2) => {
          emit2("click", e2);
          eventShiftKey.value = e2.shiftKey;
        };
        return () => {
          const {
            prefixCls,
            name,
            id,
            type,
            disabled,
            readonly: readonly2,
            tabindex,
            autofocus,
            value,
            required
          } = props2, others = __rest$9(props2, ["prefixCls", "name", "id", "type", "disabled", "readonly", "tabindex", "autofocus", "value", "required"]);
          const {
            class: className,
            onFocus,
            onBlur,
            onKeydown,
            onKeypress,
            onKeyup
          } = attrs;
          const othersAndAttrs = _extends$1(_extends$1({}, others), attrs);
          const globalProps = Object.keys(othersAndAttrs).reduce((prev2, key2) => {
            if (key2.startsWith("data-") || key2.startsWith("aria-") || key2 === "role") {
              prev2[key2] = othersAndAttrs[key2];
            }
            return prev2;
          }, {});
          const classString = classNames(prefixCls, className, {
            [`${prefixCls}-checked`]: checked.value,
            [`${prefixCls}-disabled`]: disabled
          });
          const inputProps2 = _extends$1(_extends$1({
            name,
            id,
            type,
            readonly: readonly2,
            disabled,
            tabindex,
            class: `${prefixCls}-input`,
            checked: !!checked.value,
            autofocus,
            value
          }, globalProps), {
            onChange: handleChange,
            onClick,
            onFocus,
            onBlur,
            onKeydown,
            onKeypress,
            onKeyup,
            required
          });
          return createVNode("span", {
            "class": classString
          }, [createVNode("input", _objectSpread2$1({
            "ref": inputRef
          }, inputProps2), null), createVNode("span", {
            "class": `${prefixCls}-inner`
          }, null)]);
        };
      }
    });
    const radioGroupContextKey = Symbol("radioGroupContextKey");
    const useProvideRadioGroupContext = (props2) => {
      provide(radioGroupContextKey, props2);
    };
    const useInjectRadioGroupContext = () => {
      return inject(radioGroupContextKey, void 0);
    };
    const radioOptionTypeContextKey = Symbol("radioOptionTypeContextKey");
    const useProvideRadioOptionTypeContext = (props2) => {
      provide(radioOptionTypeContextKey, props2);
    };
    const useInjectRadioOptionTypeContext = () => {
      return inject(radioOptionTypeContextKey, void 0);
    };
    const antRadioEffect = new Keyframe("antRadioEffect", {
      "0%": {
        transform: "scale(1)",
        opacity: 0.5
      },
      "100%": {
        transform: "scale(1.6)",
        opacity: 0
      }
    });
    const getGroupRadioStyle = (token2) => {
      const {
        componentCls,
        antCls
      } = token2;
      const groupPrefixCls = `${componentCls}-group`;
      return {
        [groupPrefixCls]: _extends$1(_extends$1({}, resetComponent(token2)), {
          display: "inline-block",
          fontSize: 0,
          // RTL
          [`&${groupPrefixCls}-rtl`]: {
            direction: "rtl"
          },
          [`${antCls}-badge ${antCls}-badge-count`]: {
            zIndex: 1
          },
          [`> ${antCls}-badge:not(:first-child) > ${antCls}-button-wrapper`]: {
            borderInlineStart: "none"
          }
        })
      };
    };
    const getRadioBasicStyle = (token2) => {
      const {
        componentCls,
        radioWrapperMarginRight,
        radioCheckedColor,
        radioSize,
        motionDurationSlow,
        motionDurationMid,
        motionEaseInOut,
        motionEaseInOutCirc,
        radioButtonBg,
        colorBorder,
        lineWidth,
        radioDotSize,
        colorBgContainerDisabled,
        colorTextDisabled,
        paddingXS,
        radioDotDisabledColor,
        lineType,
        radioDotDisabledSize,
        wireframe,
        colorWhite
      } = token2;
      const radioInnerPrefixCls = `${componentCls}-inner`;
      return {
        [`${componentCls}-wrapper`]: _extends$1(_extends$1({}, resetComponent(token2)), {
          position: "relative",
          display: "inline-flex",
          alignItems: "baseline",
          marginInlineStart: 0,
          marginInlineEnd: radioWrapperMarginRight,
          cursor: "pointer",
          // RTL
          [`&${componentCls}-wrapper-rtl`]: {
            direction: "rtl"
          },
          "&-disabled": {
            cursor: "not-allowed",
            color: token2.colorTextDisabled
          },
          "&::after": {
            display: "inline-block",
            width: 0,
            overflow: "hidden",
            content: '"\\a0"'
          },
          // hashId 在 wrapper 上,只能铺平
          [`${componentCls}-checked::after`]: {
            position: "absolute",
            insetBlockStart: 0,
            insetInlineStart: 0,
            width: "100%",
            height: "100%",
            border: `${lineWidth}px ${lineType} ${radioCheckedColor}`,
            borderRadius: "50%",
            visibility: "hidden",
            animationName: antRadioEffect,
            animationDuration: motionDurationSlow,
            animationTimingFunction: motionEaseInOut,
            animationFillMode: "both",
            content: '""'
          },
          [componentCls]: _extends$1(_extends$1({}, resetComponent(token2)), {
            position: "relative",
            display: "inline-block",
            outline: "none",
            cursor: "pointer",
            alignSelf: "center"
          }),
          [`${componentCls}-wrapper:hover &,
        &:hover ${radioInnerPrefixCls}`]: {
            borderColor: radioCheckedColor
          },
          [`${componentCls}-input:focus-visible + ${radioInnerPrefixCls}`]: _extends$1({}, genFocusOutline(token2)),
          [`${componentCls}:hover::after, ${componentCls}-wrapper:hover &::after`]: {
            visibility: "visible"
          },
          [`${componentCls}-inner`]: {
            "&::after": {
              boxSizing: "border-box",
              position: "absolute",
              insetBlockStart: "50%",
              insetInlineStart: "50%",
              display: "block",
              width: radioSize,
              height: radioSize,
              marginBlockStart: radioSize / -2,
              marginInlineStart: radioSize / -2,
              backgroundColor: wireframe ? radioCheckedColor : colorWhite,
              borderBlockStart: 0,
              borderInlineStart: 0,
              borderRadius: radioSize,
              transform: "scale(0)",
              opacity: 0,
              transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`,
              content: '""'
            },
            boxSizing: "border-box",
            position: "relative",
            insetBlockStart: 0,
            insetInlineStart: 0,
            display: "block",
            width: radioSize,
            height: radioSize,
            backgroundColor: radioButtonBg,
            borderColor: colorBorder,
            borderStyle: "solid",
            borderWidth: lineWidth,
            borderRadius: "50%",
            transition: `all ${motionDurationMid}`
          },
          [`${componentCls}-input`]: {
            position: "absolute",
            insetBlockStart: 0,
            insetInlineEnd: 0,
            insetBlockEnd: 0,
            insetInlineStart: 0,
            zIndex: 1,
            cursor: "pointer",
            opacity: 0
          },
          // 选中状态
          [`${componentCls}-checked`]: {
            [radioInnerPrefixCls]: {
              borderColor: radioCheckedColor,
              backgroundColor: wireframe ? radioButtonBg : radioCheckedColor,
              "&::after": {
                transform: `scale(${radioDotSize / radioSize})`,
                opacity: 1,
                transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`
              }
            }
          },
          [`${componentCls}-disabled`]: {
            cursor: "not-allowed",
            [radioInnerPrefixCls]: {
              backgroundColor: colorBgContainerDisabled,
              borderColor: colorBorder,
              cursor: "not-allowed",
              "&::after": {
                backgroundColor: radioDotDisabledColor
              }
            },
            [`${componentCls}-input`]: {
              cursor: "not-allowed"
            },
            [`${componentCls}-disabled + span`]: {
              color: colorTextDisabled,
              cursor: "not-allowed"
            },
            [`&${componentCls}-checked`]: {
              [radioInnerPrefixCls]: {
                "&::after": {
                  transform: `scale(${radioDotDisabledSize / radioSize})`
                }
              }
            }
          },
          [`span${componentCls} + *`]: {
            paddingInlineStart: paddingXS,
            paddingInlineEnd: paddingXS
          }
        })
      };
    };
    const getRadioButtonStyle = (token2) => {
      const {
        radioButtonColor,
        controlHeight,
        componentCls,
        lineWidth,
        lineType,
        colorBorder,
        motionDurationSlow,
        motionDurationMid,
        radioButtonPaddingHorizontal,
        fontSize,
        radioButtonBg,
        fontSizeLG,
        controlHeightLG,
        controlHeightSM,
        paddingXS,
        borderRadius,
        borderRadiusSM,
        borderRadiusLG,
        radioCheckedColor,
        radioButtonCheckedBg,
        radioButtonHoverColor,
        radioButtonActiveColor,
        radioSolidCheckedColor,
        colorTextDisabled,
        colorBgContainerDisabled,
        radioDisabledButtonCheckedColor,
        radioDisabledButtonCheckedBg
      } = token2;
      return {
        [`${componentCls}-button-wrapper`]: {
          position: "relative",
          display: "inline-block",
          height: controlHeight,
          margin: 0,
          paddingInline: radioButtonPaddingHorizontal,
          paddingBlock: 0,
          color: radioButtonColor,
          fontSize,
          lineHeight: `${controlHeight - lineWidth * 2}px`,
          background: radioButtonBg,
          border: `${lineWidth}px ${lineType} ${colorBorder}`,
          // strange align fix for chrome but works
          // https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
          borderBlockStartWidth: lineWidth + 0.02,
          borderInlineStartWidth: 0,
          borderInlineEndWidth: lineWidth,
          cursor: "pointer",
          transition: [`color ${motionDurationMid}`, `background ${motionDurationMid}`, `border-color ${motionDurationMid}`, `box-shadow ${motionDurationMid}`].join(","),
          a: {
            color: radioButtonColor
          },
          [`> ${componentCls}-button`]: {
            position: "absolute",
            insetBlockStart: 0,
            insetInlineStart: 0,
            zIndex: -1,
            width: "100%",
            height: "100%"
          },
          "&:not(:first-child)": {
            "&::before": {
              position: "absolute",
              insetBlockStart: -lineWidth,
              insetInlineStart: -lineWidth,
              display: "block",
              boxSizing: "content-box",
              width: 1,
              height: "100%",
              paddingBlock: lineWidth,
              paddingInline: 0,
              backgroundColor: colorBorder,
              transition: `background-color ${motionDurationSlow}`,
              content: '""'
            }
          },
          "&:first-child": {
            borderInlineStart: `${lineWidth}px ${lineType} ${colorBorder}`,
            borderStartStartRadius: borderRadius,
            borderEndStartRadius: borderRadius
          },
          "&:last-child": {
            borderStartEndRadius: borderRadius,
            borderEndEndRadius: borderRadius
          },
          "&:first-child:last-child": {
            borderRadius
          },
          [`${componentCls}-group-large &`]: {
            height: controlHeightLG,
            fontSize: fontSizeLG,
            lineHeight: `${controlHeightLG - lineWidth * 2}px`,
            "&:first-child": {
              borderStartStartRadius: borderRadiusLG,
              borderEndStartRadius: borderRadiusLG
            },
            "&:last-child": {
              borderStartEndRadius: borderRadiusLG,
              borderEndEndRadius: borderRadiusLG
            }
          },
          [`${componentCls}-group-small &`]: {
            height: controlHeightSM,
            paddingInline: paddingXS - lineWidth,
            paddingBlock: 0,
            lineHeight: `${controlHeightSM - lineWidth * 2}px`,
            "&:first-child": {
              borderStartStartRadius: borderRadiusSM,
              borderEndStartRadius: borderRadiusSM
            },
            "&:last-child": {
              borderStartEndRadius: borderRadiusSM,
              borderEndEndRadius: borderRadiusSM
            }
          },
          "&:hover": {
            position: "relative",
            color: radioCheckedColor
          },
          "&:has(:focus-visible)": _extends$1({}, genFocusOutline(token2)),
          [`${componentCls}-inner, input[type='checkbox'], input[type='radio']`]: {
            width: 0,
            height: 0,
            opacity: 0,
            pointerEvents: "none"
          },
          [`&-checked:not(${componentCls}-button-wrapper-disabled)`]: {
            zIndex: 1,
            color: radioCheckedColor,
            background: radioButtonCheckedBg,
            borderColor: radioCheckedColor,
            "&::before": {
              backgroundColor: radioCheckedColor
            },
            "&:first-child": {
              borderColor: radioCheckedColor
            },
            "&:hover": {
              color: radioButtonHoverColor,
              borderColor: radioButtonHoverColor,
              "&::before": {
                backgroundColor: radioButtonHoverColor
              }
            },
            "&:active": {
              color: radioButtonActiveColor,
              borderColor: radioButtonActiveColor,
              "&::before": {
                backgroundColor: radioButtonActiveColor
              }
            }
          },
          [`${componentCls}-group-solid &-checked:not(${componentCls}-button-wrapper-disabled)`]: {
            color: radioSolidCheckedColor,
            background: radioCheckedColor,
            borderColor: radioCheckedColor,
            "&:hover": {
              color: radioSolidCheckedColor,
              background: radioButtonHoverColor,
              borderColor: radioButtonHoverColor
            },
            "&:active": {
              color: radioSolidCheckedColor,
              background: radioButtonActiveColor,
              borderColor: radioButtonActiveColor
            }
          },
          "&-disabled": {
            color: colorTextDisabled,
            backgroundColor: colorBgContainerDisabled,
            borderColor: colorBorder,
            cursor: "not-allowed",
            "&:first-child, &:hover": {
              color: colorTextDisabled,
              backgroundColor: colorBgContainerDisabled,
              borderColor: colorBorder
            }
          },
          [`&-disabled${componentCls}-button-wrapper-checked`]: {
            color: radioDisabledButtonCheckedColor,
            backgroundColor: radioDisabledButtonCheckedBg,
            borderColor: colorBorder,
            boxShadow: "none"
          }
        }
      };
    };
    const useStyle$7 = genComponentStyleHook("Radio", (token2) => {
      const {
        padding,
        lineWidth,
        controlItemBgActiveDisabled,
        colorTextDisabled,
        colorBgContainer,
        fontSizeLG,
        controlOutline,
        colorPrimaryHover,
        colorPrimaryActive,
        colorText,
        colorPrimary,
        marginXS,
        controlOutlineWidth,
        colorTextLightSolid,
        wireframe
      } = token2;
      const radioFocusShadow = `0 0 0 ${controlOutlineWidth}px ${controlOutline}`;
      const radioButtonFocusShadow = radioFocusShadow;
      const radioSize = fontSizeLG;
      const dotPadding = 4;
      const radioDotDisabledSize = radioSize - dotPadding * 2;
      const radioDotSize = wireframe ? radioDotDisabledSize : radioSize - (dotPadding + lineWidth) * 2;
      const radioCheckedColor = colorPrimary;
      const radioButtonColor = colorText;
      const radioButtonHoverColor = colorPrimaryHover;
      const radioButtonActiveColor = colorPrimaryActive;
      const radioButtonPaddingHorizontal = padding - lineWidth;
      const radioDisabledButtonCheckedColor = colorTextDisabled;
      const radioWrapperMarginRight = marginXS;
      const radioToken = merge(token2, {
        radioFocusShadow,
        radioButtonFocusShadow,
        radioSize,
        radioDotSize,
        radioDotDisabledSize,
        radioCheckedColor,
        radioDotDisabledColor: colorTextDisabled,
        radioSolidCheckedColor: colorTextLightSolid,
        radioButtonBg: colorBgContainer,
        radioButtonCheckedBg: colorBgContainer,
        radioButtonColor,
        radioButtonHoverColor,
        radioButtonActiveColor,
        radioButtonPaddingHorizontal,
        radioDisabledButtonCheckedBg: controlItemBgActiveDisabled,
        radioDisabledButtonCheckedColor,
        radioWrapperMarginRight
      });
      return [getGroupRadioStyle(radioToken), getRadioBasicStyle(radioToken), getRadioButtonStyle(radioToken)];
    });
    var __rest$8 = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const radioProps = () => ({
      prefixCls: String,
      checked: booleanType(),
      disabled: booleanType(),
      isGroup: booleanType(),
      value: PropTypes.any,
      name: String,
      id: String,
      autofocus: booleanType(),
      onChange: functionType(),
      onFocus: functionType(),
      onBlur: functionType(),
      onClick: functionType(),
      "onUpdate:checked": functionType(),
      "onUpdate:value": functionType()
    });
    const Radio = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ARadio",
      inheritAttrs: false,
      props: radioProps(),
      setup(props2, _ref) {
        let {
          emit: emit2,
          expose,
          slots,
          attrs
        } = _ref;
        const formItemContext = useInjectFormItemContext();
        const formItemInputContext = FormItemInputContext.useInject();
        const radioOptionTypeContext = useInjectRadioOptionTypeContext();
        const radioGroupContext = useInjectRadioGroupContext();
        const disabledContext = useInjectDisabled();
        const mergedDisabled = computed(() => {
          var _a;
          return (_a = disabled.value) !== null && _a !== void 0 ? _a : disabledContext.value;
        });
        const vcCheckbox = ref();
        const {
          prefixCls: radioPrefixCls,
          direction,
          disabled
        } = useConfigInject("radio", props2);
        const prefixCls = computed(() => (radioGroupContext === null || radioGroupContext === void 0 ? void 0 : radioGroupContext.optionType.value) === "button" || radioOptionTypeContext === "button" ? `${radioPrefixCls.value}-button` : radioPrefixCls.value);
        const contextDisabled = useInjectDisabled();
        const [wrapSSR, hashId] = useStyle$7(radioPrefixCls);
        const focus = () => {
          vcCheckbox.value.focus();
        };
        const blur = () => {
          vcCheckbox.value.blur();
        };
        expose({
          focus,
          blur
        });
        const handleChange = (event) => {
          const targetChecked = event.target.checked;
          emit2("update:checked", targetChecked);
          emit2("update:value", targetChecked);
          emit2("change", event);
          formItemContext.onFieldChange();
        };
        const onChange = (e2) => {
          emit2("change", e2);
          if (radioGroupContext && radioGroupContext.onChange) {
            radioGroupContext.onChange(e2);
          }
        };
        return () => {
          var _a;
          const radioGroup = radioGroupContext;
          const {
            prefixCls: customizePrefixCls,
            id = formItemContext.id.value
          } = props2, restProps = __rest$8(props2, ["prefixCls", "id"]);
          const rProps = _extends$1(_extends$1({
            prefixCls: prefixCls.value,
            id
          }, omit(restProps, ["onUpdate:checked", "onUpdate:value"])), {
            disabled: (_a = disabled.value) !== null && _a !== void 0 ? _a : contextDisabled.value
          });
          if (radioGroup) {
            rProps.name = radioGroup.name.value;
            rProps.onChange = onChange;
            rProps.checked = props2.value === radioGroup.value.value;
            rProps.disabled = mergedDisabled.value || radioGroup.disabled.value;
          } else {
            rProps.onChange = handleChange;
          }
          const wrapperClassString = classNames({
            [`${prefixCls.value}-wrapper`]: true,
            [`${prefixCls.value}-wrapper-checked`]: rProps.checked,
            [`${prefixCls.value}-wrapper-disabled`]: rProps.disabled,
            [`${prefixCls.value}-wrapper-rtl`]: direction.value === "rtl",
            [`${prefixCls.value}-wrapper-in-form-item`]: formItemInputContext.isFormItemInput
          }, attrs.class, hashId.value);
          return wrapSSR(createVNode("label", _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "class": wrapperClassString
          }), [createVNode(VcCheckbox, _objectSpread2$1(_objectSpread2$1({}, rProps), {}, {
            "type": "radio",
            "ref": vcCheckbox
          }), null), slots.default && createVNode("span", null, [slots.default()])]));
        };
      }
    });
    const radioGroupProps = () => ({
      prefixCls: String,
      value: PropTypes.any,
      size: stringType(),
      options: arrayType(),
      disabled: booleanType(),
      name: String,
      buttonStyle: stringType("outline"),
      id: String,
      optionType: stringType("default"),
      onChange: functionType(),
      "onUpdate:value": functionType()
    });
    const RadioGroup = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ARadioGroup",
      inheritAttrs: false,
      props: radioGroupProps(),
      // emits: ['update:value', 'change'],
      setup(props2, _ref) {
        let {
          slots,
          emit: emit2,
          attrs
        } = _ref;
        const formItemContext = useInjectFormItemContext();
        const {
          prefixCls,
          direction,
          size: size2
        } = useConfigInject("radio", props2);
        const [wrapSSR, hashId] = useStyle$7(prefixCls);
        const stateValue = ref(props2.value);
        const updatingValue = ref(false);
        watch(() => props2.value, (val) => {
          stateValue.value = val;
          updatingValue.value = false;
        });
        const onRadioChange = (ev) => {
          const lastValue = stateValue.value;
          const {
            value
          } = ev.target;
          if (!("value" in props2)) {
            stateValue.value = value;
          }
          if (!updatingValue.value && value !== lastValue) {
            updatingValue.value = true;
            emit2("update:value", value);
            emit2("change", ev);
            formItemContext.onFieldChange();
          }
          nextTick(() => {
            updatingValue.value = false;
          });
        };
        useProvideRadioGroupContext({
          onChange: onRadioChange,
          value: stateValue,
          disabled: computed(() => props2.disabled),
          name: computed(() => props2.name),
          optionType: computed(() => props2.optionType)
        });
        return () => {
          var _a;
          const {
            options,
            buttonStyle,
            id = formItemContext.id.value
          } = props2;
          const groupPrefixCls = `${prefixCls.value}-group`;
          const classString = classNames(groupPrefixCls, `${groupPrefixCls}-${buttonStyle}`, {
            [`${groupPrefixCls}-${size2.value}`]: size2.value,
            [`${groupPrefixCls}-rtl`]: direction.value === "rtl"
          }, attrs.class, hashId.value);
          let children = null;
          if (options && options.length > 0) {
            children = options.map((option) => {
              if (typeof option === "string" || typeof option === "number") {
                return createVNode(Radio, {
                  "key": option,
                  "prefixCls": prefixCls.value,
                  "disabled": props2.disabled,
                  "value": option,
                  "checked": stateValue.value === option
                }, {
                  default: () => [option]
                });
              }
              const {
                value,
                disabled,
                label
              } = option;
              return createVNode(Radio, {
                "key": `radio-group-value-options-${value}`,
                "prefixCls": prefixCls.value,
                "disabled": disabled || props2.disabled,
                "value": value,
                "checked": stateValue.value === value
              }, {
                default: () => [label]
              });
            });
          } else {
            children = (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
          }
          return wrapSSR(createVNode("div", _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "class": classString,
            "id": id
          }), [children]));
        };
      }
    });
    const RadioButton = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ARadioButton",
      inheritAttrs: false,
      props: radioProps(),
      setup(props2, _ref) {
        let {
          slots,
          attrs
        } = _ref;
        const {
          prefixCls
        } = useConfigInject("radio", props2);
        useProvideRadioOptionTypeContext("button");
        return () => {
          var _a;
          return createVNode(Radio, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, attrs), props2), {}, {
            "prefixCls": prefixCls.value
          }), {
            default: () => [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]
          });
        };
      }
    });
    Radio.Group = RadioGroup;
    Radio.Button = RadioButton;
    Radio.install = function(app) {
      app.component(Radio.name, Radio);
      app.component(Radio.Group.name, Radio.Group);
      app.component(Radio.Button.name, Radio.Button);
      return app;
    };
    const canUseDocElement = () => canUseDom$1() && window.document.documentElement;
    let flexGapSupported;
    const detectFlexGapSupported = () => {
      if (!canUseDocElement()) {
        return false;
      }
      if (flexGapSupported !== void 0) {
        return flexGapSupported;
      }
      const flex = document.createElement("div");
      flex.style.display = "flex";
      flex.style.flexDirection = "column";
      flex.style.rowGap = "1px";
      flex.appendChild(document.createElement("div"));
      flex.appendChild(document.createElement("div"));
      document.body.appendChild(flex);
      flexGapSupported = flex.scrollHeight === 1;
      document.body.removeChild(flex);
      return flexGapSupported;
    };
    const useFlexGapSupport = () => {
      const flexible = shallowRef(false);
      onMounted(() => {
        flexible.value = detectFlexGapSupported();
      });
      return flexible;
    };
    const RowContextKey = Symbol("rowContextKey");
    const useProvideRow = (state) => {
      provide(RowContextKey, state);
    };
    const useInjectRow = () => {
      return inject(RowContextKey, {
        gutter: computed(() => void 0),
        wrap: computed(() => void 0),
        supportFlexGap: computed(() => void 0)
      });
    };
    const genGridRowStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        // Grid system
        [componentCls]: {
          display: "flex",
          flexFlow: "row wrap",
          minWidth: 0,
          "&::before, &::after": {
            display: "flex"
          },
          "&-no-wrap": {
            flexWrap: "nowrap"
          },
          // The origin of the X-axis
          "&-start": {
            justifyContent: "flex-start"
          },
          // The center of the X-axis
          "&-center": {
            justifyContent: "center"
          },
          // The opposite of the X-axis
          "&-end": {
            justifyContent: "flex-end"
          },
          "&-space-between": {
            justifyContent: "space-between"
          },
          "&-space-around ": {
            justifyContent: "space-around"
          },
          "&-space-evenly ": {
            justifyContent: "space-evenly"
          },
          // Align at the top
          "&-top": {
            alignItems: "flex-start"
          },
          // Align at the center
          "&-middle": {
            alignItems: "center"
          },
          "&-bottom": {
            alignItems: "flex-end"
          }
        }
      };
    };
    const genGridColStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        // Grid system
        [componentCls]: {
          position: "relative",
          maxWidth: "100%",
          // Prevent columns from collapsing when empty
          minHeight: 1
        }
      };
    };
    const genLoopGridColumnsStyle = (token2, sizeCls) => {
      const {
        componentCls,
        gridColumns
      } = token2;
      const gridColumnsStyle = {};
      for (let i2 = gridColumns; i2 >= 0; i2--) {
        if (i2 === 0) {
          gridColumnsStyle[`${componentCls}${sizeCls}-${i2}`] = {
            display: "none"
          };
          gridColumnsStyle[`${componentCls}-push-${i2}`] = {
            insetInlineStart: "auto"
          };
          gridColumnsStyle[`${componentCls}-pull-${i2}`] = {
            insetInlineEnd: "auto"
          };
          gridColumnsStyle[`${componentCls}${sizeCls}-push-${i2}`] = {
            insetInlineStart: "auto"
          };
          gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i2}`] = {
            insetInlineEnd: "auto"
          };
          gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i2}`] = {
            marginInlineEnd: 0
          };
          gridColumnsStyle[`${componentCls}${sizeCls}-order-${i2}`] = {
            order: 0
          };
        } else {
          gridColumnsStyle[`${componentCls}${sizeCls}-${i2}`] = {
            display: "block",
            flex: `0 0 ${i2 / gridColumns * 100}%`,
            maxWidth: `${i2 / gridColumns * 100}%`
          };
          gridColumnsStyle[`${componentCls}${sizeCls}-push-${i2}`] = {
            insetInlineStart: `${i2 / gridColumns * 100}%`
          };
          gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i2}`] = {
            insetInlineEnd: `${i2 / gridColumns * 100}%`
          };
          gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i2}`] = {
            marginInlineStart: `${i2 / gridColumns * 100}%`
          };
          gridColumnsStyle[`${componentCls}${sizeCls}-order-${i2}`] = {
            order: i2
          };
        }
      }
      return gridColumnsStyle;
    };
    const genGridStyle = (token2, sizeCls) => genLoopGridColumnsStyle(token2, sizeCls);
    const genGridMediaStyle = (token2, screenSize, sizeCls) => ({
      [`@media (min-width: ${screenSize}px)`]: _extends$1({}, genGridStyle(token2, sizeCls))
    });
    const useRowStyle = genComponentStyleHook("Grid", (token2) => [genGridRowStyle(token2)]);
    const useColStyle = genComponentStyleHook("Grid", (token2) => {
      const gridToken = merge(token2, {
        gridColumns: 24
        // Row is divided into 24 parts in Grid
      });
      const gridMediaSizesMap = {
        "-sm": gridToken.screenSMMin,
        "-md": gridToken.screenMDMin,
        "-lg": gridToken.screenLGMin,
        "-xl": gridToken.screenXLMin,
        "-xxl": gridToken.screenXXLMin
      };
      return [genGridColStyle(gridToken), genGridStyle(gridToken, ""), genGridStyle(gridToken, "-xs"), Object.keys(gridMediaSizesMap).map((key2) => genGridMediaStyle(gridToken, gridMediaSizesMap[key2], key2)).reduce((pre, cur) => _extends$1(_extends$1({}, pre), cur), {})];
    });
    const rowProps = () => ({
      align: someType([String, Object]),
      justify: someType([String, Object]),
      prefixCls: String,
      gutter: someType([Number, Array, Object], 0),
      wrap: {
        type: Boolean,
        default: void 0
      }
    });
    const ARow = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ARow",
      inheritAttrs: false,
      props: rowProps(),
      setup(props2, _ref) {
        let {
          slots,
          attrs
        } = _ref;
        const {
          prefixCls,
          direction
        } = useConfigInject("row", props2);
        const [wrapSSR, hashId] = useRowStyle(prefixCls);
        let token2;
        const responsiveObserve = useResponsiveObserver();
        const screens = ref({
          xs: true,
          sm: true,
          md: true,
          lg: true,
          xl: true,
          xxl: true
        });
        const curScreens = ref({
          xs: false,
          sm: false,
          md: false,
          lg: false,
          xl: false,
          xxl: false
        });
        const mergePropsByScreen = (oriProp) => {
          return computed(() => {
            if (typeof props2[oriProp] === "string") {
              return props2[oriProp];
            }
            if (typeof props2[oriProp] !== "object") {
              return "";
            }
            for (let i2 = 0; i2 < responsiveArray.length; i2++) {
              const breakpoint = responsiveArray[i2];
              if (!curScreens.value[breakpoint]) continue;
              const curVal = props2[oriProp][breakpoint];
              if (curVal !== void 0) {
                return curVal;
              }
            }
            return "";
          });
        };
        const mergeAlign = mergePropsByScreen("align");
        const mergeJustify = mergePropsByScreen("justify");
        const supportFlexGap = useFlexGapSupport();
        onMounted(() => {
          token2 = responsiveObserve.value.subscribe((screen) => {
            curScreens.value = screen;
            const currentGutter = props2.gutter || 0;
            if (!Array.isArray(currentGutter) && typeof currentGutter === "object" || Array.isArray(currentGutter) && (typeof currentGutter[0] === "object" || typeof currentGutter[1] === "object")) {
              screens.value = screen;
            }
          });
        });
        onBeforeUnmount(() => {
          responsiveObserve.value.unsubscribe(token2);
        });
        const gutter = computed(() => {
          const results = [void 0, void 0];
          const {
            gutter: gutter2 = 0
          } = props2;
          const normalizedGutter = Array.isArray(gutter2) ? gutter2 : [gutter2, void 0];
          normalizedGutter.forEach((g2, index2) => {
            if (typeof g2 === "object") {
              for (let i2 = 0; i2 < responsiveArray.length; i2++) {
                const breakpoint = responsiveArray[i2];
                if (screens.value[breakpoint] && g2[breakpoint] !== void 0) {
                  results[index2] = g2[breakpoint];
                  break;
                }
              }
            } else {
              results[index2] = g2;
            }
          });
          return results;
        });
        useProvideRow({
          gutter,
          supportFlexGap,
          wrap: computed(() => props2.wrap)
        });
        const classes = computed(() => classNames(prefixCls.value, {
          [`${prefixCls.value}-no-wrap`]: props2.wrap === false,
          [`${prefixCls.value}-${mergeJustify.value}`]: mergeJustify.value,
          [`${prefixCls.value}-${mergeAlign.value}`]: mergeAlign.value,
          [`${prefixCls.value}-rtl`]: direction.value === "rtl"
        }, attrs.class, hashId.value));
        const rowStyle = computed(() => {
          const gt = gutter.value;
          const style = {};
          const horizontalGutter = gt[0] != null && gt[0] > 0 ? `${gt[0] / -2}px` : void 0;
          const verticalGutter = gt[1] != null && gt[1] > 0 ? `${gt[1] / -2}px` : void 0;
          if (horizontalGutter) {
            style.marginLeft = horizontalGutter;
            style.marginRight = horizontalGutter;
          }
          if (supportFlexGap.value) {
            style.rowGap = `${gt[1]}px`;
          } else if (verticalGutter) {
            style.marginTop = verticalGutter;
            style.marginBottom = verticalGutter;
          }
          return style;
        });
        return () => {
          var _a;
          return wrapSSR(createVNode("div", _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "class": classes.value,
            "style": _extends$1(_extends$1({}, rowStyle.value), attrs.style)
          }), [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]));
        };
      }
    });
    var define_process_env_default = {};
    function _extends() {
      _extends = Object.assign ? Object.assign.bind() : function(target) {
        for (var i2 = 1; i2 < arguments.length; i2++) {
          var source = arguments[i2];
          for (var key2 in source) {
            if (Object.prototype.hasOwnProperty.call(source, key2)) {
              target[key2] = source[key2];
            }
          }
        }
        return target;
      };
      return _extends.apply(this, arguments);
    }
    function _inheritsLoose(subClass, superClass) {
      subClass.prototype = Object.create(superClass.prototype);
      subClass.prototype.constructor = subClass;
      _setPrototypeOf(subClass, superClass);
    }
    function _getPrototypeOf(o2) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o22) {
        return o22.__proto__ || Object.getPrototypeOf(o22);
      };
      return _getPrototypeOf(o2);
    }
    function _setPrototypeOf(o2, p2) {
      _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o22, p22) {
        o22.__proto__ = p22;
        return o22;
      };
      return _setPrototypeOf(o2, p2);
    }
    function _isNativeReflectConstruct() {
      if (typeof Reflect === "undefined" || !Reflect.construct) return false;
      if (Reflect.construct.sham) return false;
      if (typeof Proxy === "function") return true;
      try {
        Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
        }));
        return true;
      } catch (e2) {
        return false;
      }
    }
    function _construct(Parent, args, Class) {
      if (_isNativeReflectConstruct()) {
        _construct = Reflect.construct.bind();
      } else {
        _construct = function _construct2(Parent2, args2, Class2) {
          var a2 = [null];
          a2.push.apply(a2, args2);
          var Constructor = Function.bind.apply(Parent2, a2);
          var instance = new Constructor();
          if (Class2) _setPrototypeOf(instance, Class2.prototype);
          return instance;
        };
      }
      return _construct.apply(null, arguments);
    }
    function _isNativeFunction(fn) {
      return Function.toString.call(fn).indexOf("[native code]") !== -1;
    }
    function _wrapNativeSuper(Class) {
      var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
      _wrapNativeSuper = function _wrapNativeSuper2(Class2) {
        if (Class2 === null || !_isNativeFunction(Class2)) return Class2;
        if (typeof Class2 !== "function") {
          throw new TypeError("Super expression must either be null or a function");
        }
        if (typeof _cache !== "undefined") {
          if (_cache.has(Class2)) return _cache.get(Class2);
          _cache.set(Class2, Wrapper);
        }
        function Wrapper() {
          return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
        }
        Wrapper.prototype = Object.create(Class2.prototype, {
          constructor: {
            value: Wrapper,
            enumerable: false,
            writable: true,
            configurable: true
          }
        });
        return _setPrototypeOf(Wrapper, Class2);
      };
      return _wrapNativeSuper(Class);
    }
    var formatRegExp = /%[sdj%]/g;
    var warning = function warning2() {
    };
    if (typeof process !== "undefined" && define_process_env_default && false) {
      warning = function warning3(type4, errors) {
        if (typeof console !== "undefined" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === "undefined") {
          if (errors.every(function(e2) {
            return typeof e2 === "string";
          })) {
            console.warn(type4, errors);
          }
        }
      };
    }
    function convertFieldsError(errors) {
      if (!errors || !errors.length) return null;
      var fields = {};
      errors.forEach(function(error) {
        var field = error.field;
        fields[field] = fields[field] || [];
        fields[field].push(error);
      });
      return fields;
    }
    function format(template) {
      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        args[_key - 1] = arguments[_key];
      }
      var i2 = 0;
      var len = args.length;
      if (typeof template === "function") {
        return template.apply(null, args);
      }
      if (typeof template === "string") {
        var str = template.replace(formatRegExp, function(x2) {
          if (x2 === "%%") {
            return "%";
          }
          if (i2 >= len) {
            return x2;
          }
          switch (x2) {
            case "%s":
              return String(args[i2++]);
            case "%d":
              return Number(args[i2++]);
            case "%j":
              try {
                return JSON.stringify(args[i2++]);
              } catch (_2) {
                return "[Circular]";
              }
              break;
            default:
              return x2;
          }
        });
        return str;
      }
      return template;
    }
    function isNativeStringType(type4) {
      return type4 === "string" || type4 === "url" || type4 === "hex" || type4 === "email" || type4 === "date" || type4 === "pattern";
    }
    function isEmptyValue(value, type4) {
      if (value === void 0 || value === null) {
        return true;
      }
      if (type4 === "array" && Array.isArray(value) && !value.length) {
        return true;
      }
      if (isNativeStringType(type4) && typeof value === "string" && !value) {
        return true;
      }
      return false;
    }
    function asyncParallelArray(arr, func, callback) {
      var results = [];
      var total = 0;
      var arrLength = arr.length;
      function count(errors) {
        results.push.apply(results, errors || []);
        total++;
        if (total === arrLength) {
          callback(results);
        }
      }
      arr.forEach(function(a2) {
        func(a2, count);
      });
    }
    function asyncSerialArray(arr, func, callback) {
      var index2 = 0;
      var arrLength = arr.length;
      function next2(errors) {
        if (errors && errors.length) {
          callback(errors);
          return;
        }
        var original = index2;
        index2 = index2 + 1;
        if (original < arrLength) {
          func(arr[original], next2);
        } else {
          callback([]);
        }
      }
      next2([]);
    }
    function flattenObjArr(objArr) {
      var ret = [];
      Object.keys(objArr).forEach(function(k2) {
        ret.push.apply(ret, objArr[k2] || []);
      });
      return ret;
    }
    var AsyncValidationError = /* @__PURE__ */ function(_Error) {
      _inheritsLoose(AsyncValidationError2, _Error);
      function AsyncValidationError2(errors, fields) {
        var _this;
        _this = _Error.call(this, "Async Validation Error") || this;
        _this.errors = errors;
        _this.fields = fields;
        return _this;
      }
      return AsyncValidationError2;
    }(/* @__PURE__ */ _wrapNativeSuper(Error));
    function asyncMap(objArr, option, func, callback, source) {
      if (option.first) {
        var _pending = new Promise(function(resolve2, reject) {
          var next2 = function next22(errors) {
            callback(errors);
            return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve2(source);
          };
          var flattenArr = flattenObjArr(objArr);
          asyncSerialArray(flattenArr, func, next2);
        });
        _pending["catch"](function(e2) {
          return e2;
        });
        return _pending;
      }
      var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];
      var objArrKeys = Object.keys(objArr);
      var objArrLength = objArrKeys.length;
      var total = 0;
      var results = [];
      var pending = new Promise(function(resolve2, reject) {
        var next2 = function next22(errors) {
          results.push.apply(results, errors);
          total++;
          if (total === objArrLength) {
            callback(results);
            return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve2(source);
          }
        };
        if (!objArrKeys.length) {
          callback(results);
          resolve2(source);
        }
        objArrKeys.forEach(function(key2) {
          var arr = objArr[key2];
          if (firstFields.indexOf(key2) !== -1) {
            asyncSerialArray(arr, func, next2);
          } else {
            asyncParallelArray(arr, func, next2);
          }
        });
      });
      pending["catch"](function(e2) {
        return e2;
      });
      return pending;
    }
    function isErrorObj(obj) {
      return !!(obj && obj.message !== void 0);
    }
    function getValue$1(value, path) {
      var v2 = value;
      for (var i2 = 0; i2 < path.length; i2++) {
        if (v2 == void 0) {
          return v2;
        }
        v2 = v2[path[i2]];
      }
      return v2;
    }
    function complementError(rule, source) {
      return function(oe) {
        var fieldValue;
        if (rule.fullFields) {
          fieldValue = getValue$1(source, rule.fullFields);
        } else {
          fieldValue = source[oe.field || rule.fullField];
        }
        if (isErrorObj(oe)) {
          oe.field = oe.field || rule.fullField;
          oe.fieldValue = fieldValue;
          return oe;
        }
        return {
          message: typeof oe === "function" ? oe() : oe,
          fieldValue,
          field: oe.field || rule.fullField
        };
      };
    }
    function deepMerge(target, source) {
      if (source) {
        for (var s2 in source) {
          if (source.hasOwnProperty(s2)) {
            var value = source[s2];
            if (typeof value === "object" && typeof target[s2] === "object") {
              target[s2] = _extends({}, target[s2], value);
            } else {
              target[s2] = value;
            }
          }
        }
      }
      return target;
    }
    var required$1 = function required(rule, value, source, errors, options, type4) {
      if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type4 || rule.type))) {
        errors.push(format(options.messages.required, rule.fullField));
      }
    };
    var whitespace = function whitespace2(rule, value, source, errors, options) {
      if (/^\s+$/.test(value) || value === "") {
        errors.push(format(options.messages.whitespace, rule.fullField));
      }
    };
    var urlReg;
    var getUrlRegex = function() {
      if (urlReg) {
        return urlReg;
      }
      var word = "[a-fA-F\\d:]";
      var b2 = function b22(options) {
        return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
      };
      var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
      var v6seg = "[a-fA-F\\d]{1,4}";
      var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
      var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
      var v4exact = new RegExp("^" + v4 + "$");
      var v6exact = new RegExp("^" + v6 + "$");
      var ip = function ip2(options) {
        return options && options.exact ? v46Exact : new RegExp("(?:" + b2(options) + v4 + b2(options) + ")|(?:" + b2(options) + v6 + b2(options) + ")", "g");
      };
      ip.v4 = function(options) {
        return options && options.exact ? v4exact : new RegExp("" + b2(options) + v4 + b2(options), "g");
      };
      ip.v6 = function(options) {
        return options && options.exact ? v6exact : new RegExp("" + b2(options) + v6 + b2(options), "g");
      };
      var protocol = "(?:(?:[a-z]+:)?//)";
      var auth = "(?:\\S+(?::\\S*)?@)?";
      var ipv4 = ip.v4().source;
      var ipv6 = ip.v6().source;
      var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
      var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
      var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
      var port = "(?::\\d{2,5})?";
      var path = '(?:[/?#][^\\s"]*)?';
      var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
      urlReg = new RegExp("(?:^" + regex + "$)", "i");
      return urlReg;
    };
    var pattern$2 = {
      // http://emailregex.com/
      email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
      // url: new RegExp(
      //   '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
      //   'i',
      // ),
      hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
    };
    var types = {
      integer: function integer(value) {
        return types.number(value) && parseInt(value, 10) === value;
      },
      "float": function float(value) {
        return types.number(value) && !types.integer(value);
      },
      array: function array(value) {
        return Array.isArray(value);
      },
      regexp: function regexp(value) {
        if (value instanceof RegExp) {
          return true;
        }
        try {
          return !!new RegExp(value);
        } catch (e2) {
          return false;
        }
      },
      date: function date(value) {
        return typeof value.getTime === "function" && typeof value.getMonth === "function" && typeof value.getYear === "function" && !isNaN(value.getTime());
      },
      number: function number(value) {
        if (isNaN(value)) {
          return false;
        }
        return typeof value === "number";
      },
      object: function object(value) {
        return typeof value === "object" && !types.array(value);
      },
      method: function method(value) {
        return typeof value === "function";
      },
      email: function email(value) {
        return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
      },
      url: function url(value) {
        return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
      },
      hex: function hex(value) {
        return typeof value === "string" && !!value.match(pattern$2.hex);
      }
    };
    var type$1 = function type(rule, value, source, errors, options) {
      if (rule.required && value === void 0) {
        required$1(rule, value, source, errors, options);
        return;
      }
      var custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"];
      var ruleType = rule.type;
      if (custom.indexOf(ruleType) > -1) {
        if (!types[ruleType](value)) {
          errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
        }
      } else if (ruleType && typeof value !== rule.type) {
        errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
      }
    };
    var range = function range2(rule, value, source, errors, options) {
      var len = typeof rule.len === "number";
      var min = typeof rule.min === "number";
      var max = typeof rule.max === "number";
      var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
      var val = value;
      var key2 = null;
      var num = typeof value === "number";
      var str = typeof value === "string";
      var arr = Array.isArray(value);
      if (num) {
        key2 = "number";
      } else if (str) {
        key2 = "string";
      } else if (arr) {
        key2 = "array";
      }
      if (!key2) {
        return false;
      }
      if (arr) {
        val = value.length;
      }
      if (str) {
        val = value.replace(spRegexp, "_").length;
      }
      if (len) {
        if (val !== rule.len) {
          errors.push(format(options.messages[key2].len, rule.fullField, rule.len));
        }
      } else if (min && !max && val < rule.min) {
        errors.push(format(options.messages[key2].min, rule.fullField, rule.min));
      } else if (max && !min && val > rule.max) {
        errors.push(format(options.messages[key2].max, rule.fullField, rule.max));
      } else if (min && max && (val < rule.min || val > rule.max)) {
        errors.push(format(options.messages[key2].range, rule.fullField, rule.min, rule.max));
      }
    };
    var ENUM$1 = "enum";
    var enumerable$1 = function enumerable(rule, value, source, errors, options) {
      rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];
      if (rule[ENUM$1].indexOf(value) === -1) {
        errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(", ")));
      }
    };
    var pattern$1 = function pattern(rule, value, source, errors, options) {
      if (rule.pattern) {
        if (rule.pattern instanceof RegExp) {
          rule.pattern.lastIndex = 0;
          if (!rule.pattern.test(value)) {
            errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
          }
        } else if (typeof rule.pattern === "string") {
          var _pattern = new RegExp(rule.pattern);
          if (!_pattern.test(value)) {
            errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
          }
        }
      }
    };
    var rules = {
      required: required$1,
      whitespace,
      type: type$1,
      range,
      "enum": enumerable$1,
      pattern: pattern$1
    };
    var string = function string2(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value, "string") && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options, "string");
        if (!isEmptyValue(value, "string")) {
          rules.type(rule, value, source, errors, options);
          rules.range(rule, value, source, errors, options);
          rules.pattern(rule, value, source, errors, options);
          if (rule.whitespace === true) {
            rules.whitespace(rule, value, source, errors, options);
          }
        }
      }
      callback(errors);
    };
    var method2 = function method3(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (value !== void 0) {
          rules.type(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var number2 = function number3(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (value === "") {
          value = void 0;
        }
        if (isEmptyValue(value) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (value !== void 0) {
          rules.type(rule, value, source, errors, options);
          rules.range(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var _boolean = function _boolean2(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (value !== void 0) {
          rules.type(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var regexp2 = function regexp3(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (!isEmptyValue(value)) {
          rules.type(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var integer2 = function integer3(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (value !== void 0) {
          rules.type(rule, value, source, errors, options);
          rules.range(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var floatFn = function floatFn2(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (value !== void 0) {
          rules.type(rule, value, source, errors, options);
          rules.range(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var array2 = function array3(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if ((value === void 0 || value === null) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options, "array");
        if (value !== void 0 && value !== null) {
          rules.type(rule, value, source, errors, options);
          rules.range(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var object2 = function object3(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (value !== void 0) {
          rules.type(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var ENUM = "enum";
    var enumerable2 = function enumerable3(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (value !== void 0) {
          rules[ENUM](rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var pattern2 = function pattern3(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value, "string") && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (!isEmptyValue(value, "string")) {
          rules.pattern(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var date2 = function date3(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value, "date") && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
        if (!isEmptyValue(value, "date")) {
          var dateObject;
          if (value instanceof Date) {
            dateObject = value;
          } else {
            dateObject = new Date(value);
          }
          rules.type(rule, dateObject, source, errors, options);
          if (dateObject) {
            rules.range(rule, dateObject.getTime(), source, errors, options);
          }
        }
      }
      callback(errors);
    };
    var required2 = function required3(rule, value, callback, source, options) {
      var errors = [];
      var type4 = Array.isArray(value) ? "array" : typeof value;
      rules.required(rule, value, source, errors, options, type4);
      callback(errors);
    };
    var type2 = function type3(rule, value, callback, source, options) {
      var ruleType = rule.type;
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value, ruleType) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options, ruleType);
        if (!isEmptyValue(value, ruleType)) {
          rules.type(rule, value, source, errors, options);
        }
      }
      callback(errors);
    };
    var any = function any2(rule, value, callback, source, options) {
      var errors = [];
      var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
      if (validate) {
        if (isEmptyValue(value) && !rule.required) {
          return callback();
        }
        rules.required(rule, value, source, errors, options);
      }
      callback(errors);
    };
    var validators = {
      string,
      method: method2,
      number: number2,
      "boolean": _boolean,
      regexp: regexp2,
      integer: integer2,
      "float": floatFn,
      array: array2,
      object: object2,
      "enum": enumerable2,
      pattern: pattern2,
      date: date2,
      url: type2,
      hex: type2,
      email: type2,
      required: required2,
      any
    };
    function newMessages() {
      return {
        "default": "Validation error on field %s",
        required: "%s is required",
        "enum": "%s must be one of %s",
        whitespace: "%s cannot be empty",
        date: {
          format: "%s date %s is invalid for format %s",
          parse: "%s date could not be parsed, %s is invalid ",
          invalid: "%s date %s is invalid"
        },
        types: {
          string: "%s is not a %s",
          method: "%s is not a %s (function)",
          array: "%s is not an %s",
          object: "%s is not an %s",
          number: "%s is not a %s",
          date: "%s is not a %s",
          "boolean": "%s is not a %s",
          integer: "%s is not an %s",
          "float": "%s is not a %s",
          regexp: "%s is not a valid %s",
          email: "%s is not a valid %s",
          url: "%s is not a valid %s",
          hex: "%s is not a valid %s"
        },
        string: {
          len: "%s must be exactly %s characters",
          min: "%s must be at least %s characters",
          max: "%s cannot be longer than %s characters",
          range: "%s must be between %s and %s characters"
        },
        number: {
          len: "%s must equal %s",
          min: "%s cannot be less than %s",
          max: "%s cannot be greater than %s",
          range: "%s must be between %s and %s"
        },
        array: {
          len: "%s must be exactly %s in length",
          min: "%s cannot be less than %s in length",
          max: "%s cannot be greater than %s in length",
          range: "%s must be between %s and %s in length"
        },
        pattern: {
          mismatch: "%s value %s does not match pattern %s"
        },
        clone: function clone() {
          var cloned = JSON.parse(JSON.stringify(this));
          cloned.clone = this.clone;
          return cloned;
        }
      };
    }
    var messages = newMessages();
    var Schema = /* @__PURE__ */ function() {
      function Schema2(descriptor) {
        this.rules = null;
        this._messages = messages;
        this.define(descriptor);
      }
      var _proto = Schema2.prototype;
      _proto.define = function define(rules2) {
        var _this = this;
        if (!rules2) {
          throw new Error("Cannot configure a schema with no rules");
        }
        if (typeof rules2 !== "object" || Array.isArray(rules2)) {
          throw new Error("Rules must be an object");
        }
        this.rules = {};
        Object.keys(rules2).forEach(function(name) {
          var item = rules2[name];
          _this.rules[name] = Array.isArray(item) ? item : [item];
        });
      };
      _proto.messages = function messages2(_messages) {
        if (_messages) {
          this._messages = deepMerge(newMessages(), _messages);
        }
        return this._messages;
      };
      _proto.validate = function validate(source_, o2, oc) {
        var _this2 = this;
        if (o2 === void 0) {
          o2 = {};
        }
        if (oc === void 0) {
          oc = function oc2() {
          };
        }
        var source = source_;
        var options = o2;
        var callback = oc;
        if (typeof options === "function") {
          callback = options;
          options = {};
        }
        if (!this.rules || Object.keys(this.rules).length === 0) {
          if (callback) {
            callback(null, source);
          }
          return Promise.resolve(source);
        }
        function complete(results) {
          var errors = [];
          var fields = {};
          function add2(e2) {
            if (Array.isArray(e2)) {
              var _errors;
              errors = (_errors = errors).concat.apply(_errors, e2);
            } else {
              errors.push(e2);
            }
          }
          for (var i2 = 0; i2 < results.length; i2++) {
            add2(results[i2]);
          }
          if (!errors.length) {
            callback(null, source);
          } else {
            fields = convertFieldsError(errors);
            callback(errors, fields);
          }
        }
        if (options.messages) {
          var messages$1 = this.messages();
          if (messages$1 === messages) {
            messages$1 = newMessages();
          }
          deepMerge(messages$1, options.messages);
          options.messages = messages$1;
        } else {
          options.messages = this.messages();
        }
        var series = {};
        var keys2 = options.keys || Object.keys(this.rules);
        keys2.forEach(function(z2) {
          var arr = _this2.rules[z2];
          var value = source[z2];
          arr.forEach(function(r2) {
            var rule = r2;
            if (typeof rule.transform === "function") {
              if (source === source_) {
                source = _extends({}, source);
              }
              value = source[z2] = rule.transform(value);
            }
            if (typeof rule === "function") {
              rule = {
                validator: rule
              };
            } else {
              rule = _extends({}, rule);
            }
            rule.validator = _this2.getValidationMethod(rule);
            if (!rule.validator) {
              return;
            }
            rule.field = z2;
            rule.fullField = rule.fullField || z2;
            rule.type = _this2.getType(rule);
            series[z2] = series[z2] || [];
            series[z2].push({
              rule,
              value,
              source,
              field: z2
            });
          });
        });
        var errorFields = {};
        return asyncMap(series, options, function(data, doIt) {
          var rule = data.rule;
          var deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
          deep = deep && (rule.required || !rule.required && data.value);
          rule.field = data.field;
          function addFullField(key2, schema) {
            return _extends({}, schema, {
              fullField: rule.fullField + "." + key2,
              fullFields: rule.fullFields ? [].concat(rule.fullFields, [key2]) : [key2]
            });
          }
          function cb(e2) {
            if (e2 === void 0) {
              e2 = [];
            }
            var errorList = Array.isArray(e2) ? e2 : [e2];
            if (!options.suppressWarning && errorList.length) {
              Schema2.warning("async-validator:", errorList);
            }
            if (errorList.length && rule.message !== void 0) {
              errorList = [].concat(rule.message);
            }
            var filledErrors = errorList.map(complementError(rule, source));
            if (options.first && filledErrors.length) {
              errorFields[rule.field] = 1;
              return doIt(filledErrors);
            }
            if (!deep) {
              doIt(filledErrors);
            } else {
              if (rule.required && !data.value) {
                if (rule.message !== void 0) {
                  filledErrors = [].concat(rule.message).map(complementError(rule, source));
                } else if (options.error) {
                  filledErrors = [options.error(rule, format(options.messages.required, rule.field))];
                }
                return doIt(filledErrors);
              }
              var fieldsSchema = {};
              if (rule.defaultField) {
                Object.keys(data.value).map(function(key2) {
                  fieldsSchema[key2] = rule.defaultField;
                });
              }
              fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
              var paredFieldsSchema = {};
              Object.keys(fieldsSchema).forEach(function(field) {
                var fieldSchema = fieldsSchema[field];
                var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema];
                paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field));
              });
              var schema = new Schema2(paredFieldsSchema);
              schema.messages(options.messages);
              if (data.rule.options) {
                data.rule.options.messages = options.messages;
                data.rule.options.error = options.error;
              }
              schema.validate(data.value, data.rule.options || options, function(errs) {
                var finalErrors = [];
                if (filledErrors && filledErrors.length) {
                  finalErrors.push.apply(finalErrors, filledErrors);
                }
                if (errs && errs.length) {
                  finalErrors.push.apply(finalErrors, errs);
                }
                doIt(finalErrors.length ? finalErrors : null);
              });
            }
          }
          var res;
          if (rule.asyncValidator) {
            res = rule.asyncValidator(rule, data.value, cb, data.source, options);
          } else if (rule.validator) {
            try {
              res = rule.validator(rule, data.value, cb, data.source, options);
            } catch (error) {
              console.error == null ? void 0 : console.error(error);
              if (!options.suppressValidatorError) {
                setTimeout(function() {
                  throw error;
                }, 0);
              }
              cb(error.message);
            }
            if (res === true) {
              cb();
            } else if (res === false) {
              cb(typeof rule.message === "function" ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + " fails");
            } else if (res instanceof Array) {
              cb(res);
            } else if (res instanceof Error) {
              cb(res.message);
            }
          }
          if (res && res.then) {
            res.then(function() {
              return cb();
            }, function(e2) {
              return cb(e2);
            });
          }
        }, function(results) {
          complete(results);
        }, source);
      };
      _proto.getType = function getType(rule) {
        if (rule.type === void 0 && rule.pattern instanceof RegExp) {
          rule.type = "pattern";
        }
        if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) {
          throw new Error(format("Unknown rule type %s", rule.type));
        }
        return rule.type || "string";
      };
      _proto.getValidationMethod = function getValidationMethod(rule) {
        if (typeof rule.validator === "function") {
          return rule.validator;
        }
        var keys2 = Object.keys(rule);
        var messageIndex = keys2.indexOf("message");
        if (messageIndex !== -1) {
          keys2.splice(messageIndex, 1);
        }
        if (keys2.length === 1 && keys2[0] === "required") {
          return validators.required;
        }
        return validators[this.getType(rule)] || void 0;
      };
      return Schema2;
    }();
    Schema.register = function register(type4, validator) {
      if (typeof validator !== "function") {
        throw new Error("Cannot register a validator by type, validator is not a function");
      }
      validators[type4] = validator;
    };
    Schema.warning = warning;
    Schema.messages = messages;
    Schema.validators = validators;
    function toArray$1(value) {
      if (value === void 0 || value === null) {
        return [];
      }
      return Array.isArray(value) ? value : [value];
    }
    function get(entity, path) {
      let current = entity;
      for (let i2 = 0; i2 < path.length; i2 += 1) {
        if (current === null || current === void 0) {
          return void 0;
        }
        current = current[path[i2]];
      }
      return current;
    }
    function internalSet(entity, paths, value, removeIfUndefined) {
      if (!paths.length) {
        return value;
      }
      const [path, ...restPath] = paths;
      let clone;
      if (!entity && typeof path === "number") {
        clone = [];
      } else if (Array.isArray(entity)) {
        clone = [...entity];
      } else {
        clone = _extends$1({}, entity);
      }
      if (removeIfUndefined && value === void 0 && restPath.length === 1) {
        delete clone[path][restPath[0]];
      } else {
        clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);
      }
      return clone;
    }
    function set(entity, paths, value) {
      let removeIfUndefined = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
      if (paths.length && removeIfUndefined && value === void 0 && !get(entity, paths.slice(0, -1))) {
        return entity;
      }
      return internalSet(entity, paths, value, removeIfUndefined);
    }
    function getNamePath(path) {
      return toArray$1(path);
    }
    function getValue(store, namePath) {
      const value = get(store, namePath);
      return value;
    }
    function setValue(store, namePath, value) {
      let removeIfUndefined = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false;
      const newStore = set(store, namePath, value, removeIfUndefined);
      return newStore;
    }
    function containsNamePath(namePathList, namePath) {
      return namePathList && namePathList.some((path) => matchNamePath(path, namePath));
    }
    function isObject(obj) {
      return typeof obj === "object" && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;
    }
    function internalSetValues(store, values) {
      const newStore = Array.isArray(store) ? [...store] : _extends$1({}, store);
      if (!values) {
        return newStore;
      }
      Object.keys(values).forEach((key2) => {
        const prevValue = newStore[key2];
        const value = values[key2];
        const recursive = isObject(prevValue) && isObject(value);
        newStore[key2] = recursive ? internalSetValues(prevValue, value || {}) : value;
      });
      return newStore;
    }
    function setValues(store) {
      for (var _len = arguments.length, restValues = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        restValues[_key - 1] = arguments[_key];
      }
      return restValues.reduce((current, newStore) => internalSetValues(current, newStore), store);
    }
    function cloneByNamePathList(store, namePathList) {
      let newStore = {};
      namePathList.forEach((namePath) => {
        const value = getValue(store, namePath);
        newStore = setValue(newStore, namePath, value);
      });
      return newStore;
    }
    function matchNamePath(namePath, changedNamePath) {
      if (!namePath || !changedNamePath || namePath.length !== changedNamePath.length) {
        return false;
      }
      return namePath.every((nameUnit, i2) => changedNamePath[i2] === nameUnit);
    }
    const typeTemplate = "'${name}' is not a valid ${type}";
    const defaultValidateMessages = {
      default: "Validation error on field '${name}'",
      required: "'${name}' is required",
      enum: "'${name}' must be one of [${enum}]",
      whitespace: "'${name}' cannot be empty",
      date: {
        format: "'${name}' is invalid for format date",
        parse: "'${name}' could not be parsed as date",
        invalid: "'${name}' is invalid date"
      },
      types: {
        string: typeTemplate,
        method: typeTemplate,
        array: typeTemplate,
        object: typeTemplate,
        number: typeTemplate,
        date: typeTemplate,
        boolean: typeTemplate,
        integer: typeTemplate,
        float: typeTemplate,
        regexp: typeTemplate,
        email: typeTemplate,
        url: typeTemplate,
        hex: typeTemplate
      },
      string: {
        len: "'${name}' must be exactly ${len} characters",
        min: "'${name}' must be at least ${min} characters",
        max: "'${name}' cannot be longer than ${max} characters",
        range: "'${name}' must be between ${min} and ${max} characters"
      },
      number: {
        len: "'${name}' must equal ${len}",
        min: "'${name}' cannot be less than ${min}",
        max: "'${name}' cannot be greater than ${max}",
        range: "'${name}' must be between ${min} and ${max}"
      },
      array: {
        len: "'${name}' must be exactly ${len} in length",
        min: "'${name}' cannot be less than ${min} in length",
        max: "'${name}' cannot be greater than ${max} in length",
        range: "'${name}' must be between ${min} and ${max} in length"
      },
      pattern: {
        mismatch: "'${name}' does not match pattern ${pattern}"
      }
    };
    var __awaiter = function(thisArg, _arguments, P2, generator) {
      function adopt(value) {
        return value instanceof P2 ? value : new P2(function(resolve2) {
          resolve2(value);
        });
      }
      return new (P2 || (P2 = Promise))(function(resolve2, reject) {
        function fulfilled(value) {
          try {
            step(generator.next(value));
          } catch (e2) {
            reject(e2);
          }
        }
        function rejected(value) {
          try {
            step(generator["throw"](value));
          } catch (e2) {
            reject(e2);
          }
        }
        function step(result) {
          result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
        }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
      });
    };
    const AsyncValidator = Schema;
    function replaceMessage(template, kv) {
      return template.replace(/\$\{\w+\}/g, (str) => {
        const key2 = str.slice(2, -1);
        return kv[key2];
      });
    }
    function validateRule(name, value, rule, options, messageVariables) {
      return __awaiter(this, void 0, void 0, function* () {
        const cloneRule = _extends$1({}, rule);
        delete cloneRule.ruleIndex;
        delete cloneRule.trigger;
        let subRuleField = null;
        if (cloneRule && cloneRule.type === "array" && cloneRule.defaultField) {
          subRuleField = cloneRule.defaultField;
          delete cloneRule.defaultField;
        }
        const validator = new AsyncValidator({
          [name]: [cloneRule]
        });
        const messages2 = setValues({}, defaultValidateMessages, options.validateMessages);
        validator.messages(messages2);
        let result = [];
        try {
          yield Promise.resolve(validator.validate({
            [name]: value
          }, _extends$1({}, options)));
        } catch (errObj) {
          if (errObj.errors) {
            result = errObj.errors.map((_ref, index2) => {
              let {
                message
              } = _ref;
              return (
                // Wrap VueNode with `key`
                isValidElement(message) ? cloneVNode(message, {
                  key: `error_${index2}`
                }) : message
              );
            });
          } else {
            console.error(errObj);
            result = [messages2.default()];
          }
        }
        if (!result.length && subRuleField) {
          const subResults = yield Promise.all(value.map((subValue, i2) => validateRule(`${name}.${i2}`, subValue, subRuleField, options, messageVariables)));
          return subResults.reduce((prev2, errors) => [...prev2, ...errors], []);
        }
        const kv = _extends$1(_extends$1(_extends$1({}, rule), {
          name,
          enum: (rule.enum || []).join(", ")
        }), messageVariables);
        const fillVariableResult = result.map((error) => {
          if (typeof error === "string") {
            return replaceMessage(error, kv);
          }
          return error;
        });
        return fillVariableResult;
      });
    }
    function validateRules(namePath, value, rules2, options, validateFirst, messageVariables) {
      const name = namePath.join(".");
      const filledRules = rules2.map((currentRule, ruleIndex) => {
        const originValidatorFunc = currentRule.validator;
        const cloneRule = _extends$1(_extends$1({}, currentRule), {
          ruleIndex
        });
        if (originValidatorFunc) {
          cloneRule.validator = (rule, val, callback) => {
            let hasPromise = false;
            const wrappedCallback = function() {
              for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
              }
              Promise.resolve().then(() => {
                if (!hasPromise) {
                  callback(...args);
                }
              });
            };
            const promise = originValidatorFunc(rule, val, wrappedCallback);
            hasPromise = promise && typeof promise.then === "function" && typeof promise.catch === "function";
            if (hasPromise) {
              promise.then(() => {
                callback();
              }).catch((err) => {
                callback(err || " ");
              });
            }
          };
        }
        return cloneRule;
      }).sort((_ref2, _ref3) => {
        let {
          warningOnly: w1,
          ruleIndex: i1
        } = _ref2;
        let {
          warningOnly: w2,
          ruleIndex: i2
        } = _ref3;
        if (!!w1 === !!w2) {
          return i1 - i2;
        }
        if (w1) {
          return 1;
        }
        return -1;
      });
      let summaryPromise;
      if (validateFirst === true) {
        summaryPromise = new Promise((resolve2, reject) => __awaiter(this, void 0, void 0, function* () {
          for (let i2 = 0; i2 < filledRules.length; i2 += 1) {
            const rule = filledRules[i2];
            const errors = yield validateRule(name, value, rule, options, messageVariables);
            if (errors.length) {
              reject([{
                errors,
                rule
              }]);
              return;
            }
          }
          resolve2([]);
        }));
      } else {
        const rulePromises = filledRules.map((rule) => validateRule(name, value, rule, options, messageVariables).then((errors) => ({
          errors,
          rule
        })));
        summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then((errors) => {
          return Promise.reject(errors);
        });
      }
      summaryPromise.catch((e2) => e2);
      return summaryPromise;
    }
    function finishOnAllFailed(rulePromises) {
      return __awaiter(this, void 0, void 0, function* () {
        return Promise.all(rulePromises).then((errorsList) => {
          const errors = [].concat(...errorsList);
          return errors;
        });
      });
    }
    function finishOnFirstFailed(rulePromises) {
      return __awaiter(this, void 0, void 0, function* () {
        let count = 0;
        return new Promise((resolve2) => {
          rulePromises.forEach((promise) => {
            promise.then((ruleError) => {
              if (ruleError.errors.length) {
                resolve2([ruleError]);
              }
              count += 1;
              if (count === rulePromises.length) {
                resolve2([]);
              }
            });
          });
        });
      });
    }
    const FormContextKey = Symbol("formContextKey");
    const useProvideForm = (state) => {
      provide(FormContextKey, state);
    };
    const useInjectForm = () => {
      return inject(FormContextKey, {
        name: computed(() => void 0),
        labelAlign: computed(() => "right"),
        vertical: computed(() => false),
        // eslint-disable-next-line @typescript-eslint/no-unused-vars
        addField: (_eventKey, _field) => {
        },
        // eslint-disable-next-line @typescript-eslint/no-unused-vars
        removeField: (_eventKey) => {
        },
        model: computed(() => void 0),
        rules: computed(() => void 0),
        colon: computed(() => void 0),
        labelWrap: computed(() => void 0),
        labelCol: computed(() => void 0),
        requiredMark: computed(() => false),
        validateTrigger: computed(() => void 0),
        onValidate: () => {
        },
        validateMessages: computed(() => defaultValidateMessages)
      });
    };
    const FormItemPrefixContextKey = Symbol("formItemPrefixContextKey");
    const useProvideFormItemPrefix = (state) => {
      provide(FormItemPrefixContextKey, state);
    };
    const useInjectFormItemPrefix = () => {
      return inject(FormItemPrefixContextKey, {
        prefixCls: computed(() => "")
      });
    };
    function parseFlex(flex) {
      if (typeof flex === "number") {
        return `${flex} ${flex} auto`;
      }
      if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
        return `0 0 ${flex}`;
      }
      return flex;
    }
    const colProps = () => ({
      span: [String, Number],
      order: [String, Number],
      offset: [String, Number],
      push: [String, Number],
      pull: [String, Number],
      xs: {
        type: [String, Number, Object],
        default: void 0
      },
      sm: {
        type: [String, Number, Object],
        default: void 0
      },
      md: {
        type: [String, Number, Object],
        default: void 0
      },
      lg: {
        type: [String, Number, Object],
        default: void 0
      },
      xl: {
        type: [String, Number, Object],
        default: void 0
      },
      xxl: {
        type: [String, Number, Object],
        default: void 0
      },
      prefixCls: String,
      flex: [String, Number]
    });
    const sizes = ["xs", "sm", "md", "lg", "xl", "xxl"];
    const Col = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ACol",
      inheritAttrs: false,
      props: colProps(),
      setup(props2, _ref) {
        let {
          slots,
          attrs
        } = _ref;
        const {
          gutter,
          supportFlexGap,
          wrap
        } = useInjectRow();
        const {
          prefixCls,
          direction
        } = useConfigInject("col", props2);
        const [wrapSSR, hashId] = useColStyle(prefixCls);
        const classes = computed(() => {
          const {
            span,
            order,
            offset,
            push,
            pull
          } = props2;
          const pre = prefixCls.value;
          let sizeClassObj = {};
          sizes.forEach((size2) => {
            let sizeProps = {};
            const propSize = props2[size2];
            if (typeof propSize === "number") {
              sizeProps.span = propSize;
            } else if (typeof propSize === "object") {
              sizeProps = propSize || {};
            }
            sizeClassObj = _extends$1(_extends$1({}, sizeClassObj), {
              [`${pre}-${size2}-${sizeProps.span}`]: sizeProps.span !== void 0,
              [`${pre}-${size2}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,
              [`${pre}-${size2}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,
              [`${pre}-${size2}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,
              [`${pre}-${size2}-pull-${sizeProps.pull}`]: sizeProps.pull || sizeProps.pull === 0,
              [`${pre}-rtl`]: direction.value === "rtl"
            });
          });
          return classNames(pre, {
            [`${pre}-${span}`]: span !== void 0,
            [`${pre}-order-${order}`]: order,
            [`${pre}-offset-${offset}`]: offset,
            [`${pre}-push-${push}`]: push,
            [`${pre}-pull-${pull}`]: pull
          }, sizeClassObj, attrs.class, hashId.value);
        });
        const mergedStyle = computed(() => {
          const {
            flex
          } = props2;
          const gutterVal = gutter.value;
          const style = {};
          if (gutterVal && gutterVal[0] > 0) {
            const horizontalGutter = `${gutterVal[0] / 2}px`;
            style.paddingLeft = horizontalGutter;
            style.paddingRight = horizontalGutter;
          }
          if (gutterVal && gutterVal[1] > 0 && !supportFlexGap.value) {
            const verticalGutter = `${gutterVal[1] / 2}px`;
            style.paddingTop = verticalGutter;
            style.paddingBottom = verticalGutter;
          }
          if (flex) {
            style.flex = parseFlex(flex);
            if (wrap.value === false && !style.minWidth) {
              style.minWidth = 0;
            }
          }
          return style;
        });
        return () => {
          var _a;
          return wrapSSR(createVNode("div", _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "class": classes.value,
            "style": [mergedStyle.value, attrs.style]
          }), [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]));
        };
      }
    });
    var QuestionCircleOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, "name": "question-circle", "theme": "outlined" };
    function _objectSpread$6(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$6(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$6(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var QuestionCircleOutlined = function QuestionCircleOutlined2(props2, context) {
      var p2 = _objectSpread$6({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$6({}, p2, {
        "icon": QuestionCircleOutlined$1
      }), null);
    };
    QuestionCircleOutlined.displayName = "QuestionCircleOutlined";
    QuestionCircleOutlined.inheritAttrs = false;
    const FormItemLabel = (props2, _ref) => {
      let {
        slots,
        emit: emit2,
        attrs
      } = _ref;
      var _a, _b, _c, _d, _e;
      const {
        prefixCls,
        htmlFor,
        labelCol,
        labelAlign,
        colon,
        required,
        requiredMark
      } = _extends$1(_extends$1({}, props2), attrs);
      const [formLocale] = useLocaleReceiver("Form");
      const label = (_a = props2.label) !== null && _a !== void 0 ? _a : (_b = slots.label) === null || _b === void 0 ? void 0 : _b.call(slots);
      if (!label) return null;
      const {
        vertical,
        labelAlign: contextLabelAlign,
        labelCol: contextLabelCol,
        labelWrap,
        colon: contextColon
      } = useInjectForm();
      const mergedLabelCol = labelCol || (contextLabelCol === null || contextLabelCol === void 0 ? void 0 : contextLabelCol.value) || {};
      const mergedLabelAlign = labelAlign || (contextLabelAlign === null || contextLabelAlign === void 0 ? void 0 : contextLabelAlign.value);
      const labelClsBasic = `${prefixCls}-item-label`;
      const labelColClassName = classNames(labelClsBasic, mergedLabelAlign === "left" && `${labelClsBasic}-left`, mergedLabelCol.class, {
        [`${labelClsBasic}-wrap`]: !!labelWrap.value
      });
      let labelChildren = label;
      const computedColon = colon === true || (contextColon === null || contextColon === void 0 ? void 0 : contextColon.value) !== false && colon !== false;
      const haveColon = computedColon && !vertical.value;
      if (haveColon && typeof label === "string" && label.trim() !== "") {
        labelChildren = label.replace(/[:|:]\s*$/, "");
      }
      if (props2.tooltip || slots.tooltip) {
        const tooltipNode = createVNode("span", {
          "class": `${prefixCls}-item-tooltip`
        }, [createVNode(Tooltip, {
          "title": props2.tooltip
        }, {
          default: () => [createVNode(QuestionCircleOutlined, null, null)]
        })]);
        labelChildren = createVNode(Fragment, null, [labelChildren, slots.tooltip ? (_c = slots.tooltip) === null || _c === void 0 ? void 0 : _c.call(slots, {
          class: `${prefixCls}-item-tooltip`
        }) : tooltipNode]);
      }
      if (requiredMark === "optional" && !required) {
        labelChildren = createVNode(Fragment, null, [labelChildren, createVNode("span", {
          "class": `${prefixCls}-item-optional`
        }, [((_d = formLocale.value) === null || _d === void 0 ? void 0 : _d.optional) || ((_e = localeValues.Form) === null || _e === void 0 ? void 0 : _e.optional)])]);
      }
      const labelClassName = classNames({
        [`${prefixCls}-item-required`]: required,
        [`${prefixCls}-item-required-mark-optional`]: requiredMark === "optional",
        [`${prefixCls}-item-no-colon`]: !computedColon
      });
      return createVNode(Col, _objectSpread2$1(_objectSpread2$1({}, mergedLabelCol), {}, {
        "class": labelColClassName
      }), {
        default: () => [createVNode("label", {
          "for": htmlFor,
          "class": labelClassName,
          "title": typeof label === "string" ? label : "",
          "onClick": (e2) => emit2("click", e2)
        }, [labelChildren])]
      });
    };
    FormItemLabel.displayName = "FormItemLabel";
    FormItemLabel.inheritAttrs = false;
    const genFormValidateMotionStyle = (token2) => {
      const {
        componentCls
      } = token2;
      const helpCls = `${componentCls}-show-help`;
      const helpItemCls = `${componentCls}-show-help-item`;
      return {
        [helpCls]: {
          // Explain holder
          transition: `opacity ${token2.motionDurationSlow} ${token2.motionEaseInOut}`,
          "&-appear, &-enter": {
            opacity: 0,
            "&-active": {
              opacity: 1
            }
          },
          "&-leave": {
            opacity: 1,
            "&-active": {
              opacity: 0
            }
          },
          // Explain
          [helpItemCls]: {
            overflow: "hidden",
            transition: `height ${token2.motionDurationSlow} ${token2.motionEaseInOut},
                     opacity ${token2.motionDurationSlow} ${token2.motionEaseInOut},
                     transform ${token2.motionDurationSlow} ${token2.motionEaseInOut} !important`,
            [`&${helpItemCls}-appear, &${helpItemCls}-enter`]: {
              transform: `translateY(-5px)`,
              opacity: 0,
              [`&-active`]: {
                transform: "translateY(0)",
                opacity: 1
              }
            },
            [`&${helpItemCls}-leave-active`]: {
              transform: `translateY(-5px)`
            }
          }
        }
      };
    };
    const resetForm = (token2) => ({
      legend: {
        display: "block",
        width: "100%",
        marginBottom: token2.marginLG,
        padding: 0,
        color: token2.colorTextDescription,
        fontSize: token2.fontSizeLG,
        lineHeight: "inherit",
        border: 0,
        borderBottom: `${token2.lineWidth}px ${token2.lineType} ${token2.colorBorder}`
      },
      label: {
        fontSize: token2.fontSize
      },
      'input[type="search"]': {
        boxSizing: "border-box"
      },
      // Position radios and checkboxes better
      'input[type="radio"], input[type="checkbox"]': {
        lineHeight: "normal"
      },
      'input[type="file"]': {
        display: "block"
      },
      // Make range inputs behave like textual form controls
      'input[type="range"]': {
        display: "block",
        width: "100%"
      },
      // Make multiple select elements height not fixed
      "select[multiple], select[size]": {
        height: "auto"
      },
      // Focus for file, radio, and checkbox
      [`input[type='file']:focus,
  input[type='radio']:focus,
  input[type='checkbox']:focus`]: {
        outline: 0,
        boxShadow: `0 0 0 ${token2.controlOutlineWidth}px ${token2.controlOutline}`
      },
      // Adjust output element
      output: {
        display: "block",
        paddingTop: 15,
        color: token2.colorText,
        fontSize: token2.fontSize,
        lineHeight: token2.lineHeight
      }
    });
    const genFormSize = (token2, height) => {
      const {
        formItemCls
      } = token2;
      return {
        [formItemCls]: {
          [`${formItemCls}-label > label`]: {
            height
          },
          [`${formItemCls}-control-input`]: {
            minHeight: height
          }
        }
      };
    };
    const genFormStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        [token2.componentCls]: _extends$1(_extends$1(_extends$1({}, resetComponent(token2)), resetForm(token2)), {
          [`${componentCls}-text`]: {
            display: "inline-block",
            paddingInlineEnd: token2.paddingSM
          },
          // ================================================================
          // =                             Size                             =
          // ================================================================
          "&-small": _extends$1({}, genFormSize(token2, token2.controlHeightSM)),
          "&-large": _extends$1({}, genFormSize(token2, token2.controlHeightLG))
        })
      };
    };
    const genFormItemStyle = (token2) => {
      const {
        formItemCls,
        iconCls,
        componentCls,
        rootPrefixCls
      } = token2;
      return {
        [formItemCls]: _extends$1(_extends$1({}, resetComponent(token2)), {
          marginBottom: token2.marginLG,
          verticalAlign: "top",
          "&-with-help": {
            transition: "none"
          },
          [`&-hidden,
        &-hidden.${rootPrefixCls}-row`]: {
            // https://github.com/ant-design/ant-design/issues/26141
            display: "none"
          },
          "&-has-warning": {
            [`${formItemCls}-split`]: {
              color: token2.colorError
            }
          },
          "&-has-error": {
            [`${formItemCls}-split`]: {
              color: token2.colorWarning
            }
          },
          // ==============================================================
          // =                            Label                           =
          // ==============================================================
          [`${formItemCls}-label`]: {
            display: "inline-block",
            flexGrow: 0,
            overflow: "hidden",
            whiteSpace: "nowrap",
            textAlign: "end",
            verticalAlign: "middle",
            "&-left": {
              textAlign: "start"
            },
            "&-wrap": {
              overflow: "unset",
              lineHeight: `${token2.lineHeight} - 0.25em`,
              whiteSpace: "unset"
            },
            "> label": {
              position: "relative",
              display: "inline-flex",
              alignItems: "center",
              maxWidth: "100%",
              height: token2.controlHeight,
              color: token2.colorTextHeading,
              fontSize: token2.fontSize,
              [`> ${iconCls}`]: {
                fontSize: token2.fontSize,
                verticalAlign: "top"
              },
              // Required mark
              [`&${formItemCls}-required:not(${formItemCls}-required-mark-optional)::before`]: {
                display: "inline-block",
                marginInlineEnd: token2.marginXXS,
                color: token2.colorError,
                fontSize: token2.fontSize,
                fontFamily: "SimSun, sans-serif",
                lineHeight: 1,
                content: '"*"',
                [`${componentCls}-hide-required-mark &`]: {
                  display: "none"
                }
              },
              // Optional mark
              [`${formItemCls}-optional`]: {
                display: "inline-block",
                marginInlineStart: token2.marginXXS,
                color: token2.colorTextDescription,
                [`${componentCls}-hide-required-mark &`]: {
                  display: "none"
                }
              },
              // Optional mark
              [`${formItemCls}-tooltip`]: {
                color: token2.colorTextDescription,
                cursor: "help",
                writingMode: "horizontal-tb",
                marginInlineStart: token2.marginXXS
              },
              "&::after": {
                content: '":"',
                position: "relative",
                marginBlock: 0,
                marginInlineStart: token2.marginXXS / 2,
                marginInlineEnd: token2.marginXS
              },
              [`&${formItemCls}-no-colon::after`]: {
                content: '" "'
              }
            }
          },
          // ==============================================================
          // =                            Input                           =
          // ==============================================================
          [`${formItemCls}-control`]: {
            display: "flex",
            flexDirection: "column",
            flexGrow: 1,
            [`&:first-child:not([class^="'${rootPrefixCls}-col-'"]):not([class*="' ${rootPrefixCls}-col-'"])`]: {
              width: "100%"
            },
            "&-input": {
              position: "relative",
              display: "flex",
              alignItems: "center",
              minHeight: token2.controlHeight,
              "&-content": {
                flex: "auto",
                maxWidth: "100%"
              }
            }
          },
          // ==============================================================
          // =                           Explain                          =
          // ==============================================================
          [formItemCls]: {
            "&-explain, &-extra": {
              clear: "both",
              color: token2.colorTextDescription,
              fontSize: token2.fontSize,
              lineHeight: token2.lineHeight
            },
            "&-explain-connected": {
              width: "100%"
            },
            "&-extra": {
              minHeight: token2.controlHeightSM,
              transition: `color ${token2.motionDurationMid} ${token2.motionEaseOut}`
              // sync input color transition
            },
            "&-explain": {
              "&-error": {
                color: token2.colorError
              },
              "&-warning": {
                color: token2.colorWarning
              }
            }
          },
          [`&-with-help ${formItemCls}-explain`]: {
            height: "auto",
            opacity: 1
          },
          // ==============================================================
          // =                        Feedback Icon                       =
          // ==============================================================
          [`${formItemCls}-feedback-icon`]: {
            fontSize: token2.fontSize,
            textAlign: "center",
            visibility: "visible",
            animationName: zoomIn,
            animationDuration: token2.motionDurationMid,
            animationTimingFunction: token2.motionEaseOutBack,
            pointerEvents: "none",
            "&-success": {
              color: token2.colorSuccess
            },
            "&-error": {
              color: token2.colorError
            },
            "&-warning": {
              color: token2.colorWarning
            },
            "&-validating": {
              color: token2.colorPrimary
            }
          }
        })
      };
    };
    const genHorizontalStyle = (token2) => {
      const {
        componentCls,
        formItemCls,
        rootPrefixCls
      } = token2;
      return {
        [`${componentCls}-horizontal`]: {
          [`${formItemCls}-label`]: {
            flexGrow: 0
          },
          [`${formItemCls}-control`]: {
            flex: "1 1 0",
            // https://github.com/ant-design/ant-design/issues/32777
            // https://github.com/ant-design/ant-design/issues/33773
            minWidth: 0
          },
          // https://github.com/ant-design/ant-design/issues/32980
          [`${formItemCls}-label.${rootPrefixCls}-col-24 + ${formItemCls}-control`]: {
            minWidth: "unset"
          }
        }
      };
    };
    const genInlineStyle = (token2) => {
      const {
        componentCls,
        formItemCls
      } = token2;
      return {
        [`${componentCls}-inline`]: {
          display: "flex",
          flexWrap: "wrap",
          [formItemCls]: {
            flex: "none",
            flexWrap: "nowrap",
            marginInlineEnd: token2.margin,
            marginBottom: 0,
            "&-with-help": {
              marginBottom: token2.marginLG
            },
            [`> ${formItemCls}-label,
        > ${formItemCls}-control`]: {
              display: "inline-block",
              verticalAlign: "top"
            },
            [`> ${formItemCls}-label`]: {
              flex: "none"
            },
            [`${componentCls}-text`]: {
              display: "inline-block"
            },
            [`${formItemCls}-has-feedback`]: {
              display: "inline-block"
            }
          }
        }
      };
    };
    const makeVerticalLayoutLabel = (token2) => ({
      margin: 0,
      padding: `0 0 ${token2.paddingXS}px`,
      whiteSpace: "initial",
      textAlign: "start",
      "> label": {
        margin: 0,
        "&::after": {
          display: "none"
        }
      }
    });
    const makeVerticalLayout = (token2) => {
      const {
        componentCls,
        formItemCls
      } = token2;
      return {
        [`${formItemCls} ${formItemCls}-label`]: makeVerticalLayoutLabel(token2),
        [componentCls]: {
          [formItemCls]: {
            flexWrap: "wrap",
            [`${formItemCls}-label,
          ${formItemCls}-control`]: {
              flex: "0 0 100%",
              maxWidth: "100%"
            }
          }
        }
      };
    };
    const genVerticalStyle = (token2) => {
      const {
        componentCls,
        formItemCls,
        rootPrefixCls
      } = token2;
      return {
        [`${componentCls}-vertical`]: {
          [formItemCls]: {
            "&-row": {
              flexDirection: "column"
            },
            "&-label > label": {
              height: "auto"
            },
            [`${componentCls}-item-control`]: {
              width: "100%"
            }
          }
        },
        [`${componentCls}-vertical ${formItemCls}-label,
      .${rootPrefixCls}-col-24${formItemCls}-label,
      .${rootPrefixCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token2),
        [`@media (max-width: ${token2.screenXSMax}px)`]: [makeVerticalLayout(token2), {
          [componentCls]: {
            [`.${rootPrefixCls}-col-xs-24${formItemCls}-label`]: makeVerticalLayoutLabel(token2)
          }
        }],
        [`@media (max-width: ${token2.screenSMMax}px)`]: {
          [componentCls]: {
            [`.${rootPrefixCls}-col-sm-24${formItemCls}-label`]: makeVerticalLayoutLabel(token2)
          }
        },
        [`@media (max-width: ${token2.screenMDMax}px)`]: {
          [componentCls]: {
            [`.${rootPrefixCls}-col-md-24${formItemCls}-label`]: makeVerticalLayoutLabel(token2)
          }
        },
        [`@media (max-width: ${token2.screenLGMax}px)`]: {
          [componentCls]: {
            [`.${rootPrefixCls}-col-lg-24${formItemCls}-label`]: makeVerticalLayoutLabel(token2)
          }
        }
      };
    };
    const useStyle$6 = genComponentStyleHook("Form", (token2, _ref) => {
      let {
        rootPrefixCls
      } = _ref;
      const formToken = merge(token2, {
        formItemCls: `${token2.componentCls}-item`,
        rootPrefixCls
      });
      return [genFormStyle(formToken), genFormItemStyle(formToken), genFormValidateMotionStyle(formToken), genHorizontalStyle(formToken), genInlineStyle(formToken), genVerticalStyle(formToken), genCollapseMotion(formToken), zoomIn];
    });
    const ErrorList = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ErrorList",
      inheritAttrs: false,
      props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
      setup(props2, _ref) {
        let {
          attrs
        } = _ref;
        const {
          prefixCls,
          status
        } = useInjectFormItemPrefix();
        const baseClassName = computed(() => `${prefixCls.value}-item-explain`);
        const visible = computed(() => !!(props2.errors && props2.errors.length));
        const innerStatus = ref(status.value);
        const [, hashId] = useStyle$6(prefixCls);
        watch([visible, status], () => {
          if (visible.value) {
            innerStatus.value = status.value;
          }
        });
        return () => {
          var _a, _b;
          const colMItem = collapseMotion(`${prefixCls.value}-show-help-item`);
          const transitionGroupProps = getTransitionGroupProps(`${prefixCls.value}-show-help-item`, colMItem);
          transitionGroupProps.role = "alert";
          transitionGroupProps.class = [hashId.value, baseClassName.value, attrs.class, `${prefixCls.value}-show-help`];
          return createVNode(Transition, _objectSpread2$1(_objectSpread2$1({}, getTransitionProps(`${prefixCls.value}-show-help`)), {}, {
            "onAfterEnter": () => props2.onErrorVisibleChanged(true),
            "onAfterLeave": () => props2.onErrorVisibleChanged(false)
          }), {
            default: () => [withDirectives(createVNode(TransitionGroup, _objectSpread2$1(_objectSpread2$1({}, transitionGroupProps), {}, {
              "tag": "div"
            }), {
              default: () => [(_b = props2.errors) === null || _b === void 0 ? void 0 : _b.map((error, index2) => createVNode("div", {
                "key": index2,
                "class": innerStatus.value ? `${baseClassName.value}-${innerStatus.value}` : ""
              }, [error]))]
            }), [[vShow, !!((_a = props2.errors) === null || _a === void 0 ? void 0 : _a.length)]])]
          });
        };
      }
    });
    const FormItemInput = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      slots: Object,
      inheritAttrs: false,
      props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        const formContext = useInjectForm();
        const {
          wrapperCol: contextWrapperCol
        } = formContext;
        const subFormContext = _extends$1({}, formContext);
        delete subFormContext.labelCol;
        delete subFormContext.wrapperCol;
        useProvideForm(subFormContext);
        useProvideFormItemPrefix({
          prefixCls: computed(() => props2.prefixCls),
          status: computed(() => props2.status)
        });
        return () => {
          var _a, _b, _c;
          const {
            prefixCls,
            wrapperCol,
            marginBottom,
            onErrorVisibleChanged,
            help = (_a = slots.help) === null || _a === void 0 ? void 0 : _a.call(slots),
            errors = filterEmpty((_b = slots.errors) === null || _b === void 0 ? void 0 : _b.call(slots)),
            // hasFeedback,
            // status,
            extra = (_c = slots.extra) === null || _c === void 0 ? void 0 : _c.call(slots)
          } = props2;
          const baseClassName = `${prefixCls}-item`;
          const mergedWrapperCol = wrapperCol || (contextWrapperCol === null || contextWrapperCol === void 0 ? void 0 : contextWrapperCol.value) || {};
          const className = classNames(`${baseClassName}-control`, mergedWrapperCol.class);
          return createVNode(Col, _objectSpread2$1(_objectSpread2$1({}, mergedWrapperCol), {}, {
            "class": className
          }), {
            default: () => {
              var _a2;
              return createVNode(Fragment, null, [createVNode("div", {
                "class": `${baseClassName}-control-input`
              }, [createVNode("div", {
                "class": `${baseClassName}-control-input-content`
              }, [(_a2 = slots.default) === null || _a2 === void 0 ? void 0 : _a2.call(slots)])]), marginBottom !== null || errors.length ? createVNode("div", {
                "style": {
                  display: "flex",
                  flexWrap: "nowrap"
                }
              }, [createVNode(ErrorList, {
                "errors": errors,
                "help": help,
                "class": `${baseClassName}-explain-connected`,
                "onErrorVisibleChanged": onErrorVisibleChanged
              }, null), !!marginBottom && createVNode("div", {
                "style": {
                  width: 0,
                  height: `${marginBottom}px`
                }
              }, null)]) : null, extra ? createVNode("div", {
                "class": `${baseClassName}-extra`
              }, [extra]) : null]);
            }
          });
        };
      }
    });
    function useDebounce(value) {
      const cacheValue = shallowRef(value.value.slice());
      let timeout = null;
      watchEffect(() => {
        clearTimeout(timeout);
        timeout = setTimeout(() => {
          cacheValue.value = value.value;
        }, value.value.length ? 0 : 10);
      });
      return cacheValue;
    }
    tuple("success", "warning", "error", "validating", "");
    const iconMap = {
      success: CheckCircleFilled,
      warning: ExclamationCircleFilled,
      error: CloseCircleFilled,
      validating: LoadingOutlined
    };
    function getPropByPath$1(obj, namePathList, strict) {
      let tempObj = obj;
      const keyArr = namePathList;
      let i2 = 0;
      try {
        for (let len = keyArr.length; i2 < len - 1; ++i2) {
          if (!tempObj && !strict) break;
          const key2 = keyArr[i2];
          if (key2 in tempObj) {
            tempObj = tempObj[key2];
          } else {
            if (strict) {
              throw Error("please transfer a valid name path to form item!");
            }
            break;
          }
        }
        if (strict && !tempObj) {
          throw Error("please transfer a valid name path to form item!");
        }
      } catch (error) {
        console.error("please transfer a valid name path to form item!");
      }
      return {
        o: tempObj,
        k: keyArr[i2],
        v: tempObj ? tempObj[keyArr[i2]] : void 0
      };
    }
    const formItemProps = () => ({
      htmlFor: String,
      prefixCls: String,
      label: PropTypes.any,
      help: PropTypes.any,
      extra: PropTypes.any,
      labelCol: {
        type: Object
      },
      wrapperCol: {
        type: Object
      },
      hasFeedback: {
        type: Boolean,
        default: false
      },
      colon: {
        type: Boolean,
        default: void 0
      },
      labelAlign: String,
      prop: {
        type: [String, Number, Array]
      },
      name: {
        type: [String, Number, Array]
      },
      rules: [Array, Object],
      autoLink: {
        type: Boolean,
        default: true
      },
      required: {
        type: Boolean,
        default: void 0
      },
      validateFirst: {
        type: Boolean,
        default: void 0
      },
      validateStatus: PropTypes.oneOf(tuple("", "success", "warning", "error", "validating")),
      validateTrigger: {
        type: [String, Array]
      },
      messageVariables: {
        type: Object
      },
      hidden: Boolean,
      noStyle: Boolean,
      tooltip: String
    });
    let indexGuid = 0;
    const defaultItemNamePrefixCls = "form_item";
    const FormItem = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "AFormItem",
      inheritAttrs: false,
      __ANT_NEW_FORM_ITEM: true,
      props: formItemProps(),
      slots: Object,
      setup(props2, _ref) {
        let {
          slots,
          attrs,
          expose
        } = _ref;
        warning$3(props2.prop === void 0);
        const eventKey = `form-item-${++indexGuid}`;
        const {
          prefixCls
        } = useConfigInject("form", props2);
        const [wrapSSR, hashId] = useStyle$6(prefixCls);
        const itemRef = shallowRef();
        const formContext = useInjectForm();
        const fieldName = computed(() => props2.name || props2.prop);
        const errors = shallowRef([]);
        const validateDisabled = shallowRef(false);
        const inputRef = shallowRef();
        const namePath = computed(() => {
          const val = fieldName.value;
          return getNamePath(val);
        });
        const fieldId = computed(() => {
          if (!namePath.value.length) {
            return void 0;
          } else {
            const formName = formContext.name.value;
            const mergedId = namePath.value.join("_");
            return formName ? `${formName}_${mergedId}` : `${defaultItemNamePrefixCls}_${mergedId}`;
          }
        });
        const getNewFieldValue = () => {
          const model = formContext.model.value;
          if (!model || !fieldName.value) {
            return;
          } else {
            return getPropByPath$1(model, namePath.value, true).v;
          }
        };
        const fieldValue = computed(() => getNewFieldValue());
        const initialValue = shallowRef(cloneDeep(fieldValue.value));
        const mergedValidateTrigger = computed(() => {
          let validateTrigger = props2.validateTrigger !== void 0 ? props2.validateTrigger : formContext.validateTrigger.value;
          validateTrigger = validateTrigger === void 0 ? "change" : validateTrigger;
          return toArray$1(validateTrigger);
        });
        const rulesRef = computed(() => {
          let formRules = formContext.rules.value;
          const selfRules = props2.rules;
          const requiredRule = props2.required !== void 0 ? {
            required: !!props2.required,
            trigger: mergedValidateTrigger.value
          } : [];
          const prop = getPropByPath$1(formRules, namePath.value);
          formRules = formRules ? prop.o[prop.k] || prop.v : [];
          const rules2 = [].concat(selfRules || formRules || []);
          if (find(rules2, (rule) => rule.required)) {
            return rules2;
          } else {
            return rules2.concat(requiredRule);
          }
        });
        const isRequired2 = computed(() => {
          const rules2 = rulesRef.value;
          let isRequired3 = false;
          if (rules2 && rules2.length) {
            rules2.every((rule) => {
              if (rule.required) {
                isRequired3 = true;
                return false;
              }
              return true;
            });
          }
          return isRequired3 || props2.required;
        });
        const validateState = shallowRef();
        watchEffect(() => {
          validateState.value = props2.validateStatus;
        });
        const messageVariables = computed(() => {
          let variables = {};
          if (typeof props2.label === "string") {
            variables.label = props2.label;
          } else if (props2.name) {
            variables.label = String(props2.name);
          }
          if (props2.messageVariables) {
            variables = _extends$1(_extends$1({}, variables), props2.messageVariables);
          }
          return variables;
        });
        const validateRules$1 = (options) => {
          if (namePath.value.length === 0) {
            return;
          }
          const {
            validateFirst = false
          } = props2;
          const {
            triggerName
          } = options || {};
          let filteredRules = rulesRef.value;
          if (triggerName) {
            filteredRules = filteredRules.filter((rule) => {
              const {
                trigger: trigger2
              } = rule;
              if (!trigger2 && !mergedValidateTrigger.value.length) {
                return true;
              }
              const triggerList = toArray$1(trigger2 || mergedValidateTrigger.value);
              return triggerList.includes(triggerName);
            });
          }
          if (!filteredRules.length) {
            return Promise.resolve();
          }
          const promise = validateRules(namePath.value, fieldValue.value, filteredRules, _extends$1({
            validateMessages: formContext.validateMessages.value
          }, options), validateFirst, messageVariables.value);
          validateState.value = "validating";
          errors.value = [];
          promise.catch((e2) => e2).then(function() {
            let results = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
            if (validateState.value === "validating") {
              const res = results.filter((result) => result && result.errors.length);
              validateState.value = res.length ? "error" : "success";
              errors.value = res.map((r2) => r2.errors);
              formContext.onValidate(fieldName.value, !errors.value.length, errors.value.length ? toRaw(errors.value[0]) : null);
            }
          });
          return promise;
        };
        const onFieldBlur = () => {
          validateRules$1({
            triggerName: "blur"
          });
        };
        const onFieldChange = () => {
          if (validateDisabled.value) {
            validateDisabled.value = false;
            return;
          }
          validateRules$1({
            triggerName: "change"
          });
        };
        const clearValidate = () => {
          validateState.value = props2.validateStatus;
          validateDisabled.value = false;
          errors.value = [];
        };
        const resetField = () => {
          var _a;
          validateState.value = props2.validateStatus;
          validateDisabled.value = true;
          errors.value = [];
          const model = formContext.model.value || {};
          const value = fieldValue.value;
          const prop = getPropByPath$1(model, namePath.value, true);
          if (Array.isArray(value)) {
            prop.o[prop.k] = [].concat((_a = initialValue.value) !== null && _a !== void 0 ? _a : []);
          } else {
            prop.o[prop.k] = initialValue.value;
          }
          nextTick(() => {
            validateDisabled.value = false;
          });
        };
        const htmlFor = computed(() => {
          return props2.htmlFor === void 0 ? fieldId.value : props2.htmlFor;
        });
        const onLabelClick = () => {
          const id = htmlFor.value;
          if (!id || !inputRef.value) {
            return;
          }
          const control = inputRef.value.$el.querySelector(`[id="${id}"]`);
          if (control && control.focus) {
            control.focus();
          }
        };
        expose({
          onFieldBlur,
          onFieldChange,
          clearValidate,
          resetField
        });
        useProvideFormItemContext({
          id: fieldId,
          onFieldBlur: () => {
            if (props2.autoLink) {
              onFieldBlur();
            }
          },
          onFieldChange: () => {
            if (props2.autoLink) {
              onFieldChange();
            }
          },
          clearValidate
        }, computed(() => {
          return !!(props2.autoLink && formContext.model.value && fieldName.value);
        }));
        let registered = false;
        watch(fieldName, (val) => {
          if (val) {
            if (!registered) {
              registered = true;
              formContext.addField(eventKey, {
                fieldValue,
                fieldId,
                fieldName,
                resetField,
                clearValidate,
                namePath,
                validateRules: validateRules$1,
                rules: rulesRef
              });
            }
          } else {
            registered = false;
            formContext.removeField(eventKey);
          }
        }, {
          immediate: true
        });
        onBeforeUnmount(() => {
          formContext.removeField(eventKey);
        });
        const debounceErrors = useDebounce(errors);
        const mergedValidateStatus = computed(() => {
          if (props2.validateStatus !== void 0) {
            return props2.validateStatus;
          } else if (debounceErrors.value.length) {
            return "error";
          }
          return validateState.value;
        });
        const itemClassName = computed(() => ({
          [`${prefixCls.value}-item`]: true,
          [hashId.value]: true,
          // Status
          [`${prefixCls.value}-item-has-feedback`]: mergedValidateStatus.value && props2.hasFeedback,
          [`${prefixCls.value}-item-has-success`]: mergedValidateStatus.value === "success",
          [`${prefixCls.value}-item-has-warning`]: mergedValidateStatus.value === "warning",
          [`${prefixCls.value}-item-has-error`]: mergedValidateStatus.value === "error",
          [`${prefixCls.value}-item-is-validating`]: mergedValidateStatus.value === "validating",
          [`${prefixCls.value}-item-hidden`]: props2.hidden
        }));
        const formItemInputContext = reactive({});
        FormItemInputContext.useProvide(formItemInputContext);
        watchEffect(() => {
          let feedbackIcon;
          if (props2.hasFeedback) {
            const IconNode = mergedValidateStatus.value && iconMap[mergedValidateStatus.value];
            feedbackIcon = IconNode ? createVNode("span", {
              "class": classNames(`${prefixCls.value}-item-feedback-icon`, `${prefixCls.value}-item-feedback-icon-${mergedValidateStatus.value}`)
            }, [createVNode(IconNode, null, null)]) : null;
          }
          _extends$1(formItemInputContext, {
            status: mergedValidateStatus.value,
            hasFeedback: props2.hasFeedback,
            feedbackIcon,
            isFormItemInput: true
          });
        });
        const marginBottom = shallowRef(null);
        const showMarginOffset = shallowRef(false);
        const updateMarginBottom = () => {
          if (itemRef.value) {
            const itemStyle = getComputedStyle(itemRef.value);
            marginBottom.value = parseInt(itemStyle.marginBottom, 10);
          }
        };
        onMounted(() => {
          watch(showMarginOffset, () => {
            if (showMarginOffset.value) {
              updateMarginBottom();
            }
          }, {
            flush: "post",
            immediate: true
          });
        });
        const onErrorVisibleChanged = (nextVisible) => {
          if (!nextVisible) {
            marginBottom.value = null;
          }
        };
        return () => {
          var _a, _b;
          if (props2.noStyle) return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
          const help = (_b = props2.help) !== null && _b !== void 0 ? _b : slots.help ? filterEmpty(slots.help()) : null;
          const withHelp = !!(help !== void 0 && help !== null && Array.isArray(help) && help.length || debounceErrors.value.length);
          showMarginOffset.value = withHelp;
          return wrapSSR(createVNode("div", {
            "class": [itemClassName.value, withHelp ? `${prefixCls.value}-item-with-help` : "", attrs.class],
            "ref": itemRef
          }, [createVNode(ARow, _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "class": `${prefixCls.value}-item-row`,
            "key": "row"
          }), {
            default: () => {
              var _a2, _b2;
              return createVNode(Fragment, null, [createVNode(FormItemLabel, _objectSpread2$1(_objectSpread2$1({}, props2), {}, {
                "htmlFor": htmlFor.value,
                "required": isRequired2.value,
                "requiredMark": formContext.requiredMark.value,
                "prefixCls": prefixCls.value,
                "onClick": onLabelClick,
                "label": props2.label
              }), {
                label: slots.label,
                tooltip: slots.tooltip
              }), createVNode(FormItemInput, _objectSpread2$1(_objectSpread2$1({}, props2), {}, {
                "errors": help !== void 0 && help !== null ? toArray$1(help) : debounceErrors.value,
                "marginBottom": marginBottom.value,
                "prefixCls": prefixCls.value,
                "status": mergedValidateStatus.value,
                "ref": inputRef,
                "help": help,
                "extra": (_a2 = props2.extra) !== null && _a2 !== void 0 ? _a2 : (_b2 = slots.extra) === null || _b2 === void 0 ? void 0 : _b2.call(slots),
                "onErrorVisibleChanged": onErrorVisibleChanged
              }), {
                default: slots.default
              })]);
            }
          }), !!marginBottom.value && createVNode("div", {
            "class": `${prefixCls.value}-margin-offset`,
            "style": {
              marginBottom: `-${marginBottom.value}px`
            }
          }, null)]));
        };
      }
    });
    function allPromiseFinish(promiseList) {
      let hasError = false;
      let count = promiseList.length;
      const results = [];
      if (!promiseList.length) {
        return Promise.resolve([]);
      }
      return new Promise((resolve2, reject) => {
        promiseList.forEach((promise, index2) => {
          promise.catch((e2) => {
            hasError = true;
            return e2;
          }).then((result) => {
            count -= 1;
            results[index2] = result;
            if (count > 0) {
              return;
            }
            if (hasError) {
              reject(results);
            }
            resolve2(results);
          });
        });
      });
    }
    function isRequired(rules2) {
      let isRequired2 = false;
      if (rules2 && rules2.length) {
        rules2.every((rule) => {
          if (rule.required) {
            isRequired2 = true;
            return false;
          }
          return true;
        });
      }
      return isRequired2;
    }
    function toArray(value) {
      if (value === void 0 || value === null) {
        return [];
      }
      return Array.isArray(value) ? value : [value];
    }
    function getPropByPath(obj, path, strict) {
      let tempObj = obj;
      path = path.replace(/\[(\w+)\]/g, ".$1");
      path = path.replace(/^\./, "");
      const keyArr = path.split(".");
      let i2 = 0;
      for (let len = keyArr.length; i2 < len - 1; ++i2) {
        if (!tempObj && !strict) break;
        const key2 = keyArr[i2];
        if (key2 in tempObj) {
          tempObj = tempObj[key2];
        } else {
          if (strict) {
            throw new Error("please transfer a valid name path to validate!");
          }
          break;
        }
      }
      return {
        o: tempObj,
        k: keyArr[i2],
        v: tempObj ? tempObj[keyArr[i2]] : null,
        isValid: tempObj && keyArr[i2] in tempObj
      };
    }
    function useForm(modelRef) {
      let rulesRef = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ref({});
      let options = arguments.length > 2 ? arguments[2] : void 0;
      const initialModel = cloneDeep(unref(modelRef));
      const validateInfos = reactive({});
      const rulesKeys = shallowRef([]);
      const resetFields = (newValues) => {
        _extends$1(unref(modelRef), _extends$1(_extends$1({}, cloneDeep(initialModel)), newValues));
        nextTick(() => {
          Object.keys(validateInfos).forEach((key2) => {
            validateInfos[key2] = {
              autoLink: false,
              required: isRequired(unref(rulesRef)[key2])
            };
          });
        });
      };
      const filterRules = function() {
        let rules2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
        let trigger2 = arguments.length > 1 ? arguments[1] : void 0;
        if (!trigger2.length) {
          return rules2;
        } else {
          return rules2.filter((rule) => {
            const triggerList = toArray(rule.trigger || "change");
            return intersection(triggerList, trigger2).length;
          });
        }
      };
      let lastValidatePromise = null;
      const validateFields = function(names2) {
        let option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        let strict = arguments.length > 2 ? arguments[2] : void 0;
        const promiseList = [];
        const values = {};
        for (let i2 = 0; i2 < names2.length; i2++) {
          const name = names2[i2];
          const prop = getPropByPath(unref(modelRef), name, strict);
          if (!prop.isValid) continue;
          values[name] = prop.v;
          const rules2 = filterRules(unref(rulesRef)[name], toArray(option && option.trigger));
          if (rules2.length) {
            promiseList.push(validateField(name, prop.v, rules2, option || {}).then(() => ({
              name,
              errors: [],
              warnings: []
            })).catch((ruleErrors) => {
              const mergedErrors = [];
              const mergedWarnings = [];
              ruleErrors.forEach((_ref) => {
                let {
                  rule: {
                    warningOnly
                  },
                  errors
                } = _ref;
                if (warningOnly) {
                  mergedWarnings.push(...errors);
                } else {
                  mergedErrors.push(...errors);
                }
              });
              if (mergedErrors.length) {
                return Promise.reject({
                  name,
                  errors: mergedErrors,
                  warnings: mergedWarnings
                });
              }
              return {
                name,
                errors: mergedErrors,
                warnings: mergedWarnings
              };
            }));
          }
        }
        const summaryPromise = allPromiseFinish(promiseList);
        lastValidatePromise = summaryPromise;
        const returnPromise = summaryPromise.then(() => {
          if (lastValidatePromise === summaryPromise) {
            return Promise.resolve(values);
          }
          return Promise.reject([]);
        }).catch((results) => {
          const errorList = results.filter((result) => result && result.errors.length);
          return errorList.length ? Promise.reject({
            values,
            errorFields: errorList,
            outOfDate: lastValidatePromise !== summaryPromise
          }) : Promise.resolve(values);
        });
        returnPromise.catch((e2) => e2);
        return returnPromise;
      };
      const validateField = function(name, value, rules2) {
        let option = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
        const promise = validateRules([name], value, rules2, _extends$1({
          validateMessages: defaultValidateMessages
        }, option), !!option.validateFirst);
        if (!validateInfos[name]) {
          return promise.catch((e2) => e2);
        }
        validateInfos[name].validateStatus = "validating";
        promise.catch((e2) => e2).then(function() {
          let results = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
          var _a;
          if (validateInfos[name].validateStatus === "validating") {
            const res = results.filter((result) => result && result.errors.length);
            validateInfos[name].validateStatus = res.length ? "error" : "success";
            validateInfos[name].help = res.length ? res.map((r2) => r2.errors) : null;
            (_a = options === null || options === void 0 ? void 0 : options.onValidate) === null || _a === void 0 ? void 0 : _a.call(options, name, !res.length, res.length ? toRaw(validateInfos[name].help[0]) : null);
          }
        });
        return promise;
      };
      const validate = (names2, option) => {
        let keys2 = [];
        let strict = true;
        if (!names2) {
          strict = false;
          keys2 = rulesKeys.value;
        } else if (Array.isArray(names2)) {
          keys2 = names2;
        } else {
          keys2 = [names2];
        }
        const promises = validateFields(keys2, option || {}, strict);
        promises.catch((e2) => e2);
        return promises;
      };
      const clearValidate = (names2) => {
        let keys2 = [];
        if (!names2) {
          keys2 = rulesKeys.value;
        } else if (Array.isArray(names2)) {
          keys2 = names2;
        } else {
          keys2 = [names2];
        }
        keys2.forEach((key2) => {
          validateInfos[key2] && _extends$1(validateInfos[key2], {
            validateStatus: "",
            help: null
          });
        });
      };
      const mergeValidateInfo = (items) => {
        const info = {
          autoLink: false
        };
        const help = [];
        const infos = Array.isArray(items) ? items : [items];
        for (let i2 = 0; i2 < infos.length; i2++) {
          const arg = infos[i2];
          if ((arg === null || arg === void 0 ? void 0 : arg.validateStatus) === "error") {
            info.validateStatus = "error";
            arg.help && help.push(arg.help);
          }
          info.required = info.required || (arg === null || arg === void 0 ? void 0 : arg.required);
        }
        info.help = help;
        return info;
      };
      let oldModel = initialModel;
      let isFirstTime = true;
      const modelFn = (model) => {
        const names2 = [];
        rulesKeys.value.forEach((key2) => {
          const prop = getPropByPath(model, key2, false);
          const oldProp = getPropByPath(oldModel, key2, false);
          const isFirstValidation = isFirstTime && (options === null || options === void 0 ? void 0 : options.immediate) && prop.isValid;
          if (isFirstValidation || !isEqual(prop.v, oldProp.v)) {
            names2.push(key2);
          }
        });
        validate(names2, {
          trigger: "change"
        });
        isFirstTime = false;
        oldModel = cloneDeep(toRaw(model));
      };
      const debounceOptions = options === null || options === void 0 ? void 0 : options.debounce;
      let first = true;
      watch(rulesRef, () => {
        rulesKeys.value = rulesRef ? Object.keys(unref(rulesRef)) : [];
        if (!first && options && options.validateOnRuleChange) {
          validate();
        }
        first = false;
      }, {
        deep: true,
        immediate: true
      });
      watch(rulesKeys, () => {
        const newValidateInfos = {};
        rulesKeys.value.forEach((key2) => {
          newValidateInfos[key2] = _extends$1({}, validateInfos[key2], {
            autoLink: false,
            required: isRequired(unref(rulesRef)[key2])
          });
          delete validateInfos[key2];
        });
        for (const key2 in validateInfos) {
          if (Object.prototype.hasOwnProperty.call(validateInfos, key2)) {
            delete validateInfos[key2];
          }
        }
        _extends$1(validateInfos, newValidateInfos);
      }, {
        immediate: true
      });
      watch(modelRef, debounceOptions && debounceOptions.wait ? debounce(modelFn, debounceOptions.wait, omit$1(debounceOptions, ["wait"])) : modelFn, {
        immediate: options && !!options.immediate,
        deep: true
      });
      return {
        modelRef,
        rulesRef,
        initialModel,
        validateInfos,
        resetFields,
        validate,
        validateField,
        mergeValidateInfo,
        clearValidate
      };
    }
    const formProps = () => ({
      layout: PropTypes.oneOf(tuple("horizontal", "inline", "vertical")),
      labelCol: objectType(),
      wrapperCol: objectType(),
      colon: booleanType(),
      labelAlign: stringType(),
      labelWrap: booleanType(),
      prefixCls: String,
      requiredMark: someType([String, Boolean]),
      /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
      hideRequiredMark: booleanType(),
      model: PropTypes.object,
      rules: objectType(),
      validateMessages: objectType(),
      validateOnRuleChange: booleanType(),
      // 提交失败自动滚动到第一个错误字段
      scrollToFirstError: anyType(),
      onSubmit: functionType(),
      name: String,
      validateTrigger: someType([String, Array]),
      size: stringType(),
      disabled: booleanType(),
      onValuesChange: functionType(),
      onFieldsChange: functionType(),
      onFinish: functionType(),
      onFinishFailed: functionType(),
      onValidate: functionType()
    });
    function isEqualName(name1, name2) {
      return isEqual(toArray$1(name1), toArray$1(name2));
    }
    const Form = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "AForm",
      inheritAttrs: false,
      props: initDefaultProps(formProps(), {
        layout: "horizontal",
        hideRequiredMark: false,
        colon: true
      }),
      Item: FormItem,
      useForm,
      // emits: ['finishFailed', 'submit', 'finish', 'validate'],
      setup(props2, _ref) {
        let {
          emit: emit2,
          slots,
          expose,
          attrs
        } = _ref;
        const {
          prefixCls,
          direction,
          form: contextForm,
          size: size2,
          disabled
        } = useConfigInject("form", props2);
        const requiredMark = computed(() => props2.requiredMark === "" || props2.requiredMark);
        const mergedRequiredMark = computed(() => {
          var _a;
          if (requiredMark.value !== void 0) {
            return requiredMark.value;
          }
          if (contextForm && ((_a = contextForm.value) === null || _a === void 0 ? void 0 : _a.requiredMark) !== void 0) {
            return contextForm.value.requiredMark;
          }
          if (props2.hideRequiredMark) {
            return false;
          }
          return true;
        });
        useProviderSize(size2);
        useProviderDisabled(disabled);
        const mergedColon = computed(() => {
          var _a, _b;
          return (_a = props2.colon) !== null && _a !== void 0 ? _a : (_b = contextForm.value) === null || _b === void 0 ? void 0 : _b.colon;
        });
        const {
          validateMessages: globalValidateMessages
        } = useInjectGlobalForm();
        const validateMessages = computed(() => {
          return _extends$1(_extends$1(_extends$1({}, defaultValidateMessages), globalValidateMessages.value), props2.validateMessages);
        });
        const [wrapSSR, hashId] = useStyle$6(prefixCls);
        const formClassName = computed(() => classNames(prefixCls.value, {
          [`${prefixCls.value}-${props2.layout}`]: true,
          [`${prefixCls.value}-hide-required-mark`]: mergedRequiredMark.value === false,
          [`${prefixCls.value}-rtl`]: direction.value === "rtl",
          [`${prefixCls.value}-${size2.value}`]: size2.value
        }, hashId.value));
        const lastValidatePromise = ref();
        const fields = {};
        const addField = (eventKey, field) => {
          fields[eventKey] = field;
        };
        const removeField = (eventKey) => {
          delete fields[eventKey];
        };
        const getFieldsByNameList = (nameList) => {
          const provideNameList = !!nameList;
          const namePathList = provideNameList ? toArray$1(nameList).map(getNamePath) : [];
          if (!provideNameList) {
            return Object.values(fields);
          } else {
            return Object.values(fields).filter((field) => namePathList.findIndex((namePath) => isEqualName(namePath, field.fieldName.value)) > -1);
          }
        };
        const resetFields = (name) => {
          if (!props2.model) {
            return;
          }
          getFieldsByNameList(name).forEach((field) => {
            field.resetField();
          });
        };
        const clearValidate = (name) => {
          getFieldsByNameList(name).forEach((field) => {
            field.clearValidate();
          });
        };
        const handleFinishFailed = (errorInfo) => {
          const {
            scrollToFirstError
          } = props2;
          emit2("finishFailed", errorInfo);
          if (scrollToFirstError && errorInfo.errorFields.length) {
            let scrollToFieldOptions = {};
            if (typeof scrollToFirstError === "object") {
              scrollToFieldOptions = scrollToFirstError;
            }
            scrollToField(errorInfo.errorFields[0].name, scrollToFieldOptions);
          }
        };
        const validate = function() {
          return validateField(...arguments);
        };
        const scrollToField = function(name) {
          let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
          const fields2 = getFieldsByNameList(name ? [name] : void 0);
          if (fields2.length) {
            const fieldId = fields2[0].fieldId.value;
            const node2 = fieldId ? document.getElementById(fieldId) : null;
            if (node2) {
              scrollIntoView(node2, _extends$1({
                scrollMode: "if-needed",
                block: "nearest"
              }, options));
            }
          }
        };
        const getFieldsValue = function() {
          let nameList = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
          if (nameList === true) {
            const allNameList = [];
            Object.values(fields).forEach((_ref2) => {
              let {
                namePath
              } = _ref2;
              allNameList.push(namePath.value);
            });
            return cloneByNamePathList(props2.model, allNameList);
          } else {
            return cloneByNamePathList(props2.model, nameList);
          }
        };
        const validateFields = (nameList, options) => {
          if (!props2.model) {
            return Promise.reject("Form `model` is required for validateFields to work.");
          }
          const provideNameList = !!nameList;
          const namePathList = provideNameList ? toArray$1(nameList).map(getNamePath) : [];
          const promiseList = [];
          Object.values(fields).forEach((field) => {
            var _a;
            if (!provideNameList) {
              namePathList.push(field.namePath.value);
            }
            if (!((_a = field.rules) === null || _a === void 0 ? void 0 : _a.value.length)) {
              return;
            }
            const fieldNamePath = field.namePath.value;
            if (!provideNameList || containsNamePath(namePathList, fieldNamePath)) {
              const promise = field.validateRules(_extends$1({
                validateMessages: validateMessages.value
              }, options));
              promiseList.push(promise.then(() => ({
                name: fieldNamePath,
                errors: [],
                warnings: []
              })).catch((ruleErrors) => {
                const mergedErrors = [];
                const mergedWarnings = [];
                ruleErrors.forEach((_ref3) => {
                  let {
                    rule: {
                      warningOnly
                    },
                    errors
                  } = _ref3;
                  if (warningOnly) {
                    mergedWarnings.push(...errors);
                  } else {
                    mergedErrors.push(...errors);
                  }
                });
                if (mergedErrors.length) {
                  return Promise.reject({
                    name: fieldNamePath,
                    errors: mergedErrors,
                    warnings: mergedWarnings
                  });
                }
                return {
                  name: fieldNamePath,
                  errors: mergedErrors,
                  warnings: mergedWarnings
                };
              }));
            }
          });
          const summaryPromise = allPromiseFinish(promiseList);
          lastValidatePromise.value = summaryPromise;
          const returnPromise = summaryPromise.then(() => {
            if (lastValidatePromise.value === summaryPromise) {
              return Promise.resolve(getFieldsValue(namePathList));
            }
            return Promise.reject([]);
          }).catch((results) => {
            const errorList = results.filter((result) => result && result.errors.length);
            return Promise.reject({
              values: getFieldsValue(namePathList),
              errorFields: errorList,
              outOfDate: lastValidatePromise.value !== summaryPromise
            });
          });
          returnPromise.catch((e2) => e2);
          return returnPromise;
        };
        const validateField = function() {
          return validateFields(...arguments);
        };
        const handleSubmit = (e2) => {
          e2.preventDefault();
          e2.stopPropagation();
          emit2("submit", e2);
          if (props2.model) {
            const res = validateFields();
            res.then((values) => {
              emit2("finish", values);
            }).catch((errors) => {
              handleFinishFailed(errors);
            });
          }
        };
        expose({
          resetFields,
          clearValidate,
          validateFields,
          getFieldsValue,
          validate,
          scrollToField
        });
        useProvideForm({
          model: computed(() => props2.model),
          name: computed(() => props2.name),
          labelAlign: computed(() => props2.labelAlign),
          labelCol: computed(() => props2.labelCol),
          labelWrap: computed(() => props2.labelWrap),
          wrapperCol: computed(() => props2.wrapperCol),
          vertical: computed(() => props2.layout === "vertical"),
          colon: mergedColon,
          requiredMark: mergedRequiredMark,
          validateTrigger: computed(() => props2.validateTrigger),
          rules: computed(() => props2.rules),
          addField,
          removeField,
          onValidate: (name, status, errors) => {
            emit2("validate", name, status, errors);
          },
          validateMessages
        });
        watch(() => props2.rules, () => {
          if (props2.validateOnRuleChange) {
            validateFields();
          }
        });
        return () => {
          var _a;
          return wrapSSR(createVNode("form", _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "onSubmit": handleSubmit,
            "class": [formClassName.value, attrs.class]
          }), [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]));
        };
      }
    });
    Form.useInjectFormItemContext = useInjectFormItemContext;
    Form.ItemRest = FormItemRest;
    Form.install = function(app) {
      app.component(Form.name, Form);
      app.component(Form.Item.name, Form.Item);
      app.component(FormItemRest.name, FormItemRest);
      return app;
    };
    let runtimeLocale = _extends$1({}, localeValues.Modal);
    function changeConfirmLocale(newLocale) {
      if (newLocale) {
        runtimeLocale = _extends$1(_extends$1({}, runtimeLocale), newLocale);
      } else {
        runtimeLocale = _extends$1({}, localeValues.Modal);
      }
    }
    const ANT_MARK = "internalMark";
    const LocaleProvider = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ALocaleProvider",
      props: {
        locale: {
          type: Object
        },
        ANT_MARK__: String
      },
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        warning$2(props2.ANT_MARK__ === ANT_MARK);
        const state = reactive({
          antLocale: _extends$1(_extends$1({}, props2.locale), {
            exist: true
          }),
          ANT_MARK__: ANT_MARK
        });
        provide("localeData", state);
        watch(() => props2.locale, (locale2) => {
          changeConfirmLocale(locale2 && locale2.Modal);
          state.antLocale = _extends$1(_extends$1({}, locale2), {
            exist: true
          });
        }, {
          immediate: true
        });
        return () => {
          var _a;
          return (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
        };
      }
    });
    LocaleProvider.install = function(app) {
      app.component(LocaleProvider.name, LocaleProvider);
      return app;
    };
    const locale = withInstall(LocaleProvider);
    const Notice = /* @__PURE__ */ defineComponent({
      name: "Notice",
      inheritAttrs: false,
      props: ["prefixCls", "duration", "updateMark", "noticeKey", "closeIcon", "closable", "props", "onClick", "onClose", "holder", "visible"],
      setup(props2, _ref) {
        let {
          attrs,
          slots
        } = _ref;
        let closeTimer;
        let isUnMounted = false;
        const duration = computed(() => props2.duration === void 0 ? 4.5 : props2.duration);
        const startCloseTimer = () => {
          if (duration.value && !isUnMounted) {
            closeTimer = setTimeout(() => {
              close();
            }, duration.value * 1e3);
          }
        };
        const clearCloseTimer = () => {
          if (closeTimer) {
            clearTimeout(closeTimer);
            closeTimer = null;
          }
        };
        const close = (e2) => {
          if (e2) {
            e2.stopPropagation();
          }
          clearCloseTimer();
          const {
            onClose,
            noticeKey
          } = props2;
          if (onClose) {
            onClose(noticeKey);
          }
        };
        const restartCloseTimer = () => {
          clearCloseTimer();
          startCloseTimer();
        };
        onMounted(() => {
          startCloseTimer();
        });
        onUnmounted(() => {
          isUnMounted = true;
          clearCloseTimer();
        });
        watch([duration, () => props2.updateMark, () => props2.visible], (_ref2, _ref3) => {
          let [preDuration, preUpdateMark, preVisible] = _ref2;
          let [newDuration, newUpdateMark, newVisible] = _ref3;
          if (preDuration !== newDuration || preUpdateMark !== newUpdateMark || preVisible !== newVisible && newVisible) {
            restartCloseTimer();
          }
        }, {
          flush: "post"
        });
        return () => {
          var _a, _b;
          const {
            prefixCls,
            closable,
            closeIcon = (_a = slots.closeIcon) === null || _a === void 0 ? void 0 : _a.call(slots),
            onClick,
            holder
          } = props2;
          const {
            class: className,
            style
          } = attrs;
          const componentClass = `${prefixCls}-notice`;
          const dataOrAriaAttributeProps = Object.keys(attrs).reduce((acc, key2) => {
            if (key2.startsWith("data-") || key2.startsWith("aria-") || key2 === "role") {
              acc[key2] = attrs[key2];
            }
            return acc;
          }, {});
          const node2 = createVNode("div", _objectSpread2$1({
            "class": classNames(componentClass, className, {
              [`${componentClass}-closable`]: closable
            }),
            "style": style,
            "onMouseenter": clearCloseTimer,
            "onMouseleave": startCloseTimer,
            "onClick": onClick
          }, dataOrAriaAttributeProps), [createVNode("div", {
            "class": `${componentClass}-content`
          }, [(_b = slots.default) === null || _b === void 0 ? void 0 : _b.call(slots)]), closable ? createVNode("a", {
            "tabindex": 0,
            "onClick": close,
            "class": `${componentClass}-close`
          }, [closeIcon || createVNode("span", {
            "class": `${componentClass}-close-x`
          }, null)]) : null]);
          if (holder) {
            return createVNode(Teleport, {
              "to": holder
            }, {
              default: () => node2
            });
          }
          return node2;
        };
      }
    });
    var __rest$7 = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    let seed$1 = 0;
    const now$1 = Date.now();
    function getUuid$1() {
      const id = seed$1;
      seed$1 += 1;
      return `rcNotification_${now$1}_${id}`;
    }
    const Notification$1 = /* @__PURE__ */ defineComponent({
      name: "Notification",
      inheritAttrs: false,
      props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId"],
      setup(props2, _ref) {
        let {
          attrs,
          expose,
          slots
        } = _ref;
        const hookRefs = /* @__PURE__ */ new Map();
        const notices = ref([]);
        const transitionProps = computed(() => {
          const {
            prefixCls,
            animation = "fade"
          } = props2;
          let name = props2.transitionName;
          if (!name && animation) {
            name = `${prefixCls}-${animation}`;
          }
          return getTransitionGroupProps(name);
        });
        const add2 = (originNotice, holderCallback) => {
          const key2 = originNotice.key || getUuid$1();
          const notice2 = _extends$1(_extends$1({}, originNotice), {
            key: key2
          });
          const {
            maxCount: maxCount2
          } = props2;
          const noticeIndex = notices.value.map((v2) => v2.notice.key).indexOf(key2);
          const updatedNotices = notices.value.concat();
          if (noticeIndex !== -1) {
            updatedNotices.splice(noticeIndex, 1, {
              notice: notice2,
              holderCallback
            });
          } else {
            if (maxCount2 && notices.value.length >= maxCount2) {
              notice2.key = updatedNotices[0].notice.key;
              notice2.updateMark = getUuid$1();
              notice2.userPassKey = key2;
              updatedNotices.shift();
            }
            updatedNotices.push({
              notice: notice2,
              holderCallback
            });
          }
          notices.value = updatedNotices;
        };
        const remove2 = (removeKey) => {
          notices.value = notices.value.filter((_ref2) => {
            let {
              notice: {
                key: key2,
                userPassKey
              }
            } = _ref2;
            const mergedKey = userPassKey || key2;
            return mergedKey !== removeKey;
          });
        };
        expose({
          add: add2,
          remove: remove2,
          notices
        });
        return () => {
          var _a;
          const {
            prefixCls,
            closeIcon = (_a = slots.closeIcon) === null || _a === void 0 ? void 0 : _a.call(slots, {
              prefixCls
            })
          } = props2;
          const noticeNodes = notices.value.map((_ref3, index2) => {
            let {
              notice: notice2,
              holderCallback
            } = _ref3;
            const updateMark = index2 === notices.value.length - 1 ? notice2.updateMark : void 0;
            const {
              key: key2,
              userPassKey
            } = notice2;
            const {
              content
            } = notice2;
            const noticeProps = _extends$1(_extends$1(_extends$1({
              prefixCls,
              closeIcon: typeof closeIcon === "function" ? closeIcon({
                prefixCls
              }) : closeIcon
            }, notice2), notice2.props), {
              key: key2,
              noticeKey: userPassKey || key2,
              updateMark,
              onClose: (noticeKey) => {
                var _a2;
                remove2(noticeKey);
                (_a2 = notice2.onClose) === null || _a2 === void 0 ? void 0 : _a2.call(notice2);
              },
              onClick: notice2.onClick
            });
            if (holderCallback) {
              return createVNode("div", {
                "key": key2,
                "class": `${prefixCls}-hook-holder`,
                "ref": (div) => {
                  if (typeof key2 === "undefined") {
                    return;
                  }
                  if (div) {
                    hookRefs.set(key2, div);
                    holderCallback(div, noticeProps);
                  } else {
                    hookRefs.delete(key2);
                  }
                }
              }, null);
            }
            return createVNode(Notice, _objectSpread2$1(_objectSpread2$1({}, noticeProps), {}, {
              "class": classNames(noticeProps.class, props2.hashId)
            }), {
              default: () => [typeof content === "function" ? content({
                prefixCls
              }) : content]
            });
          });
          const className = {
            [prefixCls]: 1,
            [attrs.class]: !!attrs.class,
            [props2.hashId]: true
          };
          return createVNode("div", {
            "class": className,
            "style": attrs.style || {
              top: "65px",
              left: "50%"
            }
          }, [createVNode(TransitionGroup, _objectSpread2$1({
            "tag": "div"
          }, transitionProps.value), {
            default: () => [noticeNodes]
          })]);
        };
      }
    });
    Notification$1.newInstance = function newNotificationInstance(properties, callback) {
      const _a = properties || {}, {
        name = "notification",
        getContainer: getContainer2,
        appContext,
        prefixCls: customizePrefixCls,
        rootPrefixCls: customRootPrefixCls,
        transitionName: customTransitionName,
        hasTransitionName: hasTransitionName2,
        useStyle: useStyle2
      } = _a, props2 = __rest$7(_a, ["name", "getContainer", "appContext", "prefixCls", "rootPrefixCls", "transitionName", "hasTransitionName", "useStyle"]);
      const div = document.createElement("div");
      if (getContainer2) {
        const root2 = getContainer2();
        root2.appendChild(div);
      } else {
        document.body.appendChild(div);
      }
      const Wrapper = /* @__PURE__ */ defineComponent({
        compatConfig: {
          MODE: 3
        },
        name: "NotificationWrapper",
        setup(_props, _ref4) {
          let {
            attrs
          } = _ref4;
          const notiRef = shallowRef();
          const prefixCls = computed(() => globalConfigForApi.getPrefixCls(name, customizePrefixCls));
          const [, hashId] = useStyle2(prefixCls);
          onMounted(() => {
            callback({
              notice(noticeProps) {
                var _a2;
                (_a2 = notiRef.value) === null || _a2 === void 0 ? void 0 : _a2.add(noticeProps);
              },
              removeNotice(key2) {
                var _a2;
                (_a2 = notiRef.value) === null || _a2 === void 0 ? void 0 : _a2.remove(key2);
              },
              destroy() {
                render(null, div);
                if (div.parentNode) {
                  div.parentNode.removeChild(div);
                }
              },
              component: notiRef
            });
          });
          return () => {
            const global2 = globalConfigForApi;
            const rootPrefixCls = global2.getRootPrefixCls(customRootPrefixCls, prefixCls.value);
            const transitionName2 = hasTransitionName2 ? customTransitionName : `${prefixCls.value}-${customTransitionName}`;
            return createVNode(ConfigProvider, _objectSpread2$1(_objectSpread2$1({}, global2), {}, {
              "prefixCls": rootPrefixCls
            }), {
              default: () => [createVNode(Notification$1, _objectSpread2$1(_objectSpread2$1({
                "ref": notiRef
              }, attrs), {}, {
                "prefixCls": prefixCls.value,
                "transitionName": transitionName2,
                "hashId": hashId.value
              }), null)]
            });
          };
        }
      });
      const vm = createVNode(Wrapper, props2);
      vm.appContext = appContext || vm.appContext;
      render(vm, div);
    };
    let seed = 0;
    const now = Date.now();
    function getUuid() {
      const id = seed;
      seed += 1;
      return `rcNotification_${now}_${id}`;
    }
    const Notification = /* @__PURE__ */ defineComponent({
      name: "HookNotification",
      inheritAttrs: false,
      props: ["prefixCls", "transitionName", "animation", "maxCount", "closeIcon", "hashId", "remove", "notices", "getStyles", "getClassName", "onAllRemoved", "getContainer"],
      setup(props2, _ref) {
        let {
          attrs,
          slots
        } = _ref;
        const hookRefs = /* @__PURE__ */ new Map();
        const notices = computed(() => props2.notices);
        const transitionProps = computed(() => {
          let name = props2.transitionName;
          if (!name && props2.animation) {
            switch (typeof props2.animation) {
              case "string":
                name = props2.animation;
                break;
              case "function":
                name = props2.animation().name;
                break;
              case "object":
                name = props2.animation.name;
                break;
              default:
                name = `${props2.prefixCls}-fade`;
                break;
            }
          }
          return getTransitionGroupProps(name);
        });
        const remove2 = (key2) => props2.remove(key2);
        const placements2 = ref({});
        watch(notices, () => {
          const nextPlacements = {};
          Object.keys(placements2.value).forEach((placement) => {
            nextPlacements[placement] = [];
          });
          props2.notices.forEach((config) => {
            const {
              placement = "topRight"
            } = config.notice;
            if (placement) {
              nextPlacements[placement] = nextPlacements[placement] || [];
              nextPlacements[placement].push(config);
            }
          });
          placements2.value = nextPlacements;
        });
        const placementList = computed(() => Object.keys(placements2.value));
        return () => {
          var _a;
          const {
            prefixCls,
            closeIcon = (_a = slots.closeIcon) === null || _a === void 0 ? void 0 : _a.call(slots, {
              prefixCls
            })
          } = props2;
          const noticeNodes = placementList.value.map((placement) => {
            var _a2, _b;
            const noticesForPlacement = placements2.value[placement];
            const classes = (_a2 = props2.getClassName) === null || _a2 === void 0 ? void 0 : _a2.call(props2, placement);
            const styles = (_b = props2.getStyles) === null || _b === void 0 ? void 0 : _b.call(props2, placement);
            const noticeNodesForPlacement = noticesForPlacement.map((_ref2, index2) => {
              let {
                notice: notice2,
                holderCallback
              } = _ref2;
              const updateMark = index2 === notices.value.length - 1 ? notice2.updateMark : void 0;
              const {
                key: key2,
                userPassKey
              } = notice2;
              const {
                content
              } = notice2;
              const noticeProps = _extends$1(_extends$1(_extends$1({
                prefixCls,
                closeIcon: typeof closeIcon === "function" ? closeIcon({
                  prefixCls
                }) : closeIcon
              }, notice2), notice2.props), {
                key: key2,
                noticeKey: userPassKey || key2,
                updateMark,
                onClose: (noticeKey) => {
                  var _a3;
                  remove2(noticeKey);
                  (_a3 = notice2.onClose) === null || _a3 === void 0 ? void 0 : _a3.call(notice2);
                },
                onClick: notice2.onClick
              });
              if (holderCallback) {
                return createVNode("div", {
                  "key": key2,
                  "class": `${prefixCls}-hook-holder`,
                  "ref": (div) => {
                    if (typeof key2 === "undefined") {
                      return;
                    }
                    if (div) {
                      hookRefs.set(key2, div);
                      holderCallback(div, noticeProps);
                    } else {
                      hookRefs.delete(key2);
                    }
                  }
                }, null);
              }
              return createVNode(Notice, _objectSpread2$1(_objectSpread2$1({}, noticeProps), {}, {
                "class": classNames(noticeProps.class, props2.hashId)
              }), {
                default: () => [typeof content === "function" ? content({
                  prefixCls
                }) : content]
              });
            });
            const className = {
              [prefixCls]: 1,
              [`${prefixCls}-${placement}`]: 1,
              [attrs.class]: !!attrs.class,
              [props2.hashId]: true,
              [classes]: !!classes
            };
            function onAfterLeave() {
              var _a3;
              if (noticesForPlacement.length > 0) {
                return;
              }
              Reflect.deleteProperty(placements2.value, placement);
              (_a3 = props2.onAllRemoved) === null || _a3 === void 0 ? void 0 : _a3.call(props2);
            }
            return createVNode("div", {
              "key": placement,
              "class": className,
              "style": attrs.style || styles || {
                top: "65px",
                left: "50%"
              }
            }, [createVNode(TransitionGroup, _objectSpread2$1(_objectSpread2$1({
              "tag": "div"
            }, transitionProps.value), {}, {
              "onAfterLeave": onAfterLeave
            }), {
              default: () => [noticeNodesForPlacement]
            })]);
          });
          return createVNode(Portal$1, {
            "getContainer": props2.getContainer
          }, {
            default: () => [noticeNodes]
          });
        };
      }
    });
    const HookNotification = Notification;
    var __rest$6 = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const defaultGetContainer$1 = () => document.body;
    let uniqueKey = 0;
    function mergeConfig() {
      const clone = {};
      for (var _len = arguments.length, objList = new Array(_len), _key = 0; _key < _len; _key++) {
        objList[_key] = arguments[_key];
      }
      objList.forEach((obj) => {
        if (obj) {
          Object.keys(obj).forEach((key2) => {
            const val = obj[key2];
            if (val !== void 0) {
              clone[key2] = val;
            }
          });
        }
      });
      return clone;
    }
    function useNotification$1() {
      let rootConfig = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      const {
        getContainer: getContainer2 = defaultGetContainer$1,
        motion,
        prefixCls,
        maxCount: maxCount2,
        getClassName,
        getStyles,
        onAllRemoved
      } = rootConfig, shareConfig = __rest$6(rootConfig, ["getContainer", "motion", "prefixCls", "maxCount", "getClassName", "getStyles", "onAllRemoved"]);
      const notices = shallowRef([]);
      const notificationsRef = shallowRef();
      const add2 = (originNotice, holderCallback) => {
        const key2 = originNotice.key || getUuid();
        const notice2 = _extends$1(_extends$1({}, originNotice), {
          key: key2
        });
        const noticeIndex = notices.value.map((v2) => v2.notice.key).indexOf(key2);
        const updatedNotices = notices.value.concat();
        if (noticeIndex !== -1) {
          updatedNotices.splice(noticeIndex, 1, {
            notice: notice2,
            holderCallback
          });
        } else {
          if (maxCount2 && notices.value.length >= maxCount2) {
            notice2.key = updatedNotices[0].notice.key;
            notice2.updateMark = getUuid();
            notice2.userPassKey = key2;
            updatedNotices.shift();
          }
          updatedNotices.push({
            notice: notice2,
            holderCallback
          });
        }
        notices.value = updatedNotices;
      };
      const removeNotice = (removeKey) => {
        notices.value = notices.value.filter((_ref) => {
          let {
            notice: {
              key: key2,
              userPassKey
            }
          } = _ref;
          const mergedKey = userPassKey || key2;
          return mergedKey !== removeKey;
        });
      };
      const destroy = () => {
        notices.value = [];
      };
      const contextHolder = () => createVNode(HookNotification, {
        "ref": notificationsRef,
        "prefixCls": prefixCls,
        "maxCount": maxCount2,
        "notices": notices.value,
        "remove": removeNotice,
        "getClassName": getClassName,
        "getStyles": getStyles,
        "animation": motion,
        "hashId": rootConfig.hashId,
        "onAllRemoved": onAllRemoved,
        "getContainer": getContainer2
      }, null);
      const taskQueue = shallowRef([]);
      const api2 = {
        open: (config) => {
          const mergedConfig = mergeConfig(shareConfig, config);
          if (mergedConfig.key === null || mergedConfig.key === void 0) {
            mergedConfig.key = `vc-notification-${uniqueKey}`;
            uniqueKey += 1;
          }
          taskQueue.value = [...taskQueue.value, {
            type: "open",
            config: mergedConfig
          }];
        },
        close: (key2) => {
          taskQueue.value = [...taskQueue.value, {
            type: "close",
            key: key2
          }];
        },
        destroy: () => {
          taskQueue.value = [...taskQueue.value, {
            type: "destroy"
          }];
        }
      };
      watch(taskQueue, () => {
        if (taskQueue.value.length) {
          taskQueue.value.forEach((task) => {
            switch (task.type) {
              case "open":
                add2(task.config);
                break;
              case "close":
                removeNotice(task.key);
                break;
              case "destroy":
                destroy();
                break;
            }
          });
          taskQueue.value = [];
        }
      });
      return [api2, contextHolder];
    }
    const genMessageStyle = (token2) => {
      const {
        componentCls,
        iconCls,
        boxShadowSecondary,
        colorBgElevated,
        colorSuccess,
        colorError,
        colorWarning,
        colorInfo,
        fontSizeLG,
        motionEaseInOutCirc,
        motionDurationSlow,
        marginXS,
        paddingXS,
        borderRadiusLG,
        zIndexPopup,
        // Custom token
        messageNoticeContentPadding
      } = token2;
      const messageMoveIn = new Keyframe("MessageMoveIn", {
        "0%": {
          padding: 0,
          transform: "translateY(-100%)",
          opacity: 0
        },
        "100%": {
          padding: paddingXS,
          transform: "translateY(0)",
          opacity: 1
        }
      });
      const messageMoveOut = new Keyframe("MessageMoveOut", {
        "0%": {
          maxHeight: token2.height,
          padding: paddingXS,
          opacity: 1
        },
        "100%": {
          maxHeight: 0,
          padding: 0,
          opacity: 0
        }
      });
      return [
        // ============================ Holder ============================
        {
          [componentCls]: _extends$1(_extends$1({}, resetComponent(token2)), {
            position: "fixed",
            top: marginXS,
            left: "50%",
            transform: "translateX(-50%)",
            width: "100%",
            pointerEvents: "none",
            zIndex: zIndexPopup,
            [`${componentCls}-move-up`]: {
              animationFillMode: "forwards"
            },
            [`
        ${componentCls}-move-up-appear,
        ${componentCls}-move-up-enter
      `]: {
              animationName: messageMoveIn,
              animationDuration: motionDurationSlow,
              animationPlayState: "paused",
              animationTimingFunction: motionEaseInOutCirc
            },
            [`
        ${componentCls}-move-up-appear${componentCls}-move-up-appear-active,
        ${componentCls}-move-up-enter${componentCls}-move-up-enter-active
      `]: {
              animationPlayState: "running"
            },
            [`${componentCls}-move-up-leave`]: {
              animationName: messageMoveOut,
              animationDuration: motionDurationSlow,
              animationPlayState: "paused",
              animationTimingFunction: motionEaseInOutCirc
            },
            [`${componentCls}-move-up-leave${componentCls}-move-up-leave-active`]: {
              animationPlayState: "running"
            },
            "&-rtl": {
              direction: "rtl",
              span: {
                direction: "rtl"
              }
            }
          })
        },
        // ============================ Notice ============================
        {
          [`${componentCls}-notice`]: {
            padding: paddingXS,
            textAlign: "center",
            [iconCls]: {
              verticalAlign: "text-bottom",
              marginInlineEnd: marginXS,
              fontSize: fontSizeLG
            },
            [`${componentCls}-notice-content`]: {
              display: "inline-block",
              padding: messageNoticeContentPadding,
              background: colorBgElevated,
              borderRadius: borderRadiusLG,
              boxShadow: boxShadowSecondary,
              pointerEvents: "all"
            },
            [`${componentCls}-success ${iconCls}`]: {
              color: colorSuccess
            },
            [`${componentCls}-error ${iconCls}`]: {
              color: colorError
            },
            [`${componentCls}-warning ${iconCls}`]: {
              color: colorWarning
            },
            [`
        ${componentCls}-info ${iconCls},
        ${componentCls}-loading ${iconCls}`]: {
              color: colorInfo
            }
          }
        },
        // ============================= Pure =============================
        {
          [`${componentCls}-notice-pure-panel`]: {
            padding: 0,
            textAlign: "start"
          }
        }
      ];
    };
    const useStyle$5 = genComponentStyleHook("Message", (token2) => {
      const combinedToken = merge(token2, {
        messageNoticeContentPadding: `${(token2.controlHeightLG - token2.fontSize * token2.lineHeight) / 2}px ${token2.paddingSM}px`
      });
      return [genMessageStyle(combinedToken)];
    }, (token2) => ({
      height: 150,
      zIndexPopup: token2.zIndexPopupBase + 10
    }));
    const TypeIcon = {
      info: createVNode(InfoCircleFilled, null, null),
      success: createVNode(CheckCircleFilled, null, null),
      error: createVNode(CloseCircleFilled, null, null),
      warning: createVNode(ExclamationCircleFilled, null, null),
      loading: createVNode(LoadingOutlined, null, null)
    };
    const PureContent$1 = /* @__PURE__ */ defineComponent({
      name: "PureContent",
      inheritAttrs: false,
      props: ["prefixCls", "type", "icon"],
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        return () => {
          var _a;
          return createVNode("div", {
            "class": classNames(`${props2.prefixCls}-custom-content`, `${props2.prefixCls}-${props2.type}`)
          }, [props2.icon || TypeIcon[props2.type], createVNode("span", null, [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)])]);
        };
      }
    });
    var __rest$5 = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const DEFAULT_OFFSET$1 = 8;
    const DEFAULT_DURATION$1 = 3;
    const Holder$1 = /* @__PURE__ */ defineComponent({
      name: "Holder",
      inheritAttrs: false,
      props: ["top", "prefixCls", "getContainer", "maxCount", "duration", "rtl", "transitionName", "onAllRemoved"],
      setup(props2, _ref) {
        let {
          expose
        } = _ref;
        var _a, _b;
        const {
          getPrefixCls,
          getPopupContainer
        } = useConfigInject("message", props2);
        const prefixCls = computed(() => getPrefixCls("message", props2.prefixCls));
        const [, hashId] = useStyle$5(prefixCls);
        const getStyles = () => {
          var _a2;
          const top = (_a2 = props2.top) !== null && _a2 !== void 0 ? _a2 : DEFAULT_OFFSET$1;
          return {
            left: "50%",
            transform: "translateX(-50%)",
            top: typeof top === "number" ? `${top}px` : top
          };
        };
        const getClassName = () => classNames(hashId.value, props2.rtl ? `${prefixCls.value}-rtl` : "");
        const getNotificationMotion = () => {
          var _a2;
          return getMotion$1({
            prefixCls: prefixCls.value,
            animation: (_a2 = props2.animation) !== null && _a2 !== void 0 ? _a2 : `move-up`,
            transitionName: props2.transitionName
          });
        };
        const mergedCloseIcon = createVNode("span", {
          "class": `${prefixCls.value}-close-x`
        }, [createVNode(CloseOutlined, {
          "class": `${prefixCls.value}-close-icon`
        }, null)]);
        const [api2, holder] = useNotification$1({
          //@ts-ignore
          getStyles,
          prefixCls: prefixCls.value,
          getClassName,
          motion: getNotificationMotion,
          closable: false,
          closeIcon: mergedCloseIcon,
          duration: (_a = props2.duration) !== null && _a !== void 0 ? _a : DEFAULT_DURATION$1,
          getContainer: (_b = props2.staticGetContainer) !== null && _b !== void 0 ? _b : getPopupContainer.value,
          maxCount: props2.maxCount,
          onAllRemoved: props2.onAllRemoved
        });
        expose(_extends$1(_extends$1({}, api2), {
          prefixCls,
          hashId
        }));
        return holder;
      }
    });
    let keyIndex = 0;
    function useInternalMessage(messageConfig) {
      const holderRef = shallowRef(null);
      const holderKey = Symbol("messageHolderKey");
      const close = (key2) => {
        var _a;
        (_a = holderRef.value) === null || _a === void 0 ? void 0 : _a.close(key2);
      };
      const open2 = (config) => {
        if (!holderRef.value) {
          const fakeResult = () => {
          };
          fakeResult.then = () => {
          };
          return fakeResult;
        }
        const {
          open: originOpen,
          prefixCls,
          hashId
        } = holderRef.value;
        const noticePrefixCls = `${prefixCls}-notice`;
        const {
          content,
          icon,
          type,
          key: key2,
          class: className,
          onClose
        } = config, restConfig = __rest$5(config, ["content", "icon", "type", "key", "class", "onClose"]);
        let mergedKey = key2;
        if (mergedKey === void 0 || mergedKey === null) {
          keyIndex += 1;
          mergedKey = `antd-message-${keyIndex}`;
        }
        return wrapPromiseFn((resolve2) => {
          originOpen(_extends$1(_extends$1({}, restConfig), {
            key: mergedKey,
            content: () => createVNode(PureContent$1, {
              "prefixCls": prefixCls,
              "type": type,
              "icon": typeof icon === "function" ? icon() : icon
            }, {
              default: () => [typeof content === "function" ? content() : content]
            }),
            placement: "top",
            // @ts-ignore
            class: classNames(type && `${noticePrefixCls}-${type}`, hashId, className),
            onClose: () => {
              onClose === null || onClose === void 0 ? void 0 : onClose();
              resolve2();
            }
          }));
          return () => {
            close(mergedKey);
          };
        });
      };
      const destroy = (key2) => {
        var _a;
        if (key2 !== void 0) {
          close(key2);
        } else {
          (_a = holderRef.value) === null || _a === void 0 ? void 0 : _a.destroy();
        }
      };
      const wrapAPI = {
        open: open2,
        destroy
      };
      const keys2 = ["info", "success", "warning", "error", "loading"];
      keys2.forEach((type) => {
        const typeOpen = (jointContent, duration, onClose) => {
          let config;
          if (jointContent && typeof jointContent === "object" && "content" in jointContent) {
            config = jointContent;
          } else {
            config = {
              content: jointContent
            };
          }
          let mergedDuration;
          let mergedOnClose;
          if (typeof duration === "function") {
            mergedOnClose = duration;
          } else {
            mergedDuration = duration;
            mergedOnClose = onClose;
          }
          const mergedConfig = _extends$1(_extends$1({
            onClose: mergedOnClose,
            duration: mergedDuration
          }, config), {
            type
          });
          return open2(mergedConfig);
        };
        wrapAPI[type] = typeOpen;
      });
      return [wrapAPI, () => createVNode(Holder$1, _objectSpread2$1(_objectSpread2$1({
        "key": holderKey
      }, messageConfig), {}, {
        "ref": holderRef
      }), null)];
    }
    function useMessage(messageConfig) {
      return useInternalMessage(messageConfig);
    }
    let defaultDuration$1 = 3;
    let defaultTop$1;
    let messageInstance;
    let key = 1;
    let localPrefixCls = "";
    let transitionName = "move-up";
    let hasTransitionName = false;
    let getContainer = () => document.body;
    let maxCount$1;
    let rtl$1 = false;
    function getKeyThenIncreaseKey() {
      return key++;
    }
    function setMessageConfig(options) {
      if (options.top !== void 0) {
        defaultTop$1 = options.top;
        messageInstance = null;
      }
      if (options.duration !== void 0) {
        defaultDuration$1 = options.duration;
      }
      if (options.prefixCls !== void 0) {
        localPrefixCls = options.prefixCls;
      }
      if (options.getContainer !== void 0) {
        getContainer = options.getContainer;
        messageInstance = null;
      }
      if (options.transitionName !== void 0) {
        transitionName = options.transitionName;
        messageInstance = null;
        hasTransitionName = true;
      }
      if (options.maxCount !== void 0) {
        maxCount$1 = options.maxCount;
        messageInstance = null;
      }
      if (options.rtl !== void 0) {
        rtl$1 = options.rtl;
      }
    }
    function getMessageInstance(args, callback) {
      if (messageInstance) {
        callback(messageInstance);
        return;
      }
      Notification$1.newInstance({
        appContext: args.appContext,
        prefixCls: args.prefixCls || localPrefixCls,
        rootPrefixCls: args.rootPrefixCls,
        transitionName,
        hasTransitionName,
        style: {
          top: defaultTop$1
        },
        getContainer: getContainer || args.getPopupContainer,
        maxCount: maxCount$1,
        name: "message",
        useStyle: useStyle$5
      }, (instance) => {
        if (messageInstance) {
          callback(messageInstance);
          return;
        }
        messageInstance = instance;
        callback(instance);
      });
    }
    const typeToIcon$2 = {
      info: InfoCircleFilled,
      success: CheckCircleFilled,
      error: CloseCircleFilled,
      warning: ExclamationCircleFilled,
      loading: LoadingOutlined
    };
    const typeList = Object.keys(typeToIcon$2);
    function notice$1(args) {
      const duration = args.duration !== void 0 ? args.duration : defaultDuration$1;
      const target = args.key || getKeyThenIncreaseKey();
      const closePromise = new Promise((resolve2) => {
        const callback = () => {
          if (typeof args.onClose === "function") {
            args.onClose();
          }
          return resolve2(true);
        };
        getMessageInstance(args, (instance) => {
          instance.notice({
            key: target,
            duration,
            style: args.style || {},
            class: args.class,
            content: (_ref) => {
              let {
                prefixCls
              } = _ref;
              const Icon2 = typeToIcon$2[args.type];
              const iconNode = Icon2 ? createVNode(Icon2, null, null) : "";
              const messageClass = classNames(`${prefixCls}-custom-content`, {
                [`${prefixCls}-${args.type}`]: args.type,
                [`${prefixCls}-rtl`]: rtl$1 === true
              });
              return createVNode("div", {
                "class": messageClass
              }, [typeof args.icon === "function" ? args.icon() : args.icon || iconNode, createVNode("span", null, [typeof args.content === "function" ? args.content() : args.content])]);
            },
            onClose: callback,
            onClick: args.onClick
          });
        });
      });
      const result = () => {
        if (messageInstance) {
          messageInstance.removeNotice(target);
        }
      };
      result.then = (filled, rejected) => closePromise.then(filled, rejected);
      result.promise = closePromise;
      return result;
    }
    function isArgsProps(content) {
      return Object.prototype.toString.call(content) === "[object Object]" && !!content.content;
    }
    const api$1 = {
      open: notice$1,
      config: setMessageConfig,
      destroy(messageKey) {
        if (messageInstance) {
          if (messageKey) {
            const {
              removeNotice
            } = messageInstance;
            removeNotice(messageKey);
          } else {
            const {
              destroy
            } = messageInstance;
            destroy();
            messageInstance = null;
          }
        }
      }
    };
    function attachTypeApi(originalApi, type) {
      originalApi[type] = (content, duration, onClose) => {
        if (isArgsProps(content)) {
          return originalApi.open(_extends$1(_extends$1({}, content), {
            type
          }));
        }
        if (typeof duration === "function") {
          onClose = duration;
          duration = void 0;
        }
        return originalApi.open({
          content,
          duration,
          type,
          onClose
        });
      };
    }
    typeList.forEach((type) => attachTypeApi(api$1, type));
    api$1.warn = api$1.warning;
    api$1.useMessage = useMessage;
    const genNotificationPlacementStyle = (token2) => {
      const {
        componentCls,
        width,
        notificationMarginEdge
      } = token2;
      const notificationTopFadeIn = new Keyframe("antNotificationTopFadeIn", {
        "0%": {
          marginTop: "-100%",
          opacity: 0
        },
        "100%": {
          marginTop: 0,
          opacity: 1
        }
      });
      const notificationBottomFadeIn = new Keyframe("antNotificationBottomFadeIn", {
        "0%": {
          marginBottom: "-100%",
          opacity: 0
        },
        "100%": {
          marginBottom: 0,
          opacity: 1
        }
      });
      const notificationLeftFadeIn = new Keyframe("antNotificationLeftFadeIn", {
        "0%": {
          right: {
            _skip_check_: true,
            value: width
          },
          opacity: 0
        },
        "100%": {
          right: {
            _skip_check_: true,
            value: 0
          },
          opacity: 1
        }
      });
      return {
        [`&${componentCls}-top, &${componentCls}-bottom`]: {
          marginInline: 0
        },
        [`&${componentCls}-top`]: {
          [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
            animationName: notificationTopFadeIn
          }
        },
        [`&${componentCls}-bottom`]: {
          [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
            animationName: notificationBottomFadeIn
          }
        },
        [`&${componentCls}-topLeft, &${componentCls}-bottomLeft`]: {
          marginInlineEnd: 0,
          marginInlineStart: notificationMarginEdge,
          [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
            animationName: notificationLeftFadeIn
          }
        }
      };
    };
    const genNotificationStyle = (token2) => {
      const {
        iconCls,
        componentCls,
        // .ant-notification
        boxShadowSecondary,
        fontSizeLG,
        notificationMarginBottom,
        borderRadiusLG,
        colorSuccess,
        colorInfo,
        colorWarning,
        colorError,
        colorTextHeading,
        notificationBg,
        notificationPadding,
        notificationMarginEdge,
        motionDurationMid,
        motionEaseInOut,
        fontSize,
        lineHeight,
        width,
        notificationIconSize
      } = token2;
      const noticeCls = `${componentCls}-notice`;
      const notificationFadeIn = new Keyframe("antNotificationFadeIn", {
        "0%": {
          left: {
            _skip_check_: true,
            value: width
          },
          opacity: 0
        },
        "100%": {
          left: {
            _skip_check_: true,
            value: 0
          },
          opacity: 1
        }
      });
      const notificationFadeOut = new Keyframe("antNotificationFadeOut", {
        "0%": {
          maxHeight: token2.animationMaxHeight,
          marginBottom: notificationMarginBottom,
          opacity: 1
        },
        "100%": {
          maxHeight: 0,
          marginBottom: 0,
          paddingTop: 0,
          paddingBottom: 0,
          opacity: 0
        }
      });
      return [
        // ============================ Holder ============================
        {
          [componentCls]: _extends$1(_extends$1(_extends$1(_extends$1({}, resetComponent(token2)), {
            position: "fixed",
            zIndex: token2.zIndexPopup,
            marginInlineEnd: notificationMarginEdge,
            [`${componentCls}-hook-holder`]: {
              position: "relative"
            },
            [`&${componentCls}-top, &${componentCls}-bottom`]: {
              [`${componentCls}-notice`]: {
                marginInline: "auto auto"
              }
            },
            [`&${componentCls}-topLeft, &${componentCls}-bottomLeft`]: {
              [`${componentCls}-notice`]: {
                marginInlineEnd: "auto",
                marginInlineStart: 0
              }
            },
            //  animation
            [`${componentCls}-fade-enter, ${componentCls}-fade-appear`]: {
              animationDuration: token2.motionDurationMid,
              animationTimingFunction: motionEaseInOut,
              animationFillMode: "both",
              opacity: 0,
              animationPlayState: "paused"
            },
            [`${componentCls}-fade-leave`]: {
              animationTimingFunction: motionEaseInOut,
              animationFillMode: "both",
              animationDuration: motionDurationMid,
              animationPlayState: "paused"
            },
            [`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
              animationName: notificationFadeIn,
              animationPlayState: "running"
            },
            [`${componentCls}-fade-leave${componentCls}-fade-leave-active`]: {
              animationName: notificationFadeOut,
              animationPlayState: "running"
            }
          }), genNotificationPlacementStyle(token2)), {
            // RTL
            "&-rtl": {
              direction: "rtl",
              [`${componentCls}-notice-btn`]: {
                float: "left"
              }
            }
          })
        },
        // ============================ Notice ============================
        {
          [noticeCls]: {
            position: "relative",
            width,
            maxWidth: `calc(100vw - ${notificationMarginEdge * 2}px)`,
            marginBottom: notificationMarginBottom,
            marginInlineStart: "auto",
            padding: notificationPadding,
            overflow: "hidden",
            lineHeight,
            wordWrap: "break-word",
            background: notificationBg,
            borderRadius: borderRadiusLG,
            boxShadow: boxShadowSecondary,
            [`${componentCls}-close-icon`]: {
              fontSize,
              cursor: "pointer"
            },
            [`${noticeCls}-message`]: {
              marginBottom: token2.marginXS,
              color: colorTextHeading,
              fontSize: fontSizeLG,
              lineHeight: token2.lineHeightLG
            },
            [`${noticeCls}-description`]: {
              fontSize
            },
            [`&${noticeCls}-closable ${noticeCls}-message`]: {
              paddingInlineEnd: token2.paddingLG
            },
            [`${noticeCls}-with-icon ${noticeCls}-message`]: {
              marginBottom: token2.marginXS,
              marginInlineStart: token2.marginSM + notificationIconSize,
              fontSize: fontSizeLG
            },
            [`${noticeCls}-with-icon ${noticeCls}-description`]: {
              marginInlineStart: token2.marginSM + notificationIconSize,
              fontSize
            },
            // Icon & color style in different selector level
            // https://github.com/ant-design/ant-design/issues/16503
            // https://github.com/ant-design/ant-design/issues/15512
            [`${noticeCls}-icon`]: {
              position: "absolute",
              fontSize: notificationIconSize,
              lineHeight: 0,
              // icon-font
              [`&-success${iconCls}`]: {
                color: colorSuccess
              },
              [`&-info${iconCls}`]: {
                color: colorInfo
              },
              [`&-warning${iconCls}`]: {
                color: colorWarning
              },
              [`&-error${iconCls}`]: {
                color: colorError
              }
            },
            [`${noticeCls}-close`]: {
              position: "absolute",
              top: token2.notificationPaddingVertical,
              insetInlineEnd: token2.notificationPaddingHorizontal,
              color: token2.colorIcon,
              outline: "none",
              width: token2.notificationCloseButtonSize,
              height: token2.notificationCloseButtonSize,
              borderRadius: token2.borderRadiusSM,
              transition: `background-color ${token2.motionDurationMid}, color ${token2.motionDurationMid}`,
              display: "flex",
              alignItems: "center",
              justifyContent: "center",
              "&:hover": {
                color: token2.colorIconHover,
                backgroundColor: token2.wireframe ? "transparent" : token2.colorFillContent
              }
            },
            [`${noticeCls}-btn`]: {
              float: "right",
              marginTop: token2.marginSM
            }
          }
        },
        // ============================= Pure =============================
        {
          [`${noticeCls}-pure-panel`]: {
            margin: 0
          }
        }
      ];
    };
    const useStyle$4 = genComponentStyleHook("Notification", (token2) => {
      const notificationPaddingVertical = token2.paddingMD;
      const notificationPaddingHorizontal = token2.paddingLG;
      const notificationToken = merge(token2, {
        // default.less variables
        notificationBg: token2.colorBgElevated,
        notificationPaddingVertical,
        notificationPaddingHorizontal,
        // index.less variables
        notificationPadding: `${token2.paddingMD}px ${token2.paddingContentHorizontalLG}px`,
        notificationMarginBottom: token2.margin,
        notificationMarginEdge: token2.marginLG,
        animationMaxHeight: 150,
        notificationIconSize: token2.fontSizeLG * token2.lineHeightLG,
        notificationCloseButtonSize: token2.controlHeightLG * 0.55
      });
      return [genNotificationStyle(notificationToken)];
    }, (token2) => ({
      zIndexPopup: token2.zIndexPopupBase + 50,
      width: 384
    }));
    function getCloseIcon(prefixCls, closeIcon) {
      return createVNode("span", {
        "class": `${prefixCls}-close-x`
      }, [createVNode(CloseOutlined, {
        "class": `${prefixCls}-close-icon`
      }, null)]);
    }
    ({
      info: createVNode(InfoCircleFilled, null, null),
      success: createVNode(CheckCircleFilled, null, null),
      error: createVNode(CloseCircleFilled, null, null),
      warning: createVNode(ExclamationCircleFilled, null, null),
      loading: createVNode(LoadingOutlined, null, null)
    });
    const typeToIcon$1 = {
      success: CheckCircleFilled,
      info: InfoCircleFilled,
      error: CloseCircleFilled,
      warning: ExclamationCircleFilled
    };
    function PureContent(_ref) {
      let {
        prefixCls,
        icon,
        type,
        message,
        description,
        btn
      } = _ref;
      let iconNode = null;
      if (icon) {
        iconNode = createVNode("span", {
          "class": `${prefixCls}-icon`
        }, [renderHelper(icon)]);
      } else if (type) {
        const Icon2 = typeToIcon$1[type];
        iconNode = createVNode(Icon2, {
          "class": `${prefixCls}-icon ${prefixCls}-icon-${type}`
        }, null);
      }
      return createVNode("div", {
        "class": classNames({
          [`${prefixCls}-with-icon`]: iconNode
        }),
        "role": "alert"
      }, [iconNode, createVNode("div", {
        "class": `${prefixCls}-message`
      }, [message]), createVNode("div", {
        "class": `${prefixCls}-description`
      }, [description]), btn && createVNode("div", {
        "class": `${prefixCls}-btn`
      }, [btn])]);
    }
    function getPlacementStyle(placement, top, bottom) {
      let style;
      top = typeof top === "number" ? `${top}px` : top;
      bottom = typeof bottom === "number" ? `${bottom}px` : bottom;
      switch (placement) {
        case "top":
          style = {
            left: "50%",
            transform: "translateX(-50%)",
            right: "auto",
            top,
            bottom: "auto"
          };
          break;
        case "topLeft":
          style = {
            left: 0,
            top,
            bottom: "auto"
          };
          break;
        case "topRight":
          style = {
            right: 0,
            top,
            bottom: "auto"
          };
          break;
        case "bottom":
          style = {
            left: "50%",
            transform: "translateX(-50%)",
            right: "auto",
            top: "auto",
            bottom
          };
          break;
        case "bottomLeft":
          style = {
            left: 0,
            top: "auto",
            bottom
          };
          break;
        default:
          style = {
            right: 0,
            top: "auto",
            bottom
          };
          break;
      }
      return style;
    }
    function getMotion(prefixCls) {
      return {
        name: `${prefixCls}-fade`
      };
    }
    var __rest$4 = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const DEFAULT_OFFSET = 24;
    const DEFAULT_DURATION = 4.5;
    const Holder = /* @__PURE__ */ defineComponent({
      name: "Holder",
      inheritAttrs: false,
      props: ["prefixCls", "class", "type", "icon", "content", "onAllRemoved"],
      setup(props2, _ref) {
        let {
          expose
        } = _ref;
        const {
          getPrefixCls,
          getPopupContainer
        } = useConfigInject("notification", props2);
        const prefixCls = computed(() => props2.prefixCls || getPrefixCls("notification"));
        const getStyles = (placement) => {
          var _a, _b;
          return getPlacementStyle(placement, (_a = props2.top) !== null && _a !== void 0 ? _a : DEFAULT_OFFSET, (_b = props2.bottom) !== null && _b !== void 0 ? _b : DEFAULT_OFFSET);
        };
        const [, hashId] = useStyle$4(prefixCls);
        const getClassName = () => classNames(hashId.value, {
          [`${prefixCls.value}-rtl`]: props2.rtl
        });
        const getNotificationMotion = () => getMotion(prefixCls.value);
        const [api2, holder] = useNotification$1({
          prefixCls: prefixCls.value,
          getStyles,
          getClassName,
          motion: getNotificationMotion,
          closable: true,
          closeIcon: getCloseIcon(prefixCls.value),
          duration: DEFAULT_DURATION,
          getContainer: () => {
            var _a, _b;
            return ((_a = props2.getPopupContainer) === null || _a === void 0 ? void 0 : _a.call(props2)) || ((_b = getPopupContainer.value) === null || _b === void 0 ? void 0 : _b.call(getPopupContainer)) || document.body;
          },
          maxCount: props2.maxCount,
          hashId: hashId.value,
          onAllRemoved: props2.onAllRemoved
        });
        expose(_extends$1(_extends$1({}, api2), {
          prefixCls: prefixCls.value,
          hashId
        }));
        return holder;
      }
    });
    function useInternalNotification(notificationConfig) {
      const holderRef = shallowRef(null);
      const holderKey = Symbol("notificationHolderKey");
      const open2 = (config) => {
        if (!holderRef.value) {
          return;
        }
        const {
          open: originOpen,
          prefixCls,
          hashId
        } = holderRef.value;
        const noticePrefixCls = `${prefixCls}-notice`;
        const {
          message,
          description,
          icon,
          type,
          btn,
          class: className
        } = config, restConfig = __rest$4(config, ["message", "description", "icon", "type", "btn", "class"]);
        return originOpen(_extends$1(_extends$1({
          placement: "topRight"
        }, restConfig), {
          content: () => createVNode(PureContent, {
            "prefixCls": noticePrefixCls,
            "icon": typeof icon === "function" ? icon() : icon,
            "type": type,
            "message": typeof message === "function" ? message() : message,
            "description": typeof description === "function" ? description() : description,
            "btn": typeof btn === "function" ? btn() : btn
          }, null),
          // @ts-ignore
          class: classNames(type && `${noticePrefixCls}-${type}`, hashId, className)
        }));
      };
      const destroy = (key2) => {
        var _a, _b;
        if (key2 !== void 0) {
          (_a = holderRef.value) === null || _a === void 0 ? void 0 : _a.close(key2);
        } else {
          (_b = holderRef.value) === null || _b === void 0 ? void 0 : _b.destroy();
        }
      };
      const wrapAPI = {
        open: open2,
        destroy
      };
      const keys2 = ["success", "info", "warning", "error"];
      keys2.forEach((type) => {
        wrapAPI[type] = (config) => open2(_extends$1(_extends$1({}, config), {
          type
        }));
      });
      return [wrapAPI, () => createVNode(Holder, _objectSpread2$1(_objectSpread2$1({
        "key": holderKey
      }, notificationConfig), {}, {
        "ref": holderRef
      }), null)];
    }
    function useNotification(notificationConfig) {
      return useInternalNotification(notificationConfig);
    }
    const notificationInstance = {};
    let defaultDuration = 4.5;
    let defaultTop = "24px";
    let defaultBottom = "24px";
    let defaultPrefixCls$1 = "";
    let defaultPlacement = "topRight";
    let defaultGetContainer = () => document.body;
    let defaultCloseIcon = null;
    let rtl = false;
    let maxCount;
    function setNotificationConfig(options) {
      const {
        duration,
        placement,
        bottom,
        top,
        getContainer: getContainer2,
        closeIcon,
        prefixCls
      } = options;
      if (prefixCls !== void 0) {
        defaultPrefixCls$1 = prefixCls;
      }
      if (duration !== void 0) {
        defaultDuration = duration;
      }
      if (placement !== void 0) {
        defaultPlacement = placement;
      }
      if (bottom !== void 0) {
        defaultBottom = typeof bottom === "number" ? `${bottom}px` : bottom;
      }
      if (top !== void 0) {
        defaultTop = typeof top === "number" ? `${top}px` : top;
      }
      if (getContainer2 !== void 0) {
        defaultGetContainer = getContainer2;
      }
      if (closeIcon !== void 0) {
        defaultCloseIcon = closeIcon;
      }
      if (options.rtl !== void 0) {
        rtl = options.rtl;
      }
      if (options.maxCount !== void 0) {
        maxCount = options.maxCount;
      }
    }
    function getNotificationInstance(_ref, callback) {
      let {
        prefixCls: customizePrefixCls,
        placement = defaultPlacement,
        getContainer: getContainer2 = defaultGetContainer,
        top,
        bottom,
        closeIcon = defaultCloseIcon,
        appContext
      } = _ref;
      const {
        getPrefixCls
      } = globalConfig();
      const prefixCls = getPrefixCls("notification", customizePrefixCls || defaultPrefixCls$1);
      const cacheKey = `${prefixCls}-${placement}-${rtl}`;
      const cacheInstance = notificationInstance[cacheKey];
      if (cacheInstance) {
        Promise.resolve(cacheInstance).then((instance) => {
          callback(instance);
        });
        return;
      }
      const notificationClass = classNames(`${prefixCls}-${placement}`, {
        [`${prefixCls}-rtl`]: rtl === true
      });
      Notification$1.newInstance({
        name: "notification",
        prefixCls: customizePrefixCls || defaultPrefixCls$1,
        useStyle: useStyle$4,
        class: notificationClass,
        style: getPlacementStyle(placement, top !== null && top !== void 0 ? top : defaultTop, bottom !== null && bottom !== void 0 ? bottom : defaultBottom),
        appContext,
        getContainer: getContainer2,
        closeIcon: (_ref2) => {
          let {
            prefixCls: prefixCls2
          } = _ref2;
          const closeIconToRender = createVNode("span", {
            "class": `${prefixCls2}-close-x`
          }, [renderHelper(closeIcon, {}, createVNode(CloseOutlined, {
            "class": `${prefixCls2}-close-icon`
          }, null))]);
          return closeIconToRender;
        },
        maxCount,
        hasTransitionName: true
      }, (notification) => {
        notificationInstance[cacheKey] = notification;
        callback(notification);
      });
    }
    const typeToIcon = {
      success: CheckCircleOutlined,
      info: InfoCircleOutlined,
      error: CloseCircleOutlined,
      warning: ExclamationCircleOutlined
    };
    function notice(args) {
      const {
        icon,
        type,
        description,
        message,
        btn
      } = args;
      const duration = args.duration === void 0 ? defaultDuration : args.duration;
      getNotificationInstance(args, (notification) => {
        notification.notice({
          content: (_ref3) => {
            let {
              prefixCls: outerPrefixCls
            } = _ref3;
            const prefixCls = `${outerPrefixCls}-notice`;
            let iconNode = null;
            if (icon) {
              iconNode = () => createVNode("span", {
                "class": `${prefixCls}-icon`
              }, [renderHelper(icon)]);
            } else if (type) {
              const Icon2 = typeToIcon[type];
              iconNode = () => createVNode(Icon2, {
                "class": `${prefixCls}-icon ${prefixCls}-icon-${type}`
              }, null);
            }
            return createVNode("div", {
              "class": iconNode ? `${prefixCls}-with-icon` : ""
            }, [iconNode && iconNode(), createVNode("div", {
              "class": `${prefixCls}-message`
            }, [!description && iconNode ? createVNode("span", {
              "class": `${prefixCls}-message-single-line-auto-margin`
            }, null) : null, renderHelper(message)]), createVNode("div", {
              "class": `${prefixCls}-description`
            }, [renderHelper(description)]), btn ? createVNode("span", {
              "class": `${prefixCls}-btn`
            }, [renderHelper(btn)]) : null]);
          },
          duration,
          closable: true,
          onClose: args.onClose,
          onClick: args.onClick,
          key: args.key,
          style: args.style || {},
          class: args.class
        });
      });
    }
    const api = {
      open: notice,
      close(key2) {
        Object.keys(notificationInstance).forEach((cacheKey) => Promise.resolve(notificationInstance[cacheKey]).then((instance) => {
          instance.removeNotice(key2);
        }));
      },
      config: setNotificationConfig,
      destroy() {
        Object.keys(notificationInstance).forEach((cacheKey) => {
          Promise.resolve(notificationInstance[cacheKey]).then((instance) => {
            instance.destroy();
          });
          delete notificationInstance[cacheKey];
        });
      }
    };
    const iconTypes = ["success", "info", "warning", "error"];
    iconTypes.forEach((type) => {
      api[type] = (args) => api.open(_extends$1(_extends$1({}, args), {
        type
      }));
    });
    api.warn = api.warning;
    api.useNotification = useNotification;
    const dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;
    function getStyle(globalPrefixCls, theme) {
      const variables = {};
      const formatColor = (color, updater) => {
        let clone = color.clone();
        clone = (updater === null || updater === void 0 ? void 0 : updater(clone)) || clone;
        return clone.toRgbString();
      };
      const fillColor = (colorVal, type) => {
        const baseColor = new TinyColor(colorVal);
        const colorPalettes = generate$1(baseColor.toRgbString());
        variables[`${type}-color`] = formatColor(baseColor);
        variables[`${type}-color-disabled`] = colorPalettes[1];
        variables[`${type}-color-hover`] = colorPalettes[4];
        variables[`${type}-color-active`] = colorPalettes[6];
        variables[`${type}-color-outline`] = baseColor.clone().setAlpha(0.2).toRgbString();
        variables[`${type}-color-deprecated-bg`] = colorPalettes[0];
        variables[`${type}-color-deprecated-border`] = colorPalettes[2];
      };
      if (theme.primaryColor) {
        fillColor(theme.primaryColor, "primary");
        const primaryColor = new TinyColor(theme.primaryColor);
        const primaryColors = generate$1(primaryColor.toRgbString());
        primaryColors.forEach((color, index2) => {
          variables[`primary-${index2 + 1}`] = color;
        });
        variables["primary-color-deprecated-l-35"] = formatColor(primaryColor, (c2) => c2.lighten(35));
        variables["primary-color-deprecated-l-20"] = formatColor(primaryColor, (c2) => c2.lighten(20));
        variables["primary-color-deprecated-t-20"] = formatColor(primaryColor, (c2) => c2.tint(20));
        variables["primary-color-deprecated-t-50"] = formatColor(primaryColor, (c2) => c2.tint(50));
        variables["primary-color-deprecated-f-12"] = formatColor(primaryColor, (c2) => c2.setAlpha(c2.getAlpha() * 0.12));
        const primaryActiveColor = new TinyColor(primaryColors[0]);
        variables["primary-color-active-deprecated-f-30"] = formatColor(primaryActiveColor, (c2) => c2.setAlpha(c2.getAlpha() * 0.3));
        variables["primary-color-active-deprecated-d-02"] = formatColor(primaryActiveColor, (c2) => c2.darken(2));
      }
      if (theme.successColor) {
        fillColor(theme.successColor, "success");
      }
      if (theme.warningColor) {
        fillColor(theme.warningColor, "warning");
      }
      if (theme.errorColor) {
        fillColor(theme.errorColor, "error");
      }
      if (theme.infoColor) {
        fillColor(theme.infoColor, "info");
      }
      const cssList = Object.keys(variables).map((key2) => `--${globalPrefixCls}-${key2}: ${variables[key2]};`);
      return `
  :root {
    ${cssList.join("\n")}
  }
  `.trim();
    }
    function registerTheme(globalPrefixCls, theme) {
      const style = getStyle(globalPrefixCls, theme);
      if (canUseDom$1()) {
        updateCSS$1(style, `${dynamicStyleMark}-dynamic-theme`);
      }
    }
    const useStyle$3 = (iconPrefixCls) => {
      const [theme, token2] = useToken();
      return useStyleRegister(computed(() => ({
        theme: theme.value,
        token: token2.value,
        hashId: "",
        path: ["ant-design-icons", iconPrefixCls.value]
      })), () => [{
        [`.${iconPrefixCls.value}`]: _extends$1(_extends$1({}, resetIcon()), {
          [`.${iconPrefixCls.value} .${iconPrefixCls.value}-icon`]: {
            display: "block"
          }
        })
      }]);
    };
    function useTheme(theme, parentTheme) {
      const themeConfig = computed(() => (theme === null || theme === void 0 ? void 0 : theme.value) || {});
      const parentThemeConfig = computed(() => themeConfig.value.inherit === false || !(parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.value) ? defaultConfig : parentTheme.value);
      const mergedTheme = computed(() => {
        if (!(theme === null || theme === void 0 ? void 0 : theme.value)) {
          return parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.value;
        }
        const mergedComponents = _extends$1({}, parentThemeConfig.value.components);
        Object.keys(theme.value.components || {}).forEach((componentName) => {
          mergedComponents[componentName] = _extends$1(_extends$1({}, mergedComponents[componentName]), theme.value.components[componentName]);
        });
        return _extends$1(_extends$1(_extends$1({}, parentThemeConfig.value), themeConfig.value), {
          token: _extends$1(_extends$1({}, parentThemeConfig.value.token), themeConfig.value.token),
          components: mergedComponents
        });
      });
      return mergedTheme;
    }
    var __rest$3 = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const defaultPrefixCls = "ant";
    function getGlobalPrefixCls() {
      return globalConfigForApi.prefixCls || defaultPrefixCls;
    }
    function getGlobalIconPrefixCls() {
      return globalConfigForApi.iconPrefixCls || defaultIconPrefixCls;
    }
    const globalConfigBySet = reactive({});
    const globalConfigForApi = reactive({});
    watchEffect(() => {
      _extends$1(globalConfigForApi, globalConfigBySet);
      globalConfigForApi.prefixCls = getGlobalPrefixCls();
      globalConfigForApi.iconPrefixCls = getGlobalIconPrefixCls();
      globalConfigForApi.getPrefixCls = (suffixCls, customizePrefixCls) => {
        if (customizePrefixCls) return customizePrefixCls;
        return suffixCls ? `${globalConfigForApi.prefixCls}-${suffixCls}` : globalConfigForApi.prefixCls;
      };
      globalConfigForApi.getRootPrefixCls = () => {
        if (globalConfigForApi.prefixCls) {
          return globalConfigForApi.prefixCls;
        }
        return getGlobalPrefixCls();
      };
    });
    let stopWatchEffect;
    const setGlobalConfig = (params) => {
      if (stopWatchEffect) {
        stopWatchEffect();
      }
      stopWatchEffect = watchEffect(() => {
        _extends$1(globalConfigBySet, reactive(params));
        _extends$1(globalConfigForApi, reactive(params));
      });
      if (params.theme) {
        registerTheme(getGlobalPrefixCls(), params.theme);
      }
    };
    const globalConfig = () => ({
      getPrefixCls: (suffixCls, customizePrefixCls) => {
        if (customizePrefixCls) return customizePrefixCls;
        return suffixCls ? `${getGlobalPrefixCls()}-${suffixCls}` : getGlobalPrefixCls();
      },
      getIconPrefixCls: getGlobalIconPrefixCls,
      getRootPrefixCls: () => {
        if (globalConfigForApi.prefixCls) {
          return globalConfigForApi.prefixCls;
        }
        return getGlobalPrefixCls();
      }
    });
    const ConfigProvider = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "AConfigProvider",
      inheritAttrs: false,
      props: configProviderProps(),
      setup(props2, _ref) {
        let {
          slots
        } = _ref;
        const parentContext = useConfigContextInject();
        const getPrefixCls = (suffixCls, customizePrefixCls) => {
          const {
            prefixCls = "ant"
          } = props2;
          if (customizePrefixCls) return customizePrefixCls;
          const mergedPrefixCls = prefixCls || parentContext.getPrefixCls("");
          return suffixCls ? `${mergedPrefixCls}-${suffixCls}` : mergedPrefixCls;
        };
        const iconPrefixCls = computed(() => props2.iconPrefixCls || parentContext.iconPrefixCls.value || defaultIconPrefixCls);
        const shouldWrapSSR = computed(() => iconPrefixCls.value !== parentContext.iconPrefixCls.value);
        const csp = computed(() => {
          var _a;
          return props2.csp || ((_a = parentContext.csp) === null || _a === void 0 ? void 0 : _a.value);
        });
        const wrapSSR = useStyle$3(iconPrefixCls);
        const mergedTheme = useTheme(computed(() => props2.theme), computed(() => {
          var _a;
          return (_a = parentContext.theme) === null || _a === void 0 ? void 0 : _a.value;
        }));
        const renderEmptyComponent = (name) => {
          const renderEmpty$1 = props2.renderEmpty || slots.renderEmpty || parentContext.renderEmpty || renderEmpty;
          return renderEmpty$1(name);
        };
        const autoInsertSpaceInButton = computed(() => {
          var _a, _b;
          return (_a = props2.autoInsertSpaceInButton) !== null && _a !== void 0 ? _a : (_b = parentContext.autoInsertSpaceInButton) === null || _b === void 0 ? void 0 : _b.value;
        });
        const locale$12 = computed(() => {
          var _a;
          return props2.locale || ((_a = parentContext.locale) === null || _a === void 0 ? void 0 : _a.value);
        });
        watch(locale$12, () => {
          globalConfigBySet.locale = locale$12.value;
        }, {
          immediate: true
        });
        const direction = computed(() => {
          var _a;
          return props2.direction || ((_a = parentContext.direction) === null || _a === void 0 ? void 0 : _a.value);
        });
        const space = computed(() => {
          var _a, _b;
          return (_a = props2.space) !== null && _a !== void 0 ? _a : (_b = parentContext.space) === null || _b === void 0 ? void 0 : _b.value;
        });
        const virtual = computed(() => {
          var _a, _b;
          return (_a = props2.virtual) !== null && _a !== void 0 ? _a : (_b = parentContext.virtual) === null || _b === void 0 ? void 0 : _b.value;
        });
        const dropdownMatchSelectWidth = computed(() => {
          var _a, _b;
          return (_a = props2.dropdownMatchSelectWidth) !== null && _a !== void 0 ? _a : (_b = parentContext.dropdownMatchSelectWidth) === null || _b === void 0 ? void 0 : _b.value;
        });
        const getTargetContainer = computed(() => {
          var _a;
          return props2.getTargetContainer !== void 0 ? props2.getTargetContainer : (_a = parentContext.getTargetContainer) === null || _a === void 0 ? void 0 : _a.value;
        });
        const getPopupContainer = computed(() => {
          var _a;
          return props2.getPopupContainer !== void 0 ? props2.getPopupContainer : (_a = parentContext.getPopupContainer) === null || _a === void 0 ? void 0 : _a.value;
        });
        const pageHeader = computed(() => {
          var _a;
          return props2.pageHeader !== void 0 ? props2.pageHeader : (_a = parentContext.pageHeader) === null || _a === void 0 ? void 0 : _a.value;
        });
        const input = computed(() => {
          var _a;
          return props2.input !== void 0 ? props2.input : (_a = parentContext.input) === null || _a === void 0 ? void 0 : _a.value;
        });
        const pagination = computed(() => {
          var _a;
          return props2.pagination !== void 0 ? props2.pagination : (_a = parentContext.pagination) === null || _a === void 0 ? void 0 : _a.value;
        });
        const form = computed(() => {
          var _a;
          return props2.form !== void 0 ? props2.form : (_a = parentContext.form) === null || _a === void 0 ? void 0 : _a.value;
        });
        const select = computed(() => {
          var _a;
          return props2.select !== void 0 ? props2.select : (_a = parentContext.select) === null || _a === void 0 ? void 0 : _a.value;
        });
        const componentSize = computed(() => props2.componentSize);
        const componentDisabled = computed(() => props2.componentDisabled);
        const wave = computed(() => {
          var _a, _b;
          return (_a = props2.wave) !== null && _a !== void 0 ? _a : (_b = parentContext.wave) === null || _b === void 0 ? void 0 : _b.value;
        });
        const configProvider = {
          csp,
          autoInsertSpaceInButton,
          locale: locale$12,
          direction,
          space,
          virtual,
          dropdownMatchSelectWidth,
          getPrefixCls,
          iconPrefixCls,
          theme: computed(() => {
            var _a, _b;
            return (_a = mergedTheme.value) !== null && _a !== void 0 ? _a : (_b = parentContext.theme) === null || _b === void 0 ? void 0 : _b.value;
          }),
          renderEmpty: renderEmptyComponent,
          getTargetContainer,
          getPopupContainer,
          pageHeader,
          input,
          pagination,
          form,
          select,
          componentSize,
          componentDisabled,
          transformCellText: computed(() => props2.transformCellText),
          wave
        };
        const memoTheme = computed(() => {
          const _a = mergedTheme.value || {}, {
            algorithm,
            token: token2
          } = _a, rest = __rest$3(_a, ["algorithm", "token"]);
          const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : void 0;
          return _extends$1(_extends$1({}, rest), {
            theme: themeObj,
            token: _extends$1(_extends$1({}, seedToken), token2)
          });
        });
        const validateMessagesRef = computed(() => {
          var _a, _b;
          let validateMessages = {};
          if (locale$12.value) {
            validateMessages = ((_a = locale$12.value.Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || ((_b = localeValues.Form) === null || _b === void 0 ? void 0 : _b.defaultValidateMessages) || {};
          }
          if (props2.form && props2.form.validateMessages) {
            validateMessages = _extends$1(_extends$1({}, validateMessages), props2.form.validateMessages);
          }
          return validateMessages;
        });
        useConfigContextProvider(configProvider);
        useProvideGlobalForm({
          validateMessages: validateMessagesRef
        });
        useProviderSize(componentSize);
        useProviderDisabled(componentDisabled);
        const renderProvider = (legacyLocale) => {
          var _a, _b;
          let childNode = shouldWrapSSR.value ? wrapSSR((_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) : (_b = slots.default) === null || _b === void 0 ? void 0 : _b.call(slots);
          if (props2.theme) {
            const _childNode = /* @__PURE__ */ function() {
              return childNode;
            }();
            childNode = createVNode(DesignTokenProvider, {
              "value": memoTheme.value
            }, {
              default: () => [_childNode]
            });
          }
          return createVNode(locale, {
            "locale": locale$12.value || legacyLocale,
            "ANT_MARK__": ANT_MARK
          }, {
            default: () => [childNode]
          });
        };
        watchEffect(() => {
          if (direction.value) {
            api$1.config({
              rtl: direction.value === "rtl"
            });
            api.config({
              rtl: direction.value === "rtl"
            });
          }
        });
        return () => createVNode(LocaleReceiver, {
          "children": (_2, __, legacyLocale) => renderProvider(legacyLocale)
        }, null);
      }
    });
    ConfigProvider.config = setGlobalConfig;
    ConfigProvider.install = function(app) {
      app.component(ConfigProvider.name, ConfigProvider);
    };
    const genTagStatusStyle = (token2, status, cssVariableType) => {
      const capitalizedCssVariableType = capitalize(cssVariableType);
      return {
        [`${token2.componentCls}-${status}`]: {
          color: token2[`color${cssVariableType}`],
          background: token2[`color${capitalizedCssVariableType}Bg`],
          borderColor: token2[`color${capitalizedCssVariableType}Border`],
          [`&${token2.componentCls}-borderless`]: {
            borderColor: "transparent"
          }
        }
      };
    };
    const genPresetStyle = (token2) => genPresetColor(token2, (colorKey, _ref) => {
      let {
        textColor,
        lightBorderColor,
        lightColor,
        darkColor
      } = _ref;
      return {
        [`${token2.componentCls}-${colorKey}`]: {
          color: textColor,
          background: lightColor,
          borderColor: lightBorderColor,
          // Inverse color
          "&-inverse": {
            color: token2.colorTextLightSolid,
            background: darkColor,
            borderColor: darkColor
          },
          [`&${token2.componentCls}-borderless`]: {
            borderColor: "transparent"
          }
        }
      };
    });
    const genBaseStyle = (token2) => {
      const {
        paddingXXS,
        lineWidth,
        tagPaddingHorizontal,
        componentCls
      } = token2;
      const paddingInline = tagPaddingHorizontal - lineWidth;
      const iconMarginInline = paddingXXS - lineWidth;
      return {
        // Result
        [componentCls]: _extends$1(_extends$1({}, resetComponent(token2)), {
          display: "inline-block",
          height: "auto",
          marginInlineEnd: token2.marginXS,
          paddingInline,
          fontSize: token2.tagFontSize,
          lineHeight: `${token2.tagLineHeight}px`,
          whiteSpace: "nowrap",
          background: token2.tagDefaultBg,
          border: `${token2.lineWidth}px ${token2.lineType} ${token2.colorBorder}`,
          borderRadius: token2.borderRadiusSM,
          opacity: 1,
          transition: `all ${token2.motionDurationMid}`,
          textAlign: "start",
          // RTL
          [`&${componentCls}-rtl`]: {
            direction: "rtl"
          },
          "&, a, a:hover": {
            color: token2.tagDefaultColor
          },
          [`${componentCls}-close-icon`]: {
            marginInlineStart: iconMarginInline,
            color: token2.colorTextDescription,
            fontSize: token2.tagIconSize,
            cursor: "pointer",
            transition: `all ${token2.motionDurationMid}`,
            "&:hover": {
              color: token2.colorTextHeading
            }
          },
          [`&${componentCls}-has-color`]: {
            borderColor: "transparent",
            [`&, a, a:hover, ${token2.iconCls}-close, ${token2.iconCls}-close:hover`]: {
              color: token2.colorTextLightSolid
            }
          },
          [`&-checkable`]: {
            backgroundColor: "transparent",
            borderColor: "transparent",
            cursor: "pointer",
            [`&:not(${componentCls}-checkable-checked):hover`]: {
              color: token2.colorPrimary,
              backgroundColor: token2.colorFillSecondary
            },
            "&:active, &-checked": {
              color: token2.colorTextLightSolid
            },
            "&-checked": {
              backgroundColor: token2.colorPrimary,
              "&:hover": {
                backgroundColor: token2.colorPrimaryHover
              }
            },
            "&:active": {
              backgroundColor: token2.colorPrimaryActive
            }
          },
          [`&-hidden`]: {
            display: "none"
          },
          // To ensure that a space will be placed between character and `Icon`.
          [`> ${token2.iconCls} + span, > span + ${token2.iconCls}`]: {
            marginInlineStart: paddingInline
          }
        }),
        [`${componentCls}-borderless`]: {
          borderColor: "transparent",
          background: token2.tagBorderlessBg
        }
      };
    };
    const useStyle$2 = genComponentStyleHook("Tag", (token2) => {
      const {
        fontSize,
        lineHeight,
        lineWidth,
        fontSizeIcon
      } = token2;
      const tagHeight = Math.round(fontSize * lineHeight);
      const tagFontSize = token2.fontSizeSM;
      const tagLineHeight = tagHeight - lineWidth * 2;
      const tagDefaultBg = token2.colorFillAlter;
      const tagDefaultColor = token2.colorText;
      const tagToken = merge(token2, {
        tagFontSize,
        tagLineHeight,
        tagDefaultBg,
        tagDefaultColor,
        tagIconSize: fontSizeIcon - 2 * lineWidth,
        tagPaddingHorizontal: 8,
        tagBorderlessBg: token2.colorFillTertiary
      });
      return [genBaseStyle(tagToken), genPresetStyle(tagToken), genTagStatusStyle(tagToken, "success", "Success"), genTagStatusStyle(tagToken, "processing", "Info"), genTagStatusStyle(tagToken, "error", "Error"), genTagStatusStyle(tagToken, "warning", "Warning")];
    });
    const checkableTagProps = () => ({
      prefixCls: String,
      checked: {
        type: Boolean,
        default: void 0
      },
      onChange: {
        type: Function
      },
      onClick: {
        type: Function
      },
      "onUpdate:checked": Function
    });
    const CheckableTag = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ACheckableTag",
      inheritAttrs: false,
      props: checkableTagProps(),
      // emits: ['update:checked', 'change', 'click'],
      setup(props2, _ref) {
        let {
          slots,
          emit: emit2,
          attrs
        } = _ref;
        const {
          prefixCls
        } = useConfigInject("tag", props2);
        const [wrapSSR, hashId] = useStyle$2(prefixCls);
        const handleClick = (e2) => {
          const {
            checked
          } = props2;
          emit2("update:checked", !checked);
          emit2("change", !checked);
          emit2("click", e2);
        };
        const cls = computed(() => classNames(prefixCls.value, hashId.value, {
          [`${prefixCls.value}-checkable`]: true,
          [`${prefixCls.value}-checkable-checked`]: props2.checked
        }));
        return () => {
          var _a;
          return wrapSSR(createVNode("span", _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "class": [cls.value, attrs.class],
            "onClick": handleClick
          }), [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]));
        };
      }
    });
    const tagProps = () => ({
      prefixCls: String,
      color: {
        type: String
      },
      closable: {
        type: Boolean,
        default: false
      },
      closeIcon: PropTypes.any,
      /** @deprecated `visible` will be removed in next major version. */
      visible: {
        type: Boolean,
        default: void 0
      },
      onClose: {
        type: Function
      },
      onClick: eventType(),
      "onUpdate:visible": Function,
      icon: PropTypes.any,
      bordered: {
        type: Boolean,
        default: true
      }
    });
    const Tag = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ATag",
      inheritAttrs: false,
      props: tagProps(),
      // emits: ['update:visible', 'close'],
      slots: Object,
      setup(props2, _ref) {
        let {
          slots,
          emit: emit2,
          attrs
        } = _ref;
        const {
          prefixCls,
          direction
        } = useConfigInject("tag", props2);
        const [wrapSSR, hashId] = useStyle$2(prefixCls);
        const visible = shallowRef(true);
        watchEffect(() => {
          if (props2.visible !== void 0) {
            visible.value = props2.visible;
          }
        });
        const handleCloseClick = (e2) => {
          e2.stopPropagation();
          emit2("update:visible", false);
          emit2("close", e2);
          if (e2.defaultPrevented) {
            return;
          }
          if (props2.visible === void 0) {
            visible.value = false;
          }
        };
        const isInternalColor = computed(() => isPresetColor(props2.color) || isPresetStatusColor(props2.color));
        const tagClassName = computed(() => classNames(prefixCls.value, hashId.value, {
          [`${prefixCls.value}-${props2.color}`]: isInternalColor.value,
          [`${prefixCls.value}-has-color`]: props2.color && !isInternalColor.value,
          [`${prefixCls.value}-hidden`]: !visible.value,
          [`${prefixCls.value}-rtl`]: direction.value === "rtl",
          [`${prefixCls.value}-borderless`]: !props2.bordered
        }));
        const handleClick = (e2) => {
          emit2("click", e2);
        };
        return () => {
          var _a, _b, _c;
          const {
            icon = (_a = slots.icon) === null || _a === void 0 ? void 0 : _a.call(slots),
            color,
            closeIcon = (_b = slots.closeIcon) === null || _b === void 0 ? void 0 : _b.call(slots),
            closable = false
          } = props2;
          const renderCloseIcon = () => {
            if (closable) {
              return closeIcon ? createVNode("span", {
                "class": `${prefixCls.value}-close-icon`,
                "onClick": handleCloseClick
              }, [closeIcon]) : createVNode(CloseOutlined, {
                "class": `${prefixCls.value}-close-icon`,
                "onClick": handleCloseClick
              }, null);
            }
            return null;
          };
          const tagStyle = {
            backgroundColor: color && !isInternalColor.value ? color : void 0
          };
          const iconNode = icon || null;
          const children = (_c = slots.default) === null || _c === void 0 ? void 0 : _c.call(slots);
          const kids = iconNode ? createVNode(Fragment, null, [iconNode, createVNode("span", null, [children])]) : children;
          const isNeedWave = props2.onClick !== void 0;
          const tagNode = createVNode("span", _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "onClick": handleClick,
            "class": [tagClassName.value, attrs.class],
            "style": [tagStyle, attrs.style]
          }), [kids, renderCloseIcon()]);
          return wrapSSR(isNeedWave ? createVNode(Wave, null, {
            default: () => [tagNode]
          }) : tagNode);
        };
      }
    });
    Tag.CheckableTag = CheckableTag;
    Tag.install = function(app) {
      app.component(Tag.name, Tag);
      app.component(CheckableTag.name, CheckableTag);
      return app;
    };
    const props = () => ({
      prefixCls: String,
      width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
      height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
      style: {
        type: Object,
        default: void 0
      },
      class: String,
      rootClassName: String,
      rootStyle: objectType(),
      placement: {
        type: String
      },
      wrapperClassName: String,
      level: {
        type: [String, Array]
      },
      levelMove: {
        type: [Number, Function, Array]
      },
      duration: String,
      ease: String,
      showMask: {
        type: Boolean,
        default: void 0
      },
      maskClosable: {
        type: Boolean,
        default: void 0
      },
      maskStyle: {
        type: Object,
        default: void 0
      },
      afterVisibleChange: Function,
      keyboard: {
        type: Boolean,
        default: void 0
      },
      contentWrapperStyle: arrayType(),
      autofocus: {
        type: Boolean,
        default: void 0
      },
      open: {
        type: Boolean,
        default: void 0
      },
      // Motion
      motion: functionType(),
      maskMotion: objectType()
    });
    const drawerProps$1 = () => _extends$1(_extends$1({}, props()), {
      forceRender: {
        type: Boolean,
        default: void 0
      },
      getContainer: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object, PropTypes.looseBool])
    });
    const drawerChildProps = () => _extends$1(_extends$1({}, props()), {
      getContainer: Function,
      getOpenCount: Function,
      scrollLocker: PropTypes.any,
      inline: Boolean
    });
    function dataToArray(vars) {
      if (Array.isArray(vars)) {
        return vars;
      }
      return [vars];
    }
    const transitionEndObject = {
      transition: "transitionend",
      WebkitTransition: "webkitTransitionEnd",
      MozTransition: "transitionend",
      OTransition: "oTransitionEnd otransitionend"
    };
    Object.keys(transitionEndObject).filter((key2) => {
      if (typeof document === "undefined") {
        return false;
      }
      const html = document.getElementsByTagName("html")[0];
      return key2 in (html ? html.style : {});
    })[0];
    const windowIsUndefined = !(typeof window !== "undefined" && window.document && window.document.createElement);
    var __rest$2 = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const DrawerChild = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      inheritAttrs: false,
      props: drawerChildProps(),
      emits: ["close", "handleClick", "change"],
      setup(props2, _ref) {
        let {
          emit: emit2,
          slots
        } = _ref;
        const contentWrapper = shallowRef();
        const dom = shallowRef();
        const maskDom = shallowRef();
        const handlerDom = shallowRef();
        const contentDom = shallowRef();
        let levelDom = [];
        `drawer_id_${Number((Date.now() + Math.random()).toString().replace(".", Math.round(Math.random() * 9).toString())).toString(16)}`;
        onMounted(() => {
          nextTick(() => {
            var _a;
            const {
              open: open2,
              getContainer: getContainer2,
              showMask,
              autofocus
            } = props2;
            const container = getContainer2 === null || getContainer2 === void 0 ? void 0 : getContainer2();
            getLevelDom(props2);
            if (open2) {
              if (container && container.parentNode === document.body) ;
              nextTick(() => {
                if (autofocus) {
                  domFocus();
                }
              });
              if (showMask) {
                (_a = props2.scrollLocker) === null || _a === void 0 ? void 0 : _a.lock();
              }
            }
          });
        });
        watch(() => props2.level, () => {
          getLevelDom(props2);
        }, {
          flush: "post"
        });
        watch(() => props2.open, () => {
          const {
            open: open2,
            getContainer: getContainer2,
            scrollLocker,
            showMask,
            autofocus
          } = props2;
          const container = getContainer2 === null || getContainer2 === void 0 ? void 0 : getContainer2();
          if (container && container.parentNode === document.body) ;
          if (open2) {
            if (autofocus) {
              domFocus();
            }
            if (showMask) {
              scrollLocker === null || scrollLocker === void 0 ? void 0 : scrollLocker.lock();
            }
          } else {
            scrollLocker === null || scrollLocker === void 0 ? void 0 : scrollLocker.unLock();
          }
        }, {
          flush: "post"
        });
        onUnmounted(() => {
          var _a;
          const {
            open: open2
          } = props2;
          if (open2) {
            document.body.style.touchAction = "";
          }
          (_a = props2.scrollLocker) === null || _a === void 0 ? void 0 : _a.unLock();
        });
        watch(() => props2.placement, (val) => {
          if (val) {
            contentDom.value = null;
          }
        });
        const domFocus = () => {
          var _a, _b;
          (_b = (_a = dom.value) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
        };
        const onClose = (e2) => {
          emit2("close", e2);
        };
        const onKeyDown = (e2) => {
          if (e2.keyCode === KeyCode.ESC) {
            e2.stopPropagation();
            onClose(e2);
          }
        };
        const onAfterVisibleChange = () => {
          const {
            open: open2,
            afterVisibleChange
          } = props2;
          if (afterVisibleChange) {
            afterVisibleChange(!!open2);
          }
        };
        const getLevelDom = (_ref2) => {
          let {
            level,
            getContainer: getContainer2
          } = _ref2;
          if (windowIsUndefined) {
            return;
          }
          const container = getContainer2 === null || getContainer2 === void 0 ? void 0 : getContainer2();
          const parent2 = container ? container.parentNode : null;
          levelDom = [];
          if (level === "all") {
            const children = parent2 ? Array.prototype.slice.call(parent2.children) : [];
            children.forEach((child) => {
              if (child.nodeName !== "SCRIPT" && child.nodeName !== "STYLE" && child.nodeName !== "LINK" && child !== container) {
                levelDom.push(child);
              }
            });
          } else if (level) {
            dataToArray(level).forEach((key2) => {
              document.querySelectorAll(key2).forEach((item) => {
                levelDom.push(item);
              });
            });
          }
        };
        const onHandleClick = (e2) => {
          emit2("handleClick", e2);
        };
        const canOpen = shallowRef(false);
        watch(dom, () => {
          nextTick(() => {
            canOpen.value = true;
          });
        });
        return () => {
          var _a, _b;
          const {
            width,
            height,
            open: $open,
            prefixCls,
            placement,
            level,
            levelMove,
            ease,
            duration,
            getContainer: getContainer2,
            onChange,
            afterVisibleChange,
            showMask,
            maskClosable,
            maskStyle,
            keyboard,
            getOpenCount,
            scrollLocker,
            contentWrapperStyle,
            style,
            class: className,
            rootClassName,
            rootStyle,
            maskMotion,
            motion,
            inline
          } = props2, otherProps = __rest$2(props2, ["width", "height", "open", "prefixCls", "placement", "level", "levelMove", "ease", "duration", "getContainer", "onChange", "afterVisibleChange", "showMask", "maskClosable", "maskStyle", "keyboard", "getOpenCount", "scrollLocker", "contentWrapperStyle", "style", "class", "rootClassName", "rootStyle", "maskMotion", "motion", "inline"]);
          const open2 = $open && canOpen.value;
          const wrapperClassName = classNames(prefixCls, {
            [`${prefixCls}-${placement}`]: true,
            [`${prefixCls}-open`]: open2,
            [`${prefixCls}-inline`]: inline,
            "no-mask": !showMask,
            [rootClassName]: true
          });
          const motionProps = typeof motion === "function" ? motion(placement) : motion;
          return createVNode("div", _objectSpread2$1(_objectSpread2$1({}, omit(otherProps, ["autofocus"])), {}, {
            "tabindex": -1,
            "class": wrapperClassName,
            "style": rootStyle,
            "ref": dom,
            "onKeydown": open2 && keyboard ? onKeyDown : void 0
          }), [createVNode(Transition, maskMotion, {
            default: () => [showMask && withDirectives(createVNode("div", {
              "class": `${prefixCls}-mask`,
              "onClick": maskClosable ? onClose : void 0,
              "style": maskStyle,
              "ref": maskDom
            }, null), [[vShow, open2]])]
          }), createVNode(Transition, _objectSpread2$1(_objectSpread2$1({}, motionProps), {}, {
            "onAfterEnter": onAfterVisibleChange,
            "onAfterLeave": onAfterVisibleChange
          }), {
            default: () => [withDirectives(createVNode("div", {
              "class": `${prefixCls}-content-wrapper`,
              "style": [contentWrapperStyle],
              "ref": contentWrapper
            }, [createVNode("div", {
              "class": [`${prefixCls}-content`, className],
              "style": style,
              "ref": contentDom
            }, [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]), slots.handler ? createVNode("div", {
              "onClick": onHandleClick,
              "ref": handlerDom
            }, [(_b = slots.handler) === null || _b === void 0 ? void 0 : _b.call(slots)]) : null]), [[vShow, open2]])]
          })]);
        };
      }
    });
    var __rest$1 = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const DrawerWrapper = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      inheritAttrs: false,
      props: initDefaultProps(drawerProps$1(), {
        prefixCls: "drawer",
        placement: "left",
        getContainer: "body",
        level: "all",
        duration: ".3s",
        ease: "cubic-bezier(0.78, 0.14, 0.15, 0.86)",
        afterVisibleChange: () => {
        },
        showMask: true,
        maskClosable: true,
        maskStyle: {},
        wrapperClassName: "",
        keyboard: true,
        forceRender: false,
        autofocus: true
      }),
      emits: ["handleClick", "close"],
      setup(props2, _ref) {
        let {
          emit: emit2,
          slots
        } = _ref;
        const dom = ref(null);
        const onHandleClick = (e2) => {
          emit2("handleClick", e2);
        };
        const onClose = (e2) => {
          emit2("close", e2);
        };
        return () => {
          const {
            getContainer: getContainer2,
            wrapperClassName,
            rootClassName,
            rootStyle,
            forceRender
          } = props2, otherProps = __rest$1(props2, ["getContainer", "wrapperClassName", "rootClassName", "rootStyle", "forceRender"]);
          let portal = null;
          if (!getContainer2) {
            return createVNode(DrawerChild, _objectSpread2$1(_objectSpread2$1({}, otherProps), {}, {
              "rootClassName": rootClassName,
              "rootStyle": rootStyle,
              "open": props2.open,
              "onClose": onClose,
              "onHandleClick": onHandleClick,
              "inline": true
            }), slots);
          }
          const $forceRender = !!slots.handler || forceRender;
          if ($forceRender || props2.open || dom.value) {
            portal = createVNode(Portal, {
              "autoLock": true,
              "visible": props2.open,
              "forceRender": $forceRender,
              "getContainer": getContainer2,
              "wrapperClassName": wrapperClassName
            }, {
              default: (_a) => {
                var {
                  visible,
                  afterClose
                } = _a, rest = __rest$1(_a, ["visible", "afterClose"]);
                return createVNode(DrawerChild, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({
                  "ref": dom
                }, otherProps), rest), {}, {
                  "rootClassName": rootClassName,
                  "rootStyle": rootStyle,
                  "open": visible !== void 0 ? visible : props2.open,
                  "afterVisibleChange": afterClose !== void 0 ? afterClose : props2.afterVisibleChange,
                  "onClose": onClose,
                  "onHandleClick": onHandleClick
                }), slots);
              }
            });
          }
          return portal;
        };
      }
    });
    const genMotionStyle = (token2) => {
      const {
        componentCls,
        motionDurationSlow
      } = token2;
      const sharedPanelMotion = {
        "&-enter, &-appear, &-leave": {
          "&-start": {
            transition: "none"
          },
          "&-active": {
            transition: `all ${motionDurationSlow}`
          }
        }
      };
      return {
        [componentCls]: {
          // ======================== Mask ========================
          [`${componentCls}-mask-motion`]: {
            "&-enter, &-appear, &-leave": {
              "&-active": {
                transition: `all ${motionDurationSlow}`
              }
            },
            "&-enter, &-appear": {
              opacity: 0,
              "&-active": {
                opacity: 1
              }
            },
            "&-leave": {
              opacity: 1,
              "&-active": {
                opacity: 0
              }
            }
          },
          // ======================= Panel ========================
          [`${componentCls}-panel-motion`]: {
            // Left
            "&-left": [sharedPanelMotion, {
              "&-enter, &-appear": {
                "&-start": {
                  transform: "translateX(-100%) !important"
                },
                "&-active": {
                  transform: "translateX(0)"
                }
              },
              "&-leave": {
                transform: "translateX(0)",
                "&-active": {
                  transform: "translateX(-100%)"
                }
              }
            }],
            // Right
            "&-right": [sharedPanelMotion, {
              "&-enter, &-appear": {
                "&-start": {
                  transform: "translateX(100%) !important"
                },
                "&-active": {
                  transform: "translateX(0)"
                }
              },
              "&-leave": {
                transform: "translateX(0)",
                "&-active": {
                  transform: "translateX(100%)"
                }
              }
            }],
            // Top
            "&-top": [sharedPanelMotion, {
              "&-enter, &-appear": {
                "&-start": {
                  transform: "translateY(-100%) !important"
                },
                "&-active": {
                  transform: "translateY(0)"
                }
              },
              "&-leave": {
                transform: "translateY(0)",
                "&-active": {
                  transform: "translateY(-100%)"
                }
              }
            }],
            // Bottom
            "&-bottom": [sharedPanelMotion, {
              "&-enter, &-appear": {
                "&-start": {
                  transform: "translateY(100%) !important"
                },
                "&-active": {
                  transform: "translateY(0)"
                }
              },
              "&-leave": {
                transform: "translateY(0)",
                "&-active": {
                  transform: "translateY(100%)"
                }
              }
            }]
          }
        }
      };
    };
    const genDrawerStyle = (token2) => {
      const {
        componentCls,
        zIndexPopup,
        colorBgMask,
        colorBgElevated,
        motionDurationSlow,
        motionDurationMid,
        padding,
        paddingLG,
        fontSizeLG,
        lineHeightLG,
        lineWidth,
        lineType,
        colorSplit,
        marginSM,
        colorIcon,
        colorIconHover,
        colorText,
        fontWeightStrong,
        drawerFooterPaddingVertical,
        drawerFooterPaddingHorizontal
      } = token2;
      const wrapperCls = `${componentCls}-content-wrapper`;
      return {
        [componentCls]: {
          position: "fixed",
          inset: 0,
          zIndex: zIndexPopup,
          pointerEvents: "none",
          "&-pure": {
            position: "relative",
            background: colorBgElevated,
            [`&${componentCls}-left`]: {
              boxShadow: token2.boxShadowDrawerLeft
            },
            [`&${componentCls}-right`]: {
              boxShadow: token2.boxShadowDrawerRight
            },
            [`&${componentCls}-top`]: {
              boxShadow: token2.boxShadowDrawerUp
            },
            [`&${componentCls}-bottom`]: {
              boxShadow: token2.boxShadowDrawerDown
            }
          },
          "&-inline": {
            position: "absolute"
          },
          // ====================== Mask ======================
          [`${componentCls}-mask`]: {
            position: "absolute",
            inset: 0,
            zIndex: zIndexPopup,
            background: colorBgMask,
            pointerEvents: "auto"
          },
          // ==================== Content =====================
          [wrapperCls]: {
            position: "absolute",
            zIndex: zIndexPopup,
            transition: `all ${motionDurationSlow}`,
            "&-hidden": {
              display: "none"
            }
          },
          // Placement
          [`&-left > ${wrapperCls}`]: {
            top: 0,
            bottom: 0,
            left: {
              _skip_check_: true,
              value: 0
            },
            boxShadow: token2.boxShadowDrawerLeft
          },
          [`&-right > ${wrapperCls}`]: {
            top: 0,
            right: {
              _skip_check_: true,
              value: 0
            },
            bottom: 0,
            boxShadow: token2.boxShadowDrawerRight
          },
          [`&-top > ${wrapperCls}`]: {
            top: 0,
            insetInline: 0,
            boxShadow: token2.boxShadowDrawerUp
          },
          [`&-bottom > ${wrapperCls}`]: {
            bottom: 0,
            insetInline: 0,
            boxShadow: token2.boxShadowDrawerDown
          },
          [`${componentCls}-content`]: {
            width: "100%",
            height: "100%",
            overflow: "auto",
            background: colorBgElevated,
            pointerEvents: "auto"
          },
          // ===================== Panel ======================
          [`${componentCls}-wrapper-body`]: {
            display: "flex",
            flexDirection: "column",
            width: "100%",
            height: "100%"
          },
          // Header
          [`${componentCls}-header`]: {
            display: "flex",
            flex: 0,
            alignItems: "center",
            padding: `${padding}px ${paddingLG}px`,
            fontSize: fontSizeLG,
            lineHeight: lineHeightLG,
            borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`,
            "&-title": {
              display: "flex",
              flex: 1,
              alignItems: "center",
              minWidth: 0,
              minHeight: 0
            }
          },
          [`${componentCls}-extra`]: {
            flex: "none"
          },
          [`${componentCls}-close`]: {
            display: "inline-block",
            marginInlineEnd: marginSM,
            color: colorIcon,
            fontWeight: fontWeightStrong,
            fontSize: fontSizeLG,
            fontStyle: "normal",
            lineHeight: 1,
            textAlign: "center",
            textTransform: "none",
            textDecoration: "none",
            background: "transparent",
            border: 0,
            outline: 0,
            cursor: "pointer",
            transition: `color ${motionDurationMid}`,
            textRendering: "auto",
            "&:focus, &:hover": {
              color: colorIconHover,
              textDecoration: "none"
            }
          },
          [`${componentCls}-title`]: {
            flex: 1,
            margin: 0,
            color: colorText,
            fontWeight: token2.fontWeightStrong,
            fontSize: fontSizeLG,
            lineHeight: lineHeightLG
          },
          // Body
          [`${componentCls}-body`]: {
            flex: 1,
            minWidth: 0,
            minHeight: 0,
            padding: paddingLG,
            overflow: "auto"
          },
          // Footer
          [`${componentCls}-footer`]: {
            flexShrink: 0,
            padding: `${drawerFooterPaddingVertical}px ${drawerFooterPaddingHorizontal}px`,
            borderTop: `${lineWidth}px ${lineType} ${colorSplit}`
          },
          // ====================== RTL =======================
          "&-rtl": {
            direction: "rtl"
          }
        }
      };
    };
    const useStyle$1 = genComponentStyleHook("Drawer", (token2) => {
      const drawerToken = merge(token2, {
        drawerFooterPaddingVertical: token2.paddingXS,
        drawerFooterPaddingHorizontal: token2.padding
      });
      return [genDrawerStyle(drawerToken), genMotionStyle(drawerToken)];
    }, (token2) => ({
      zIndexPopup: token2.zIndexPopupBase
    }));
    var __rest = function(s2, e2) {
      var t2 = {};
      for (var p2 in s2) if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) t2[p2] = s2[p2];
      if (s2 != null && typeof Object.getOwnPropertySymbols === "function") for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {
        if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) t2[p2[i2]] = s2[p2[i2]];
      }
      return t2;
    };
    const PlacementTypes = ["top", "right", "bottom", "left"];
    const defaultPushState = {
      distance: 180
    };
    const drawerProps = () => ({
      autofocus: {
        type: Boolean,
        default: void 0
      },
      closable: {
        type: Boolean,
        default: void 0
      },
      closeIcon: PropTypes.any,
      destroyOnClose: {
        type: Boolean,
        default: void 0
      },
      forceRender: {
        type: Boolean,
        default: void 0
      },
      getContainer: {
        type: [String, Function, Boolean, Object],
        default: void 0
      },
      maskClosable: {
        type: Boolean,
        default: void 0
      },
      mask: {
        type: Boolean,
        default: void 0
      },
      maskStyle: objectType(),
      rootClassName: String,
      rootStyle: objectType(),
      size: {
        type: String
      },
      drawerStyle: objectType(),
      headerStyle: objectType(),
      bodyStyle: objectType(),
      contentWrapperStyle: {
        type: Object,
        default: void 0
      },
      title: PropTypes.any,
      /** @deprecated Please use `open` instead */
      visible: {
        type: Boolean,
        default: void 0
      },
      open: {
        type: Boolean,
        default: void 0
      },
      width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
      height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
      zIndex: Number,
      prefixCls: String,
      push: PropTypes.oneOfType([PropTypes.looseBool, {
        type: Object
      }]),
      placement: PropTypes.oneOf(PlacementTypes),
      keyboard: {
        type: Boolean,
        default: void 0
      },
      extra: PropTypes.any,
      footer: PropTypes.any,
      footerStyle: objectType(),
      level: PropTypes.any,
      levelMove: {
        type: [Number, Array, Function]
      },
      handle: PropTypes.any,
      /** @deprecated Use `@afterVisibleChange` instead */
      afterVisibleChange: Function,
      /** @deprecated Please use `@afterOpenChange` instead */
      onAfterVisibleChange: Function,
      onAfterOpenChange: Function,
      /** @deprecated Please use `onUpdate:open` instead */
      "onUpdate:visible": Function,
      "onUpdate:open": Function,
      onClose: Function
    });
    const Drawer = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ADrawer",
      inheritAttrs: false,
      props: initDefaultProps(drawerProps(), {
        closable: true,
        placement: "right",
        maskClosable: true,
        mask: true,
        level: null,
        keyboard: true,
        push: defaultPushState
      }),
      slots: Object,
      // emits: ['update:visible', 'close', 'afterVisibleChange'],
      setup(props2, _ref) {
        let {
          emit: emit2,
          slots,
          attrs
        } = _ref;
        const sPush = shallowRef(false);
        const destroyClose = shallowRef(false);
        const vcDrawer = shallowRef(null);
        const load = shallowRef(false);
        const visible = shallowRef(false);
        const mergedOpen = computed(() => {
          var _a;
          return (_a = props2.open) !== null && _a !== void 0 ? _a : props2.visible;
        });
        watch(mergedOpen, () => {
          if (mergedOpen.value) {
            load.value = true;
          } else {
            visible.value = false;
          }
        }, {
          immediate: true
        });
        watch([mergedOpen, load], () => {
          if (mergedOpen.value && load.value) {
            visible.value = true;
          }
        }, {
          immediate: true
        });
        const parentDrawerOpts = inject("parentDrawerOpts", null);
        const {
          prefixCls,
          getPopupContainer,
          direction
        } = useConfigInject("drawer", props2);
        const [wrapSSR, hashId] = useStyle$1(prefixCls);
        const getContainer2 = computed(() => (
          // 有可能为 false,所以不能直接判断
          props2.getContainer === void 0 && (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer.value) ? () => getPopupContainer.value(document.body) : props2.getContainer
        ));
        devWarning(!props2.afterVisibleChange, "Drawer", "`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead");
        const setPush = () => {
          sPush.value = true;
        };
        const setPull = () => {
          sPush.value = false;
          nextTick(() => {
            domFocus();
          });
        };
        provide("parentDrawerOpts", {
          setPush,
          setPull
        });
        onMounted(() => {
          if (mergedOpen.value && parentDrawerOpts) {
            parentDrawerOpts.setPush();
          }
        });
        onUnmounted(() => {
          if (parentDrawerOpts) {
            parentDrawerOpts.setPull();
          }
        });
        watch(visible, () => {
          if (parentDrawerOpts) {
            if (visible.value) {
              parentDrawerOpts.setPush();
            } else {
              parentDrawerOpts.setPull();
            }
          }
        }, {
          flush: "post"
        });
        const domFocus = () => {
          var _a, _b;
          (_b = (_a = vcDrawer.value) === null || _a === void 0 ? void 0 : _a.domFocus) === null || _b === void 0 ? void 0 : _b.call(_a);
        };
        const close = (e2) => {
          emit2("update:visible", false);
          emit2("update:open", false);
          emit2("close", e2);
        };
        const afterVisibleChange = (open2) => {
          var _a;
          if (!open2) {
            if (destroyClose.value === false) {
              destroyClose.value = true;
            }
            if (props2.destroyOnClose) {
              load.value = false;
            }
          }
          (_a = props2.afterVisibleChange) === null || _a === void 0 ? void 0 : _a.call(props2, open2);
          emit2("afterVisibleChange", open2);
          emit2("afterOpenChange", open2);
        };
        const pushTransform = computed(() => {
          const {
            push,
            placement
          } = props2;
          let distance;
          if (typeof push === "boolean") {
            distance = push ? defaultPushState.distance : 0;
          } else {
            distance = push.distance;
          }
          distance = parseFloat(String(distance || 0));
          if (placement === "left" || placement === "right") {
            return `translateX(${placement === "left" ? distance : -distance}px)`;
          }
          if (placement === "top" || placement === "bottom") {
            return `translateY(${placement === "top" ? distance : -distance}px)`;
          }
          return null;
        });
        const mergedWidth = computed(() => {
          var _a;
          return (_a = props2.width) !== null && _a !== void 0 ? _a : props2.size === "large" ? 736 : 378;
        });
        const mergedHeight = computed(() => {
          var _a;
          return (_a = props2.height) !== null && _a !== void 0 ? _a : props2.size === "large" ? 736 : 378;
        });
        const offsetStyle = computed(() => {
          const {
            mask,
            placement
          } = props2;
          if (!visible.value && !mask) {
            return {};
          }
          const val = {};
          if (placement === "left" || placement === "right") {
            val.width = isNumeric(mergedWidth.value) ? `${mergedWidth.value}px` : mergedWidth.value;
          } else {
            val.height = isNumeric(mergedHeight.value) ? `${mergedHeight.value}px` : mergedHeight.value;
          }
          return val;
        });
        const wrapperStyle = computed(() => {
          const {
            zIndex,
            contentWrapperStyle
          } = props2;
          const val = offsetStyle.value;
          return [{
            zIndex,
            transform: sPush.value ? pushTransform.value : void 0
          }, _extends$1({}, contentWrapperStyle), val];
        });
        const renderHeader = (prefixCls2) => {
          const {
            closable,
            headerStyle
          } = props2;
          const extra = getPropsSlot(slots, props2, "extra");
          const title = getPropsSlot(slots, props2, "title");
          if (!title && !closable) {
            return null;
          }
          return createVNode("div", {
            "class": classNames(`${prefixCls2}-header`, {
              [`${prefixCls2}-header-close-only`]: closable && !title && !extra
            }),
            "style": headerStyle
          }, [createVNode("div", {
            "class": `${prefixCls2}-header-title`
          }, [renderCloseIcon(prefixCls2), title && createVNode("div", {
            "class": `${prefixCls2}-title`
          }, [title])]), extra && createVNode("div", {
            "class": `${prefixCls2}-extra`
          }, [extra])]);
        };
        const renderCloseIcon = (prefixCls2) => {
          var _a;
          const {
            closable
          } = props2;
          const $closeIcon = slots.closeIcon ? (_a = slots.closeIcon) === null || _a === void 0 ? void 0 : _a.call(slots) : props2.closeIcon;
          return closable && createVNode("button", {
            "key": "closer",
            "onClick": close,
            "aria-label": "Close",
            "class": `${prefixCls2}-close`
          }, [$closeIcon === void 0 ? createVNode(CloseOutlined, null, null) : $closeIcon]);
        };
        const renderBody = (prefixCls2) => {
          var _a;
          if (destroyClose.value && !props2.forceRender && !load.value) {
            return null;
          }
          const {
            bodyStyle,
            drawerStyle
          } = props2;
          return createVNode("div", {
            "class": `${prefixCls2}-wrapper-body`,
            "style": drawerStyle
          }, [renderHeader(prefixCls2), createVNode("div", {
            "key": "body",
            "class": `${prefixCls2}-body`,
            "style": bodyStyle
          }, [(_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)]), renderFooter(prefixCls2)]);
        };
        const renderFooter = (prefixCls2) => {
          const footer = getPropsSlot(slots, props2, "footer");
          if (!footer) {
            return null;
          }
          const footerClassName = `${prefixCls2}-footer`;
          return createVNode("div", {
            "class": footerClassName,
            "style": props2.footerStyle
          }, [footer]);
        };
        const drawerClassName = computed(() => classNames({
          "no-mask": !props2.mask,
          [`${prefixCls.value}-rtl`]: direction.value === "rtl"
        }, props2.rootClassName, hashId.value));
        const maskMotion = computed(() => {
          return getTransitionProps(getTransitionName(prefixCls.value, "mask-motion"));
        });
        const panelMotion = (motionPlacement) => {
          return getTransitionProps(getTransitionName(prefixCls.value, `panel-motion-${motionPlacement}`));
        };
        return () => {
          const {
            width,
            height,
            placement,
            mask,
            forceRender
          } = props2, rest = __rest(props2, ["width", "height", "placement", "mask", "forceRender"]);
          const vcDrawerProps = _extends$1(_extends$1(_extends$1({}, attrs), omit(rest, ["size", "closeIcon", "closable", "destroyOnClose", "drawerStyle", "headerStyle", "bodyStyle", "title", "push", "onAfterVisibleChange", "onClose", "onUpdate:visible", "onUpdate:open", "visible"])), {
            forceRender,
            onClose: close,
            afterVisibleChange,
            handler: false,
            prefixCls: prefixCls.value,
            open: visible.value,
            showMask: mask,
            placement,
            ref: vcDrawer
          });
          return wrapSSR(createVNode(NoCompactStyle, null, {
            default: () => [createVNode(DrawerWrapper, _objectSpread2$1(_objectSpread2$1({}, vcDrawerProps), {}, {
              "maskMotion": maskMotion.value,
              "motion": panelMotion,
              "width": mergedWidth.value,
              "height": mergedHeight.value,
              "getContainer": getContainer2.value,
              "rootClassName": drawerClassName.value,
              "rootStyle": props2.rootStyle,
              "contentWrapperStyle": wrapperStyle.value
            }), {
              handler: props2.handle ? () => props2.handle : slots.handle,
              default: () => renderBody(prefixCls.value)
            })]
          }));
        };
      }
    });
    const Drawer$1 = withInstall(Drawer);
    const spaceSize = {
      small: 8,
      middle: 16,
      large: 24
    };
    const spaceProps = () => ({
      prefixCls: String,
      size: {
        type: [String, Number, Array]
      },
      direction: PropTypes.oneOf(tuple("horizontal", "vertical")).def("horizontal"),
      align: PropTypes.oneOf(tuple("start", "end", "center", "baseline")),
      wrap: booleanType()
    });
    function getNumberSize(size2) {
      return typeof size2 === "string" ? spaceSize[size2] : size2 || 0;
    }
    const Space = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ASpace",
      inheritAttrs: false,
      props: spaceProps(),
      slots: Object,
      setup(props2, _ref) {
        let {
          slots,
          attrs
        } = _ref;
        const {
          prefixCls,
          space,
          direction: directionConfig
        } = useConfigInject("space", props2);
        const [wrapSSR, hashId] = useStyle$b(prefixCls);
        const supportFlexGap = useFlexGapSupport();
        const size2 = computed(() => {
          var _a, _b, _c;
          return (_c = (_a = props2.size) !== null && _a !== void 0 ? _a : (_b = space === null || space === void 0 ? void 0 : space.value) === null || _b === void 0 ? void 0 : _b.size) !== null && _c !== void 0 ? _c : "small";
        });
        const horizontalSize = ref();
        const verticalSize = ref();
        watch(size2, () => {
          [horizontalSize.value, verticalSize.value] = (Array.isArray(size2.value) ? size2.value : [size2.value, size2.value]).map((item) => getNumberSize(item));
        }, {
          immediate: true
        });
        const mergedAlign = computed(() => props2.align === void 0 && props2.direction === "horizontal" ? "center" : props2.align);
        const cn = computed(() => {
          return classNames(prefixCls.value, hashId.value, `${prefixCls.value}-${props2.direction}`, {
            [`${prefixCls.value}-rtl`]: directionConfig.value === "rtl",
            [`${prefixCls.value}-align-${mergedAlign.value}`]: mergedAlign.value
          });
        });
        const marginDirection = computed(() => directionConfig.value === "rtl" ? "marginLeft" : "marginRight");
        const style = computed(() => {
          const gapStyle = {};
          if (supportFlexGap.value) {
            gapStyle.columnGap = `${horizontalSize.value}px`;
            gapStyle.rowGap = `${verticalSize.value}px`;
          }
          return _extends$1(_extends$1({}, gapStyle), props2.wrap && {
            flexWrap: "wrap",
            marginBottom: `${-verticalSize.value}px`
          });
        });
        return () => {
          var _a, _b;
          const {
            wrap,
            direction = "horizontal"
          } = props2;
          const children = (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
          const items = filterEmpty(children);
          const len = items.length;
          if (len === 0) {
            return null;
          }
          const split = (_b = slots.split) === null || _b === void 0 ? void 0 : _b.call(slots);
          const itemClassName = `${prefixCls.value}-item`;
          const horizontalSizeVal = horizontalSize.value;
          const latestIndex = len - 1;
          return createVNode("div", _objectSpread2$1(_objectSpread2$1({}, attrs), {}, {
            "class": [cn.value, attrs.class],
            "style": [style.value, attrs.style]
          }), [items.map((child, index2) => {
            let originIndex = children.indexOf(child);
            if (originIndex === -1) {
              originIndex = `$$space-${index2}`;
            }
            let itemStyle = {};
            if (!supportFlexGap.value) {
              if (direction === "vertical") {
                if (index2 < latestIndex) {
                  itemStyle = {
                    marginBottom: `${horizontalSizeVal / (split ? 2 : 1)}px`
                  };
                }
              } else {
                itemStyle = _extends$1(_extends$1({}, index2 < latestIndex && {
                  [marginDirection.value]: `${horizontalSizeVal / (split ? 2 : 1)}px`
                }), wrap && {
                  paddingBottom: `${verticalSize.value}px`
                });
              }
            }
            return wrapSSR(createVNode(Fragment, {
              "key": originIndex
            }, [createVNode("div", {
              "class": itemClassName,
              "style": itemStyle
            }, [child]), index2 < latestIndex && split && createVNode("span", {
              "class": `${itemClassName}-split`,
              "style": itemStyle
            }, [split])]));
          })]);
        };
      }
    });
    Space.Compact = Compact;
    Space.install = function(app) {
      app.component(Space.name, Space);
      app.component(Compact.name, Compact);
      return app;
    };
    const genSwitchSmallStyle = (token2) => {
      const {
        componentCls
      } = token2;
      const switchInnerCls = `${componentCls}-inner`;
      return {
        [componentCls]: {
          [`&${componentCls}-small`]: {
            minWidth: token2.switchMinWidthSM,
            height: token2.switchHeightSM,
            lineHeight: `${token2.switchHeightSM}px`,
            [`${componentCls}-inner`]: {
              paddingInlineStart: token2.switchInnerMarginMaxSM,
              paddingInlineEnd: token2.switchInnerMarginMinSM,
              [`${switchInnerCls}-checked`]: {
                marginInlineStart: `calc(-100% + ${token2.switchPinSizeSM + token2.switchPadding * 2}px - ${token2.switchInnerMarginMaxSM * 2}px)`,
                marginInlineEnd: `calc(100% - ${token2.switchPinSizeSM + token2.switchPadding * 2}px + ${token2.switchInnerMarginMaxSM * 2}px)`
              },
              [`${switchInnerCls}-unchecked`]: {
                marginTop: -token2.switchHeightSM,
                marginInlineStart: 0,
                marginInlineEnd: 0
              }
            },
            [`${componentCls}-handle`]: {
              width: token2.switchPinSizeSM,
              height: token2.switchPinSizeSM
            },
            [`${componentCls}-loading-icon`]: {
              top: (token2.switchPinSizeSM - token2.switchLoadingIconSize) / 2,
              fontSize: token2.switchLoadingIconSize
            },
            [`&${componentCls}-checked`]: {
              [`${componentCls}-inner`]: {
                paddingInlineStart: token2.switchInnerMarginMinSM,
                paddingInlineEnd: token2.switchInnerMarginMaxSM,
                [`${switchInnerCls}-checked`]: {
                  marginInlineStart: 0,
                  marginInlineEnd: 0
                },
                [`${switchInnerCls}-unchecked`]: {
                  marginInlineStart: `calc(100% - ${token2.switchPinSizeSM + token2.switchPadding * 2}px + ${token2.switchInnerMarginMaxSM * 2}px)`,
                  marginInlineEnd: `calc(-100% + ${token2.switchPinSizeSM + token2.switchPadding * 2}px - ${token2.switchInnerMarginMaxSM * 2}px)`
                }
              },
              [`${componentCls}-handle`]: {
                insetInlineStart: `calc(100% - ${token2.switchPinSizeSM + token2.switchPadding}px)`
              }
            },
            [`&:not(${componentCls}-disabled):active`]: {
              [`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
                [`${switchInnerCls}-unchecked`]: {
                  marginInlineStart: token2.marginXXS / 2,
                  marginInlineEnd: -token2.marginXXS / 2
                }
              },
              [`&${componentCls}-checked ${switchInnerCls}`]: {
                [`${switchInnerCls}-checked`]: {
                  marginInlineStart: -token2.marginXXS / 2,
                  marginInlineEnd: token2.marginXXS / 2
                }
              }
            }
          }
        }
      };
    };
    const genSwitchLoadingStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        [componentCls]: {
          [`${componentCls}-loading-icon${token2.iconCls}`]: {
            position: "relative",
            top: (token2.switchPinSize - token2.fontSize) / 2,
            color: token2.switchLoadingIconColor,
            verticalAlign: "top"
          },
          [`&${componentCls}-checked ${componentCls}-loading-icon`]: {
            color: token2.switchColor
          }
        }
      };
    };
    const genSwitchHandleStyle = (token2) => {
      const {
        componentCls
      } = token2;
      const switchHandleCls = `${componentCls}-handle`;
      return {
        [componentCls]: {
          [switchHandleCls]: {
            position: "absolute",
            top: token2.switchPadding,
            insetInlineStart: token2.switchPadding,
            width: token2.switchPinSize,
            height: token2.switchPinSize,
            transition: `all ${token2.switchDuration} ease-in-out`,
            "&::before": {
              position: "absolute",
              top: 0,
              insetInlineEnd: 0,
              bottom: 0,
              insetInlineStart: 0,
              backgroundColor: token2.colorWhite,
              borderRadius: token2.switchPinSize / 2,
              boxShadow: token2.switchHandleShadow,
              transition: `all ${token2.switchDuration} ease-in-out`,
              content: '""'
            }
          },
          [`&${componentCls}-checked ${switchHandleCls}`]: {
            insetInlineStart: `calc(100% - ${token2.switchPinSize + token2.switchPadding}px)`
          },
          [`&:not(${componentCls}-disabled):active`]: {
            [`${switchHandleCls}::before`]: {
              insetInlineEnd: token2.switchHandleActiveInset,
              insetInlineStart: 0
            },
            [`&${componentCls}-checked ${switchHandleCls}::before`]: {
              insetInlineEnd: 0,
              insetInlineStart: token2.switchHandleActiveInset
            }
          }
        }
      };
    };
    const genSwitchInnerStyle = (token2) => {
      const {
        componentCls
      } = token2;
      const switchInnerCls = `${componentCls}-inner`;
      return {
        [componentCls]: {
          [switchInnerCls]: {
            display: "block",
            overflow: "hidden",
            borderRadius: 100,
            height: "100%",
            paddingInlineStart: token2.switchInnerMarginMax,
            paddingInlineEnd: token2.switchInnerMarginMin,
            transition: `padding-inline-start ${token2.switchDuration} ease-in-out, padding-inline-end ${token2.switchDuration} ease-in-out`,
            [`${switchInnerCls}-checked, ${switchInnerCls}-unchecked`]: {
              display: "block",
              color: token2.colorTextLightSolid,
              fontSize: token2.fontSizeSM,
              transition: `margin-inline-start ${token2.switchDuration} ease-in-out, margin-inline-end ${token2.switchDuration} ease-in-out`,
              pointerEvents: "none"
            },
            [`${switchInnerCls}-checked`]: {
              marginInlineStart: `calc(-100% + ${token2.switchPinSize + token2.switchPadding * 2}px - ${token2.switchInnerMarginMax * 2}px)`,
              marginInlineEnd: `calc(100% - ${token2.switchPinSize + token2.switchPadding * 2}px + ${token2.switchInnerMarginMax * 2}px)`
            },
            [`${switchInnerCls}-unchecked`]: {
              marginTop: -token2.switchHeight,
              marginInlineStart: 0,
              marginInlineEnd: 0
            }
          },
          [`&${componentCls}-checked ${switchInnerCls}`]: {
            paddingInlineStart: token2.switchInnerMarginMin,
            paddingInlineEnd: token2.switchInnerMarginMax,
            [`${switchInnerCls}-checked`]: {
              marginInlineStart: 0,
              marginInlineEnd: 0
            },
            [`${switchInnerCls}-unchecked`]: {
              marginInlineStart: `calc(100% - ${token2.switchPinSize + token2.switchPadding * 2}px + ${token2.switchInnerMarginMax * 2}px)`,
              marginInlineEnd: `calc(-100% + ${token2.switchPinSize + token2.switchPadding * 2}px - ${token2.switchInnerMarginMax * 2}px)`
            }
          },
          [`&:not(${componentCls}-disabled):active`]: {
            [`&:not(${componentCls}-checked) ${switchInnerCls}`]: {
              [`${switchInnerCls}-unchecked`]: {
                marginInlineStart: token2.switchPadding * 2,
                marginInlineEnd: -token2.switchPadding * 2
              }
            },
            [`&${componentCls}-checked ${switchInnerCls}`]: {
              [`${switchInnerCls}-checked`]: {
                marginInlineStart: -token2.switchPadding * 2,
                marginInlineEnd: token2.switchPadding * 2
              }
            }
          }
        }
      };
    };
    const genSwitchStyle = (token2) => {
      const {
        componentCls
      } = token2;
      return {
        [componentCls]: _extends$1(_extends$1(_extends$1(_extends$1({}, resetComponent(token2)), {
          position: "relative",
          display: "inline-block",
          boxSizing: "border-box",
          minWidth: token2.switchMinWidth,
          height: token2.switchHeight,
          lineHeight: `${token2.switchHeight}px`,
          verticalAlign: "middle",
          background: token2.colorTextQuaternary,
          border: "0",
          borderRadius: 100,
          cursor: "pointer",
          transition: `all ${token2.motionDurationMid}`,
          userSelect: "none",
          [`&:hover:not(${componentCls}-disabled)`]: {
            background: token2.colorTextTertiary
          }
        }), genFocusStyle(token2)), {
          [`&${componentCls}-checked`]: {
            background: token2.switchColor,
            [`&:hover:not(${componentCls}-disabled)`]: {
              background: token2.colorPrimaryHover
            }
          },
          [`&${componentCls}-loading, &${componentCls}-disabled`]: {
            cursor: "not-allowed",
            opacity: token2.switchDisabledOpacity,
            "*": {
              boxShadow: "none",
              cursor: "not-allowed"
            }
          },
          // rtl style
          [`&${componentCls}-rtl`]: {
            direction: "rtl"
          }
        })
      };
    };
    const useStyle = genComponentStyleHook("Switch", (token2) => {
      const switchHeight = token2.fontSize * token2.lineHeight;
      const switchHeightSM = token2.controlHeight / 2;
      const switchPadding = 2;
      const switchPinSize = switchHeight - switchPadding * 2;
      const switchPinSizeSM = switchHeightSM - switchPadding * 2;
      const switchToken = merge(token2, {
        switchMinWidth: switchPinSize * 2 + switchPadding * 4,
        switchHeight,
        switchDuration: token2.motionDurationMid,
        switchColor: token2.colorPrimary,
        switchDisabledOpacity: token2.opacityLoading,
        switchInnerMarginMin: switchPinSize / 2,
        switchInnerMarginMax: switchPinSize + switchPadding + switchPadding * 2,
        switchPadding,
        switchPinSize,
        switchBg: token2.colorBgContainer,
        switchMinWidthSM: switchPinSizeSM * 2 + switchPadding * 2,
        switchHeightSM,
        switchInnerMarginMinSM: switchPinSizeSM / 2,
        switchInnerMarginMaxSM: switchPinSizeSM + switchPadding + switchPadding * 2,
        switchPinSizeSM,
        switchHandleShadow: `0 2px 4px 0 ${new TinyColor("#00230b").setAlpha(0.2).toRgbString()}`,
        switchLoadingIconSize: token2.fontSizeIcon * 0.75,
        switchLoadingIconColor: `rgba(0, 0, 0, ${token2.opacityLoading})`,
        switchHandleActiveInset: "-30%"
      });
      return [
        genSwitchStyle(switchToken),
        // inner style
        genSwitchInnerStyle(switchToken),
        // handle style
        genSwitchHandleStyle(switchToken),
        // loading style
        genSwitchLoadingStyle(switchToken),
        // small style
        genSwitchSmallStyle(switchToken)
      ];
    });
    const SwitchSizes = tuple("small", "default");
    const switchProps = () => ({
      id: String,
      prefixCls: String,
      size: PropTypes.oneOf(SwitchSizes),
      disabled: {
        type: Boolean,
        default: void 0
      },
      checkedChildren: PropTypes.any,
      unCheckedChildren: PropTypes.any,
      tabindex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
      autofocus: {
        type: Boolean,
        default: void 0
      },
      loading: {
        type: Boolean,
        default: void 0
      },
      checked: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.looseBool]),
      checkedValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.looseBool]).def(true),
      unCheckedValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.looseBool]).def(false),
      onChange: {
        type: Function
      },
      onClick: {
        type: Function
      },
      onKeydown: {
        type: Function
      },
      onMouseup: {
        type: Function
      },
      "onUpdate:checked": {
        type: Function
      },
      onBlur: Function,
      onFocus: Function
    });
    const Switch = /* @__PURE__ */ defineComponent({
      compatConfig: {
        MODE: 3
      },
      name: "ASwitch",
      __ANT_SWITCH: true,
      inheritAttrs: false,
      props: switchProps(),
      slots: Object,
      // emits: ['update:checked', 'mouseup', 'change', 'click', 'keydown', 'blur'],
      setup(props2, _ref) {
        let {
          attrs,
          slots,
          expose,
          emit: emit2
        } = _ref;
        const formItemContext = useInjectFormItemContext();
        const disabledContext = useInjectDisabled();
        const mergedDisabled = computed(() => {
          var _a;
          return (_a = props2.disabled) !== null && _a !== void 0 ? _a : disabledContext.value;
        });
        onBeforeMount(() => {
        });
        const checked = ref(props2.checked !== void 0 ? props2.checked : attrs.defaultChecked);
        const checkedStatus = computed(() => checked.value === props2.checkedValue);
        watch(() => props2.checked, () => {
          checked.value = props2.checked;
        });
        const {
          prefixCls,
          direction,
          size: size2
        } = useConfigInject("switch", props2);
        const [wrapSSR, hashId] = useStyle(prefixCls);
        const refSwitchNode = ref();
        const focus = () => {
          var _a;
          (_a = refSwitchNode.value) === null || _a === void 0 ? void 0 : _a.focus();
        };
        const blur = () => {
          var _a;
          (_a = refSwitchNode.value) === null || _a === void 0 ? void 0 : _a.blur();
        };
        expose({
          focus,
          blur
        });
        onMounted(() => {
          nextTick(() => {
            if (props2.autofocus && !mergedDisabled.value) {
              refSwitchNode.value.focus();
            }
          });
        });
        const setChecked = (check, e2) => {
          if (mergedDisabled.value) {
            return;
          }
          emit2("update:checked", check);
          emit2("change", check, e2);
          formItemContext.onFieldChange();
        };
        const handleBlur = (e2) => {
          emit2("blur", e2);
        };
        const handleClick = (e2) => {
          focus();
          const newChecked = checkedStatus.value ? props2.unCheckedValue : props2.checkedValue;
          setChecked(newChecked, e2);
          emit2("click", newChecked, e2);
        };
        const handleKeyDown = (e2) => {
          if (e2.keyCode === KeyCode.LEFT) {
            setChecked(props2.unCheckedValue, e2);
          } else if (e2.keyCode === KeyCode.RIGHT) {
            setChecked(props2.checkedValue, e2);
          }
          emit2("keydown", e2);
        };
        const handleMouseUp = (e2) => {
          var _a;
          (_a = refSwitchNode.value) === null || _a === void 0 ? void 0 : _a.blur();
          emit2("mouseup", e2);
        };
        const classNames2 = computed(() => ({
          [`${prefixCls.value}-small`]: size2.value === "small",
          [`${prefixCls.value}-loading`]: props2.loading,
          [`${prefixCls.value}-checked`]: checkedStatus.value,
          [`${prefixCls.value}-disabled`]: mergedDisabled.value,
          [prefixCls.value]: true,
          [`${prefixCls.value}-rtl`]: direction.value === "rtl",
          [hashId.value]: true
        }));
        return () => {
          var _a;
          return wrapSSR(createVNode(Wave, null, {
            default: () => [createVNode("button", _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, omit(props2, ["prefixCls", "checkedChildren", "unCheckedChildren", "checked", "autofocus", "checkedValue", "unCheckedValue", "id", "onChange", "onUpdate:checked"])), attrs), {}, {
              "id": (_a = props2.id) !== null && _a !== void 0 ? _a : formItemContext.id.value,
              "onKeydown": handleKeyDown,
              "onClick": handleClick,
              "onBlur": handleBlur,
              "onMouseup": handleMouseUp,
              "type": "button",
              "role": "switch",
              "aria-checked": checked.value,
              "disabled": mergedDisabled.value || props2.loading,
              "class": [attrs.class, classNames2.value],
              "ref": refSwitchNode
            }), [createVNode("div", {
              "class": `${prefixCls.value}-handle`
            }, [props2.loading ? createVNode(LoadingOutlined, {
              "class": `${prefixCls.value}-loading-icon`
            }, null) : null]), createVNode("span", {
              "class": `${prefixCls.value}-inner`
            }, [createVNode("span", {
              "class": `${prefixCls.value}-inner-checked`
            }, [getPropsSlot(slots, props2, "checkedChildren")]), createVNode("span", {
              "class": `${prefixCls.value}-inner-unchecked`
            }, [getPropsSlot(slots, props2, "unCheckedChildren")])])])]
          }));
        };
      }
    });
    const Switch$1 = withInstall(Switch);
    var DeleteOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" };
    function _objectSpread$5(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$5(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$5(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var DeleteOutlined = function DeleteOutlined2(props2, context) {
      var p2 = _objectSpread$5({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$5({}, p2, {
        "icon": DeleteOutlined$1
      }), null);
    };
    DeleteOutlined.displayName = "DeleteOutlined";
    DeleteOutlined.inheritAttrs = false;
    var ArrowDownOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z" } }] }, "name": "arrow-down", "theme": "outlined" };
    function _objectSpread$4(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$4(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$4(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var ArrowDownOutlined = function ArrowDownOutlined2(props2, context) {
      var p2 = _objectSpread$4({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$4({}, p2, {
        "icon": ArrowDownOutlined$1
      }), null);
    };
    ArrowDownOutlined.displayName = "ArrowDownOutlined";
    ArrowDownOutlined.inheritAttrs = false;
    var ArrowUpOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z" } }] }, "name": "arrow-up", "theme": "outlined" };
    function _objectSpread$3(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$3(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$3(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var ArrowUpOutlined = function ArrowUpOutlined2(props2, context) {
      var p2 = _objectSpread$3({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$3({}, p2, {
        "icon": ArrowUpOutlined$1
      }), null);
    };
    ArrowUpOutlined.displayName = "ArrowUpOutlined";
    ArrowUpOutlined.inheritAttrs = false;
    var BorderOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "border", "theme": "outlined" };
    function _objectSpread$2(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$2(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$2(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var BorderOutlined = function BorderOutlined2(props2, context) {
      var p2 = _objectSpread$2({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$2({}, p2, {
        "icon": BorderOutlined$1
      }), null);
    };
    BorderOutlined.displayName = "BorderOutlined";
    BorderOutlined.inheritAttrs = false;
    var CheckSquareOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M433.1 657.7a31.8 31.8 0 0051.7 0l210.6-292c3.8-5.3 0-12.7-6.5-12.7H642c-10.2 0-19.9 4.9-25.9 13.3L459 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H315c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "check-square", "theme": "outlined" };
    function _objectSpread$1(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty$1(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty$1(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var CheckSquareOutlined = function CheckSquareOutlined2(props2, context) {
      var p2 = _objectSpread$1({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread$1({}, p2, {
        "icon": CheckSquareOutlined$1
      }), null);
    };
    CheckSquareOutlined.displayName = "CheckSquareOutlined";
    CheckSquareOutlined.inheritAttrs = false;
    var SyncOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z" } }] }, "name": "sync", "theme": "outlined" };
    function _objectSpread(target) {
      for (var i2 = 1; i2 < arguments.length; i2++) {
        var source = arguments[i2] != null ? Object(arguments[i2]) : {};
        var ownKeys2 = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
          ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
            return Object.getOwnPropertyDescriptor(source, sym).enumerable;
          }));
        }
        ownKeys2.forEach(function(key2) {
          _defineProperty(target, key2, source[key2]);
        });
      }
      return target;
    }
    function _defineProperty(obj, key2, value) {
      if (key2 in obj) {
        Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key2] = value;
      }
      return obj;
    }
    var SyncOutlined = function SyncOutlined2(props2, context) {
      var p2 = _objectSpread({}, props2, context.attrs);
      return createVNode(Icon, _objectSpread({}, p2, {
        "icon": SyncOutlined$1
      }), null);
    };
    SyncOutlined.displayName = "SyncOutlined";
    SyncOutlined.inheritAttrs = false;
    const _export_sfc = (sfc, props2) => {
      const target = sfc.__vccOpts || sfc;
      for (const [key2, val] of props2) {
        target[key2] = val;
      }
      return target;
    };
    const _sfc_main$1 = {};
    const _hoisted_1$1 = {
      class: "icon",
      style: { "width": "1em", "height": "1em", "vertical-align": "middle", "fill": "currentColor", "overflow": "hidden" },
      viewBox: "0 0 1024 1024",
      version: "1.1",
      xmlns: "http://www.w3.org/2000/svg"
    };
    const _hoisted_2$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M496 809.6c22.4 9.6 41.6 16 60.8 20.8-6.4 33.6-12.8 67.2-17.6 100.8-3.2 17.6-19.2 28.8-36.8 27.2-17.6-3.2-28.8-19.2-27.2-36.8 4.8-36.8 12.8-75.2 20.8-112z",
      fill: "#FFFFFF",
      "p-id": "770"
    }, null, -1);
    const _hoisted_3$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M467.2 859.2c-4.8-28.8-9.6-59.2-16-89.6 19.2-4.8 38.4-12.8 57.6-24 4.8 20.8 9.6 40 14.4 60.8-20.8 19.2-38.4 36.8-56 52.8z",
      fill: "#FFFFFF",
      "p-id": "771"
    }, null, -1);
    const _hoisted_4$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M539.2 924.8c1.6 17.6-12.8 33.6-30.4 33.6-17.6 1.6-33.6-12.8-33.6-30.4-22.4-337.6 115.2-816 131.2-808 16 6.4-89.6 475.2-67.2 804.8z",
      fill: "#3A8230",
      "p-id": "772"
    }, null, -1);
    const _hoisted_5$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M540.8 398.4c-40 192-60.8 380.8-49.6 529.6 0 9.6 8 16 17.6 14.4 9.6 0 16-8 14.4-17.6-4.8-72-3.2-155.2 1.6-248 6.4-89.6 16-184 30.4-289.6 3.2-28.8 12.8-86.4 19.2-131.2-11.2 43.2-22.4 91.2-33.6 142.4z m14.4 524.8c1.6 27.2-17.6 49.6-44.8 51.2-27.2 1.6-49.6-17.6-51.2-44.8-9.6-152 9.6-342.4 51.2-537.6 16-75.2 33.6-145.6 49.6-200 8-24 14.4-44.8 19.2-57.6 3.2-8 4.8-12.8 8-17.6 1.6-3.2 3.2-4.8 4.8-6.4 4.8-4.8 11.2-8 19.2-3.2 12.8 3.2 12.8 9.6 11.2 36.8-1.6 12.8-3.2 30.4-8 57.6 1.6-8-20.8 139.2-27.2 190.4-14.4 105.6-24 198.4-30.4 288-6.4 91.2-6.4 171.2-1.6 243.2z",
      fill: "#333333",
      "p-id": "773"
    }, null, -1);
    const _hoisted_6$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M539.2 928c-1.6 17.6-16 30.4-33.6 30.4-17.6-1.6-30.4-16-30.4-33.6 17.6-305.6-110.4-846.4-92.8-851.2 16-8 174.4 540.8 156.8 854.4z",
      fill: "#3A8230",
      "p-id": "774"
    }, null, -1);
    const _hoisted_7$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M443.2 382.4c12.8 78.4 22.4 148.8 30.4 216 16 131.2 20.8 240 16 326.4 0 9.6 6.4 16 14.4 17.6 9.6 0 16-6.4 17.6-14.4 8-137.6-17.6-332.8-65.6-544-12.8-56-25.6-110.4-40-158.4 11.2 52.8 22.4 123.2 27.2 156.8z m112 547.2c-1.6 27.2-24 46.4-51.2 44.8-27.2-1.6-46.4-24-44.8-51.2 4.8-84.8-1.6-192-16-321.6-8-67.2-17.6-136-30.4-214.4-9.6-59.2-38.4-235.2-36.8-220.8-4.8-32-8-52.8-9.6-67.2-3.2-33.6-3.2-36.8 9.6-43.2 20.8-8 28.8 8 54.4 97.6 19.2 60.8 40 139.2 57.6 222.4 48 214.4 75.2 412.8 67.2 553.6z",
      fill: "#333333",
      "p-id": "775"
    }, null, -1);
    const _hoisted_8$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M476.8 928c1.6 17.6 16 30.4 33.6 30.4 17.6-1.6 30.4-16 30.4-33.6-17.6-305.6-1.6-846.4-19.2-851.2-16-8-62.4 540.8-44.8 854.4z",
      fill: "#3A8230",
      "p-id": "776"
    }, null, -1);
    const _hoisted_9$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M515.2 380.8c0 112 0 156.8 1.6 219.2 1.6 134.4 3.2 240 8 324.8 0 9.6-6.4 16-14.4 17.6s-16-6.4-17.6-14.4c-8-140.8-3.2-342.4 9.6-545.6 3.2-54.4 8-107.2 11.2-152 1.6 35.2 1.6 81.6 1.6 150.4z m-54.4 548.8c1.6 27.2 24 46.4 51.2 44.8 27.2-1.6 46.4-24 44.8-51.2-4.8-83.2-8-188.8-8-323.2 0-62.4 0-107.2-1.6-219.2 0-323.2 0-316.8-19.2-323.2-9.6-3.2-16 0-20.8 6.4-1.6 1.6-3.2 4.8-3.2 8-1.6 4.8-3.2 11.2-4.8 19.2-3.2 16-6.4 38.4-9.6 65.6-6.4 57.6-12.8 136-19.2 222.4-12.8 203.2-17.6 408-9.6 550.4z",
      fill: "#333333",
      "p-id": "777"
    }, null, -1);
    const _hoisted_10$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M539.2 923.2c1.6 17.6-11.2 33.6-28.8 33.6-17.6 1.6-33.6-11.2-33.6-28.8C448 584 201.6 128 214.4 115.2S512 566.4 539.2 923.2z",
      fill: "#64B059",
      "p-id": "778"
    }, null, -1);
    const _hoisted_11$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M467.2 859.2c-4.8-28.8-9.6-59.2-16-89.6 19.2-4.8 38.4-12.8 57.6-24 4.8 20.8 9.6 40 14.4 60.8-20.8 19.2-38.4 36.8-56 52.8z",
      fill: "#E0F2D1",
      "p-id": "779"
    }, null, -1);
    const _hoisted_12$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M360 430.4c38.4 97.6 68.8 190.4 91.2 276.8 20.8 80 33.6 153.6 38.4 219.2 0 9.6 8 16 17.6 14.4 9.6 0 16-8 14.4-17.6-11.2-155.2-73.6-344-166.4-537.6-24-48-48-96-70.4-137.6 33.6 76.8 52.8 121.6 75.2 182.4z m195.2 492.8c1.6 27.2-17.6 49.6-44.8 51.2s-49.6-17.6-51.2-44.8c-4.8-64-17.6-136-38.4-214.4-22.4-86.4-52.8-176-89.6-273.6-27.2-72-49.6-123.2-94.4-224-17.6-38.4-24-54.4-28.8-68.8-12.8-32-14.4-36.8-3.2-46.4 6.4-6.4 14.4-4.8 20.8-1.6 1.6 1.6 4.8 3.2 6.4 4.8 3.2 3.2 8 8 12.8 16 9.6 12.8 22.4 32 36.8 56 33.6 54.4 70.4 123.2 105.6 195.2 92.8 196.8 155.2 390.4 168 550.4z",
      fill: "#333333",
      "p-id": "780"
    }, null, -1);
    const _hoisted_13$1 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M537.6 931.2c-3.2 17.6-19.2 28.8-36.8 27.2-17.6-3.2-28.8-19.2-27.2-36.8C540.8 492.8 747.2 68.8 761.6 80s-158.4 432-224 851.2z",
      fill: "#64B059",
      "p-id": "781"
    }, null, -1);
    const _hoisted_14 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M496 809.6c22.4 9.6 41.6 16 60.8 20.8-8 33.6-12.8 67.2-19.2 100.8-3.2 17.6-19.2 28.8-36.8 27.2-17.6-3.2-28.8-19.2-27.2-36.8 6.4-36.8 14.4-75.2 22.4-112z",
      fill: "#E0F2D1",
      "p-id": "782"
    }, null, -1);
    const _hoisted_15 = /* @__PURE__ */ createBaseVNode("path", {
      d: "M745.6 83.2z m-92.8 259.2C579.2 531.2 520 736 491.2 924.8c-1.6 8 4.8 17.6 12.8 17.6 8 1.6 17.6-4.8 17.6-12.8 0-4.8 1.6-8 1.6-12.8 20.8-134.4 54.4-276.8 97.6-430.4 25.6-91.2 44.8-152 86.4-280-16 40-35.2 86.4-54.4 136z m-99.2 592c-4.8 25.6-28.8 44.8-54.4 40-25.6-4.8-44.8-28.8-40-54.4 28.8-192 89.6-396.8 163.2-588.8 28.8-73.6 57.6-140.8 83.2-190.4 11.2-22.4 20.8-40 28.8-52.8 3.2-6.4 8-11.2 9.6-14.4l6.4-6.4c6.4-3.2 12.8-4.8 19.2 0 11.2 8 11.2 14.4 0 51.2-4.8 17.6-12.8 40-27.2 86.4-43.2 136-62.4 196.8-89.6 289.6-43.2 152-76.8 292.8-97.6 425.6 0 4.8 0 9.6-1.6 14.4z",
      fill: "#333333",
      "p-id": "783"
    }, null, -1);
    const _hoisted_16 = [
      _hoisted_2$1,
      _hoisted_3$1,
      _hoisted_4$1,
      _hoisted_5$1,
      _hoisted_6$1,
      _hoisted_7$1,
      _hoisted_8$1,
      _hoisted_9$1,
      _hoisted_10$1,
      _hoisted_11$1,
      _hoisted_12$1,
      _hoisted_13$1,
      _hoisted_14,
      _hoisted_15
    ];
    function _sfc_render(_ctx, _cache) {
      return openBlock(), createElementBlock("svg", _hoisted_1$1, _hoisted_16);
    }
    const IconLeek = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
    class LimitedSet {
      constructor(value, maxSize = 20) {
        __publicField(this, "maxSize");
        __publicField(this, "set");
        this.maxSize = maxSize;
        this.set = new Set(value);
      }
      add(...values) {
        values.forEach((value) => this.set.add(value));
        while (this.set.size > this.maxSize) {
          const firstValue = this.set.values().next().value;
          this.set.delete(firstValue);
        }
      }
      has(value) {
        return this.set.has(value);
      }
      delete(value) {
        return this.set.delete(value);
      }
      clear() {
        this.set.clear();
      }
      size() {
        return this.set.size;
      }
      values() {
        return this.set.values();
      }
      toJSON() {
        return Array.from(this.set);
      }
    }
    const _hoisted_1 = { class: "leek-drawer-footer" };
    const _hoisted_2 = { class: "leek-search" };
    const _hoisted_3 = { class: "leek-search-sticky" };
    const _hoisted_4 = { class: "leek-select-item" };
    const _hoisted_5 = { class: "leek-select-item-label" };
    const _hoisted_6 = { class: "leek-search-history" };
    const _hoisted_7 = { class: "leek-search-history-title" };
    const _hoisted_8 = /* @__PURE__ */ createBaseVNode("h4", null, "历史搜索", -1);
    const _hoisted_9 = { class: "leek-search-history-clear" };
    const _hoisted_10 = { class: "leek-search-history-content" };
    const _hoisted_11 = { class: "leek-search-main" };
    const _hoisted_12 = { class: "leek-select-item" };
    const _hoisted_13 = { class: "leek-select-item-label" };
    const maxSelectCount = 5;
    const _sfc_main = /* @__PURE__ */ defineComponent({
      __name: "App",
      setup(__props) {
        ConfigProvider.config({
          prefixCls: "antVue"
        });
        let sandbox = void 0;
        if (typeof unsafeWindow !== "undefined") {
          sandbox = {
            window: unsafeWindow,
            getValue: GM_getValue,
            setValue: GM_setValue
          };
        } else {
          sandbox = {
            window,
            getValue: (key2, defaultValue) => {
              const leekCachesString = sessionStorage.getItem(key2) || `'${defaultValue}'`;
              try {
                return JSON.parse(leekCachesString);
              } catch (error) {
                console.error("Failed to parse JSON:", error);
                sessionStorage.removeItem(key2);
                return defaultValue;
              }
            },
            setValue: (key2, json) => {
              sessionStorage.setItem(key2, JSON.stringify(json));
            }
          };
        }
        const appVersion = "1.1.2";
        const defaultSettings = {
          runMode: "single",
          showMode: "always",
          order: "price-1",
          extra: false
        };
        const setting = reactive({
          ...defaultSettings,
          historyItems: new LimitedSet([], 10),
          selectedItems: computed({
            get: () => {
              if (isSingleMode()) {
                const key2 = Object.keys(formModel).find((key22) => formModel[key22]);
                return key2 ? formModel[key2] : "";
              } else {
                const _all = [];
                Object.keys(formModel).map((key2) => {
                  if (formModel[key2]) _all.push(...formModel[key2]);
                });
                return _all;
              }
            },
            set: (vals) => {
              if (isSingleMode()) {
                const { typeName } = dataMap[vals] || {};
                Object.keys(formModel).map((key2) => {
                  if (key2 === typeName) {
                    formModel[key2] = vals;
                  } else {
                    formModel[key2] = "";
                  }
                });
              } else {
                const _formModel = {};
                isArray$1(vals) && vals.map((val) => {
                  const { typeName } = dataMap[val] || {};
                  if (typeName) {
                    if (!_formModel[typeName]) {
                      _formModel[typeName] = [];
                    }
                    _formModel[typeName].push(val);
                  } else {
                    console.warn(`${typeName} is missing`);
                  }
                });
                Object.keys(formModel).map((key2) => {
                  formModel[key2] = _formModel[key2] || [];
                });
              }
            }
          })
        });
        const formRef = ref(null);
        const formModel = reactive({});
        const formInfo = reactive([]);
        const selectedItemsInfo = ref({
          label: "所有外观",
          options: []
        });
        const dataMap = {};
        const openRef = ref(false);
        const isSingleMode = () => {
          return setting.runMode === "single";
        };
        const isAutoMode = () => {
          return setting.showMode === "auto";
        };
        const onClose = () => {
          openRef.value = false;
        };
        const onOpen = () => {
          var _a, _b;
          (_b = (_a = sandbox.window) == null ? void 0 : _a.buyerStore) == null ? void 0 : _b.setBuyActiveTab("skin");
          check();
          openRef.value = true;
        };
        const loadCaches = () => {
          let leekSetting = sandbox.getValue("leekSetting", {});
          const { historyItems = [], ...leekCachesWithoutHistory } = leekSetting;
          historyTagsAdd(historyItems);
          Object.assign(setting, {
            ...defaultSettings,
            ...leekCachesWithoutHistory
          });
        };
        const fetchItems = async () => {
          let data;
          try {
            const response = await fetch("https://www.aijx3.cn/api/wblwg/basedata/getSearchData", {
              method: "POST"
            });
            if (!response.ok) {
              throw new Error("Network response was not ok " + response.statusText);
            }
            data = await response.json();
          } catch (error) {
            console.error("There has been a problem with your fetch operation:", error);
            return [];
          }
          return (data == null ? void 0 : data.data) || [];
        };
        watch(
          () => setting.runMode,
          () => {
            onReset(false);
          }
        );
        const onChange = (name) => (value, options) => {
          if (!isSingleMode()) {
            if (setting.selectedItems.length > maxSelectCount) {
              api$1.error(`同时最大可选物品数量 ${maxSelectCount}`);
              if (name !== selectedItemsInfo.value.label) {
                formModel[name] = value.slice(0, value.length - 1);
              } else {
                setting.selectedItems = value.slice(0, value.length - 1);
              }
            }
          } else {
            const { typeName } = options;
            Object.keys(formModel).map((key2) => {
              if (key2 !== typeName) {
                formModel[key2] = "";
              }
            });
          }
        };
        const getPopupContainer = (triggerNode) => triggerNode.parentNode;
        const onReset = (force = true) => {
          if (force) {
            Object.assign(setting, {
              ...defaultSettings
            });
          }
          Object.keys(formModel).map((key2) => {
            formModel[key2] = isSingleMode() ? "" : [];
          });
        };
        const onSearch = () => {
          var _a, _b, _c;
          if (isAutoMode()) openRef.value = false;
          (_c = (_b = (_a = sandbox.window) == null ? void 0 : _a.searchButton) == null ? void 0 : _b.props) == null ? void 0 : _c.onClick();
        };
        const onUpdate = () => {
          init(true);
        };
        watch(
          formModel,
          () => {
            check();
            onSearch();
          },
          {
            deep: true
          }
        );
        const check = () => {
          syncSort();
          sandboxSelect(setting.selectedItems);
        };
        const remainingMaxCount = computed(() => {
          if (isSingleMode()) {
            return "";
          }
          return maxSelectCount - setting.selectedItems.length;
        });
        const sandboxSelect = (values) => {
          var _a, _b, _c, _d, _e;
          let arrayValues = castArray(values);
          if ((_b = (_a = sandbox.window) == null ? void 0 : _a.buyerFilter) == null ? void 0 : _b.selectedList)
            sandbox.window.buyerFilter.selectedList = arrayValues.map((name) => ({
              name
            }));
          (_e = (_d = (_c = sandbox.window) == null ? void 0 : _c.buyerFilter) == null ? void 0 : _d.roleFilterStore) == null ? void 0 : _e.setCurrentAppearance(arrayValues, false);
        };
        const selectFilter = (inputValue, option) => {
          option.search = inputValue;
          return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0;
        };
        const selectSelect = (value) => {
          historyTagsAdd(value);
        };
        watch(
          () => setting.order,
          () => {
            syncSort();
          },
          {}
        );
        const syncSort = () => {
          var _a, _b, _c, _d;
          const [sortType, sortOrder] = setting.order.split("-");
          (_b = (_a = sandbox.window) == null ? void 0 : _a.buyerStore) == null ? void 0 : _b.setSortType(sortType);
          (_d = (_c = sandbox.window) == null ? void 0 : _c.buyerStore) == null ? void 0 : _d.setSortOrder(sortOrder);
        };
        const historyTagsAdd = (value) => {
          setting.historyItems.add(...castArray(value));
        };
        const historyTagsClose = (text) => {
          setting.historyItems.delete(text);
        };
        const historyTagsClick = (text) => {
          if (isSingleMode()) {
            setting.selectedItems = text;
          } else {
            if (setting.selectedItems.includes(text)) {
              api$1.error(`${text} 已存在`);
            } else if (setting.selectedItems.length >= maxSelectCount) {
              api$1.error(`同时最大可选物品数量 ${maxSelectCount}`);
            } else {
              const items = [...setting.selectedItems];
              items.push(text);
              setting.selectedItems = items;
            }
          }
        };
        const historyTagsClear = () => {
          setting.historyItems.clear();
        };
        const historyTagTransform = (tag) => {
          const { name, showName } = dataMap[tag];
          return `${name}(${showName})`;
        };
        watch(
          () => setting,
          () => {
            sandbox.setValue("leekSetting", JSON.parse(JSON.stringify(setting)));
          },
          {
            deep: true
          }
        );
        const updateItems = (version2, data) => {
          sandbox.setValue("leekItemData", data);
          sandbox.setValue("leekItemVersion", version2);
        };
        const isLoading = ref(true);
        const init = async (force = false) => {
          isLoading.value = true;
          const itemVersion = sandbox.getValue("leekItemVersion");
          let itemData = sandbox.getValue("leekItemData");
          const now2 = (/* @__PURE__ */ new Date()).getTime();
          if (force || !itemVersion || now2 - itemVersion > 24 * 60 * 60 * 1e3 || !itemData || isEmpty(itemData)) {
            console.log(`Item data must be updated`);
            itemData = await fetchItems();
            updateItems(now2, itemData);
          } else {
            console.log(`Use item data from cache`);
          }
          isLoading.value = false;
          const itemCategories = itemData;
          let info = [];
          itemCategories.forEach((cat) => {
            if (!formModel[cat.typeName]) formModel[cat.typeName] = [];
            const options = cat.dataModels.map((item) => {
              let { name, showName, typeName, searchDescType, searchId } = item;
              if (typeName === "其他成衣" && searchDescType === "盒子成衣" && !showName.includes("·衣")) {
                showName = `${showName}·衣`;
              }
              dataMap[showName] = { ...item, showName };
              return {
                label: `${name}(${showName})`,
                value: showName,
                typeName,
                searchDescType,
                searchId
              };
            });
            info.push({
              label: cat.typeName,
              options
            });
            selectedItemsInfo.value.options.push(...options);
          });
          formInfo.push(...info);
          sandboxSelect([]);
          loadCaches();
        };
        init();
        return (_ctx, _cache) => {
          return openBlock(), createBlock(unref(ConfigProvider), {
            "prefix-cls": "antVue",
            theme: {
              token: {
                colorPrimary: "#149ea8"
              }
            }
          }, {
            default: withCtx(() => [
              (openBlock(), createBlock(Teleport, { to: "body" }, [
                createBaseVNode("div", {
                  class: normalizeClass(["leek-btn-start", { "leek-fly-out": openRef.value, "leek-growing": !openRef.value }]),
                  onClick: onOpen
                }, [
                  createVNode(IconLeek)
                ], 2)
              ])),
              createVNode(unref(Drawer$1), {
                width: 480,
                open: openRef.value,
                onClose,
                class: "leek-drawer",
                mask: isAutoMode(),
                autofocus: ""
              }, {
                title: withCtx(() => [
                  createTextVNode(toDisplayString(isSingleMode() ? "选择外观" : "外观可选数量") + " ", 1),
                  withDirectives(createBaseVNode("span", { class: "leek-count" }, "(" + toDisplayString(remainingMaxCount.value) + ")", 513), [
                    [vShow, !isSingleMode()]
                  ])
                ]),
                footer: withCtx(() => [
                  createBaseVNode("div", _hoisted_1, "Version: " + toDisplayString(unref(appVersion)), 1)
                ]),
                extra: withCtx(() => [
                  createVNode(unref(Space), null, {
                    default: withCtx(() => [
                      createVNode(unref(Button), { onClick: onReset }, {
                        default: withCtx(() => [
                          createTextVNode("重置")
                        ]),
                        _: 1
                      }),
                      createVNode(unref(Button), {
                        type: "primary",
                        onClick: onUpdate,
                        loading: isLoading.value
                      }, {
                        default: withCtx(() => [
                          createTextVNode("更新外观数据")
                        ]),
                        _: 1
                      }, 8, ["loading"])
                    ]),
                    _: 1
                  })
                ]),
                default: withCtx(() => [
                  createBaseVNode("section", _hoisted_2, [
                    createVNode(unref(Form), {
                      ref_key: "formRef",
                      ref: formRef,
                      model: formModel
                    }, {
                      default: withCtx(() => [
                        createBaseVNode("div", _hoisted_3, [
                          (openBlock(), createBlock(unref(FormItem), {
                            key: "弹窗模式",
                            label: "弹窗模式",
                            name: "showMode"
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(RadioGroup), {
                                value: setting.showMode,
                                "onUpdate:value": _cache[0] || (_cache[0] = ($event) => setting.showMode = $event),
                                "button-style": "solid"
                              }, {
                                default: withCtx(() => [
                                  createVNode(unref(RadioButton), { value: "auto" }, {
                                    default: withCtx(() => [
                                      createTextVNode(" 自动 "),
                                      createVNode(unref(SyncOutlined))
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(RadioButton), { value: "always" }, {
                                    default: withCtx(() => [
                                      createTextVNode(" 常驻 "),
                                      createVNode(unref(BorderOutlined))
                                    ]),
                                    _: 1
                                  })
                                ]),
                                _: 1
                              }, 8, ["value"])
                            ]),
                            _: 1
                          })),
                          (openBlock(), createBlock(unref(FormItem), {
                            key: "运行模式",
                            label: "运行模式",
                            name: "runMode"
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(RadioGroup), {
                                value: setting.runMode,
                                "onUpdate:value": _cache[1] || (_cache[1] = ($event) => setting.runMode = $event),
                                "button-style": "solid"
                              }, {
                                default: withCtx(() => [
                                  createVNode(unref(RadioButton), { value: "single" }, {
                                    default: withCtx(() => [
                                      createTextVNode(" 单选 "),
                                      createVNode(unref(CheckCircleOutlined))
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(RadioButton), { value: "multiple" }, {
                                    default: withCtx(() => [
                                      createTextVNode(" 多选 "),
                                      createVNode(unref(CheckSquareOutlined))
                                    ]),
                                    _: 1
                                  })
                                ]),
                                _: 1
                              }, 8, ["value"])
                            ]),
                            _: 1
                          })),
                          (openBlock(), createBlock(unref(FormItem), {
                            key: "排序方式",
                            label: "排序方式",
                            name: "order"
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(RadioGroup), {
                                value: setting.order,
                                "onUpdate:value": _cache[2] || (_cache[2] = ($event) => setting.order = $event),
                                "button-style": "solid"
                              }, {
                                default: withCtx(() => [
                                  createVNode(unref(RadioButton), { value: "price-1" }, {
                                    default: withCtx(() => [
                                      createTextVNode(" 价格 "),
                                      createVNode(unref(ArrowUpOutlined))
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(RadioButton), { value: "price-0" }, {
                                    default: withCtx(() => [
                                      createTextVNode("价格 "),
                                      createVNode(unref(ArrowDownOutlined))
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(RadioButton), { value: "followed_num-1" }, {
                                    default: withCtx(() => [
                                      createTextVNode("关注 "),
                                      createVNode(unref(ArrowUpOutlined))
                                    ]),
                                    _: 1
                                  }),
                                  createVNode(unref(RadioButton), { value: "followed_num-0" }, {
                                    default: withCtx(() => [
                                      createTextVNode("关注 "),
                                      createVNode(unref(ArrowDownOutlined))
                                    ]),
                                    _: 1
                                  })
                                ]),
                                _: 1
                              }, 8, ["value"])
                            ]),
                            _: 1
                          })),
                          (openBlock(), createBlock(unref(FormItem), {
                            key: "分类搜索",
                            label: "分类搜索",
                            name: "extra"
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(Switch$1), {
                                checked: setting.extra,
                                "onUpdate:checked": _cache[3] || (_cache[3] = ($event) => setting.extra = $event)
                              }, null, 8, ["checked"])
                            ]),
                            _: 1
                          })),
                          (openBlock(), createBlock(unref(FormItem), {
                            key: selectedItemsInfo.value.label,
                            label: selectedItemsInfo.value.label,
                            name: "selectedItemsInfo.label"
                          }, {
                            default: withCtx(() => [
                              createVNode(unref(Select), {
                                class: "leek-search-select",
                                "popup-class-name": "leek-search-select-popup",
                                onChange: _cache[4] || (_cache[4] = (value, options) => onChange(selectedItemsInfo.value.label)(value, options)),
                                onSelect: selectSelect,
                                options: selectedItemsInfo.value.options,
                                mode: isSingleMode() ? void 0 : "multiple",
                                "show-search": "",
                                "allow-clear": "",
                                "filter-option": selectFilter,
                                value: setting.selectedItems,
                                "onUpdate:value": _cache[5] || (_cache[5] = ($event) => setting.selectedItems = $event),
                                "max-tag-count": 10,
                                "get-popup-container": getPopupContainer
                              }, {
                                option: withCtx(({ label, searchDescType }) => [
                                  createBaseVNode("div", _hoisted_4, [
                                    createBaseVNode("span", _hoisted_5, toDisplayString(label), 1),
                                    createVNode(unref(Tag), {
                                      class: "leek-select-item-tag",
                                      color: "default"
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode(toDisplayString(searchDescType), 1)
                                      ]),
                                      _: 2
                                    }, 1024)
                                  ])
                                ]),
                                _: 1
                              }, 8, ["options", "mode", "value"])
                            ]),
                            _: 1
                          }, 8, ["label"])),
                          withDirectives(createBaseVNode("div", _hoisted_6, [
                            createBaseVNode("div", _hoisted_7, [
                              _hoisted_8,
                              createBaseVNode("div", _hoisted_9, [
                                createVNode(unref(DeleteOutlined), { onClick: historyTagsClear })
                              ])
                            ]),
                            createBaseVNode("div", _hoisted_10, [
                              createVNode(unref(Space), {
                                size: [0, "small"],
                                wrap: ""
                              }, {
                                default: withCtx(() => [
                                  (openBlock(true), createElementBlock(Fragment, null, renderList(setting.historyItems.toJSON().reverse(), (tag) => {
                                    return openBlock(), createBlock(unref(Tag), {
                                      class: "leek-search-history-tag",
                                      key: tag,
                                      bordered: false,
                                      closable: "",
                                      onClick: ($event) => historyTagsClick(tag),
                                      onClose: ($event) => historyTagsClose(tag)
                                    }, {
                                      default: withCtx(() => [
                                        createTextVNode(toDisplayString(historyTagTransform(tag)), 1)
                                      ]),
                                      _: 2
                                    }, 1032, ["onClick", "onClose"]);
                                  }), 128))
                                ]),
                                _: 1
                              })
                            ])
                          ], 512), [
                            [vShow, setting.historyItems.size()]
                          ])
                        ]),
                        withDirectives(createBaseVNode("div", _hoisted_11, [
                          (openBlock(true), createElementBlock(Fragment, null, renderList(formInfo, (item) => {
                            return openBlock(), createBlock(unref(FormItem), {
                              key: item.label,
                              label: item.label,
                              name: item.label
                            }, {
                              default: withCtx(() => [
                                createVNode(unref(Select), {
                                  class: "leek-search-select",
                                  "popup-class-name": "leek-search-select-popup",
                                  onChange: (value, options) => onChange(item.label)(value, options),
                                  onSelect: selectSelect,
                                  options: item.options,
                                  mode: isSingleMode() ? void 0 : "multiple",
                                  "show-search": "",
                                  "allow-clear": "",
                                  "filter-option": selectFilter,
                                  "get-popup-container": getPopupContainer,
                                  value: formModel[item.label],
                                  "onUpdate:value": ($event) => formModel[item.label] = $event
                                }, {
                                  option: withCtx(({ label, searchDescType }) => [
                                    createBaseVNode("div", _hoisted_12, [
                                      createBaseVNode("span", _hoisted_13, toDisplayString(label), 1),
                                      createVNode(unref(Tag), {
                                        class: "leek-select-item-tag",
                                        color: "default"
                                      }, {
                                        default: withCtx(() => [
                                          createTextVNode(toDisplayString(searchDescType), 1)
                                        ]),
                                        _: 2
                                      }, 1024)
                                    ])
                                  ]),
                                  _: 2
                                }, 1032, ["onChange", "options", "mode", "value", "onUpdate:value"])
                              ]),
                              _: 2
                            }, 1032, ["label", "name"]);
                          }), 128))
                        ], 512), [
                          [vShow, setting.extra]
                        ])
                      ]),
                      _: 1
                    }, 8, ["model"])
                  ])
                ]),
                _: 1
              }, 8, ["open", "mask"])
            ]),
            _: 1
          });
        };
      }
    });
    createApp(_sfc_main).mount("#leek-app");
  }
});
 require_index();


  }



})();