小红书视频图片下载与预览

小红书媒体文件下载与图片预览,已集成迅雷,欢迎使用

// ==UserScript==
// @name         小红书视频图片下载与预览
// @namespace    xiaohongshu
// @version      0.4.8
// @author       xiaoma
// @description  小红书媒体文件下载与图片预览,已集成迅雷,欢迎使用
// @license      MIT
// @icon         https://picasso-static.xiaohongshu.com/fe-platform/f43dc4a8baf03678996c62d8db6ebc01a82256ff.png
// @match        https://www.xiaohongshu.com/*
// @match        https://www.xiaohongshu.com/explore/*
// @require      https://cdn.jsdelivr.net/npm/thunderlink@1.5.2/src/index.min.js
// @require      https://cdn.jsdelivr.net/npm/vue@3.4.27/dist/vue.global.prod.js
// @require      data:application/javascript,%3Bwindow.Vue%3DVue%3B
// @resource     viewerjs/dist/viewer.css  https://cdn.jsdelivr.net/npm/viewerjs@1.11.6/dist/viewer.css
// @grant        GM_addStyle
// @grant        GM_getResourceText
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        unsafeWindow
// ==/UserScript==

(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const o=document.createElement("style");o.textContent=e,document.head.append(o)})(' @charset "UTF-8";:root{--el-color-white: #ffffff;--el-color-black: #000000;--el-color-primary-rgb: 255, 46, 77;--el-color-success-rgb: 103, 194, 58;--el-color-warning-rgb: 230, 162, 60;--el-color-danger-rgb: 245, 108, 108;--el-color-error-rgb: 245, 108, 108;--el-color-info-rgb: 144, 147, 153;--el-font-size-extra-large: 20px;--el-font-size-large: 18px;--el-font-size-medium: 16px;--el-font-size-base: 14px;--el-font-size-small: 13px;--el-font-size-extra-small: 12px;--el-font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\u5FAE\u8F6F\u96C5\u9ED1", Arial, sans-serif;--el-font-weight-primary: 500;--el-font-line-height-primary: 24px;--el-index-normal: 1;--el-index-top: 1000;--el-index-popper: 2000;--el-border-radius-base: 4px;--el-border-radius-small: 2px;--el-border-radius-round: 20px;--el-border-radius-circle: 100%;--el-transition-duration: .3s;--el-transition-duration-fast: .2s;--el-transition-function-ease-in-out-bezier: cubic-bezier(.645, .045, .355, 1);--el-transition-function-fast-bezier: cubic-bezier(.23, 1, .32, 1);--el-transition-all: all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade: opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade: transform var(--el-transition-duration) var(--el-transition-function-fast-bezier), opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear: opacity var(--el-transition-duration-fast) linear;--el-transition-border: border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow: box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color: color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large: 40px;--el-component-size: 32px;--el-component-size-small: 24px}:root{color-scheme:light;--el-color-primary: #ff2e4d;--el-color-primary-light-3: #ff6d82;--el-color-primary-light-5: #ff97a6;--el-color-primary-light-7: #ffc0ca;--el-color-primary-light-8: #ffd5db;--el-color-primary-light-9: #ffeaed;--el-color-primary-dark-2: #cc253e;--el-color-success: #67c23a;--el-color-success-light-3: #95d475;--el-color-success-light-5: #b3e19d;--el-color-success-light-7: #d1edc4;--el-color-success-light-8: #e1f3d8;--el-color-success-light-9: #f0f9eb;--el-color-success-dark-2: #529b2e;--el-color-warning: #e6a23c;--el-color-warning-light-3: #eebe77;--el-color-warning-light-5: #f3d19e;--el-color-warning-light-7: #f8e3c5;--el-color-warning-light-8: #faecd8;--el-color-warning-light-9: #fdf6ec;--el-color-warning-dark-2: #b88230;--el-color-danger: #f56c6c;--el-color-danger-light-3: #f89898;--el-color-danger-light-5: #fab6b6;--el-color-danger-light-7: #fcd3d3;--el-color-danger-light-8: #fde2e2;--el-color-danger-light-9: #fef0f0;--el-color-danger-dark-2: #c45656;--el-color-error: #f56c6c;--el-color-error-light-3: #f89898;--el-color-error-light-5: #fab6b6;--el-color-error-light-7: #fcd3d3;--el-color-error-light-8: #fde2e2;--el-color-error-light-9: #fef0f0;--el-color-error-dark-2: #c45656;--el-color-info: #909399;--el-color-info-light-3: #b1b3b8;--el-color-info-light-5: #c8c9cc;--el-color-info-light-7: #dedfe0;--el-color-info-light-8: #e9e9eb;--el-color-info-light-9: #f4f4f5;--el-color-info-dark-2: #73767a;--el-bg-color: #ffffff;--el-bg-color-page: #f2f3f5;--el-bg-color-overlay: #ffffff;--el-text-color-primary: #303133;--el-text-color-regular: #606266;--el-text-color-secondary: #909399;--el-text-color-placeholder: #a8abb2;--el-text-color-disabled: #c0c4cc;--el-border-color: #dcdfe6;--el-border-color-light: #e4e7ed;--el-border-color-lighter: #ebeef5;--el-border-color-extra-light: #f2f6fc;--el-border-color-dark: #d4d7de;--el-border-color-darker: #cdd0d6;--el-fill-color: #f0f2f5;--el-fill-color-light: #f5f7fa;--el-fill-color-lighter: #fafafa;--el-fill-color-extra-light: #fafcff;--el-fill-color-dark: #ebedf0;--el-fill-color-darker: #e6e8eb;--el-fill-color-blank: #ffffff;--el-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, .04), 0px 8px 20px rgba(0, 0, 0, .08);--el-box-shadow-light: 0px 0px 12px rgba(0, 0, 0, .12);--el-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, .12);--el-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, .08), 0px 12px 32px rgba(0, 0, 0, .12), 0px 8px 16px -8px rgba(0, 0, 0, .16);--el-disabled-bg-color: var(--el-fill-color-light);--el-disabled-text-color: var(--el-text-color-placeholder);--el-disabled-border-color: var(--el-border-color-light);--el-overlay-color: rgba(0, 0, 0, .8);--el-overlay-color-light: rgba(0, 0, 0, .7);--el-overlay-color-lighter: rgba(0, 0, 0, .5);--el-mask-color: rgba(255, 255, 255, .9);--el-mask-color-extra-light: rgba(255, 255, 255, .3);--el-border-width: 1px;--el-border-style: solid;--el-border-color-hover: var(--el-text-color-disabled);--el-border: var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey: var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center top}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:center bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transform:scaleY(1);transition:var(--el-transition-md-fade);transform-origin:center bottom}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transform:scale(1);transition:var(--el-transition-md-fade);transform-origin:top left}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-leave-active,.el-collapse-transition-enter-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-icon-loading{animation:rotating 2s linear infinite}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.el-icon{--color: inherit;height:1em;width:1em;line-height:1em;display:inline-flex;justify-content:center;align-items:center;position:relative;fill:currentColor;color:var(--color);font-size:inherit}.el-icon.is-loading{animation:rotating 2s linear infinite}.el-icon svg{height:1em;width:1em}.el-drawer{--el-drawer-bg-color: var(--el-dialog-bg-color, var(--el-bg-color));--el-drawer-padding-primary: var(--el-dialog-padding-primary, 20px)}.el-drawer{position:absolute;box-sizing:border-box;background-color:var(--el-drawer-bg-color);display:flex;flex-direction:column;box-shadow:var(--el-box-shadow-dark);overflow:hidden;transition:all var(--el-transition-duration)}.el-drawer .rtl,.el-drawer .ltr,.el-drawer .ttb,.el-drawer .btt{transform:translate(0)}.el-drawer__sr-focus:focus{outline:none!important}.el-drawer__header{align-items:center;color:#72767b;display:flex;margin-bottom:32px;padding:var(--el-drawer-padding-primary);padding-bottom:0}.el-drawer__header>:first-child{flex:1}.el-drawer__title{margin:0;flex:1;line-height:inherit;font-size:1rem}.el-drawer__footer{padding:var(--el-drawer-padding-primary);padding-top:10px;text-align:right}.el-drawer__close-btn{display:inline-flex;border:none;cursor:pointer;font-size:var(--el-font-size-extra-large);color:inherit;background-color:transparent;outline:none}.el-drawer__close-btn:focus i,.el-drawer__close-btn:hover i{color:var(--el-color-primary)}.el-drawer__body{flex:1;padding:var(--el-drawer-padding-primary);overflow:auto}.el-drawer__body>*{box-sizing:border-box}.el-drawer.ltr,.el-drawer.rtl{height:100%;top:0;bottom:0}.el-drawer.ttb,.el-drawer.btt{width:100%;left:0;right:0}.el-drawer.ltr{left:0}.el-drawer.rtl{right:0}.el-drawer.ttb{top:0}.el-drawer.btt{bottom:0}.el-drawer-fade-enter-active,.el-drawer-fade-leave-active{transition:all var(--el-transition-duration)}.el-drawer-fade-enter-from,.el-drawer-fade-enter-active,.el-drawer-fade-enter-to,.el-drawer-fade-leave-from,.el-drawer-fade-leave-active,.el-drawer-fade-leave-to{overflow:hidden!important}.el-drawer-fade-enter-from,.el-drawer-fade-leave-to{opacity:0}.el-drawer-fade-enter-to,.el-drawer-fade-leave-from{opacity:1}.el-drawer-fade-enter-from .rtl,.el-drawer-fade-leave-to .rtl{transform:translate(100%)}.el-drawer-fade-enter-from .ltr,.el-drawer-fade-leave-to .ltr{transform:translate(-100%)}.el-drawer-fade-enter-from .ttb,.el-drawer-fade-leave-to .ttb{transform:translateY(-100%)}.el-drawer-fade-enter-from .btt,.el-drawer-fade-leave-to .btt{transform:translateY(100%)}.el-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;height:100%;background-color:var(--el-overlay-color-lighter);overflow:auto}.el-overlay .el-overlay-root{height:0}.el-button{--el-button-font-weight: var(--el-font-weight-primary);--el-button-border-color: var(--el-border-color);--el-button-bg-color: var(--el-fill-color-blank);--el-button-text-color: var(--el-text-color-regular);--el-button-disabled-text-color: var(--el-disabled-text-color);--el-button-disabled-bg-color: var(--el-fill-color-blank);--el-button-disabled-border-color: var(--el-border-color-light);--el-button-divide-border-color: rgba(255, 255, 255, .5);--el-button-hover-text-color: var(--el-color-primary);--el-button-hover-bg-color: var(--el-color-primary-light-9);--el-button-hover-border-color: var(--el-color-primary-light-7);--el-button-active-text-color: var(--el-button-hover-text-color);--el-button-active-border-color: var(--el-color-primary);--el-button-active-bg-color: var(--el-button-hover-bg-color);--el-button-outline-color: var(--el-color-primary-light-5);--el-button-hover-link-text-color: var(--el-color-info);--el-button-active-color: var(--el-text-color-primary)}.el-button{display:inline-flex;justify-content:center;align-items:center;line-height:1;height:32px;white-space:nowrap;cursor:pointer;color:var(--el-button-text-color);text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:var(--el-button-font-weight);-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;background-color:var(--el-button-bg-color);border:var(--el-border);border-color:var(--el-button-border-color);padding:8px 15px;font-size:var(--el-font-size-base);border-radius:var(--el-border-radius-base)}.el-button:hover{color:var(--el-button-hover-text-color);border-color:var(--el-button-hover-border-color);background-color:var(--el-button-hover-bg-color);outline:none}.el-button:active{color:var(--el-button-active-text-color);border-color:var(--el-button-active-border-color);background-color:var(--el-button-active-bg-color);outline:none}.el-button:focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px;transition:outline-offset 0s,outline 0s}.el-button>span{display:inline-flex;align-items:center}.el-button+.el-button{margin-left:12px}.el-button.is-round{padding:8px 15px}.el-button::-moz-focus-inner{border:0}.el-button [class*=el-icon]+span{margin-left:6px}.el-button [class*=el-icon] svg{vertical-align:bottom}.el-button.is-plain{--el-button-hover-text-color: var(--el-color-primary);--el-button-hover-bg-color: var(--el-fill-color-blank);--el-button-hover-border-color: var(--el-color-primary)}.el-button.is-active{color:var(--el-button-active-text-color);border-color:var(--el-button-active-border-color);background-color:var(--el-button-active-bg-color);outline:none}.el-button.is-disabled,.el-button.is-disabled:hover{color:var(--el-button-disabled-text-color);cursor:not-allowed;background-image:none;background-color:var(--el-button-disabled-bg-color);border-color:var(--el-button-disabled-border-color)}.el-button.is-loading{position:relative;pointer-events:none}.el-button.is-loading:before{z-index:1;pointer-events:none;content:"";position:absolute;left:-1px;top:-1px;right:-1px;bottom:-1px;border-radius:inherit;background-color:var(--el-mask-color-extra-light)}.el-button.is-round{border-radius:var(--el-border-radius-round)}.el-button.is-circle{width:32px;border-radius:50%;padding:8px}.el-button.is-text{color:var(--el-button-text-color);border:0 solid transparent;background-color:transparent}.el-button.is-text.is-disabled{color:var(--el-button-disabled-text-color);background-color:transparent!important}.el-button.is-text:not(.is-disabled):hover{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled):focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px;transition:outline-offset 0s,outline 0s}.el-button.is-text:not(.is-disabled):active{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled).is-has-bg:hover{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg:active{background-color:var(--el-fill-color-dark)}.el-button__text--expand{letter-spacing:.3em;margin-right:-.3em}.el-button.is-link{border-color:transparent;color:var(--el-button-text-color);background:transparent;padding:2px;height:auto}.el-button.is-link:hover{color:var(--el-button-hover-link-text-color)}.el-button.is-link.is-disabled{color:var(--el-button-disabled-text-color);background-color:transparent!important;border-color:transparent!important}.el-button.is-link:not(.is-disabled):hover{border-color:transparent;background-color:transparent}.el-button.is-link:not(.is-disabled):active{color:var(--el-button-active-color);border-color:transparent;background-color:transparent}.el-button--text{border-color:transparent;background:transparent;color:var(--el-color-primary);padding-left:0;padding-right:0}.el-button--text.is-disabled{color:var(--el-button-disabled-text-color);background-color:transparent!important;border-color:transparent!important}.el-button--text:not(.is-disabled):hover{color:var(--el-color-primary-light-3);border-color:transparent;background-color:transparent}.el-button--text:not(.is-disabled):active{color:var(--el-color-primary-dark-2);border-color:transparent;background-color:transparent}.el-button__link--expand{letter-spacing:.3em;margin-right:-.3em}.el-button--primary{--el-button-text-color: var(--el-color-white);--el-button-bg-color: var(--el-color-primary);--el-button-border-color: var(--el-color-primary);--el-button-outline-color: var(--el-color-primary-light-5);--el-button-active-color: var(--el-color-primary-dark-2);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-link-text-color: var(--el-color-primary-light-5);--el-button-hover-bg-color: var(--el-color-primary-light-3);--el-button-hover-border-color: var(--el-color-primary-light-3);--el-button-active-bg-color: var(--el-color-primary-dark-2);--el-button-active-border-color: var(--el-color-primary-dark-2);--el-button-disabled-text-color: var(--el-color-white);--el-button-disabled-bg-color: var(--el-color-primary-light-5);--el-button-disabled-border-color: var(--el-color-primary-light-5)}.el-button--primary.is-plain,.el-button--primary.is-text,.el-button--primary.is-link{--el-button-text-color: var(--el-color-primary);--el-button-bg-color: var(--el-color-primary-light-9);--el-button-border-color: var(--el-color-primary-light-5);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-bg-color: var(--el-color-primary);--el-button-hover-border-color: var(--el-color-primary);--el-button-active-text-color: var(--el-color-white)}.el-button--primary.is-plain.is-disabled,.el-button--primary.is-plain.is-disabled:hover,.el-button--primary.is-plain.is-disabled:focus,.el-button--primary.is-plain.is-disabled:active,.el-button--primary.is-text.is-disabled,.el-button--primary.is-text.is-disabled:hover,.el-button--primary.is-text.is-disabled:focus,.el-button--primary.is-text.is-disabled:active,.el-button--primary.is-link.is-disabled,.el-button--primary.is-link.is-disabled:hover,.el-button--primary.is-link.is-disabled:focus,.el-button--primary.is-link.is-disabled:active{color:var(--el-color-primary-light-5);background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary-light-8)}.el-button--success{--el-button-text-color: var(--el-color-white);--el-button-bg-color: var(--el-color-success);--el-button-border-color: var(--el-color-success);--el-button-outline-color: var(--el-color-success-light-5);--el-button-active-color: var(--el-color-success-dark-2);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-link-text-color: var(--el-color-success-light-5);--el-button-hover-bg-color: var(--el-color-success-light-3);--el-button-hover-border-color: var(--el-color-success-light-3);--el-button-active-bg-color: var(--el-color-success-dark-2);--el-button-active-border-color: var(--el-color-success-dark-2);--el-button-disabled-text-color: var(--el-color-white);--el-button-disabled-bg-color: var(--el-color-success-light-5);--el-button-disabled-border-color: var(--el-color-success-light-5)}.el-button--success.is-plain,.el-button--success.is-text,.el-button--success.is-link{--el-button-text-color: var(--el-color-success);--el-button-bg-color: var(--el-color-success-light-9);--el-button-border-color: var(--el-color-success-light-5);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-bg-color: var(--el-color-success);--el-button-hover-border-color: var(--el-color-success);--el-button-active-text-color: var(--el-color-white)}.el-button--success.is-plain.is-disabled,.el-button--success.is-plain.is-disabled:hover,.el-button--success.is-plain.is-disabled:focus,.el-button--success.is-plain.is-disabled:active,.el-button--success.is-text.is-disabled,.el-button--success.is-text.is-disabled:hover,.el-button--success.is-text.is-disabled:focus,.el-button--success.is-text.is-disabled:active,.el-button--success.is-link.is-disabled,.el-button--success.is-link.is-disabled:hover,.el-button--success.is-link.is-disabled:focus,.el-button--success.is-link.is-disabled:active{color:var(--el-color-success-light-5);background-color:var(--el-color-success-light-9);border-color:var(--el-color-success-light-8)}.el-button--warning{--el-button-text-color: var(--el-color-white);--el-button-bg-color: var(--el-color-warning);--el-button-border-color: var(--el-color-warning);--el-button-outline-color: var(--el-color-warning-light-5);--el-button-active-color: var(--el-color-warning-dark-2);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-link-text-color: var(--el-color-warning-light-5);--el-button-hover-bg-color: var(--el-color-warning-light-3);--el-button-hover-border-color: var(--el-color-warning-light-3);--el-button-active-bg-color: var(--el-color-warning-dark-2);--el-button-active-border-color: var(--el-color-warning-dark-2);--el-button-disabled-text-color: var(--el-color-white);--el-button-disabled-bg-color: var(--el-color-warning-light-5);--el-button-disabled-border-color: var(--el-color-warning-light-5)}.el-button--warning.is-plain,.el-button--warning.is-text,.el-button--warning.is-link{--el-button-text-color: var(--el-color-warning);--el-button-bg-color: var(--el-color-warning-light-9);--el-button-border-color: var(--el-color-warning-light-5);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-bg-color: var(--el-color-warning);--el-button-hover-border-color: var(--el-color-warning);--el-button-active-text-color: var(--el-color-white)}.el-button--warning.is-plain.is-disabled,.el-button--warning.is-plain.is-disabled:hover,.el-button--warning.is-plain.is-disabled:focus,.el-button--warning.is-plain.is-disabled:active,.el-button--warning.is-text.is-disabled,.el-button--warning.is-text.is-disabled:hover,.el-button--warning.is-text.is-disabled:focus,.el-button--warning.is-text.is-disabled:active,.el-button--warning.is-link.is-disabled,.el-button--warning.is-link.is-disabled:hover,.el-button--warning.is-link.is-disabled:focus,.el-button--warning.is-link.is-disabled:active{color:var(--el-color-warning-light-5);background-color:var(--el-color-warning-light-9);border-color:var(--el-color-warning-light-8)}.el-button--danger{--el-button-text-color: var(--el-color-white);--el-button-bg-color: var(--el-color-danger);--el-button-border-color: var(--el-color-danger);--el-button-outline-color: var(--el-color-danger-light-5);--el-button-active-color: var(--el-color-danger-dark-2);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-link-text-color: var(--el-color-danger-light-5);--el-button-hover-bg-color: var(--el-color-danger-light-3);--el-button-hover-border-color: var(--el-color-danger-light-3);--el-button-active-bg-color: var(--el-color-danger-dark-2);--el-button-active-border-color: var(--el-color-danger-dark-2);--el-button-disabled-text-color: var(--el-color-white);--el-button-disabled-bg-color: var(--el-color-danger-light-5);--el-button-disabled-border-color: var(--el-color-danger-light-5)}.el-button--danger.is-plain,.el-button--danger.is-text,.el-button--danger.is-link{--el-button-text-color: var(--el-color-danger);--el-button-bg-color: var(--el-color-danger-light-9);--el-button-border-color: var(--el-color-danger-light-5);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-bg-color: var(--el-color-danger);--el-button-hover-border-color: var(--el-color-danger);--el-button-active-text-color: var(--el-color-white)}.el-button--danger.is-plain.is-disabled,.el-button--danger.is-plain.is-disabled:hover,.el-button--danger.is-plain.is-disabled:focus,.el-button--danger.is-plain.is-disabled:active,.el-button--danger.is-text.is-disabled,.el-button--danger.is-text.is-disabled:hover,.el-button--danger.is-text.is-disabled:focus,.el-button--danger.is-text.is-disabled:active,.el-button--danger.is-link.is-disabled,.el-button--danger.is-link.is-disabled:hover,.el-button--danger.is-link.is-disabled:focus,.el-button--danger.is-link.is-disabled:active{color:var(--el-color-danger-light-5);background-color:var(--el-color-danger-light-9);border-color:var(--el-color-danger-light-8)}.el-button--info{--el-button-text-color: var(--el-color-white);--el-button-bg-color: var(--el-color-info);--el-button-border-color: var(--el-color-info);--el-button-outline-color: var(--el-color-info-light-5);--el-button-active-color: var(--el-color-info-dark-2);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-link-text-color: var(--el-color-info-light-5);--el-button-hover-bg-color: var(--el-color-info-light-3);--el-button-hover-border-color: var(--el-color-info-light-3);--el-button-active-bg-color: var(--el-color-info-dark-2);--el-button-active-border-color: var(--el-color-info-dark-2);--el-button-disabled-text-color: var(--el-color-white);--el-button-disabled-bg-color: var(--el-color-info-light-5);--el-button-disabled-border-color: var(--el-color-info-light-5)}.el-button--info.is-plain,.el-button--info.is-text,.el-button--info.is-link{--el-button-text-color: var(--el-color-info);--el-button-bg-color: var(--el-color-info-light-9);--el-button-border-color: var(--el-color-info-light-5);--el-button-hover-text-color: var(--el-color-white);--el-button-hover-bg-color: var(--el-color-info);--el-button-hover-border-color: var(--el-color-info);--el-button-active-text-color: var(--el-color-white)}.el-button--info.is-plain.is-disabled,.el-button--info.is-plain.is-disabled:hover,.el-button--info.is-plain.is-disabled:focus,.el-button--info.is-plain.is-disabled:active,.el-button--info.is-text.is-disabled,.el-button--info.is-text.is-disabled:hover,.el-button--info.is-text.is-disabled:focus,.el-button--info.is-text.is-disabled:active,.el-button--info.is-link.is-disabled,.el-button--info.is-link.is-disabled:hover,.el-button--info.is-link.is-disabled:focus,.el-button--info.is-link.is-disabled:active{color:var(--el-color-info-light-5);background-color:var(--el-color-info-light-9);border-color:var(--el-color-info-light-8)}.el-button--large{--el-button-size: 40px;height:var(--el-button-size);padding:12px 19px;font-size:var(--el-font-size-base);border-radius:var(--el-border-radius-base)}.el-button--large [class*=el-icon]+span{margin-left:8px}.el-button--large.is-round{padding:12px 19px}.el-button--large.is-circle{width:var(--el-button-size);padding:12px}.el-button--small{--el-button-size: 24px;height:var(--el-button-size);padding:5px 11px;font-size:12px;border-radius:calc(var(--el-border-radius-base) - 1px)}.el-button--small [class*=el-icon]+span{margin-left:4px}.el-button--small.is-round{padding:5px 11px}.el-button--small.is-circle{width:var(--el-button-size);padding:5px}.el-form{--el-form-label-font-size: var(--el-font-size-base);--el-form-inline-content-width: 220px}.el-form--label-left .el-form-item__label{justify-content:flex-start}.el-form--label-top .el-form-item{display:block}.el-form--label-top .el-form-item .el-form-item__label{display:block;height:auto;text-align:left;margin-bottom:8px;line-height:22px}.el-form--inline .el-form-item{display:inline-flex;vertical-align:middle;margin-right:32px}.el-form--inline.el-form--label-top{display:flex;flex-wrap:wrap}.el-form--inline.el-form--label-top .el-form-item{display:block}.el-form--large.el-form--label-top .el-form-item .el-form-item__label{margin-bottom:12px;line-height:22px}.el-form--default.el-form--label-top .el-form-item .el-form-item__label{margin-bottom:8px;line-height:22px}.el-form--small.el-form--label-top .el-form-item .el-form-item__label{margin-bottom:4px;line-height:20px}.el-form-item{display:flex;--font-size: 14px;margin-bottom:18px}.el-form-item .el-form-item{margin-bottom:0}.el-form-item .el-input__validateIcon{display:none}.el-form-item--large{--font-size: 14px;--el-form-label-font-size: var(--font-size);margin-bottom:22px}.el-form-item--large .el-form-item__label{height:40px;line-height:40px}.el-form-item--large .el-form-item__content{line-height:40px}.el-form-item--large .el-form-item__error{padding-top:4px}.el-form-item--default{--font-size: 14px;--el-form-label-font-size: var(--font-size);margin-bottom:18px}.el-form-item--default .el-form-item__label{height:32px;line-height:32px}.el-form-item--default .el-form-item__content{line-height:32px}.el-form-item--default .el-form-item__error{padding-top:2px}.el-form-item--small{--font-size: 12px;--el-form-label-font-size: var(--font-size);margin-bottom:18px}.el-form-item--small .el-form-item__label{height:24px;line-height:24px}.el-form-item--small .el-form-item__content{line-height:24px}.el-form-item--small .el-form-item__error{padding-top:2px}.el-form-item__label-wrap{display:flex}.el-form-item__label{display:inline-flex;justify-content:flex-end;align-items:flex-start;flex:0 0 auto;font-size:var(--el-form-label-font-size);color:var(--el-text-color-regular);height:32px;line-height:32px;padding:0 12px 0 0;box-sizing:border-box}.el-form-item__content{display:flex;flex-wrap:wrap;align-items:center;flex:1;line-height:32px;position:relative;font-size:var(--font-size);min-width:0}.el-form-item__content .el-input-group{vertical-align:top}.el-form-item__error{color:var(--el-color-danger);font-size:12px;line-height:1;padding-top:2px;position:absolute;top:100%;left:0}.el-form-item__error--inline{position:relative;top:auto;left:auto;display:inline-block;margin-left:10px}.el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label:before,.el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label-wrap>.el-form-item__label:before{content:"*";color:var(--el-color-danger);margin-right:4px}.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label:after,.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label-wrap>.el-form-item__label:after{content:"*";color:var(--el-color-danger);margin-left:4px}.el-form-item.is-error .el-input__wrapper,.el-form-item.is-error .el-input__wrapper:hover,.el-form-item.is-error .el-input__wrapper:focus,.el-form-item.is-error .el-input__wrapper.is-focus,.el-form-item.is-error .el-textarea__inner,.el-form-item.is-error .el-textarea__inner:hover,.el-form-item.is-error .el-textarea__inner:focus,.el-form-item.is-error .el-textarea__inner.is-focus,.el-form-item.is-error .el-select__wrapper,.el-form-item.is-error .el-select__wrapper:hover,.el-form-item.is-error .el-select__wrapper:focus,.el-form-item.is-error .el-select__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-form-item.is-error .el-input-group__append .el-input__wrapper,.el-form-item.is-error .el-input-group__prepend .el-input__wrapper{box-shadow:0 0 0 1px transparent inset}.el-form-item.is-error .el-input__validateIcon{color:var(--el-color-danger)}.el-form-item--feedback .el-input__validateIcon{display:inline-flex}.el-radio-group{display:inline-flex;align-items:center;flex-wrap:wrap;font-size:0}.el-radio{--el-radio-font-size: var(--el-font-size-base);--el-radio-text-color: var(--el-text-color-regular);--el-radio-font-weight: var(--el-font-weight-primary);--el-radio-input-height: 14px;--el-radio-input-width: 14px;--el-radio-input-border-radius: var(--el-border-radius-circle);--el-radio-input-bg-color: var(--el-fill-color-blank);--el-radio-input-border: var(--el-border);--el-radio-input-border-color: var(--el-border-color);--el-radio-input-border-color-hover: var(--el-color-primary)}.el-radio{color:var(--el-radio-text-color);font-weight:var(--el-radio-font-weight);position:relative;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;outline:none;font-size:var(--el-font-size-base);-webkit-user-select:none;user-select:none;margin-right:32px;height:32px}.el-radio.el-radio--large{height:40px}.el-radio.el-radio--small{height:24px}.el-radio.is-bordered{padding:0 15px 0 9px;border-radius:var(--el-border-radius-base);border:var(--el-border);box-sizing:border-box}.el-radio.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-radio.is-bordered.is-disabled{cursor:not-allowed;border-color:var(--el-border-color-lighter)}.el-radio.is-bordered.el-radio--large{padding:0 19px 0 11px;border-radius:var(--el-border-radius-base)}.el-radio.is-bordered.el-radio--large .el-radio__label{font-size:var(--el-font-size-base)}.el-radio.is-bordered.el-radio--large .el-radio__inner{height:14px;width:14px}.el-radio.is-bordered.el-radio--small{padding:0 11px 0 7px;border-radius:var(--el-border-radius-base)}.el-radio.is-bordered.el-radio--small .el-radio__label{font-size:12px}.el-radio.is-bordered.el-radio--small .el-radio__inner{height:12px;width:12px}.el-radio:last-child{margin-right:0}.el-radio__input{white-space:nowrap;cursor:pointer;outline:none;display:inline-flex;position:relative;vertical-align:middle}.el-radio__input.is-disabled .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color);cursor:not-allowed}.el-radio__input.is-disabled .el-radio__inner:after{cursor:not-allowed;background-color:var(--el-disabled-bg-color)}.el-radio__input.is-disabled .el-radio__inner+.el-radio__label{cursor:not-allowed}.el-radio__input.is-disabled.is-checked .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color)}.el-radio__input.is-disabled.is-checked .el-radio__inner:after{background-color:var(--el-text-color-placeholder)}.el-radio__input.is-disabled+span.el-radio__label{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-radio__input.is-checked .el-radio__inner{border-color:var(--el-color-primary);background:var(--el-color-primary)}.el-radio__input.is-checked .el-radio__inner:after{transform:translate(-50%,-50%) scale(1)}.el-radio__input.is-checked+.el-radio__label{color:var(--el-color-primary)}.el-radio__input.is-focus .el-radio__inner{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner{border:var(--el-radio-input-border);border-radius:var(--el-radio-input-border-radius);width:var(--el-radio-input-width);height:var(--el-radio-input-height);background-color:var(--el-radio-input-bg-color);position:relative;cursor:pointer;display:inline-block;box-sizing:border-box}.el-radio__inner:hover{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner:after{width:4px;height:4px;border-radius:var(--el-radio-input-border-radius);background-color:var(--el-color-white);content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(0);transition:transform .15s ease-in}.el-radio__original{opacity:0;outline:none;position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;margin:0}.el-radio__original:focus-visible+.el-radio__inner{outline:2px solid var(--el-radio-input-border-color-hover);outline-offset:1px;border-radius:var(--el-radio-input-border-radius)}.el-radio:focus:not(:focus-visible):not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner{box-shadow:0 0 2px 2px var(--el-radio-input-border-color-hover)}.el-radio__label{font-size:var(--el-radio-font-size);padding-left:8px}.el-radio.el-radio--large .el-radio__label{font-size:14px}.el-radio.el-radio--large .el-radio__inner{width:14px;height:14px}.el-radio.el-radio--small .el-radio__label{font-size:12px}.el-radio.el-radio--small .el-radio__inner{width:12px;height:12px}.el-textarea{--el-input-text-color: var(--el-text-color-regular);--el-input-border: var(--el-border);--el-input-hover-border: var(--el-border-color-hover);--el-input-focus-border: var(--el-color-primary);--el-input-transparent-border: 0 0 0 1px transparent inset;--el-input-border-color: var(--el-border-color);--el-input-border-radius: var(--el-border-radius-base);--el-input-bg-color: var(--el-fill-color-blank);--el-input-icon-color: var(--el-text-color-placeholder);--el-input-placeholder-color: var(--el-text-color-placeholder);--el-input-hover-border-color: var(--el-border-color-hover);--el-input-clear-hover-color: var(--el-text-color-secondary);--el-input-focus-border-color: var(--el-color-primary);--el-input-width: 100%}.el-textarea{position:relative;display:inline-block;width:100%;vertical-align:bottom;font-size:var(--el-font-size-base)}.el-textarea__inner{position:relative;display:block;resize:vertical;padding:5px 11px;line-height:1.5;box-sizing:border-box;width:100%;font-size:inherit;font-family:inherit;color:var(--el-input-text-color, var(--el-text-color-regular));background-color:var(--el-input-bg-color, var(--el-fill-color-blank));background-image:none;-webkit-appearance:none;box-shadow:0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;border-radius:var(--el-input-border-radius, var(--el-border-radius-base));transition:var(--el-transition-box-shadow);border:none}.el-textarea__inner::placeholder{color:var(--el-input-placeholder-color, var(--el-text-color-placeholder))}.el-textarea__inner:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-textarea__inner:focus{outline:none;box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-textarea .el-input__count{color:var(--el-color-info);background:var(--el-fill-color-blank);position:absolute;font-size:12px;line-height:14px;bottom:5px;right:10px}.el-textarea.is-disabled .el-textarea__inner{box-shadow:0 0 0 1px var(--el-disabled-border-color) inset;background-color:var(--el-disabled-bg-color);color:var(--el-disabled-text-color);cursor:not-allowed}.el-textarea.is-disabled .el-textarea__inner::placeholder{color:var(--el-text-color-placeholder)}.el-textarea.is-exceed .el-textarea__inner{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-textarea.is-exceed .el-input__count{color:var(--el-color-danger)}.el-input{--el-input-text-color: var(--el-text-color-regular);--el-input-border: var(--el-border);--el-input-hover-border: var(--el-border-color-hover);--el-input-focus-border: var(--el-color-primary);--el-input-transparent-border: 0 0 0 1px transparent inset;--el-input-border-color: var(--el-border-color);--el-input-border-radius: var(--el-border-radius-base);--el-input-bg-color: var(--el-fill-color-blank);--el-input-icon-color: var(--el-text-color-placeholder);--el-input-placeholder-color: var(--el-text-color-placeholder);--el-input-hover-border-color: var(--el-border-color-hover);--el-input-clear-hover-color: var(--el-text-color-secondary);--el-input-focus-border-color: var(--el-color-primary);--el-input-width: 100%}.el-input{--el-input-height: var(--el-component-size);position:relative;font-size:var(--el-font-size-base);display:inline-flex;width:var(--el-input-width);line-height:var(--el-input-height);box-sizing:border-box;vertical-align:middle}.el-input::-webkit-scrollbar{z-index:11;width:6px}.el-input::-webkit-scrollbar:horizontal{height:6px}.el-input::-webkit-scrollbar-thumb{border-radius:5px;width:6px;background:var(--el-text-color-disabled)}.el-input::-webkit-scrollbar-corner{background:var(--el-fill-color-blank)}.el-input::-webkit-scrollbar-track{background:var(--el-fill-color-blank)}.el-input::-webkit-scrollbar-track-piece{background:var(--el-fill-color-blank);width:6px}.el-input .el-input__clear,.el-input .el-input__password{color:var(--el-input-icon-color);font-size:14px;cursor:pointer}.el-input .el-input__clear:hover,.el-input .el-input__password:hover{color:var(--el-input-clear-hover-color)}.el-input .el-input__count{height:100%;display:inline-flex;align-items:center;color:var(--el-color-info);font-size:12px}.el-input .el-input__count .el-input__count-inner{background:var(--el-fill-color-blank);line-height:initial;display:inline-block;padding-left:8px}.el-input__wrapper{display:inline-flex;flex-grow:1;align-items:center;justify-content:center;padding:1px 11px;background-color:var(--el-input-bg-color, var(--el-fill-color-blank));background-image:none;border-radius:var(--el-input-border-radius, var(--el-border-radius-base));cursor:text;transition:var(--el-transition-box-shadow);transform:translateZ(0);box-shadow:0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset}.el-input__wrapper:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-input__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-input__inner{--el-input-inner-height: calc(var(--el-input-height, 32px) - 2px);width:100%;flex-grow:1;-webkit-appearance:none;color:var(--el-input-text-color, var(--el-text-color-regular));font-size:inherit;height:var(--el-input-inner-height);line-height:var(--el-input-inner-height);padding:0;outline:none;border:none;background:none;box-sizing:border-box}.el-input__inner:focus{outline:none}.el-input__inner::placeholder{color:var(--el-input-placeholder-color, var(--el-text-color-placeholder))}.el-input__inner[type=password]::-ms-reveal{display:none}.el-input__inner[type=number]{line-height:1}.el-input__prefix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;height:100%;text-align:center;color:var(--el-input-icon-color, var(--el-text-color-placeholder));transition:all var(--el-transition-duration);pointer-events:none}.el-input__prefix-inner{pointer-events:all;display:inline-flex;align-items:center;justify-content:center}.el-input__prefix-inner>:last-child{margin-right:8px}.el-input__prefix-inner>:first-child,.el-input__prefix-inner>:first-child.el-input__icon{margin-left:0}.el-input__suffix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;height:100%;text-align:center;color:var(--el-input-icon-color, var(--el-text-color-placeholder));transition:all var(--el-transition-duration);pointer-events:none}.el-input__suffix-inner{pointer-events:all;display:inline-flex;align-items:center;justify-content:center}.el-input__suffix-inner>:first-child{margin-left:8px}.el-input .el-input__icon{height:inherit;line-height:inherit;display:flex;justify-content:center;align-items:center;transition:all var(--el-transition-duration);margin-left:8px}.el-input__validateIcon{pointer-events:none}.el-input.is-active .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-color, ) inset}.el-input.is-disabled{cursor:not-allowed}.el-input.is-disabled .el-input__wrapper{background-color:var(--el-disabled-bg-color);box-shadow:0 0 0 1px var(--el-disabled-border-color) inset}.el-input.is-disabled .el-input__inner{color:var(--el-disabled-text-color);-webkit-text-fill-color:var(--el-disabled-text-color);cursor:not-allowed}.el-input.is-disabled .el-input__inner::placeholder{color:var(--el-text-color-placeholder)}.el-input.is-disabled .el-input__icon{cursor:not-allowed}.el-input.is-exceed .el-input__wrapper{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-input.is-exceed .el-input__suffix .el-input__count{color:var(--el-color-danger)}.el-input--large{--el-input-height: var(--el-component-size-large);font-size:14px}.el-input--large .el-input__wrapper{padding:1px 15px}.el-input--large .el-input__inner{--el-input-inner-height: calc(var(--el-input-height, 40px) - 2px)}.el-input--small{--el-input-height: var(--el-component-size-small);font-size:12px}.el-input--small .el-input__wrapper{padding:1px 7px}.el-input--small .el-input__inner{--el-input-inner-height: calc(var(--el-input-height, 24px) - 2px)}.el-input-group{display:inline-flex;width:100%;align-items:stretch}.el-input-group__append,.el-input-group__prepend{background-color:var(--el-fill-color-light);color:var(--el-color-info);position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:100%;border-radius:var(--el-input-border-radius);padding:0 20px;white-space:nowrap}.el-input-group__append:focus,.el-input-group__prepend:focus{outline:none}.el-input-group__append .el-select,.el-input-group__append .el-button,.el-input-group__prepend .el-select,.el-input-group__prepend .el-button{display:inline-block;margin:0 -20px}.el-input-group__append button.el-button,.el-input-group__append button.el-button:hover,.el-input-group__append div.el-select .el-select__wrapper,.el-input-group__append div.el-select:hover .el-select__wrapper,.el-input-group__prepend button.el-button,.el-input-group__prepend button.el-button:hover,.el-input-group__prepend div.el-select .el-select__wrapper,.el-input-group__prepend div.el-select:hover .el-select__wrapper{border-color:transparent;background-color:transparent;color:inherit}.el-input-group__append .el-button,.el-input-group__append .el-input,.el-input-group__prepend .el-button,.el-input-group__prepend .el-input{font-size:inherit}.el-input-group__prepend{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;box-shadow:1px 0 0 0 var(--el-input-border-color) inset,0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset}.el-input-group__append{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;box-shadow:0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset,-1px 0 0 0 var(--el-input-border-color) inset}.el-input-group--prepend>.el-input__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.el-input-group--prepend .el-input-group__prepend .el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;box-shadow:1px 0 0 0 var(--el-input-border-color) inset,0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset}.el-input-group--append>.el-input__wrapper{border-top-right-radius:0;border-bottom-right-radius:0}.el-input-group--append .el-input-group__append .el-select .el-select__wrapper{border-top-left-radius:0;border-bottom-left-radius:0;box-shadow:0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset,-1px 0 0 0 var(--el-input-border-color) inset}.el-input-hidden{display:none!important}.el-empty{--el-empty-padding: 40px 0;--el-empty-image-width: 160px;--el-empty-description-margin-top: 20px;--el-empty-bottom-margin-top: 20px;--el-empty-fill-color-0: var(--el-color-white);--el-empty-fill-color-1: #fcfcfd;--el-empty-fill-color-2: #f8f9fb;--el-empty-fill-color-3: #f7f8fc;--el-empty-fill-color-4: #eeeff3;--el-empty-fill-color-5: #edeef2;--el-empty-fill-color-6: #e9ebef;--el-empty-fill-color-7: #e5e7e9;--el-empty-fill-color-8: #e0e3e9;--el-empty-fill-color-9: #d5d7de;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;box-sizing:border-box;padding:var(--el-empty-padding)}.el-empty__image{width:var(--el-empty-image-width)}.el-empty__image img{-webkit-user-select:none;user-select:none;width:100%;height:100%;vertical-align:top;object-fit:contain}.el-empty__image svg{color:var(--el-svg-monochrome-grey);fill:currentColor;width:100%;height:100%;vertical-align:top}.el-empty__description{margin-top:var(--el-empty-description-margin-top)}.el-empty__description p{margin:0;font-size:var(--el-font-size-base);color:var(--el-text-color-secondary)}.el-empty__bottom{margin-top:var(--el-empty-bottom-margin-top)}.el-checkbox-group{font-size:0;line-height:0}.el-checkbox{--el-checkbox-font-size: 14px;--el-checkbox-font-weight: var(--el-font-weight-primary);--el-checkbox-text-color: var(--el-text-color-regular);--el-checkbox-input-height: 14px;--el-checkbox-input-width: 14px;--el-checkbox-border-radius: var(--el-border-radius-small);--el-checkbox-bg-color: var(--el-fill-color-blank);--el-checkbox-input-border: var(--el-border);--el-checkbox-disabled-border-color: var(--el-border-color);--el-checkbox-disabled-input-fill: var(--el-fill-color-light);--el-checkbox-disabled-icon-color: var(--el-text-color-placeholder);--el-checkbox-disabled-checked-input-fill: var(--el-border-color-extra-light);--el-checkbox-disabled-checked-input-border-color: var(--el-border-color);--el-checkbox-disabled-checked-icon-color: var(--el-text-color-placeholder);--el-checkbox-checked-text-color: var(--el-color-primary);--el-checkbox-checked-input-border-color: var(--el-color-primary);--el-checkbox-checked-bg-color: var(--el-color-primary);--el-checkbox-checked-icon-color: var(--el-color-white);--el-checkbox-input-border-color-hover: var(--el-color-primary)}.el-checkbox{color:var(--el-checkbox-text-color);font-weight:var(--el-checkbox-font-weight);font-size:var(--el-font-size-base);position:relative;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;-webkit-user-select:none;user-select:none;margin-right:30px;height:var(--el-checkbox-height, 32px)}.el-checkbox.is-disabled{cursor:not-allowed}.el-checkbox.is-bordered{padding:0 15px 0 9px;border-radius:var(--el-border-radius-base);border:var(--el-border);box-sizing:border-box}.el-checkbox.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-checkbox.is-bordered.is-disabled{border-color:var(--el-border-color-lighter)}.el-checkbox.is-bordered.el-checkbox--large{padding:0 19px 0 11px;border-radius:var(--el-border-radius-base)}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__label{font-size:var(--el-font-size-base)}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__inner{height:14px;width:14px}.el-checkbox.is-bordered.el-checkbox--small{padding:0 11px 0 7px;border-radius:calc(var(--el-border-radius-base) - 1px)}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner{height:12px;width:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner:after{height:6px;width:2px}.el-checkbox input:focus-visible+.el-checkbox__inner{outline:2px solid var(--el-checkbox-input-border-color-hover);outline-offset:1px;border-radius:var(--el-checkbox-border-radius)}.el-checkbox__input{white-space:nowrap;cursor:pointer;outline:none;display:inline-flex;position:relative}.el-checkbox__input.is-disabled .el-checkbox__inner{background-color:var(--el-checkbox-disabled-input-fill);border-color:var(--el-checkbox-disabled-border-color);cursor:not-allowed}.el-checkbox__input.is-disabled .el-checkbox__inner:after{cursor:not-allowed;border-color:var(--el-checkbox-disabled-icon-color)}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner:after{border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner:before{background-color:var(--el-checkbox-disabled-checked-icon-color);border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled+span.el-checkbox__label{color:var(--el-disabled-text-color);cursor:not-allowed}.el-checkbox__input.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-checked .el-checkbox__inner:after{transform:rotate(45deg) scaleY(1);border-color:var(--el-checkbox-checked-icon-color)}.el-checkbox__input.is-checked+.el-checkbox__label{color:var(--el-checkbox-checked-text-color)}.el-checkbox__input.is-focus:not(.is-checked) .el-checkbox__original:not(:focus-visible){border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__input.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-indeterminate .el-checkbox__inner:before{content:"";position:absolute;display:block;background-color:var(--el-checkbox-checked-icon-color);height:2px;transform:scale(.5);left:0;right:0;top:5px}.el-checkbox__input.is-indeterminate .el-checkbox__inner:after{display:none}.el-checkbox__inner{display:inline-block;position:relative;border:var(--el-checkbox-input-border);border-radius:var(--el-checkbox-border-radius);box-sizing:border-box;width:var(--el-checkbox-input-width);height:var(--el-checkbox-input-height);background-color:var(--el-checkbox-bg-color);z-index:var(--el-index-normal);transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46),outline .25s cubic-bezier(.71,-.46,.29,1.46)}.el-checkbox__inner:hover{border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__inner:after{box-sizing:content-box;content:"";border:1px solid transparent;border-left:0;border-top:0;height:7px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:3px;transition:transform .15s ease-in .05s;transform-origin:center}.el-checkbox__original{opacity:0;outline:none;position:absolute;margin:0;width:0;height:0;z-index:-1}.el-checkbox__label{display:inline-block;padding-left:8px;line-height:1;font-size:var(--el-checkbox-font-size)}.el-checkbox.el-checkbox--large{height:40px}.el-checkbox.el-checkbox--large .el-checkbox__label{font-size:14px}.el-checkbox.el-checkbox--large .el-checkbox__inner{width:14px;height:14px}.el-checkbox.el-checkbox--small{height:24px}.el-checkbox.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.el-checkbox--small .el-checkbox__inner{width:12px;height:12px}.el-checkbox.el-checkbox--small .el-checkbox__input.is-indeterminate .el-checkbox__inner:before{top:4px}.el-checkbox.el-checkbox--small .el-checkbox__inner:after{width:2px;height:6px}.el-checkbox:last-of-type{margin-right:0}.xiaohongshu-download-float-btn[data-v-83ac9659]{-webkit-user-select:none;user-select:none;background-color:#ff304f80;color:#fff;cursor:pointer;z-index:99999;position:fixed;border-radius:0 30px 30px 0;display:inline-block;width:fit-content;transition:background-color .25s ease,border-radius .25s ease,left .5s ease}.xiaohongshu-download-float-btn>svg[data-v-83ac9659]{margin:8px 16px;transform:translateY(3px)}.xiaohongshu-download-float-btn.right[data-v-83ac9659]{border-radius:30px 0 0 30px}.xiaohongshu-download-float-btn.active[data-v-83ac9659]{background-color:#ff304f;border-radius:30px;transition:background-color .25s ease,border-radius .25s ease}.img-list[data-v-b4044390]{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:10px;border-radius:8px;background-color:#eee}.img-list[data-v-b4044390] .el-checkbox{position:relative;width:100%;height:100%}.img-list[data-v-b4044390] .el-checkbox .el-checkbox__input{position:absolute;top:0;left:0}.img-list[data-v-b4044390] .el-checkbox .el-checkbox__label{height:100%;padding:0;margin:0}.img-list .item[data-v-b4044390]{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;position:relative;border-radius:8px;overflow:hidden}.img-list .item .progress[data-v-b4044390]{position:absolute;right:0;top:0;background-color:#00000080;color:#fff;padding:5px 10px;border-bottom-left-radius:10px}.img-list .item img[data-v-b4044390]{width:100%;height:100%;object-fit:cover}.header[data-v-b4044390]{display:flex;justify-content:space-between;margin-right:20px}.header .icon[data-v-b4044390]{width:20px;height:20px}.btns[data-v-b4044390]{display:flex;justify-content:center}.xiaohongshu_download{color:#fff;font-weight:700;background-color:#ff2e4d;border-radius:20px;position:absolute;top:0;right:0;bottom:0;left:0;margin-top:20px;margin-left:20px;height:36px;width:80px;text-align:center;line-height:36px;font-size:16px;z-index:20;cursor:pointer}.xiaohongshu_download::hover{background-color:#f92646}.xiaohongshu_download.loading{pointer-events:none}@media (max-width: 960px){.xiaohongshu_download{margin:15px auto}}#noteContainer{position:relative}.xiaohongshu_preview{display:none} ');

(function (vue) {
  'use strict';

  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __commonJS = (cb, mod) => function __require() {
    return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
  };
  var require_main_001 = __commonJS({
    "main-DRQumjV5.js"(exports, module) {
      var _a;
      const isClient = typeof window !== "undefined";
      const isString$2 = (val) => typeof val === "string";
      const noop = () => {
      };
      isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
      function resolveUnref(r) {
        return typeof r === "function" ? r() : vue.unref(r);
      }
      function createFilterWrapper(filter, fn) {
        function wrapper(...args) {
          return new Promise((resolve, reject) => {
            Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
          });
        }
        return wrapper;
      }
      function debounceFilter(ms, options = {}) {
        let timer;
        let maxTimer;
        let lastRejector = noop;
        const _clearTimeout = (timer2) => {
          clearTimeout(timer2);
          lastRejector();
          lastRejector = noop;
        };
        const filter = (invoke) => {
          const duration = resolveUnref(ms);
          const maxDuration = resolveUnref(options.maxWait);
          if (timer)
            _clearTimeout(timer);
          if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
            if (maxTimer) {
              _clearTimeout(maxTimer);
              maxTimer = null;
            }
            return Promise.resolve(invoke());
          }
          return new Promise((resolve, reject) => {
            lastRejector = options.rejectOnCancel ? reject : resolve;
            if (maxDuration && !maxTimer) {
              maxTimer = setTimeout(() => {
                if (timer)
                  _clearTimeout(timer);
                maxTimer = null;
                resolve(invoke());
              }, maxDuration);
            }
            timer = setTimeout(() => {
              if (maxTimer)
                _clearTimeout(maxTimer);
              maxTimer = null;
              resolve(invoke());
            }, duration);
          });
        };
        return filter;
      }
      function identity$1(arg) {
        return arg;
      }
      function tryOnScopeDispose(fn) {
        if (vue.getCurrentScope()) {
          vue.onScopeDispose(fn);
          return true;
        }
        return false;
      }
      function useDebounceFn(fn, ms = 200, options = {}) {
        return createFilterWrapper(debounceFilter(ms, options), fn);
      }
      function refDebounced(value, ms = 200, options = {}) {
        const debounced = vue.ref(value.value);
        const updater = useDebounceFn(() => {
          debounced.value = value.value;
        }, ms, options);
        vue.watch(value, () => updater());
        return debounced;
      }
      function tryOnMounted(fn, sync = true) {
        if (vue.getCurrentInstance())
          vue.onMounted(fn);
        else if (sync)
          fn();
        else
          vue.nextTick(fn);
      }
      function useTimeoutFn(cb, interval, options = {}) {
        const {
          immediate = true
        } = options;
        const isPending = vue.ref(false);
        let timer = null;
        function clear() {
          if (timer) {
            clearTimeout(timer);
            timer = null;
          }
        }
        function stop() {
          isPending.value = false;
          clear();
        }
        function start(...args) {
          clear();
          isPending.value = true;
          timer = setTimeout(() => {
            isPending.value = false;
            timer = null;
            cb(...args);
          }, resolveUnref(interval));
        }
        if (immediate) {
          isPending.value = true;
          if (isClient)
            start();
        }
        tryOnScopeDispose(stop);
        return {
          isPending: vue.readonly(isPending),
          start,
          stop
        };
      }
      function unrefElement(elRef) {
        var _a2;
        const plain = resolveUnref(elRef);
        return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
      }
      const defaultWindow = isClient ? window : void 0;
      function useEventListener(...args) {
        let target;
        let events2;
        let listeners;
        let options;
        if (isString$2(args[0]) || Array.isArray(args[0])) {
          [events2, listeners, options] = args;
          target = defaultWindow;
        } else {
          [target, events2, listeners, options] = args;
        }
        if (!target)
          return noop;
        if (!Array.isArray(events2))
          events2 = [events2];
        if (!Array.isArray(listeners))
          listeners = [listeners];
        const cleanups = [];
        const cleanup = () => {
          cleanups.forEach((fn) => fn());
          cleanups.length = 0;
        };
        const register = (el, event, listener, options2) => {
          el.addEventListener(event, listener, options2);
          return () => el.removeEventListener(event, listener, options2);
        };
        const stopWatch = vue.watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
          cleanup();
          if (!el)
            return;
          cleanups.push(...events2.flatMap((event) => {
            return listeners.map((listener) => register(el, event, listener, options2));
          }));
        }, { immediate: true, flush: "post" });
        const stop = () => {
          stopWatch();
          cleanup();
        };
        tryOnScopeDispose(stop);
        return stop;
      }
      function useSupported(callback, sync = false) {
        const isSupported = vue.ref();
        const update = () => isSupported.value = Boolean(callback());
        update();
        tryOnMounted(update, sync);
        return isSupported;
      }
      const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
      const globalKey = "__vueuse_ssr_handlers__";
      _global[globalKey] = _global[globalKey] || {};
      var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
      var __hasOwnProp$g = Object.prototype.hasOwnProperty;
      var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
      var __objRest$2 = (source, exclude) => {
        var target = {};
        for (var prop in source)
          if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
            target[prop] = source[prop];
        if (source != null && __getOwnPropSymbols$g)
          for (var prop of __getOwnPropSymbols$g(source)) {
            if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
              target[prop] = source[prop];
          }
        return target;
      };
      function useResizeObserver(target, callback, options = {}) {
        const _a2 = options, { window: window2 = defaultWindow } = _a2, observerOptions = __objRest$2(_a2, ["window"]);
        let observer;
        const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
        const cleanup = () => {
          if (observer) {
            observer.disconnect();
            observer = void 0;
          }
        };
        const stopWatch = vue.watch(() => unrefElement(target), (el) => {
          cleanup();
          if (isSupported.value && window2 && el) {
            observer = new ResizeObserver(callback);
            observer.observe(el, observerOptions);
          }
        }, { immediate: true, flush: "post" });
        const stop = () => {
          cleanup();
          stopWatch();
        };
        tryOnScopeDispose(stop);
        return {
          isSupported,
          stop
        };
      }
      var SwipeDirection;
      (function(SwipeDirection2) {
        SwipeDirection2["UP"] = "UP";
        SwipeDirection2["RIGHT"] = "RIGHT";
        SwipeDirection2["DOWN"] = "DOWN";
        SwipeDirection2["LEFT"] = "LEFT";
        SwipeDirection2["NONE"] = "NONE";
      })(SwipeDirection || (SwipeDirection = {}));
      var __defProp = Object.defineProperty;
      var __getOwnPropSymbols = Object.getOwnPropertySymbols;
      var __hasOwnProp = Object.prototype.hasOwnProperty;
      var __propIsEnum = Object.prototype.propertyIsEnumerable;
      var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
      var __spreadValues = (a, b2) => {
        for (var prop in b2 || (b2 = {}))
          if (__hasOwnProp.call(b2, prop))
            __defNormalProp(a, prop, b2[prop]);
        if (__getOwnPropSymbols)
          for (var prop of __getOwnPropSymbols(b2)) {
            if (__propIsEnum.call(b2, prop))
              __defNormalProp(a, prop, b2[prop]);
          }
        return a;
      };
      const _TransitionPresets = {
        easeInSine: [0.12, 0, 0.39, 0],
        easeOutSine: [0.61, 1, 0.88, 1],
        easeInOutSine: [0.37, 0, 0.63, 1],
        easeInQuad: [0.11, 0, 0.5, 0],
        easeOutQuad: [0.5, 1, 0.89, 1],
        easeInOutQuad: [0.45, 0, 0.55, 1],
        easeInCubic: [0.32, 0, 0.67, 0],
        easeOutCubic: [0.33, 1, 0.68, 1],
        easeInOutCubic: [0.65, 0, 0.35, 1],
        easeInQuart: [0.5, 0, 0.75, 0],
        easeOutQuart: [0.25, 1, 0.5, 1],
        easeInOutQuart: [0.76, 0, 0.24, 1],
        easeInQuint: [0.64, 0, 0.78, 0],
        easeOutQuint: [0.22, 1, 0.36, 1],
        easeInOutQuint: [0.83, 0, 0.17, 1],
        easeInExpo: [0.7, 0, 0.84, 0],
        easeOutExpo: [0.16, 1, 0.3, 1],
        easeInOutExpo: [0.87, 0, 0.13, 1],
        easeInCirc: [0.55, 0, 1, 0.45],
        easeOutCirc: [0, 0.55, 0.45, 1],
        easeInOutCirc: [0.85, 0, 0.15, 1],
        easeInBack: [0.36, 0, 0.66, -0.56],
        easeOutBack: [0.34, 1.56, 0.64, 1],
        easeInOutBack: [0.68, -0.6, 0.32, 1.6]
      };
      __spreadValues({
        linear: identity$1
      }, _TransitionPresets);
      const isFirefox = () => isClient && /firefox/i.test(window.navigator.userAgent);
      /**
      * @vue/shared v3.4.27
      * (c) 2018-present Yuxi (Evan) You and Vue contributors
      * @license MIT
      **/
      const NOOP = () => {
      };
      const hasOwnProperty$d = Object.prototype.hasOwnProperty;
      const hasOwn = (val, key) => hasOwnProperty$d.call(val, key);
      const isArray$1 = Array.isArray;
      const isFunction$2 = (val) => typeof val === "function";
      const isString$1 = (val) => typeof val === "string";
      const isSymbol$1 = (val) => typeof val === "symbol";
      const isObject$2 = (val) => val !== null && typeof val === "object";
      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, (_, c) => c ? c.toUpperCase() : "");
      });
      const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
      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$e = Object.prototype;
      var hasOwnProperty$c = objectProto$e.hasOwnProperty;
      var nativeObjectToString$1 = objectProto$e.toString;
      var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
      function getRawTag(value) {
        var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
        try {
          value[symToStringTag$1] = void 0;
          var unmasked = true;
        } catch (e) {
        }
        var result = nativeObjectToString$1.call(value);
        if (unmasked) {
          if (isOwn) {
            value[symToStringTag$1] = tag;
          } else {
            delete value[symToStringTag$1];
          }
        }
        return result;
      }
      var objectProto$d = Object.prototype;
      var nativeObjectToString = objectProto$d.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 index = -1, length = array == null ? 0 : array.length, result = Array(length);
        while (++index < length) {
          result[index] = iteratee(array[index], index, array);
        }
        return result;
      }
      var isArray = Array.isArray;
      var INFINITY$1 = 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(value)) {
          return arrayMap(value, baseToString) + "";
        }
        if (isSymbol(value)) {
          return symbolToString ? symbolToString.call(value) : "";
        }
        var result = value + "";
        return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
      }
      function isObject$1(value) {
        var type = typeof value;
        return value != null && (type == "object" || type == "function");
      }
      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$1(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 uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
        return uid ? "Symbol(src)_1." + uid : "";
      }();
      function isMasked(func) {
        return !!maskSrcKey && maskSrcKey in func;
      }
      var funcProto$1 = Function.prototype;
      var funcToString$1 = funcProto$1.toString;
      function toSource(func) {
        if (func != null) {
          try {
            return funcToString$1.call(func);
          } catch (e) {
          }
          try {
            return func + "";
          } catch (e) {
          }
        }
        return "";
      }
      var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
      var reIsHostCtor = /^\[object .+?Constructor\]$/;
      var funcProto = Function.prototype, objectProto$c = Object.prototype;
      var funcToString = funcProto.toString;
      var hasOwnProperty$b = objectProto$c.hasOwnProperty;
      var reIsNative = RegExp(
        "^" + funcToString.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
      );
      function baseIsNative(value) {
        if (!isObject$1(value) || isMasked(value)) {
          return false;
        }
        var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
        return pattern.test(toSource(value));
      }
      function getValue$1(object, key) {
        return object == null ? void 0 : object[key];
      }
      function getNative(object, key) {
        var value = getValue$1(object, key);
        return baseIsNative(value) ? value : void 0;
      }
      var WeakMap = getNative(root, "WeakMap");
      var objectCreate = Object.create;
      var baseCreate = /* @__PURE__ */ function() {
        function object() {
        }
        return function(proto) {
          if (!isObject$1(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 index = -1, length = source.length;
        array || (array = Array(length));
        while (++index < length) {
          array[index] = source[index];
        }
        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 (e) {
        }
      }();
      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 index = -1, length = array == null ? 0 : array.length;
        while (++index < length) {
          if (iteratee(array[index], index, array) === false) {
            break;
          }
        }
        return array;
      }
      var MAX_SAFE_INTEGER$1 = 9007199254740991;
      var reIsUint = /^(?:0|[1-9]\d*)$/;
      function isIndex(value, length) {
        var type = typeof value;
        length = length == null ? MAX_SAFE_INTEGER$1 : length;
        return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
      }
      function baseAssignValue(object, key, value) {
        if (key == "__proto__" && defineProperty) {
          defineProperty(object, key, {
            "configurable": true,
            "enumerable": true,
            "value": value,
            "writable": true
          });
        } else {
          object[key] = value;
        }
      }
      function eq(value, other) {
        return value === other || value !== value && other !== other;
      }
      var objectProto$b = Object.prototype;
      var hasOwnProperty$a = objectProto$b.hasOwnProperty;
      function assignValue(object, key, value) {
        var objValue = object[key];
        if (!(hasOwnProperty$a.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
          baseAssignValue(object, key, value);
        }
      }
      function copyObject(source, props, object, customizer) {
        var isNew = !object;
        object || (object = {});
        var index = -1, length = props.length;
        while (++index < length) {
          var key = props[index];
          var newValue = void 0;
          if (newValue === void 0) {
            newValue = source[key];
          }
          if (isNew) {
            baseAssignValue(object, key, newValue);
          } else {
            assignValue(object, key, newValue);
          }
        }
        return object;
      }
      var nativeMax = Math.max;
      function overRest(func, start, transform) {
        start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
        return function() {
          var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
          while (++index < length) {
            array[index] = args[start + index];
          }
          index = -1;
          var otherArgs = Array(start + 1);
          while (++index < start) {
            otherArgs[index] = args[index];
          }
          otherArgs[start] = transform(array);
          return apply(func, this, otherArgs);
        };
      }
      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$a = Object.prototype;
      function isPrototype(value) {
        var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$a;
        return value === proto;
      }
      function baseTimes(n, iteratee) {
        var index = -1, result = Array(n);
        while (++index < n) {
          result[index] = iteratee(index);
        }
        return result;
      }
      var argsTag$3 = "[object Arguments]";
      function baseIsArguments(value) {
        return isObjectLike(value) && baseGetTag(value) == argsTag$3;
      }
      var objectProto$9 = Object.prototype;
      var hasOwnProperty$9 = objectProto$9.hasOwnProperty;
      var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable;
      var isArguments = baseIsArguments(/* @__PURE__ */ function() {
        return arguments;
      }()) ? baseIsArguments : function(value) {
        return isObjectLike(value) && hasOwnProperty$9.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$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[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$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = 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 (e) {
        }
      }();
      var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
      var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
      var objectProto$8 = Object.prototype;
      var hasOwnProperty$8 = objectProto$8.hasOwnProperty;
      function arrayLikeKeys(value, inherited) {
        var isArr = isArray(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) : [], length = result.length;
        for (var key in value) {
          if ((inherited || hasOwnProperty$8.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
          (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
          isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
          isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
          isIndex(key, length)))) {
            result.push(key);
          }
        }
        return result;
      }
      function overArg(func, transform) {
        return function(arg) {
          return func(transform(arg));
        };
      }
      var nativeKeys = overArg(Object.keys, Object);
      var objectProto$7 = Object.prototype;
      var hasOwnProperty$7 = objectProto$7.hasOwnProperty;
      function baseKeys(object) {
        if (!isPrototype(object)) {
          return nativeKeys(object);
        }
        var result = [];
        for (var key in Object(object)) {
          if (hasOwnProperty$7.call(object, key) && key != "constructor") {
            result.push(key);
          }
        }
        return result;
      }
      function keys(object) {
        return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
      }
      function nativeKeysIn(object) {
        var result = [];
        if (object != null) {
          for (var key in Object(object)) {
            result.push(key);
          }
        }
        return result;
      }
      var objectProto$6 = Object.prototype;
      var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
      function baseKeysIn(object) {
        if (!isObject$1(object)) {
          return nativeKeysIn(object);
        }
        var isProto = isPrototype(object), result = [];
        for (var key in object) {
          if (!(key == "constructor" && (isProto || !hasOwnProperty$6.call(object, key)))) {
            result.push(key);
          }
        }
        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(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(key) {
        var result = this.has(key) && delete this.__data__[key];
        this.size -= result ? 1 : 0;
        return result;
      }
      var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
      var objectProto$5 = Object.prototype;
      var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
      function hashGet(key) {
        var data = this.__data__;
        if (nativeCreate) {
          var result = data[key];
          return result === HASH_UNDEFINED$2 ? void 0 : result;
        }
        return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
      }
      var objectProto$4 = Object.prototype;
      var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
      function hashHas(key) {
        var data = this.__data__;
        return nativeCreate ? data[key] !== void 0 : hasOwnProperty$4.call(data, key);
      }
      var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
      function hashSet(key, value) {
        var data = this.__data__;
        this.size += this.has(key) ? 0 : 1;
        data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
        return this;
      }
      function Hash(entries) {
        var index = -1, length = entries == null ? 0 : entries.length;
        this.clear();
        while (++index < length) {
          var entry = entries[index];
          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, key) {
        var length = array.length;
        while (length--) {
          if (eq(array[length][0], key)) {
            return length;
          }
        }
        return -1;
      }
      var arrayProto = Array.prototype;
      var splice = arrayProto.splice;
      function listCacheDelete(key) {
        var data = this.__data__, index = assocIndexOf(data, key);
        if (index < 0) {
          return false;
        }
        var lastIndex = data.length - 1;
        if (index == lastIndex) {
          data.pop();
        } else {
          splice.call(data, index, 1);
        }
        --this.size;
        return true;
      }
      function listCacheGet(key) {
        var data = this.__data__, index = assocIndexOf(data, key);
        return index < 0 ? void 0 : data[index][1];
      }
      function listCacheHas(key) {
        return assocIndexOf(this.__data__, key) > -1;
      }
      function listCacheSet(key, value) {
        var data = this.__data__, index = assocIndexOf(data, key);
        if (index < 0) {
          ++this.size;
          data.push([key, value]);
        } else {
          data[index][1] = value;
        }
        return this;
      }
      function ListCache(entries) {
        var index = -1, length = entries == null ? 0 : entries.length;
        this.clear();
        while (++index < length) {
          var entry = entries[index];
          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, key) {
        var data = map.__data__;
        return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
      }
      function mapCacheDelete(key) {
        var result = getMapData(this, key)["delete"](key);
        this.size -= result ? 1 : 0;
        return result;
      }
      function mapCacheGet(key) {
        return getMapData(this, key).get(key);
      }
      function mapCacheHas(key) {
        return getMapData(this, key).has(key);
      }
      function mapCacheSet(key, value) {
        var data = getMapData(this, key), size = data.size;
        data.set(key, value);
        this.size += data.size == size ? 0 : 1;
        return this;
      }
      function MapCache(entries) {
        var index = -1, length = entries == null ? 0 : entries.length;
        this.clear();
        while (++index < length) {
          var entry = entries[index];
          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 = "Expected a function";
      function memoize(func, resolver) {
        if (typeof func != "function" || resolver != null && typeof resolver != "function") {
          throw new TypeError(FUNC_ERROR_TEXT);
        }
        var memoized = function() {
          var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
          if (cache.has(key)) {
            return cache.get(key);
          }
          var result = func.apply(this, args);
          memoized.cache = cache.set(key, 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(key) {
          if (cache.size === MAX_MEMOIZE_SIZE) {
            cache.clear();
          }
          return key;
        });
        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(match, number, quote, subString) {
          result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
        });
        return result;
      });
      function toString(value) {
        return value == null ? "" : baseToString(value);
      }
      function castPath(value, object) {
        if (isArray(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 index = 0, length = path.length;
        while (object != null && index < length) {
          object = object[toKey(path[index++])];
        }
        return index && index == length ? object : void 0;
      }
      function get(object, path, defaultValue) {
        var result = object == null ? void 0 : baseGet(object, path);
        return result === void 0 ? defaultValue : result;
      }
      function arrayPush(array, values) {
        var index = -1, length = values.length, offset = array.length;
        while (++index < length) {
          array[offset + index] = values[index];
        }
        return array;
      }
      var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
      function isFlattenable(value) {
        return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
      }
      function baseFlatten(array, depth, predicate, isStrict, result) {
        var index = -1, length = array.length;
        predicate || (predicate = isFlattenable);
        result || (result = []);
        while (++index < length) {
          var value = array[index];
          if (predicate(value)) {
            {
              arrayPush(result, value);
            }
          } else {
            result[result.length] = value;
          }
        }
        return result;
      }
      function flatten(array) {
        var length = array == null ? 0 : array.length;
        return length ? baseFlatten(array) : [];
      }
      function flatRest(func) {
        return setToString(overRest(func, void 0, flatten), func + "");
      }
      var getPrototype = overArg(Object.getPrototypeOf, Object);
      function castArray() {
        if (!arguments.length) {
          return [];
        }
        var value = arguments[0];
        return isArray(value) ? value : [value];
      }
      function stackClear() {
        this.__data__ = new ListCache();
        this.size = 0;
      }
      function stackDelete(key) {
        var data = this.__data__, result = data["delete"](key);
        this.size = data.size;
        return result;
      }
      function stackGet(key) {
        return this.__data__.get(key);
      }
      function stackHas(key) {
        return this.__data__.has(key);
      }
      var LARGE_ARRAY_SIZE = 200;
      function stackSet(key, value) {
        var data = this.__data__;
        if (data instanceof ListCache) {
          var pairs = data.__data__;
          if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {
            pairs.push([key, value]);
            this.size = ++data.size;
            return this;
          }
          data = this.__data__ = new MapCache(pairs);
        }
        data.set(key, 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) {
        var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
        buffer.copy(result);
        return result;
      }
      function arrayFilter(array, predicate) {
        var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
        while (++index < length) {
          var value = array[index];
          if (predicate(value, index, array)) {
            result[resIndex++] = value;
          }
        }
        return result;
      }
      function stubArray() {
        return [];
      }
      var objectProto$3 = Object.prototype;
      var propertyIsEnumerable = objectProto$3.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(object) ? result : arrayPush(result, symbolsFunc(object));
      }
      function getAllKeys(object) {
        return baseGetAllKeys(object, keys, getSymbols);
      }
      var DataView = getNative(root, "DataView");
      var Promise$1 = getNative(root, "Promise");
      var Set$1 = getNative(root, "Set");
      var mapTag$4 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[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);
      var getTag = baseGetTag;
      if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag(new Map$1()) != mapTag$4 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$4 || WeakMap && getTag(new WeakMap()) != 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$4;
              case promiseCtorString:
                return promiseTag;
              case setCtorString:
                return setTag$4;
              case weakMapCtorString:
                return weakMapTag$1;
            }
          }
          return result;
        };
      }
      var objectProto$2 = Object.prototype;
      var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
      function initCloneArray(array) {
        var length = array.length, result = new array.constructor(length);
        if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
          result.index = array.index;
          result.input = array.input;
        }
        return result;
      }
      var Uint8Array$1 = root.Uint8Array;
      function cloneArrayBuffer(arrayBuffer) {
        var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
        new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
        return result;
      }
      function cloneDataView(dataView, isDeep) {
        var 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 = typedArray.buffer;
        return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
      }
      var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[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);
          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);
          case mapTag$3:
            return new Ctor();
          case numberTag$2:
          case stringTag$2:
            return new Ctor(object);
          case regexpTag$2:
            return cloneRegExp(object);
          case setTag$3:
            return new Ctor();
          case symbolTag$2:
            return cloneSymbol(object);
        }
      }
      function initCloneObject(object) {
        return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
      }
      var mapTag$2 = "[object Map]";
      function baseIsMap(value) {
        return isObjectLike(value) && getTag(value) == mapTag$2;
      }
      var nodeIsMap = nodeUtil && nodeUtil.isMap;
      var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
      var setTag$2 = "[object Set]";
      function baseIsSet(value) {
        return isObjectLike(value) && getTag(value) == setTag$2;
      }
      var nodeIsSet = nodeUtil && nodeUtil.isSet;
      var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
      var CLONE_FLAT_FLAG = 2;
      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$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[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$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = 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, key, object, stack) {
        var result, isFlat = bitmask & CLONE_FLAT_FLAG;
        if (result !== void 0) {
          return result;
        }
        if (!isObject$1(value)) {
          return value;
        }
        var isArr = isArray(value);
        if (isArr) {
          result = initCloneArray(value);
          {
            return copyArray(value, result);
          }
        } else {
          var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
          if (isBuffer(value)) {
            return cloneBuffer(value);
          }
          if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
            result = isFunc ? {} : initCloneObject(value);
            {
              return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
            }
          } else {
            if (!cloneableTags[tag]) {
              return object ? value : {};
            }
            result = initCloneByTag(value, tag);
          }
        }
        stack || (stack = new Stack());
        var stacked = stack.get(value);
        if (stacked) {
          return stacked;
        }
        stack.set(value, result);
        if (isSet(value)) {
          value.forEach(function(subValue) {
            result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
          });
        } else if (isMap(value)) {
          value.forEach(function(subValue, key2) {
            result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
          });
        }
        var keysFunc = getAllKeys ;
        var props = isArr ? void 0 : keysFunc(value);
        arrayEach(props || value, function(subValue, key2) {
          if (props) {
            key2 = subValue;
            subValue = value[key2];
          }
          assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
        });
        return result;
      }
      var CLONE_SYMBOLS_FLAG = 4;
      function clone(value) {
        return baseClone(value, CLONE_SYMBOLS_FLAG);
      }
      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 index = -1, length = values == null ? 0 : values.length;
        this.__data__ = new MapCache();
        while (++index < length) {
          this.add(values[index]);
        }
      }
      SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
      SetCache.prototype.has = setCacheHas;
      function arraySome(array, predicate) {
        var index = -1, length = array == null ? 0 : array.length;
        while (++index < length) {
          if (predicate(array[index], index, array)) {
            return true;
          }
        }
        return false;
      }
      function cacheHas(cache, key) {
        return cache.has(key);
      }
      var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
      function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
        var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
        if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
          return false;
        }
        var arrStacked = stack.get(array);
        var othStacked = stack.get(other);
        if (arrStacked && othStacked) {
          return arrStacked == other && othStacked == array;
        }
        var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
        stack.set(array, other);
        stack.set(other, array);
        while (++index < arrLength) {
          var arrValue = array[index], othValue = other[index];
          if (customizer) {
            var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
          }
          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, stack))) {
                return seen.push(othIndex);
              }
            })) {
              result = false;
              break;
            }
          } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
            result = false;
            break;
          }
        }
        stack["delete"](array);
        stack["delete"](other);
        return result;
      }
      function mapToArray(map) {
        var index = -1, result = Array(map.size);
        map.forEach(function(value, key) {
          result[++index] = [key, value];
        });
        return result;
      }
      function setToArray(set2) {
        var index = -1, result = Array(set2.size);
        set2.forEach(function(value) {
          result[++index] = value;
        });
        return result;
      }
      var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
      var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[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, stack) {
        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 Uint8Array$1(object), new Uint8Array$1(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:
            var convert = mapToArray;
          case setTag:
            var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
            convert || (convert = setToArray);
            if (object.size != other.size && !isPartial) {
              return false;
            }
            var stacked = stack.get(object);
            if (stacked) {
              return stacked == other;
            }
            bitmask |= COMPARE_UNORDERED_FLAG;
            stack.set(object, other);
            var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
            stack["delete"](object);
            return result;
          case symbolTag:
            if (symbolValueOf) {
              return symbolValueOf.call(object) == symbolValueOf.call(other);
            }
        }
        return false;
      }
      var COMPARE_PARTIAL_FLAG$1 = 1;
      var objectProto$1 = Object.prototype;
      var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
      function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
        var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
        if (objLength != othLength && !isPartial) {
          return false;
        }
        var index = objLength;
        while (index--) {
          var key = objProps[index];
          if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
            return false;
          }
        }
        var objStacked = stack.get(object);
        var othStacked = stack.get(other);
        if (objStacked && othStacked) {
          return objStacked == other && othStacked == object;
        }
        var result = true;
        stack.set(object, other);
        stack.set(other, object);
        var skipCtor = isPartial;
        while (++index < objLength) {
          key = objProps[index];
          var objValue = object[key], othValue = other[key];
          if (customizer) {
            var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
          }
          if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
            result = false;
            break;
          }
          skipCtor || (skipCtor = key == "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;
          }
        }
        stack["delete"](object);
        stack["delete"](other);
        return result;
      }
      var COMPARE_PARTIAL_FLAG = 1;
      var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
      var objectProto = Object.prototype;
      var hasOwnProperty$1 = objectProto.hasOwnProperty;
      function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
        var objIsArr = isArray(object), othIsArr = isArray(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) {
          stack || (stack = new Stack());
          return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
        }
        if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
          var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
          if (objIsWrapped || othIsWrapped) {
            var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
            stack || (stack = new Stack());
            return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
          }
        }
        if (!isSameTag) {
          return false;
        }
        stack || (stack = new Stack());
        return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
      }
      function baseIsEqual(value, other, bitmask, customizer, stack) {
        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, stack);
      }
      function baseHasIn(object, key) {
        return object != null && key in Object(object);
      }
      function hasPath(object, path, hasFunc) {
        path = castPath(path, object);
        var index = -1, length = path.length, result = false;
        while (++index < length) {
          var key = toKey(path[index]);
          if (!(result = object != null && hasFunc(object, key))) {
            break;
          }
          object = object[key];
        }
        if (result || ++index != length) {
          return result;
        }
        length = object == null ? 0 : object.length;
        return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
      }
      function hasIn(object, path) {
        return object != null && hasPath(object, path, baseHasIn);
      }
      function fromPairs(pairs) {
        var index = -1, length = pairs == null ? 0 : pairs.length, result = {};
        while (++index < length) {
          var pair = pairs[index];
          result[pair[0]] = pair[1];
        }
        return result;
      }
      function isEqual(value, other) {
        return baseIsEqual(value, other);
      }
      function isNil(value) {
        return value == null;
      }
      function isUndefined$2(value) {
        return value === void 0;
      }
      function baseSet(object, path, value, customizer) {
        if (!isObject$1(object)) {
          return object;
        }
        path = castPath(path, object);
        var index = -1, length = path.length, lastIndex = length - 1, nested = object;
        while (nested != null && ++index < length) {
          var key = toKey(path[index]), newValue = value;
          if (key === "__proto__" || key === "constructor" || key === "prototype") {
            return object;
          }
          if (index != lastIndex) {
            var objValue = nested[key];
            newValue = void 0;
            if (newValue === void 0) {
              newValue = isObject$1(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
            }
          }
          assignValue(nested, key, newValue);
          nested = nested[key];
        }
        return object;
      }
      function basePickBy(object, paths, predicate) {
        var index = -1, length = paths.length, result = {};
        while (++index < length) {
          var path = paths[index], value = baseGet(object, path);
          if (predicate(value, path)) {
            baseSet(result, castPath(path, object), value);
          }
        }
        return result;
      }
      function basePick(object, paths) {
        return basePickBy(object, paths, function(value, path) {
          return hasIn(object, path);
        });
      }
      var pick = flatRest(function(object, paths) {
        return object == null ? {} : basePick(object, paths);
      });
      function set(object, path, value) {
        return object == null ? object : baseSet(object, path, value);
      }
      const isUndefined$1 = (val) => val === void 0;
      const isBoolean = (val) => typeof val === "boolean";
      const isNumber$1 = (val) => typeof val === "number";
      const isPropAbsent = (prop) => {
        return isNil(prop);
      };
      const isStringNumber = (val) => {
        if (!isString$1(val)) {
          return false;
        }
        return !Number.isNaN(Number(val));
      };
      const keysOf = (arr) => Object.keys(arr);
      const getProp = (obj, path, defaultValue) => {
        return {
          get value() {
            return get(obj, path, defaultValue);
          },
          set value(val) {
            set(obj, path, val);
          }
        };
      };
      class ElementPlusError extends Error {
        constructor(m) {
          super(m);
          this.name = "ElementPlusError";
        }
      }
      function throwError(scope, m) {
        throw new ElementPlusError(`[${scope}] ${m}`);
      }
      function debugWarn(scope, message) {
      }
      const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
      const hasClass$1 = (el, cls) => {
        if (!el || !cls)
          return false;
        if (cls.includes(" "))
          throw new Error("className should not contain space.");
        return el.classList.contains(cls);
      };
      const addClass$1 = (el, cls) => {
        if (!el || !cls.trim())
          return;
        el.classList.add(...classNameToArray(cls));
      };
      const removeClass$1 = (el, cls) => {
        if (!el || !cls.trim())
          return;
        el.classList.remove(...classNameToArray(cls));
      };
      const getStyle = (element, styleName) => {
        var _a2;
        if (!isClient || !element || !styleName)
          return "";
        let key = camelize(styleName);
        if (key === "float")
          key = "cssFloat";
        try {
          const style = element.style[key];
          if (style)
            return style;
          const computed2 = (_a2 = document.defaultView) == null ? void 0 : _a2.getComputedStyle(element, "");
          return computed2 ? computed2[key] : "";
        } catch (e) {
          return element.style[key];
        }
      };
      function addUnit(value, defaultUnit = "px") {
        if (!value)
          return "";
        if (isNumber$1(value) || isStringNumber(value)) {
          return `${value}${defaultUnit}`;
        } else if (isString$1(value)) {
          return value;
        }
      }
      let scrollBarWidth;
      const getScrollBarWidth = (namespace) => {
        var _a2;
        if (!isClient)
          return 0;
        if (scrollBarWidth !== void 0)
          return scrollBarWidth;
        const outer = document.createElement("div");
        outer.className = `${namespace}-scrollbar__wrap`;
        outer.style.visibility = "hidden";
        outer.style.width = "100px";
        outer.style.position = "absolute";
        outer.style.top = "-9999px";
        document.body.appendChild(outer);
        const widthNoScroll = outer.offsetWidth;
        outer.style.overflow = "scroll";
        const inner = document.createElement("div");
        inner.style.width = "100%";
        outer.appendChild(inner);
        const widthWithScroll = inner.offsetWidth;
        (_a2 = outer.parentNode) == null ? void 0 : _a2.removeChild(outer);
        scrollBarWidth = widthNoScroll - widthWithScroll;
        return scrollBarWidth;
      };
      /*! Element Plus Icons Vue v2.3.1 */
      var circle_check_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
        name: "CircleCheck",
        __name: "circle-check",
        setup(__props) {
          return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            viewBox: "0 0 1024 1024"
          }, [
            vue.createElementVNode("path", {
              fill: "currentColor",
              d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
            }),
            vue.createElementVNode("path", {
              fill: "currentColor",
              d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
            })
          ]));
        }
      });
      var circle_check_default = circle_check_vue_vue_type_script_setup_true_lang_default;
      var circle_close_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
        name: "CircleClose",
        __name: "circle-close",
        setup(__props) {
          return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            viewBox: "0 0 1024 1024"
          }, [
            vue.createElementVNode("path", {
              fill: "currentColor",
              d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
            }),
            vue.createElementVNode("path", {
              fill: "currentColor",
              d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
            })
          ]));
        }
      });
      var circle_close_default = circle_close_vue_vue_type_script_setup_true_lang_default;
      var close_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
        name: "Close",
        __name: "close",
        setup(__props) {
          return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            viewBox: "0 0 1024 1024"
          }, [
            vue.createElementVNode("path", {
              fill: "currentColor",
              d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
            })
          ]));
        }
      });
      var close_default = close_vue_vue_type_script_setup_true_lang_default;
      var hide_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
        name: "Hide",
        __name: "hide",
        setup(__props) {
          return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            viewBox: "0 0 1024 1024"
          }, [
            vue.createElementVNode("path", {
              fill: "currentColor",
              d: "M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"
            }),
            vue.createElementVNode("path", {
              fill: "currentColor",
              d: "M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"
            })
          ]));
        }
      });
      var hide_default = hide_vue_vue_type_script_setup_true_lang_default;
      var loading_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
        name: "Loading",
        __name: "loading",
        setup(__props) {
          return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            viewBox: "0 0 1024 1024"
          }, [
            vue.createElementVNode("path", {
              fill: "currentColor",
              d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
            })
          ]));
        }
      });
      var loading_default = loading_vue_vue_type_script_setup_true_lang_default;
      var view_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ vue.defineComponent({
        name: "View",
        __name: "view",
        setup(__props) {
          return (_ctx, _cache) => (vue.openBlock(), vue.createElementBlock("svg", {
            xmlns: "http://www.w3.org/2000/svg",
            viewBox: "0 0 1024 1024"
          }, [
            vue.createElementVNode("path", {
              fill: "currentColor",
              d: "M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"
            })
          ]));
        }
      });
      var view_default = view_vue_vue_type_script_setup_true_lang_default;
      const epPropKey = "__epPropKey";
      const definePropType = (val) => val;
      const isEpProp = (val) => isObject$2(val) && !!val[epPropKey];
      const buildProp = (prop, key) => {
        if (!isObject$2(prop) || isEpProp(prop))
          return prop;
        const { values, required, default: defaultValue, type, validator } = prop;
        const _validator = values || validator ? (val) => {
          let valid = false;
          let allowedValues = [];
          if (values) {
            allowedValues = Array.from(values);
            if (hasOwn(prop, "default")) {
              allowedValues.push(defaultValue);
            }
            valid || (valid = allowedValues.includes(val));
          }
          if (validator)
            valid || (valid = validator(val));
          if (!valid && allowedValues.length > 0) {
            const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
            vue.warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
          }
          return valid;
        } : void 0;
        const epProp = {
          type,
          required: !!required,
          validator: _validator,
          [epPropKey]: true
        };
        if (hasOwn(prop, "default"))
          epProp.default = defaultValue;
        return epProp;
      };
      const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [
        key,
        buildProp(option, key)
      ]));
      const iconPropType = definePropType([
        String,
        Object,
        Function
      ]);
      const ValidateComponentsMap = {
        validating: loading_default,
        success: circle_check_default,
        error: circle_close_default
      };
      const withInstall = (main, extra) => {
        main.install = (app2) => {
          for (const comp of [main, ...Object.values(extra != null ? extra : {})]) {
            app2.component(comp.name, comp);
          }
        };
        if (extra) {
          for (const [key, comp] of Object.entries(extra)) {
            main[key] = comp;
          }
        }
        return main;
      };
      const withNoopInstall = (component) => {
        component.install = NOOP;
        return component;
      };
      const EVENT_CODE = {
        tab: "Tab",
        enter: "Enter",
        space: "Space",
        left: "ArrowLeft",
        up: "ArrowUp",
        right: "ArrowRight",
        down: "ArrowDown",
        esc: "Escape",
        delete: "Delete",
        backspace: "Backspace",
        numpadEnter: "NumpadEnter",
        pageUp: "PageUp",
        pageDown: "PageDown",
        home: "Home",
        end: "End"
      };
      const UPDATE_MODEL_EVENT = "update:modelValue";
      const CHANGE_EVENT = "change";
      const componentSizes = ["", "default", "small", "large"];
      var PatchFlags = /* @__PURE__ */ ((PatchFlags2) => {
        PatchFlags2[PatchFlags2["TEXT"] = 1] = "TEXT";
        PatchFlags2[PatchFlags2["CLASS"] = 2] = "CLASS";
        PatchFlags2[PatchFlags2["STYLE"] = 4] = "STYLE";
        PatchFlags2[PatchFlags2["PROPS"] = 8] = "PROPS";
        PatchFlags2[PatchFlags2["FULL_PROPS"] = 16] = "FULL_PROPS";
        PatchFlags2[PatchFlags2["HYDRATE_EVENTS"] = 32] = "HYDRATE_EVENTS";
        PatchFlags2[PatchFlags2["STABLE_FRAGMENT"] = 64] = "STABLE_FRAGMENT";
        PatchFlags2[PatchFlags2["KEYED_FRAGMENT"] = 128] = "KEYED_FRAGMENT";
        PatchFlags2[PatchFlags2["UNKEYED_FRAGMENT"] = 256] = "UNKEYED_FRAGMENT";
        PatchFlags2[PatchFlags2["NEED_PATCH"] = 512] = "NEED_PATCH";
        PatchFlags2[PatchFlags2["DYNAMIC_SLOTS"] = 1024] = "DYNAMIC_SLOTS";
        PatchFlags2[PatchFlags2["HOISTED"] = -1] = "HOISTED";
        PatchFlags2[PatchFlags2["BAIL"] = -2] = "BAIL";
        return PatchFlags2;
      })(PatchFlags || {});
      const isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
      const mutable = (val) => val;
      const DEFAULT_EXCLUDE_KEYS = ["class", "style"];
      const LISTENER_PREFIX = /^on[A-Z]/;
      const useAttrs = (params = {}) => {
        const { excludeListeners = false, excludeKeys } = params;
        const allExcludeKeys = vue.computed(() => {
          return ((excludeKeys == null ? void 0 : excludeKeys.value) || []).concat(DEFAULT_EXCLUDE_KEYS);
        });
        const instance = vue.getCurrentInstance();
        if (!instance) {
          return vue.computed(() => ({}));
        }
        return vue.computed(() => {
          var _a2;
          return fromPairs(Object.entries((_a2 = instance.proxy) == null ? void 0 : _a2.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))));
        });
      };
      const useDeprecated = ({ from, replacement, scope, version, ref: ref2, type = "API" }, condition) => {
        vue.watch(() => vue.unref(condition), (val) => {
        }, {
          immediate: true
        });
      };
      var English = {
        name: "en",
        el: {
          breadcrumb: {
            label: "Breadcrumb"
          },
          colorpicker: {
            confirm: "OK",
            clear: "Clear",
            defaultLabel: "color picker",
            description: "current color is {color}. press enter to select a new color."
          },
          datepicker: {
            now: "Now",
            today: "Today",
            cancel: "Cancel",
            clear: "Clear",
            confirm: "OK",
            dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
            monthTablePrompt: "Use the arrow keys and enter to select the month",
            yearTablePrompt: "Use the arrow keys and enter to select the year",
            selectedDate: "Selected date",
            selectDate: "Select date",
            selectTime: "Select time",
            startDate: "Start Date",
            startTime: "Start Time",
            endDate: "End Date",
            endTime: "End Time",
            prevYear: "Previous Year",
            nextYear: "Next Year",
            prevMonth: "Previous Month",
            nextMonth: "Next Month",
            year: "",
            month1: "January",
            month2: "February",
            month3: "March",
            month4: "April",
            month5: "May",
            month6: "June",
            month7: "July",
            month8: "August",
            month9: "September",
            month10: "October",
            month11: "November",
            month12: "December",
            week: "week",
            weeks: {
              sun: "Sun",
              mon: "Mon",
              tue: "Tue",
              wed: "Wed",
              thu: "Thu",
              fri: "Fri",
              sat: "Sat"
            },
            weeksFull: {
              sun: "Sunday",
              mon: "Monday",
              tue: "Tuesday",
              wed: "Wednesday",
              thu: "Thursday",
              fri: "Friday",
              sat: "Saturday"
            },
            months: {
              jan: "Jan",
              feb: "Feb",
              mar: "Mar",
              apr: "Apr",
              may: "May",
              jun: "Jun",
              jul: "Jul",
              aug: "Aug",
              sep: "Sep",
              oct: "Oct",
              nov: "Nov",
              dec: "Dec"
            }
          },
          inputNumber: {
            decrease: "decrease number",
            increase: "increase number"
          },
          select: {
            loading: "Loading",
            noMatch: "No matching data",
            noData: "No data",
            placeholder: "Select"
          },
          dropdown: {
            toggleDropdown: "Toggle Dropdown"
          },
          cascader: {
            noMatch: "No matching data",
            loading: "Loading",
            placeholder: "Select",
            noData: "No data"
          },
          pagination: {
            goto: "Go to",
            pagesize: "/page",
            total: "Total {total}",
            pageClassifier: "",
            page: "Page",
            prev: "Go to previous page",
            next: "Go to next page",
            currentPage: "page {pager}",
            prevPages: "Previous {pager} pages",
            nextPages: "Next {pager} pages",
            deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
          },
          dialog: {
            close: "Close this dialog"
          },
          drawer: {
            close: "Close this dialog"
          },
          messagebox: {
            title: "Message",
            confirm: "OK",
            cancel: "Cancel",
            error: "Illegal input",
            close: "Close this dialog"
          },
          upload: {
            deleteTip: "press delete to remove",
            delete: "Delete",
            preview: "Preview",
            continue: "Continue"
          },
          slider: {
            defaultLabel: "slider between {min} and {max}",
            defaultRangeStartLabel: "pick start value",
            defaultRangeEndLabel: "pick end value"
          },
          table: {
            emptyText: "No Data",
            confirmFilter: "Confirm",
            resetFilter: "Reset",
            clearFilter: "All",
            sumText: "Sum"
          },
          tour: {
            next: "Next",
            previous: "Previous",
            finish: "Finish"
          },
          tree: {
            emptyText: "No Data"
          },
          transfer: {
            noMatch: "No matching data",
            noData: "No data",
            titles: ["List 1", "List 2"],
            filterPlaceholder: "Enter keyword",
            noCheckedFormat: "{total} items",
            hasCheckedFormat: "{checked}/{total} checked"
          },
          image: {
            error: "FAILED"
          },
          pageHeader: {
            title: "Back"
          },
          popconfirm: {
            confirmButtonText: "Yes",
            cancelButtonText: "No"
          },
          carousel: {
            leftArrow: "Carousel arrow left",
            rightArrow: "Carousel arrow right",
            indicator: "Carousel switch to index {index}"
          }
        }
      };
      const buildTranslator = (locale) => (path, option) => translate(path, option, vue.unref(locale));
      const translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
        var _a2;
        return `${(_a2 = option == null ? void 0 : option[key]) != null ? _a2 : `{${key}}`}`;
      });
      const buildLocaleContext = (locale) => {
        const lang = vue.computed(() => vue.unref(locale).name);
        const localeRef = vue.isRef(locale) ? locale : vue.ref(locale);
        return {
          lang,
          locale: localeRef,
          t: buildTranslator(locale)
        };
      };
      const localeContextKey = Symbol("localeContextKey");
      const useLocale = (localeOverrides) => {
        const locale = vue.inject(localeContextKey, vue.ref());
        return buildLocaleContext(vue.computed(() => locale.value || English));
      };
      /**
      * @vue/reactivity v3.4.27
      * (c) 2018-present Yuxi (Evan) You and Vue contributors
      * @license MIT
      **/
      let activeEffectScope;
      function recordEffectScope(effect2, scope = activeEffectScope) {
        if (scope && scope.active) {
          scope.effects.push(effect2);
        }
      }
      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 i = 0; i < this._depsLength; i++) {
              const dep = this.deps[i];
              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(v) {
          this._dirtyLevel = v ? 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 i = effect2._depsLength; i < effect2.deps.length; i++) {
            cleanupDepEffect(effect2.deps[i], 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 last = trackStack.pop();
        shouldTrack = last === void 0 ? true : last;
      }
      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 = (cleanup, computed2) => {
        const dep = /* @__PURE__ */ new Map();
        dep.cleanup = cleanup;
        dep.computed = computed2;
        return dep;
      };
      new Set(
        /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol$1)
      );
      function toRaw(observed) {
        const raw = observed && observed["__v_raw"];
        return raw ? toRaw(raw) : observed;
      }
      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(v) {
          this.effect.dirty = v;
        }
        // #endregion
      }
      function computed(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 _a2;
        if (shouldTrack && activeEffect) {
          ref2 = toRaw(ref2);
          trackEffect(
            activeEffect,
            (_a2 = ref2.dep) != null ? _a2 : ref2.dep = createDep(
              () => ref2.dep = void 0,
              ref2 instanceof ComputedRefImpl ? ref2 : void 0
            )
          );
        }
      }
      function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
        ref2 = toRaw(ref2);
        const dep = ref2.dep;
        if (dep) {
          triggerEffects(
            dep,
            dirtyLevel
          );
        }
      }
      const defaultNamespace = "el";
      const statePrefix = "is-";
      const _bem = (namespace, block, blockSuffix, element, modifier) => {
        let cls = `${namespace}-${block}`;
        if (blockSuffix) {
          cls += `-${blockSuffix}`;
        }
        if (element) {
          cls += `__${element}`;
        }
        if (modifier) {
          cls += `--${modifier}`;
        }
        return cls;
      };
      const namespaceContextKey = Symbol("namespaceContextKey");
      const useGetDerivedNamespace = (namespaceOverrides) => {
        const derivedNamespace = vue.getCurrentInstance() ? vue.inject(namespaceContextKey, vue.ref(defaultNamespace)) : vue.ref(defaultNamespace);
        const namespace = vue.computed(() => {
          return vue.unref(derivedNamespace) || defaultNamespace;
        });
        return namespace;
      };
      const useNamespace = (block, namespaceOverrides) => {
        const namespace = useGetDerivedNamespace();
        const b2 = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
        const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
        const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
        const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
        const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
        const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
        const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
        const is = (name, ...args) => {
          const state = args.length >= 1 ? args[0] : true;
          return name && state ? `${statePrefix}${name}` : "";
        };
        const cssVar = (object) => {
          const styles = {};
          for (const key in object) {
            if (object[key]) {
              styles[`--${namespace.value}-${key}`] = object[key];
            }
          }
          return styles;
        };
        const cssVarBlock = (object) => {
          const styles = {};
          for (const key in object) {
            if (object[key]) {
              styles[`--${namespace.value}-${block}-${key}`] = object[key];
            }
          }
          return styles;
        };
        const cssVarName = (name) => `--${namespace.value}-${name}`;
        const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
        return {
          namespace,
          b: b2,
          e,
          m,
          be,
          em,
          bm,
          bem,
          is,
          cssVar,
          cssVarName,
          cssVarBlock,
          cssVarBlockName
        };
      };
      const useLockscreen = (trigger, options = {}) => {
        if (!vue.isRef(trigger)) {
          throwError("[useLockscreen]", "You need to pass a ref param to this function");
        }
        const ns = options.ns || useNamespace("popup");
        const hiddenCls = computed(() => ns.bm("parent", "hidden"));
        if (!isClient || hasClass$1(document.body, hiddenCls.value)) {
          return;
        }
        let scrollBarWidth2 = 0;
        let withoutHiddenClass = false;
        let bodyWidth = "0";
        const cleanup = () => {
          setTimeout(() => {
            removeClass$1(document == null ? void 0 : document.body, hiddenCls.value);
            if (withoutHiddenClass && document) {
              document.body.style.width = bodyWidth;
            }
          }, 200);
        };
        vue.watch(trigger, (val) => {
          if (!val) {
            cleanup();
            return;
          }
          withoutHiddenClass = !hasClass$1(document.body, hiddenCls.value);
          if (withoutHiddenClass) {
            bodyWidth = document.body.style.width;
          }
          scrollBarWidth2 = getScrollBarWidth(ns.namespace.value);
          const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
          const bodyOverflowY = getStyle(document.body, "overflowY");
          if (scrollBarWidth2 > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) {
            document.body.style.width = `calc(100% - ${scrollBarWidth2}px)`;
          }
          addClass$1(document.body, hiddenCls.value);
        });
        vue.onScopeDispose(() => cleanup());
      };
      const useProp = (name) => {
        const vm = vue.getCurrentInstance();
        return vue.computed(() => {
          var _a2, _b;
          return (_b = (_a2 = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a2.$props) == null ? void 0 : _b[name];
        });
      };
      const useSameTarget = (handleClick) => {
        if (!handleClick) {
          return { onClick: NOOP, onMousedown: NOOP, onMouseup: NOOP };
        }
        let mousedownTarget = false;
        let mouseupTarget = false;
        const onClick = (e) => {
          if (mousedownTarget && mouseupTarget) {
            handleClick(e);
          }
          mousedownTarget = mouseupTarget = false;
        };
        const onMousedown = (e) => {
          mousedownTarget = e.target === e.currentTarget;
        };
        const onMouseup = (e) => {
          mouseupTarget = e.target === e.currentTarget;
        };
        return { onClick, onMousedown, onMouseup };
      };
      const defaultIdInjection = {
        prefix: Math.floor(Math.random() * 1e4),
        current: 0
      };
      const ID_INJECTION_KEY = Symbol("elIdInjection");
      const useIdInjection = () => {
        return vue.getCurrentInstance() ? vue.inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
      };
      const useId = (deterministicId) => {
        const idInjection = useIdInjection();
        const namespace = useGetDerivedNamespace();
        const idRef = vue.computed(() => vue.unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
        return idRef;
      };
      let registeredEscapeHandlers = [];
      const cachedHandler = (e) => {
        const event = e;
        if (event.key === EVENT_CODE.esc) {
          registeredEscapeHandlers.forEach((registeredHandler) => registeredHandler(event));
        }
      };
      const useEscapeKeydown = (handler) => {
        vue.onMounted(() => {
          if (registeredEscapeHandlers.length === 0) {
            document.addEventListener("keydown", cachedHandler);
          }
          if (isClient)
            registeredEscapeHandlers.push(handler);
        });
        vue.onBeforeUnmount(() => {
          registeredEscapeHandlers = registeredEscapeHandlers.filter((registeredHandler) => registeredHandler !== handler);
          if (registeredEscapeHandlers.length === 0) {
            if (isClient)
              document.removeEventListener("keydown", cachedHandler);
          }
        });
      };
      const initial = {
        current: 0
      };
      const zIndex = vue.ref(0);
      const defaultInitialZIndex = 2e3;
      const ZINDEX_INJECTION_KEY = Symbol("elZIndexContextKey");
      const zIndexContextKey = Symbol("zIndexContextKey");
      const useZIndex = (zIndexOverrides) => {
        const increasingInjection = vue.getCurrentInstance() ? vue.inject(ZINDEX_INJECTION_KEY, initial) : initial;
        const zIndexInjection = vue.getCurrentInstance() ? vue.inject(zIndexContextKey, void 0) : void 0;
        const initialZIndex = vue.computed(() => {
          const zIndexFromInjection = vue.unref(zIndexInjection);
          return isNumber$1(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
        });
        const currentZIndex = vue.computed(() => initialZIndex.value + zIndex.value);
        const nextZIndex = () => {
          increasingInjection.current++;
          zIndex.value = increasingInjection.current;
          return currentZIndex.value;
        };
        if (!isClient && !vue.inject(ZINDEX_INJECTION_KEY))
          ;
        return {
          initialZIndex,
          currentZIndex,
          nextZIndex
        };
      };
      function useCursor(input) {
        const selectionRef = vue.ref();
        function recordCursor() {
          if (input.value == void 0)
            return;
          const { selectionStart, selectionEnd, value } = input.value;
          if (selectionStart == null || selectionEnd == null)
            return;
          const beforeTxt = value.slice(0, Math.max(0, selectionStart));
          const afterTxt = value.slice(Math.max(0, selectionEnd));
          selectionRef.value = {
            selectionStart,
            selectionEnd,
            value,
            beforeTxt,
            afterTxt
          };
        }
        function setCursor() {
          if (input.value == void 0 || selectionRef.value == void 0)
            return;
          const { value } = input.value;
          const { beforeTxt, afterTxt, selectionStart } = selectionRef.value;
          if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0)
            return;
          let startPos = value.length;
          if (value.endsWith(afterTxt)) {
            startPos = value.length - afterTxt.length;
          } else if (value.startsWith(beforeTxt)) {
            startPos = beforeTxt.length;
          } else {
            const beforeLastChar = beforeTxt[selectionStart - 1];
            const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
            if (newIndex !== -1) {
              startPos = newIndex + 1;
            }
          }
          input.value.setSelectionRange(startPos, startPos);
        }
        return [recordCursor, setCursor];
      }
      const useSizeProp = buildProp({
        type: String,
        values: componentSizes,
        required: false
      });
      const SIZE_INJECTION_KEY = Symbol("size");
      const useGlobalSize = () => {
        const injectedSize = vue.inject(SIZE_INJECTION_KEY, {});
        return vue.computed(() => {
          return vue.unref(injectedSize.size) || "";
        });
      };
      function useFocusController(target, { afterFocus, beforeBlur, afterBlur } = {}) {
        const instance = vue.getCurrentInstance();
        const { emit } = instance;
        const wrapperRef = vue.shallowRef();
        const isFocused = vue.ref(false);
        const handleFocus = (event) => {
          if (isFocused.value)
            return;
          isFocused.value = true;
          emit("focus", event);
          afterFocus == null ? void 0 : afterFocus();
        };
        const handleBlur = (event) => {
          var _a2;
          const cancelBlur = isFunction$2(beforeBlur) ? beforeBlur(event) : false;
          if (cancelBlur || event.relatedTarget && ((_a2 = wrapperRef.value) == null ? void 0 : _a2.contains(event.relatedTarget)))
            return;
          isFocused.value = false;
          emit("blur", event);
          afterBlur == null ? void 0 : afterBlur();
        };
        const handleClick = () => {
          var _a2;
          (_a2 = target.value) == null ? void 0 : _a2.focus();
        };
        vue.watch(wrapperRef, (el) => {
          if (el) {
            el.setAttribute("tabindex", "-1");
          }
        });
        useEventListener(wrapperRef, "click", handleClick);
        return {
          wrapperRef,
          isFocused,
          handleFocus,
          handleBlur
        };
      }
      const useEmptyValuesProps = buildProps({
        emptyValues: Array,
        valueOnClear: {
          type: [String, Number, Boolean, Function],
          default: void 0,
          validator: (val) => isFunction$2(val) ? !val() : !val
        }
      });
      const ariaProps = buildProps({
        ariaLabel: String,
        ariaOrientation: {
          type: String,
          values: ["horizontal", "vertical", "undefined"]
        },
        ariaControls: String
      });
      const useAriaProps = (arias) => {
        return pick(ariaProps, arias);
      };
      const configProviderContextKey = Symbol();
      const globalConfig = vue.ref();
      function useGlobalConfig(key, defaultValue = void 0) {
        const config = vue.getCurrentInstance() ? vue.inject(configProviderContextKey, globalConfig) : globalConfig;
        if (key) {
          return vue.computed(() => {
            var _a2, _b;
            return (_b = (_a2 = config.value) == null ? void 0 : _a2[key]) != null ? _b : defaultValue;
          });
        } else {
          return config;
        }
      }
      const provideGlobalConfig = (config, app2, global2 = false) => {
        var _a2;
        const inSetup = !!vue.getCurrentInstance();
        const oldConfig = inSetup ? useGlobalConfig() : void 0;
        const provideFn = (_a2 = void 0) != null ? _a2 : inSetup ? vue.provide : void 0;
        if (!provideFn) {
          return;
        }
        const context = vue.computed(() => {
          const cfg = vue.unref(config);
          if (!(oldConfig == null ? void 0 : oldConfig.value))
            return cfg;
          return mergeConfig(oldConfig.value, cfg);
        });
        provideFn(configProviderContextKey, context);
        provideFn(localeContextKey, vue.computed(() => context.value.locale));
        provideFn(namespaceContextKey, vue.computed(() => context.value.namespace));
        provideFn(zIndexContextKey, vue.computed(() => context.value.zIndex));
        provideFn(SIZE_INJECTION_KEY, {
          size: vue.computed(() => context.value.size || "")
        });
        if (global2 || !globalConfig.value) {
          globalConfig.value = context.value;
        }
        return context;
      };
      const mergeConfig = (a, b2) => {
        const keys2 = [.../* @__PURE__ */ new Set([...keysOf(a), ...keysOf(b2)])];
        const obj = {};
        for (const key of keys2) {
          obj[key] = b2[key] !== void 0 ? b2[key] : a[key];
        }
        return obj;
      };
      const configProviderProps = buildProps({
        a11y: {
          type: Boolean,
          default: true
        },
        locale: {
          type: definePropType(Object)
        },
        size: useSizeProp,
        button: {
          type: definePropType(Object)
        },
        experimentalFeatures: {
          type: definePropType(Object)
        },
        keyboardNavigation: {
          type: Boolean,
          default: true
        },
        message: {
          type: definePropType(Object)
        },
        zIndex: Number,
        namespace: {
          type: String,
          default: "el"
        },
        ...useEmptyValuesProps
      });
      const messageConfig = {};
      const ConfigProvider = vue.defineComponent({
        name: "ElConfigProvider",
        props: configProviderProps,
        setup(props, { slots }) {
          vue.watch(() => props.message, (val) => {
            Object.assign(messageConfig, val != null ? val : {});
          }, { immediate: true, deep: true });
          const config = provideGlobalConfig(props);
          return () => vue.renderSlot(slots, "default", { config: config == null ? void 0 : config.value });
        }
      });
      const ElConfigProvider = withInstall(ConfigProvider);
      var _export_sfc$1 = (sfc, props) => {
        const target = sfc.__vccOpts || sfc;
        for (const [key, val] of props) {
          target[key] = val;
        }
        return target;
      };
      const iconProps = buildProps({
        size: {
          type: definePropType([Number, String])
        },
        color: {
          type: String
        }
      });
      const __default__$e = vue.defineComponent({
        name: "ElIcon",
        inheritAttrs: false
      });
      const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
        ...__default__$e,
        props: iconProps,
        setup(__props) {
          const props = __props;
          const ns = useNamespace("icon");
          const style = vue.computed(() => {
            const { size, color } = props;
            if (!size && !color)
              return {};
            return {
              fontSize: isUndefined$1(size) ? void 0 : addUnit(size),
              "--color": color
            };
          });
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createElementBlock("i", vue.mergeProps({
              class: vue.unref(ns).b(),
              style: vue.unref(style)
            }, _ctx.$attrs), [
              vue.renderSlot(_ctx.$slots, "default")
            ], 16);
          };
        }
      });
      var Icon = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__file", "icon.vue"]]);
      const ElIcon = withInstall(Icon);
      const formContextKey = Symbol("formContextKey");
      const formItemContextKey = Symbol("formItemContextKey");
      const useFormSize = (fallback, ignore = {}) => {
        const emptyRef = vue.ref(void 0);
        const size = ignore.prop ? emptyRef : useProp("size");
        const globalConfig2 = ignore.global ? emptyRef : useGlobalSize();
        const form = ignore.form ? { size: void 0 } : vue.inject(formContextKey, void 0);
        const formItem = ignore.formItem ? { size: void 0 } : vue.inject(formItemContextKey, void 0);
        return vue.computed(() => size.value || vue.unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig2.value || "");
      };
      const useFormDisabled = (fallback) => {
        const disabled = useProp("disabled");
        const form = vue.inject(formContextKey, void 0);
        return vue.computed(() => disabled.value || vue.unref(fallback) || (form == null ? void 0 : form.disabled) || false);
      };
      const useFormItem = () => {
        const form = vue.inject(formContextKey, void 0);
        const formItem = vue.inject(formItemContextKey, void 0);
        return {
          form,
          formItem
        };
      };
      const useFormItemInputId = (props, {
        formItemContext,
        disableIdGeneration,
        disableIdManagement
      }) => {
        if (!disableIdGeneration) {
          disableIdGeneration = vue.ref(false);
        }
        if (!disableIdManagement) {
          disableIdManagement = vue.ref(false);
        }
        const inputId = vue.ref();
        let idUnwatch = void 0;
        const isLabeledByFormItem = vue.computed(() => {
          var _a2;
          return !!(!(props.label || props.ariaLabel) && formItemContext && formItemContext.inputIds && ((_a2 = formItemContext.inputIds) == null ? void 0 : _a2.length) <= 1);
        });
        vue.onMounted(() => {
          idUnwatch = vue.watch([vue.toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration2]) => {
            const newId = id != null ? id : !disableIdGeneration2 ? useId().value : void 0;
            if (newId !== inputId.value) {
              if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
                inputId.value && formItemContext.removeInputId(inputId.value);
                if (!(disableIdManagement == null ? void 0 : disableIdManagement.value) && !disableIdGeneration2 && newId) {
                  formItemContext.addInputId(newId);
                }
              }
              inputId.value = newId;
            }
          }, { immediate: true });
        });
        vue.onUnmounted(() => {
          idUnwatch && idUnwatch();
          if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
            inputId.value && formItemContext.removeInputId(inputId.value);
          }
        });
        return {
          isLabeledByFormItem,
          inputId
        };
      };
      const formMetaProps = buildProps({
        size: {
          type: String,
          values: componentSizes
        },
        disabled: Boolean
      });
      const formProps = buildProps({
        ...formMetaProps,
        model: Object,
        rules: {
          type: definePropType(Object)
        },
        labelPosition: {
          type: String,
          values: ["left", "right", "top"],
          default: "right"
        },
        requireAsteriskPosition: {
          type: String,
          values: ["left", "right"],
          default: "left"
        },
        labelWidth: {
          type: [String, Number],
          default: ""
        },
        labelSuffix: {
          type: String,
          default: ""
        },
        inline: Boolean,
        inlineMessage: Boolean,
        statusIcon: Boolean,
        showMessage: {
          type: Boolean,
          default: true
        },
        validateOnRuleChange: {
          type: Boolean,
          default: true
        },
        hideRequiredAsterisk: Boolean,
        scrollToError: Boolean,
        scrollIntoViewOptions: {
          type: [Object, Boolean]
        }
      });
      const formEmits = {
        validate: (prop, isValid, message) => (isArray$1(prop) || isString$1(prop)) && isBoolean(isValid) && isString$1(message)
      };
      function useFormLabelWidth() {
        const potentialLabelWidthArr = vue.ref([]);
        const autoLabelWidth = vue.computed(() => {
          if (!potentialLabelWidthArr.value.length)
            return "0";
          const max = Math.max(...potentialLabelWidthArr.value);
          return max ? `${max}px` : "";
        });
        function getLabelWidthIndex(width) {
          const index = potentialLabelWidthArr.value.indexOf(width);
          if (index === -1 && autoLabelWidth.value === "0")
            ;
          return index;
        }
        function registerLabelWidth(val, oldVal) {
          if (val && oldVal) {
            const index = getLabelWidthIndex(oldVal);
            potentialLabelWidthArr.value.splice(index, 1, val);
          } else if (val) {
            potentialLabelWidthArr.value.push(val);
          }
        }
        function deregisterLabelWidth(val) {
          const index = getLabelWidthIndex(val);
          if (index > -1) {
            potentialLabelWidthArr.value.splice(index, 1);
          }
        }
        return {
          autoLabelWidth,
          registerLabelWidth,
          deregisterLabelWidth
        };
      }
      const filterFields = (fields, props) => {
        const normalized = castArray(props);
        return normalized.length > 0 ? fields.filter((field) => field.prop && normalized.includes(field.prop)) : fields;
      };
      const COMPONENT_NAME$1 = "ElForm";
      const __default__$d = vue.defineComponent({
        name: COMPONENT_NAME$1
      });
      const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
        ...__default__$d,
        props: formProps,
        emits: formEmits,
        setup(__props, { expose, emit }) {
          const props = __props;
          const fields = [];
          const formSize = useFormSize();
          const ns = useNamespace("form");
          const formClasses = vue.computed(() => {
            const { labelPosition, inline } = props;
            return [
              ns.b(),
              ns.m(formSize.value || "default"),
              {
                [ns.m(`label-${labelPosition}`)]: labelPosition,
                [ns.m("inline")]: inline
              }
            ];
          });
          const getField = (prop) => {
            return fields.find((field) => field.prop === prop);
          };
          const addField = (field) => {
            fields.push(field);
          };
          const removeField = (field) => {
            if (field.prop) {
              fields.splice(fields.indexOf(field), 1);
            }
          };
          const resetFields = (properties = []) => {
            if (!props.model) {
              return;
            }
            filterFields(fields, properties).forEach((field) => field.resetField());
          };
          const clearValidate = (props2 = []) => {
            filterFields(fields, props2).forEach((field) => field.clearValidate());
          };
          const isValidatable = vue.computed(() => {
            const hasModel = !!props.model;
            return hasModel;
          });
          const obtainValidateFields = (props2) => {
            if (fields.length === 0)
              return [];
            const filteredFields = filterFields(fields, props2);
            if (!filteredFields.length) {
              return [];
            }
            return filteredFields;
          };
          const validate = async (callback) => validateField(void 0, callback);
          const doValidateField = async (props2 = []) => {
            if (!isValidatable.value)
              return false;
            const fields2 = obtainValidateFields(props2);
            if (fields2.length === 0)
              return true;
            let validationErrors = {};
            for (const field of fields2) {
              try {
                await field.validate("");
              } catch (fields3) {
                validationErrors = {
                  ...validationErrors,
                  ...fields3
                };
              }
            }
            if (Object.keys(validationErrors).length === 0)
              return true;
            return Promise.reject(validationErrors);
          };
          const validateField = async (modelProps = [], callback) => {
            const shouldThrow = !isFunction$2(callback);
            try {
              const result = await doValidateField(modelProps);
              if (result === true) {
                await (callback == null ? void 0 : callback(result));
              }
              return result;
            } catch (e) {
              if (e instanceof Error)
                throw e;
              const invalidFields = e;
              if (props.scrollToError) {
                scrollToField(Object.keys(invalidFields)[0]);
              }
              await (callback == null ? void 0 : callback(false, invalidFields));
              return shouldThrow && Promise.reject(invalidFields);
            }
          };
          const scrollToField = (prop) => {
            var _a2;
            const field = filterFields(fields, prop)[0];
            if (field) {
              (_a2 = field.$el) == null ? void 0 : _a2.scrollIntoView(props.scrollIntoViewOptions);
            }
          };
          vue.watch(() => props.rules, () => {
            if (props.validateOnRuleChange) {
              validate().catch((err) => debugWarn());
            }
          }, { deep: true });
          vue.provide(formContextKey, vue.reactive({
            ...vue.toRefs(props),
            emit,
            resetFields,
            clearValidate,
            validateField,
            getField,
            addField,
            removeField,
            ...useFormLabelWidth()
          }));
          expose({
            validate,
            validateField,
            resetFields,
            clearValidate,
            scrollToField,
            fields
          });
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createElementBlock("form", {
              class: vue.normalizeClass(vue.unref(formClasses))
            }, [
              vue.renderSlot(_ctx.$slots, "default")
            ], 2);
          };
        }
      });
      var Form = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__file", "form.vue"]]);
      var define_process_env_default = {};
      function _extends() {
        _extends = Object.assign ? Object.assign.bind() : function(target) {
          for (var i = 1; i < arguments.length; i++) {
            var source = arguments[i];
            for (var key in source) {
              if (Object.prototype.hasOwnProperty.call(source, key)) {
                target[key] = source[key];
              }
            }
          }
          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(o) {
        _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
          return o2.__proto__ || Object.getPrototypeOf(o2);
        };
        return _getPrototypeOf(o);
      }
      function _setPrototypeOf(o, p) {
        _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
          o2.__proto__ = p2;
          return o2;
        };
        return _setPrototypeOf(o, p);
      }
      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 (e) {
          return false;
        }
      }
      function _construct(Parent, args, Class) {
        if (_isNativeReflectConstruct()) {
          _construct = Reflect.construct.bind();
        } else {
          _construct = function _construct2(Parent2, args2, Class2) {
            var a = [null];
            a.push.apply(a, args2);
            var Constructor = Function.bind.apply(Parent2, a);
            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(e) {
              return typeof e === "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 i = 0;
        var len = args.length;
        if (typeof template === "function") {
          return template.apply(null, args);
        }
        if (typeof template === "string") {
          var str = template.replace(formatRegExp, function(x) {
            if (x === "%%") {
              return "%";
            }
            if (i >= len) {
              return x;
            }
            switch (x) {
              case "%s":
                return String(args[i++]);
              case "%d":
                return Number(args[i++]);
              case "%j":
                try {
                  return JSON.stringify(args[i++]);
                } catch (_) {
                  return "[Circular]";
                }
                break;
              default:
                return x;
            }
          });
          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(a) {
          func(a, count);
        });
      }
      function asyncSerialArray(arr, func, callback) {
        var index = 0;
        var arrLength = arr.length;
        function next(errors) {
          if (errors && errors.length) {
            callback(errors);
            return;
          }
          var original = index;
          index = index + 1;
          if (original < arrLength) {
            func(arr[original], next);
          } else {
            callback([]);
          }
        }
        next([]);
      }
      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(resolve, reject) {
            var next = function next2(errors) {
              callback(errors);
              return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);
            };
            var flattenArr = flattenObjArr(objArr);
            asyncSerialArray(flattenArr, func, next);
          });
          _pending["catch"](function(e) {
            return e;
          });
          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(resolve, reject) {
          var next = function next2(errors) {
            results.push.apply(results, errors);
            total++;
            if (total === objArrLength) {
              callback(results);
              return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);
            }
          };
          if (!objArrKeys.length) {
            callback(results);
            resolve(source);
          }
          objArrKeys.forEach(function(key) {
            var arr = objArr[key];
            if (firstFields.indexOf(key) !== -1) {
              asyncSerialArray(arr, func, next);
            } else {
              asyncParallelArray(arr, func, next);
            }
          });
        });
        pending["catch"](function(e) {
          return e;
        });
        return pending;
      }
      function isErrorObj(obj) {
        return !!(obj && obj.message !== void 0);
      }
      function getValue(value, path) {
        var v = value;
        for (var i = 0; i < path.length; i++) {
          if (v == void 0) {
            return v;
          }
          v = v[path[i]];
        }
        return v;
      }
      function complementError(rule, source) {
        return function(oe2) {
          var fieldValue;
          if (rule.fullFields) {
            fieldValue = getValue(source, rule.fullFields);
          } else {
            fieldValue = source[oe2.field || rule.fullField];
          }
          if (isErrorObj(oe2)) {
            oe2.field = oe2.field || rule.fullField;
            oe2.fieldValue = fieldValue;
            return oe2;
          }
          return {
            message: typeof oe2 === "function" ? oe2() : oe2,
            fieldValue,
            field: oe2.field || rule.fullField
          };
        };
      }
      function deepMerge(target, source) {
        if (source) {
          for (var s in source) {
            if (source.hasOwnProperty(s)) {
              var value = source[s];
              if (typeof value === "object" && typeof target[s] === "object") {
                target[s] = _extends({}, target[s], value);
              } else {
                target[s] = 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 (e) {
            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 hex2(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 key = null;
        var num = typeof value === "number";
        var str = typeof value === "string";
        var arr = Array.isArray(value);
        if (num) {
          key = "number";
        } else if (str) {
          key = "string";
        } else if (arr) {
          key = "array";
        }
        if (!key) {
          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[key].len, rule.fullField, rule.len));
          }
        } else if (min && !max && val < rule.min) {
          errors.push(format(options.messages[key].min, rule.fullField, rule.min));
        } else if (max && !min && val > rule.max) {
          errors.push(format(options.messages[key].max, rule.fullField, rule.max));
        } else if (min && max && (val < rule.min || val > rule.max)) {
          errors.push(format(options.messages[key].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 clone2() {
            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_, o, oc) {
          var _this2 = this;
          if (o === void 0) {
            o = {};
          }
          if (oc === void 0) {
            oc = function oc2() {
            };
          }
          var source = source_;
          var options = o;
          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(e) {
              if (Array.isArray(e)) {
                var _errors;
                errors = (_errors = errors).concat.apply(_errors, e);
              } else {
                errors.push(e);
              }
            }
            for (var i = 0; i < results.length; i++) {
              add2(results[i]);
            }
            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(r) {
              var rule = r;
              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(key, schema) {
              return _extends({}, schema, {
                fullField: rule.fullField + "." + key,
                fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key]
              });
            }
            function cb(e) {
              if (e === void 0) {
                e = [];
              }
              var errorList = Array.isArray(e) ? e : [e];
              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(key) {
                    fieldsSchema[key] = 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(e) {
                return cb(e);
              });
            }
          }, 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;
      const formItemValidateStates = [
        "",
        "error",
        "validating",
        "success"
      ];
      const formItemProps = buildProps({
        label: String,
        labelWidth: {
          type: [String, Number],
          default: ""
        },
        prop: {
          type: definePropType([String, Array])
        },
        required: {
          type: Boolean,
          default: void 0
        },
        rules: {
          type: definePropType([Object, Array])
        },
        error: String,
        validateStatus: {
          type: String,
          values: formItemValidateStates
        },
        for: String,
        inlineMessage: {
          type: [String, Boolean],
          default: ""
        },
        showMessage: {
          type: Boolean,
          default: true
        },
        size: {
          type: String,
          values: componentSizes
        }
      });
      const COMPONENT_NAME = "ElLabelWrap";
      var FormLabelWrap = vue.defineComponent({
        name: COMPONENT_NAME,
        props: {
          isAutoWidth: Boolean,
          updateAll: Boolean
        },
        setup(props, {
          slots
        }) {
          const formContext = vue.inject(formContextKey, void 0);
          const formItemContext = vue.inject(formItemContextKey);
          if (!formItemContext)
            throwError(COMPONENT_NAME, "usage: <el-form-item><label-wrap /></el-form-item>");
          const ns = useNamespace("form");
          const el = vue.ref();
          const computedWidth = vue.ref(0);
          const getLabelWidth = () => {
            var _a2;
            if ((_a2 = el.value) == null ? void 0 : _a2.firstElementChild) {
              const width = window.getComputedStyle(el.value.firstElementChild).width;
              return Math.ceil(Number.parseFloat(width));
            } else {
              return 0;
            }
          };
          const updateLabelWidth = (action = "update") => {
            vue.nextTick(() => {
              if (slots.default && props.isAutoWidth) {
                if (action === "update") {
                  computedWidth.value = getLabelWidth();
                } else if (action === "remove") {
                  formContext == null ? void 0 : formContext.deregisterLabelWidth(computedWidth.value);
                }
              }
            });
          };
          const updateLabelWidthFn = () => updateLabelWidth("update");
          vue.onMounted(() => {
            updateLabelWidthFn();
          });
          vue.onBeforeUnmount(() => {
            updateLabelWidth("remove");
          });
          vue.onUpdated(() => updateLabelWidthFn());
          vue.watch(computedWidth, (val, oldVal) => {
            if (props.updateAll) {
              formContext == null ? void 0 : formContext.registerLabelWidth(val, oldVal);
            }
          });
          useResizeObserver(vue.computed(() => {
            var _a2, _b;
            return (_b = (_a2 = el.value) == null ? void 0 : _a2.firstElementChild) != null ? _b : null;
          }), updateLabelWidthFn);
          return () => {
            var _a2, _b;
            if (!slots)
              return null;
            const {
              isAutoWidth
            } = props;
            if (isAutoWidth) {
              const autoLabelWidth = formContext == null ? void 0 : formContext.autoLabelWidth;
              const hasLabel = formItemContext == null ? void 0 : formItemContext.hasLabel;
              const style = {};
              if (hasLabel && autoLabelWidth && autoLabelWidth !== "auto") {
                const marginWidth = Math.max(0, Number.parseInt(autoLabelWidth, 10) - computedWidth.value);
                const marginPosition = formContext.labelPosition === "left" ? "marginRight" : "marginLeft";
                if (marginWidth) {
                  style[marginPosition] = `${marginWidth}px`;
                }
              }
              return vue.createVNode("div", {
                "ref": el,
                "class": [ns.be("item", "label-wrap")],
                "style": style
              }, [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)]);
            } else {
              return vue.createVNode(vue.Fragment, {
                "ref": el
              }, [(_b = slots.default) == null ? void 0 : _b.call(slots)]);
            }
          };
        }
      });
      const _hoisted_1$d = ["role", "aria-labelledby"];
      const __default__$c = vue.defineComponent({
        name: "ElFormItem"
      });
      const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
        ...__default__$c,
        props: formItemProps,
        setup(__props, { expose }) {
          const props = __props;
          const slots = vue.useSlots();
          const formContext = vue.inject(formContextKey, void 0);
          const parentFormItemContext = vue.inject(formItemContextKey, void 0);
          const _size = useFormSize(void 0, { formItem: false });
          const ns = useNamespace("form-item");
          const labelId = useId().value;
          const inputIds = vue.ref([]);
          const validateState = vue.ref("");
          const validateStateDebounced = refDebounced(validateState, 100);
          const validateMessage = vue.ref("");
          const formItemRef = vue.ref();
          let initialValue = void 0;
          let isResettingField = false;
          const labelStyle = vue.computed(() => {
            if ((formContext == null ? void 0 : formContext.labelPosition) === "top") {
              return {};
            }
            const labelWidth = addUnit(props.labelWidth || (formContext == null ? void 0 : formContext.labelWidth) || "");
            if (labelWidth)
              return { width: labelWidth };
            return {};
          });
          const contentStyle = vue.computed(() => {
            if ((formContext == null ? void 0 : formContext.labelPosition) === "top" || (formContext == null ? void 0 : formContext.inline)) {
              return {};
            }
            if (!props.label && !props.labelWidth && isNested) {
              return {};
            }
            const labelWidth = addUnit(props.labelWidth || (formContext == null ? void 0 : formContext.labelWidth) || "");
            if (!props.label && !slots.label) {
              return { marginLeft: labelWidth };
            }
            return {};
          });
          const formItemClasses = vue.computed(() => [
            ns.b(),
            ns.m(_size.value),
            ns.is("error", validateState.value === "error"),
            ns.is("validating", validateState.value === "validating"),
            ns.is("success", validateState.value === "success"),
            ns.is("required", isRequired.value || props.required),
            ns.is("no-asterisk", formContext == null ? void 0 : formContext.hideRequiredAsterisk),
            (formContext == null ? void 0 : formContext.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
            { [ns.m("feedback")]: formContext == null ? void 0 : formContext.statusIcon }
          ]);
          const _inlineMessage = vue.computed(() => isBoolean(props.inlineMessage) ? props.inlineMessage : (formContext == null ? void 0 : formContext.inlineMessage) || false);
          const validateClasses = vue.computed(() => [
            ns.e("error"),
            { [ns.em("error", "inline")]: _inlineMessage.value }
          ]);
          const propString = vue.computed(() => {
            if (!props.prop)
              return "";
            return isString$1(props.prop) ? props.prop : props.prop.join(".");
          });
          const hasLabel = vue.computed(() => {
            return !!(props.label || slots.label);
          });
          const labelFor = vue.computed(() => {
            return props.for || (inputIds.value.length === 1 ? inputIds.value[0] : void 0);
          });
          const isGroup = vue.computed(() => {
            return !labelFor.value && hasLabel.value;
          });
          const isNested = !!parentFormItemContext;
          const fieldValue = vue.computed(() => {
            const model = formContext == null ? void 0 : formContext.model;
            if (!model || !props.prop) {
              return;
            }
            return getProp(model, props.prop).value;
          });
          const normalizedRules = vue.computed(() => {
            const { required } = props;
            const rules2 = [];
            if (props.rules) {
              rules2.push(...castArray(props.rules));
            }
            const formRules = formContext == null ? void 0 : formContext.rules;
            if (formRules && props.prop) {
              const _rules = getProp(formRules, props.prop).value;
              if (_rules) {
                rules2.push(...castArray(_rules));
              }
            }
            if (required !== void 0) {
              const requiredRules = rules2.map((rule, i) => [rule, i]).filter(([rule]) => Object.keys(rule).includes("required"));
              if (requiredRules.length > 0) {
                for (const [rule, i] of requiredRules) {
                  if (rule.required === required)
                    continue;
                  rules2[i] = { ...rule, required };
                }
              } else {
                rules2.push({ required });
              }
            }
            return rules2;
          });
          const validateEnabled = vue.computed(() => normalizedRules.value.length > 0);
          const getFilteredRule = (trigger) => {
            const rules2 = normalizedRules.value;
            return rules2.filter((rule) => {
              if (!rule.trigger || !trigger)
                return true;
              if (Array.isArray(rule.trigger)) {
                return rule.trigger.includes(trigger);
              } else {
                return rule.trigger === trigger;
              }
            }).map(({ trigger: trigger2, ...rule }) => rule);
          };
          const isRequired = vue.computed(() => normalizedRules.value.some((rule) => rule.required));
          const shouldShowError = vue.computed(() => {
            var _a2;
            return validateStateDebounced.value === "error" && props.showMessage && ((_a2 = formContext == null ? void 0 : formContext.showMessage) != null ? _a2 : true);
          });
          const currentLabel = vue.computed(() => `${props.label || ""}${(formContext == null ? void 0 : formContext.labelSuffix) || ""}`);
          const setValidationState = (state) => {
            validateState.value = state;
          };
          const onValidationFailed = (error) => {
            var _a2, _b;
            const { errors, fields } = error;
            if (!errors || !fields) {
              console.error(error);
            }
            setValidationState("error");
            validateMessage.value = errors ? (_b = (_a2 = errors == null ? void 0 : errors[0]) == null ? void 0 : _a2.message) != null ? _b : `${props.prop} is required` : "";
            formContext == null ? void 0 : formContext.emit("validate", props.prop, false, validateMessage.value);
          };
          const onValidationSucceeded = () => {
            setValidationState("success");
            formContext == null ? void 0 : formContext.emit("validate", props.prop, true, "");
          };
          const doValidate = async (rules2) => {
            const modelName = propString.value;
            const validator = new Schema({
              [modelName]: rules2
            });
            return validator.validate({ [modelName]: fieldValue.value }, { firstFields: true }).then(() => {
              onValidationSucceeded();
              return true;
            }).catch((err) => {
              onValidationFailed(err);
              return Promise.reject(err);
            });
          };
          const validate = async (trigger, callback) => {
            if (isResettingField || !props.prop) {
              return false;
            }
            const hasCallback = isFunction$2(callback);
            if (!validateEnabled.value) {
              callback == null ? void 0 : callback(false);
              return false;
            }
            const rules2 = getFilteredRule(trigger);
            if (rules2.length === 0) {
              callback == null ? void 0 : callback(true);
              return true;
            }
            setValidationState("validating");
            return doValidate(rules2).then(() => {
              callback == null ? void 0 : callback(true);
              return true;
            }).catch((err) => {
              const { fields } = err;
              callback == null ? void 0 : callback(false, fields);
              return hasCallback ? false : Promise.reject(fields);
            });
          };
          const clearValidate = () => {
            setValidationState("");
            validateMessage.value = "";
            isResettingField = false;
          };
          const resetField = async () => {
            const model = formContext == null ? void 0 : formContext.model;
            if (!model || !props.prop)
              return;
            const computedValue = getProp(model, props.prop);
            isResettingField = true;
            computedValue.value = clone(initialValue);
            await vue.nextTick();
            clearValidate();
            isResettingField = false;
          };
          const addInputId = (id) => {
            if (!inputIds.value.includes(id)) {
              inputIds.value.push(id);
            }
          };
          const removeInputId = (id) => {
            inputIds.value = inputIds.value.filter((listId) => listId !== id);
          };
          vue.watch(() => props.error, (val) => {
            validateMessage.value = val || "";
            setValidationState(val ? "error" : "");
          }, { immediate: true });
          vue.watch(() => props.validateStatus, (val) => setValidationState(val || ""));
          const context = vue.reactive({
            ...vue.toRefs(props),
            $el: formItemRef,
            size: _size,
            validateState,
            labelId,
            inputIds,
            isGroup,
            hasLabel,
            fieldValue,
            addInputId,
            removeInputId,
            resetField,
            clearValidate,
            validate
          });
          vue.provide(formItemContextKey, context);
          vue.onMounted(() => {
            if (props.prop) {
              formContext == null ? void 0 : formContext.addField(context);
              initialValue = clone(fieldValue.value);
            }
          });
          vue.onBeforeUnmount(() => {
            formContext == null ? void 0 : formContext.removeField(context);
          });
          expose({
            size: _size,
            validateMessage,
            validateState,
            validate,
            clearValidate,
            resetField
          });
          return (_ctx, _cache) => {
            var _a2;
            return vue.openBlock(), vue.createElementBlock("div", {
              ref_key: "formItemRef",
              ref: formItemRef,
              class: vue.normalizeClass(vue.unref(formItemClasses)),
              role: vue.unref(isGroup) ? "group" : void 0,
              "aria-labelledby": vue.unref(isGroup) ? vue.unref(labelId) : void 0
            }, [
              vue.createVNode(vue.unref(FormLabelWrap), {
                "is-auto-width": vue.unref(labelStyle).width === "auto",
                "update-all": ((_a2 = vue.unref(formContext)) == null ? void 0 : _a2.labelWidth) === "auto"
              }, {
                default: vue.withCtx(() => [
                  vue.unref(hasLabel) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(labelFor) ? "label" : "div"), {
                    key: 0,
                    id: vue.unref(labelId),
                    for: vue.unref(labelFor),
                    class: vue.normalizeClass(vue.unref(ns).e("label")),
                    style: vue.normalizeStyle(vue.unref(labelStyle))
                  }, {
                    default: vue.withCtx(() => [
                      vue.renderSlot(_ctx.$slots, "label", { label: vue.unref(currentLabel) }, () => [
                        vue.createTextVNode(vue.toDisplayString(vue.unref(currentLabel)), 1)
                      ])
                    ]),
                    _: 3
                  }, 8, ["id", "for", "class", "style"])) : vue.createCommentVNode("v-if", true)
                ]),
                _: 3
              }, 8, ["is-auto-width", "update-all"]),
              vue.createElementVNode("div", {
                class: vue.normalizeClass(vue.unref(ns).e("content")),
                style: vue.normalizeStyle(vue.unref(contentStyle))
              }, [
                vue.renderSlot(_ctx.$slots, "default"),
                vue.createVNode(vue.TransitionGroup, {
                  name: `${vue.unref(ns).namespace.value}-zoom-in-top`
                }, {
                  default: vue.withCtx(() => [
                    vue.unref(shouldShowError) ? vue.renderSlot(_ctx.$slots, "error", {
                      key: 0,
                      error: validateMessage.value
                    }, () => [
                      vue.createElementVNode("div", {
                        class: vue.normalizeClass(vue.unref(validateClasses))
                      }, vue.toDisplayString(validateMessage.value), 3)
                    ]) : vue.createCommentVNode("v-if", true)
                  ]),
                  _: 3
                }, 8, ["name"])
              ], 6)
            ], 10, _hoisted_1$d);
          };
        }
      });
      var FormItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["__file", "form-item.vue"]]);
      const ElForm = withInstall(Form, {
        FormItem
      });
      const ElFormItem = withNoopInstall(FormItem);
      let hiddenTextarea = void 0;
      const HIDDEN_STYLE = `
  height:0 !important;
  visibility:hidden !important;
  ${isFirefox() ? "" : "overflow:hidden !important;"}
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
`;
      const CONTEXT_STYLE = [
        "letter-spacing",
        "line-height",
        "padding-top",
        "padding-bottom",
        "font-family",
        "font-weight",
        "font-size",
        "text-rendering",
        "text-transform",
        "width",
        "text-indent",
        "padding-left",
        "padding-right",
        "border-width",
        "box-sizing"
      ];
      function calculateNodeStyling(targetElement) {
        const style = window.getComputedStyle(targetElement);
        const boxSizing = style.getPropertyValue("box-sizing");
        const paddingSize = Number.parseFloat(style.getPropertyValue("padding-bottom")) + Number.parseFloat(style.getPropertyValue("padding-top"));
        const borderSize = Number.parseFloat(style.getPropertyValue("border-bottom-width")) + Number.parseFloat(style.getPropertyValue("border-top-width"));
        const contextStyle = CONTEXT_STYLE.map((name) => `${name}:${style.getPropertyValue(name)}`).join(";");
        return { contextStyle, paddingSize, borderSize, boxSizing };
      }
      function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
        var _a2;
        if (!hiddenTextarea) {
          hiddenTextarea = document.createElement("textarea");
          document.body.appendChild(hiddenTextarea);
        }
        const { paddingSize, borderSize, boxSizing, contextStyle } = calculateNodeStyling(targetElement);
        hiddenTextarea.setAttribute("style", `${contextStyle};${HIDDEN_STYLE}`);
        hiddenTextarea.value = targetElement.value || targetElement.placeholder || "";
        let height = hiddenTextarea.scrollHeight;
        const result = {};
        if (boxSizing === "border-box") {
          height = height + borderSize;
        } else if (boxSizing === "content-box") {
          height = height - paddingSize;
        }
        hiddenTextarea.value = "";
        const singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
        if (isNumber$1(minRows)) {
          let minHeight = singleRowHeight * minRows;
          if (boxSizing === "border-box") {
            minHeight = minHeight + paddingSize + borderSize;
          }
          height = Math.max(minHeight, height);
          result.minHeight = `${minHeight}px`;
        }
        if (isNumber$1(maxRows)) {
          let maxHeight = singleRowHeight * maxRows;
          if (boxSizing === "border-box") {
            maxHeight = maxHeight + paddingSize + borderSize;
          }
          height = Math.min(maxHeight, height);
        }
        result.height = `${height}px`;
        (_a2 = hiddenTextarea.parentNode) == null ? void 0 : _a2.removeChild(hiddenTextarea);
        hiddenTextarea = void 0;
        return result;
      }
      const inputProps = buildProps({
        id: {
          type: String,
          default: void 0
        },
        size: useSizeProp,
        disabled: Boolean,
        modelValue: {
          type: definePropType([
            String,
            Number,
            Object
          ]),
          default: ""
        },
        maxlength: {
          type: [String, Number]
        },
        minlength: {
          type: [String, Number]
        },
        type: {
          type: String,
          default: "text"
        },
        resize: {
          type: String,
          values: ["none", "both", "horizontal", "vertical"]
        },
        autosize: {
          type: definePropType([Boolean, Object]),
          default: false
        },
        autocomplete: {
          type: String,
          default: "off"
        },
        formatter: {
          type: Function
        },
        parser: {
          type: Function
        },
        placeholder: {
          type: String
        },
        form: {
          type: String
        },
        readonly: {
          type: Boolean,
          default: false
        },
        clearable: {
          type: Boolean,
          default: false
        },
        showPassword: {
          type: Boolean,
          default: false
        },
        showWordLimit: {
          type: Boolean,
          default: false
        },
        suffixIcon: {
          type: iconPropType
        },
        prefixIcon: {
          type: iconPropType
        },
        containerRole: {
          type: String,
          default: void 0
        },
        label: {
          type: String,
          default: void 0
        },
        tabindex: {
          type: [String, Number],
          default: 0
        },
        validateEvent: {
          type: Boolean,
          default: true
        },
        inputStyle: {
          type: definePropType([Object, Array, String]),
          default: () => mutable({})
        },
        autofocus: {
          type: Boolean,
          default: false
        },
        ...useAriaProps(["ariaLabel"])
      });
      const inputEmits = {
        [UPDATE_MODEL_EVENT]: (value) => isString$1(value),
        input: (value) => isString$1(value),
        change: (value) => isString$1(value),
        focus: (evt) => evt instanceof FocusEvent,
        blur: (evt) => evt instanceof FocusEvent,
        clear: () => true,
        mouseleave: (evt) => evt instanceof MouseEvent,
        mouseenter: (evt) => evt instanceof MouseEvent,
        keydown: (evt) => evt instanceof Event,
        compositionstart: (evt) => evt instanceof CompositionEvent,
        compositionupdate: (evt) => evt instanceof CompositionEvent,
        compositionend: (evt) => evt instanceof CompositionEvent
      };
      const _hoisted_1$c = ["role"];
      const _hoisted_2$9 = ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"];
      const _hoisted_3$5 = ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"];
      const __default__$b = vue.defineComponent({
        name: "ElInput",
        inheritAttrs: false
      });
      const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
        ...__default__$b,
        props: inputProps,
        emits: inputEmits,
        setup(__props, { expose, emit }) {
          const props = __props;
          const rawAttrs = vue.useAttrs();
          const slots = vue.useSlots();
          const containerAttrs = vue.computed(() => {
            const comboBoxAttrs = {};
            if (props.containerRole === "combobox") {
              comboBoxAttrs["aria-haspopup"] = rawAttrs["aria-haspopup"];
              comboBoxAttrs["aria-owns"] = rawAttrs["aria-owns"];
              comboBoxAttrs["aria-expanded"] = rawAttrs["aria-expanded"];
            }
            return comboBoxAttrs;
          });
          const containerKls = vue.computed(() => [
            props.type === "textarea" ? nsTextarea.b() : nsInput.b(),
            nsInput.m(inputSize.value),
            nsInput.is("disabled", inputDisabled.value),
            nsInput.is("exceed", inputExceed.value),
            {
              [nsInput.b("group")]: slots.prepend || slots.append,
              [nsInput.bm("group", "append")]: slots.append,
              [nsInput.bm("group", "prepend")]: slots.prepend,
              [nsInput.m("prefix")]: slots.prefix || props.prefixIcon,
              [nsInput.m("suffix")]: slots.suffix || props.suffixIcon || props.clearable || props.showPassword,
              [nsInput.bm("suffix", "password-clear")]: showClear.value && showPwdVisible.value,
              [nsInput.b("hidden")]: props.type === "hidden"
            },
            rawAttrs.class
          ]);
          const wrapperKls = vue.computed(() => [
            nsInput.e("wrapper"),
            nsInput.is("focus", isFocused.value)
          ]);
          const attrs = useAttrs({
            excludeKeys: vue.computed(() => {
              return Object.keys(containerAttrs.value);
            })
          });
          const { form: elForm, formItem: elFormItem } = useFormItem();
          const { inputId } = useFormItemInputId(props, {
            formItemContext: elFormItem
          });
          const inputSize = useFormSize();
          const inputDisabled = useFormDisabled();
          const nsInput = useNamespace("input");
          const nsTextarea = useNamespace("textarea");
          const input = vue.shallowRef();
          const textarea = vue.shallowRef();
          const hovering = vue.ref(false);
          const isComposing = vue.ref(false);
          const passwordVisible = vue.ref(false);
          const countStyle = vue.ref();
          const textareaCalcStyle = vue.shallowRef(props.inputStyle);
          const _ref = vue.computed(() => input.value || textarea.value);
          const { wrapperRef, isFocused, handleFocus, handleBlur } = useFocusController(_ref, {
            afterBlur() {
              var _a2;
              if (props.validateEvent) {
                (_a2 = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a2.call(elFormItem, "blur").catch((err) => debugWarn());
              }
            }
          });
          const needStatusIcon = vue.computed(() => {
            var _a2;
            return (_a2 = elForm == null ? void 0 : elForm.statusIcon) != null ? _a2 : false;
          });
          const validateState = vue.computed(() => (elFormItem == null ? void 0 : elFormItem.validateState) || "");
          const validateIcon = vue.computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
          const passwordIcon = vue.computed(() => passwordVisible.value ? view_default : hide_default);
          const containerStyle = vue.computed(() => [
            rawAttrs.style
          ]);
          const textareaStyle = vue.computed(() => [
            props.inputStyle,
            textareaCalcStyle.value,
            { resize: props.resize }
          ]);
          const nativeInputValue = vue.computed(() => isNil(props.modelValue) ? "" : String(props.modelValue));
          const showClear = vue.computed(() => props.clearable && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (isFocused.value || hovering.value));
          const showPwdVisible = vue.computed(() => props.showPassword && !inputDisabled.value && !props.readonly && !!nativeInputValue.value && (!!nativeInputValue.value || isFocused.value));
          const isWordLimitVisible = vue.computed(() => props.showWordLimit && !!props.maxlength && (props.type === "text" || props.type === "textarea") && !inputDisabled.value && !props.readonly && !props.showPassword);
          const textLength = vue.computed(() => nativeInputValue.value.length);
          const inputExceed = vue.computed(() => !!isWordLimitVisible.value && textLength.value > Number(props.maxlength));
          const suffixVisible = vue.computed(() => !!slots.suffix || !!props.suffixIcon || showClear.value || props.showPassword || isWordLimitVisible.value || !!validateState.value && needStatusIcon.value);
          const [recordCursor, setCursor] = useCursor(input);
          useResizeObserver(textarea, (entries) => {
            onceInitSizeTextarea();
            if (!isWordLimitVisible.value || props.resize !== "both")
              return;
            const entry = entries[0];
            const { width } = entry.contentRect;
            countStyle.value = {
              right: `calc(100% - ${width + 15 + 6}px)`
            };
          });
          const resizeTextarea = () => {
            const { type, autosize } = props;
            if (!isClient || type !== "textarea" || !textarea.value)
              return;
            if (autosize) {
              const minRows = isObject$2(autosize) ? autosize.minRows : void 0;
              const maxRows = isObject$2(autosize) ? autosize.maxRows : void 0;
              const textareaStyle2 = calcTextareaHeight(textarea.value, minRows, maxRows);
              textareaCalcStyle.value = {
                overflowY: "hidden",
                ...textareaStyle2
              };
              vue.nextTick(() => {
                textarea.value.offsetHeight;
                textareaCalcStyle.value = textareaStyle2;
              });
            } else {
              textareaCalcStyle.value = {
                minHeight: calcTextareaHeight(textarea.value).minHeight
              };
            }
          };
          const createOnceInitResize = (resizeTextarea2) => {
            let isInit = false;
            return () => {
              var _a2;
              if (isInit || !props.autosize)
                return;
              const isElHidden = ((_a2 = textarea.value) == null ? void 0 : _a2.offsetParent) === null;
              if (!isElHidden) {
                resizeTextarea2();
                isInit = true;
              }
            };
          };
          const onceInitSizeTextarea = createOnceInitResize(resizeTextarea);
          const setNativeInputValue = () => {
            const input2 = _ref.value;
            const formatterValue = props.formatter ? props.formatter(nativeInputValue.value) : nativeInputValue.value;
            if (!input2 || input2.value === formatterValue)
              return;
            input2.value = formatterValue;
          };
          const handleInput = async (event) => {
            recordCursor();
            let { value } = event.target;
            if (props.formatter) {
              value = props.parser ? props.parser(value) : value;
            }
            if (isComposing.value)
              return;
            if (value === nativeInputValue.value) {
              setNativeInputValue();
              return;
            }
            emit(UPDATE_MODEL_EVENT, value);
            emit("input", value);
            await vue.nextTick();
            setNativeInputValue();
            setCursor();
          };
          const handleChange = (event) => {
            emit("change", event.target.value);
          };
          const handleCompositionStart = (event) => {
            emit("compositionstart", event);
            isComposing.value = true;
          };
          const handleCompositionUpdate = (event) => {
            var _a2;
            emit("compositionupdate", event);
            const text = (_a2 = event.target) == null ? void 0 : _a2.value;
            const lastCharacter = text[text.length - 1] || "";
            isComposing.value = !isKorean(lastCharacter);
          };
          const handleCompositionEnd = (event) => {
            emit("compositionend", event);
            if (isComposing.value) {
              isComposing.value = false;
              handleInput(event);
            }
          };
          const handlePasswordVisible = () => {
            passwordVisible.value = !passwordVisible.value;
            focus();
          };
          const focus = async () => {
            var _a2;
            await vue.nextTick();
            (_a2 = _ref.value) == null ? void 0 : _a2.focus();
          };
          const blur = () => {
            var _a2;
            return (_a2 = _ref.value) == null ? void 0 : _a2.blur();
          };
          const handleMouseLeave = (evt) => {
            hovering.value = false;
            emit("mouseleave", evt);
          };
          const handleMouseEnter = (evt) => {
            hovering.value = true;
            emit("mouseenter", evt);
          };
          const handleKeydown = (evt) => {
            emit("keydown", evt);
          };
          const select = () => {
            var _a2;
            (_a2 = _ref.value) == null ? void 0 : _a2.select();
          };
          const clear = () => {
            emit(UPDATE_MODEL_EVENT, "");
            emit("change", "");
            emit("clear");
            emit("input", "");
          };
          vue.watch(() => props.modelValue, () => {
            var _a2;
            vue.nextTick(() => resizeTextarea());
            if (props.validateEvent) {
              (_a2 = elFormItem == null ? void 0 : elFormItem.validate) == null ? void 0 : _a2.call(elFormItem, "change").catch((err) => debugWarn());
            }
          });
          vue.watch(nativeInputValue, () => setNativeInputValue());
          vue.watch(() => props.type, async () => {
            await vue.nextTick();
            setNativeInputValue();
            resizeTextarea();
          });
          vue.onMounted(() => {
            if (!props.formatter && props.parser)
              ;
            setNativeInputValue();
            vue.nextTick(resizeTextarea);
          });
          useDeprecated({
            from: "label",
            replacement: "aria-label",
            version: "2.8.0",
            scope: "el-input",
            ref: "https://element-plus.org/en-US/component/input.html"
          }, vue.computed(() => !!props.label));
          expose({
            input,
            textarea,
            ref: _ref,
            textareaStyle,
            autosize: vue.toRef(props, "autosize"),
            focus,
            blur,
            select,
            clear,
            resizeTextarea
          });
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps(vue.unref(containerAttrs), {
              class: vue.unref(containerKls),
              style: vue.unref(containerStyle),
              role: _ctx.containerRole,
              onMouseenter: handleMouseEnter,
              onMouseleave: handleMouseLeave
            }), [
              vue.createCommentVNode(" input "),
              _ctx.type !== "textarea" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
                vue.createCommentVNode(" prepend slot "),
                _ctx.$slots.prepend ? (vue.openBlock(), vue.createElementBlock("div", {
                  key: 0,
                  class: vue.normalizeClass(vue.unref(nsInput).be("group", "prepend"))
                }, [
                  vue.renderSlot(_ctx.$slots, "prepend")
                ], 2)) : vue.createCommentVNode("v-if", true),
                vue.createElementVNode("div", {
                  ref_key: "wrapperRef",
                  ref: wrapperRef,
                  class: vue.normalizeClass(vue.unref(wrapperKls))
                }, [
                  vue.createCommentVNode(" prefix slot "),
                  _ctx.$slots.prefix || _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("span", {
                    key: 0,
                    class: vue.normalizeClass(vue.unref(nsInput).e("prefix"))
                  }, [
                    vue.createElementVNode("span", {
                      class: vue.normalizeClass(vue.unref(nsInput).e("prefix-inner"))
                    }, [
                      vue.renderSlot(_ctx.$slots, "prefix"),
                      _ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
                        key: 0,
                        class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
                      }, {
                        default: vue.withCtx(() => [
                          (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.prefixIcon)))
                        ]),
                        _: 1
                      }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
                    ], 2)
                  ], 2)) : vue.createCommentVNode("v-if", true),
                  vue.createElementVNode("input", vue.mergeProps({
                    id: vue.unref(inputId),
                    ref_key: "input",
                    ref: input,
                    class: vue.unref(nsInput).e("inner")
                  }, vue.unref(attrs), {
                    minlength: _ctx.minlength,
                    maxlength: _ctx.maxlength,
                    type: _ctx.showPassword ? passwordVisible.value ? "text" : "password" : _ctx.type,
                    disabled: vue.unref(inputDisabled),
                    readonly: _ctx.readonly,
                    autocomplete: _ctx.autocomplete,
                    tabindex: _ctx.tabindex,
                    "aria-label": _ctx.label || _ctx.ariaLabel,
                    placeholder: _ctx.placeholder,
                    style: _ctx.inputStyle,
                    form: _ctx.form,
                    autofocus: _ctx.autofocus,
                    onCompositionstart: handleCompositionStart,
                    onCompositionupdate: handleCompositionUpdate,
                    onCompositionend: handleCompositionEnd,
                    onInput: handleInput,
                    onFocus: _cache[0] || (_cache[0] = (...args) => vue.unref(handleFocus) && vue.unref(handleFocus)(...args)),
                    onBlur: _cache[1] || (_cache[1] = (...args) => vue.unref(handleBlur) && vue.unref(handleBlur)(...args)),
                    onChange: handleChange,
                    onKeydown: handleKeydown
                  }), null, 16, _hoisted_2$9),
                  vue.createCommentVNode(" suffix slot "),
                  vue.unref(suffixVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
                    key: 1,
                    class: vue.normalizeClass(vue.unref(nsInput).e("suffix"))
                  }, [
                    vue.createElementVNode("span", {
                      class: vue.normalizeClass(vue.unref(nsInput).e("suffix-inner"))
                    }, [
                      !vue.unref(showClear) || !vue.unref(showPwdVisible) || !vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
                        vue.renderSlot(_ctx.$slots, "suffix"),
                        _ctx.suffixIcon ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
                          key: 0,
                          class: vue.normalizeClass(vue.unref(nsInput).e("icon"))
                        }, {
                          default: vue.withCtx(() => [
                            (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.suffixIcon)))
                          ]),
                          _: 1
                        }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
                      ], 64)) : vue.createCommentVNode("v-if", true),
                      vue.unref(showClear) ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
                        key: 1,
                        class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("clear")]),
                        onMousedown: vue.withModifiers(vue.unref(NOOP), ["prevent"]),
                        onClick: clear
                      }, {
                        default: vue.withCtx(() => [
                          vue.createVNode(vue.unref(circle_close_default))
                        ]),
                        _: 1
                      }, 8, ["class", "onMousedown"])) : vue.createCommentVNode("v-if", true),
                      vue.unref(showPwdVisible) ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
                        key: 2,
                        class: vue.normalizeClass([vue.unref(nsInput).e("icon"), vue.unref(nsInput).e("password")]),
                        onClick: handlePasswordVisible
                      }, {
                        default: vue.withCtx(() => [
                          (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(passwordIcon))))
                        ]),
                        _: 1
                      }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
                      vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
                        key: 3,
                        class: vue.normalizeClass(vue.unref(nsInput).e("count"))
                      }, [
                        vue.createElementVNode("span", {
                          class: vue.normalizeClass(vue.unref(nsInput).e("count-inner"))
                        }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(_ctx.maxlength), 3)
                      ], 2)) : vue.createCommentVNode("v-if", true),
                      vue.unref(validateState) && vue.unref(validateIcon) && vue.unref(needStatusIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
                        key: 4,
                        class: vue.normalizeClass([
                          vue.unref(nsInput).e("icon"),
                          vue.unref(nsInput).e("validateIcon"),
                          vue.unref(nsInput).is("loading", vue.unref(validateState) === "validating")
                        ])
                      }, {
                        default: vue.withCtx(() => [
                          (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(validateIcon))))
                        ]),
                        _: 1
                      }, 8, ["class"])) : vue.createCommentVNode("v-if", true)
                    ], 2)
                  ], 2)) : vue.createCommentVNode("v-if", true)
                ], 2),
                vue.createCommentVNode(" append slot "),
                _ctx.$slots.append ? (vue.openBlock(), vue.createElementBlock("div", {
                  key: 1,
                  class: vue.normalizeClass(vue.unref(nsInput).be("group", "append"))
                }, [
                  vue.renderSlot(_ctx.$slots, "append")
                ], 2)) : vue.createCommentVNode("v-if", true)
              ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
                vue.createCommentVNode(" textarea "),
                vue.createElementVNode("textarea", vue.mergeProps({
                  id: vue.unref(inputId),
                  ref_key: "textarea",
                  ref: textarea,
                  class: vue.unref(nsTextarea).e("inner")
                }, vue.unref(attrs), {
                  minlength: _ctx.minlength,
                  maxlength: _ctx.maxlength,
                  tabindex: _ctx.tabindex,
                  disabled: vue.unref(inputDisabled),
                  readonly: _ctx.readonly,
                  autocomplete: _ctx.autocomplete,
                  style: vue.unref(textareaStyle),
                  "aria-label": _ctx.label || _ctx.ariaLabel,
                  placeholder: _ctx.placeholder,
                  form: _ctx.form,
                  autofocus: _ctx.autofocus,
                  onCompositionstart: handleCompositionStart,
                  onCompositionupdate: handleCompositionUpdate,
                  onCompositionend: handleCompositionEnd,
                  onInput: handleInput,
                  onFocus: _cache[2] || (_cache[2] = (...args) => vue.unref(handleFocus) && vue.unref(handleFocus)(...args)),
                  onBlur: _cache[3] || (_cache[3] = (...args) => vue.unref(handleBlur) && vue.unref(handleBlur)(...args)),
                  onChange: handleChange,
                  onKeydown: handleKeydown
                }), null, 16, _hoisted_3$5),
                vue.unref(isWordLimitVisible) ? (vue.openBlock(), vue.createElementBlock("span", {
                  key: 0,
                  style: vue.normalizeStyle(countStyle.value),
                  class: vue.normalizeClass(vue.unref(nsInput).e("count"))
                }, vue.toDisplayString(vue.unref(textLength)) + " / " + vue.toDisplayString(_ctx.maxlength), 7)) : vue.createCommentVNode("v-if", true)
              ], 64))
            ], 16, _hoisted_1$c);
          };
        }
      });
      var Input = /* @__PURE__ */ _export_sfc$1(_sfc_main$f, [["__file", "input.vue"]]);
      const ElInput = withInstall(Input);
      const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
      const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
      const FOCUSOUT_PREVENTED = "focus-trap.focusout-prevented";
      const FOCUS_AFTER_TRAPPED_OPTS = {
        cancelable: true,
        bubbles: false
      };
      const FOCUSOUT_PREVENTED_OPTS = {
        cancelable: true,
        bubbles: false
      };
      const ON_TRAP_FOCUS_EVT = "focusAfterTrapped";
      const ON_RELEASE_FOCUS_EVT = "focusAfterReleased";
      const FOCUS_TRAP_INJECTION_KEY = Symbol("elFocusTrap");
      const focusReason = vue.ref();
      const lastUserFocusTimestamp = vue.ref(0);
      const lastAutomatedFocusTimestamp = vue.ref(0);
      let focusReasonUserCount = 0;
      const obtainAllFocusableElements = (element) => {
        const nodes = [];
        const walker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, {
          acceptNode: (node) => {
            const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
            if (node.disabled || node.hidden || isHiddenInput)
              return NodeFilter.FILTER_SKIP;
            return node.tabIndex >= 0 || node === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
          }
        });
        while (walker.nextNode())
          nodes.push(walker.currentNode);
        return nodes;
      };
      const getVisibleElement = (elements, container) => {
        for (const element of elements) {
          if (!isHidden(element, container))
            return element;
        }
      };
      const isHidden = (element, container) => {
        if (getComputedStyle(element).visibility === "hidden")
          return true;
        while (element) {
          if (container && element === container)
            return false;
          if (getComputedStyle(element).display === "none")
            return true;
          element = element.parentElement;
        }
        return false;
      };
      const getEdges = (container) => {
        const focusable = obtainAllFocusableElements(container);
        const first = getVisibleElement(focusable, container);
        const last = getVisibleElement(focusable.reverse(), container);
        return [first, last];
      };
      const isSelectable = (element) => {
        return element instanceof HTMLInputElement && "select" in element;
      };
      const tryFocus = (element, shouldSelect) => {
        if (element && element.focus) {
          const prevFocusedElement = document.activeElement;
          element.focus({ preventScroll: true });
          lastAutomatedFocusTimestamp.value = window.performance.now();
          if (element !== prevFocusedElement && isSelectable(element) && shouldSelect) {
            element.select();
          }
        }
      };
      function removeFromStack(list, item) {
        const copy = [...list];
        const idx = list.indexOf(item);
        if (idx !== -1) {
          copy.splice(idx, 1);
        }
        return copy;
      }
      const createFocusableStack = () => {
        let stack = [];
        const push = (layer) => {
          const currentLayer = stack[0];
          if (currentLayer && layer !== currentLayer) {
            currentLayer.pause();
          }
          stack = removeFromStack(stack, layer);
          stack.unshift(layer);
        };
        const remove = (layer) => {
          var _a2, _b;
          stack = removeFromStack(stack, layer);
          (_b = (_a2 = stack[0]) == null ? void 0 : _a2.resume) == null ? void 0 : _b.call(_a2);
        };
        return {
          push,
          remove
        };
      };
      const focusFirstDescendant = (elements, shouldSelect = false) => {
        const prevFocusedElement = document.activeElement;
        for (const element of elements) {
          tryFocus(element, shouldSelect);
          if (document.activeElement !== prevFocusedElement)
            return;
        }
      };
      const focusableStack = createFocusableStack();
      const isFocusCausedByUserEvent = () => {
        return lastUserFocusTimestamp.value > lastAutomatedFocusTimestamp.value;
      };
      const notifyFocusReasonPointer = () => {
        focusReason.value = "pointer";
        lastUserFocusTimestamp.value = window.performance.now();
      };
      const notifyFocusReasonKeydown = () => {
        focusReason.value = "keyboard";
        lastUserFocusTimestamp.value = window.performance.now();
      };
      const useFocusReason = () => {
        vue.onMounted(() => {
          if (focusReasonUserCount === 0) {
            document.addEventListener("mousedown", notifyFocusReasonPointer);
            document.addEventListener("touchstart", notifyFocusReasonPointer);
            document.addEventListener("keydown", notifyFocusReasonKeydown);
          }
          focusReasonUserCount++;
        });
        vue.onBeforeUnmount(() => {
          focusReasonUserCount--;
          if (focusReasonUserCount <= 0) {
            document.removeEventListener("mousedown", notifyFocusReasonPointer);
            document.removeEventListener("touchstart", notifyFocusReasonPointer);
            document.removeEventListener("keydown", notifyFocusReasonKeydown);
          }
        });
        return {
          focusReason,
          lastUserFocusTimestamp,
          lastAutomatedFocusTimestamp
        };
      };
      const createFocusOutPreventedEvent = (detail) => {
        return new CustomEvent(FOCUSOUT_PREVENTED, {
          ...FOCUSOUT_PREVENTED_OPTS,
          detail
        });
      };
      const _sfc_main$e = vue.defineComponent({
        name: "ElFocusTrap",
        inheritAttrs: false,
        props: {
          loop: Boolean,
          trapped: Boolean,
          focusTrapEl: Object,
          focusStartEl: {
            type: [Object, String],
            default: "first"
          }
        },
        emits: [
          ON_TRAP_FOCUS_EVT,
          ON_RELEASE_FOCUS_EVT,
          "focusin",
          "focusout",
          "focusout-prevented",
          "release-requested"
        ],
        setup(props, { emit }) {
          const forwardRef = vue.ref();
          let lastFocusBeforeTrapped;
          let lastFocusAfterTrapped;
          const { focusReason: focusReason2 } = useFocusReason();
          useEscapeKeydown((event) => {
            if (props.trapped && !focusLayer.paused) {
              emit("release-requested", event);
            }
          });
          const focusLayer = {
            paused: false,
            pause() {
              this.paused = true;
            },
            resume() {
              this.paused = false;
            }
          };
          const onKeydown = (e) => {
            if (!props.loop && !props.trapped)
              return;
            if (focusLayer.paused)
              return;
            const { key, altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e;
            const { loop } = props;
            const isTabbing = key === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey;
            const currentFocusingEl = document.activeElement;
            if (isTabbing && currentFocusingEl) {
              const container = currentTarget;
              const [first, last] = getEdges(container);
              const isTabbable = first && last;
              if (!isTabbable) {
                if (currentFocusingEl === container) {
                  const focusoutPreventedEvent = createFocusOutPreventedEvent({
                    focusReason: focusReason2.value
                  });
                  emit("focusout-prevented", focusoutPreventedEvent);
                  if (!focusoutPreventedEvent.defaultPrevented) {
                    e.preventDefault();
                  }
                }
              } else {
                if (!shiftKey && currentFocusingEl === last) {
                  const focusoutPreventedEvent = createFocusOutPreventedEvent({
                    focusReason: focusReason2.value
                  });
                  emit("focusout-prevented", focusoutPreventedEvent);
                  if (!focusoutPreventedEvent.defaultPrevented) {
                    e.preventDefault();
                    if (loop)
                      tryFocus(first, true);
                  }
                } else if (shiftKey && [first, container].includes(currentFocusingEl)) {
                  const focusoutPreventedEvent = createFocusOutPreventedEvent({
                    focusReason: focusReason2.value
                  });
                  emit("focusout-prevented", focusoutPreventedEvent);
                  if (!focusoutPreventedEvent.defaultPrevented) {
                    e.preventDefault();
                    if (loop)
                      tryFocus(last, true);
                  }
                }
              }
            }
          };
          vue.provide(FOCUS_TRAP_INJECTION_KEY, {
            focusTrapRef: forwardRef,
            onKeydown
          });
          vue.watch(() => props.focusTrapEl, (focusTrapEl) => {
            if (focusTrapEl) {
              forwardRef.value = focusTrapEl;
            }
          }, { immediate: true });
          vue.watch([forwardRef], ([forwardRef2], [oldForwardRef]) => {
            if (forwardRef2) {
              forwardRef2.addEventListener("keydown", onKeydown);
              forwardRef2.addEventListener("focusin", onFocusIn);
              forwardRef2.addEventListener("focusout", onFocusOut);
            }
            if (oldForwardRef) {
              oldForwardRef.removeEventListener("keydown", onKeydown);
              oldForwardRef.removeEventListener("focusin", onFocusIn);
              oldForwardRef.removeEventListener("focusout", onFocusOut);
            }
          });
          const trapOnFocus = (e) => {
            emit(ON_TRAP_FOCUS_EVT, e);
          };
          const releaseOnFocus = (e) => emit(ON_RELEASE_FOCUS_EVT, e);
          const onFocusIn = (e) => {
            const trapContainer = vue.unref(forwardRef);
            if (!trapContainer)
              return;
            const target = e.target;
            const relatedTarget = e.relatedTarget;
            const isFocusedInTrap = target && trapContainer.contains(target);
            if (!props.trapped) {
              const isPrevFocusedInTrap = relatedTarget && trapContainer.contains(relatedTarget);
              if (!isPrevFocusedInTrap) {
                lastFocusBeforeTrapped = relatedTarget;
              }
            }
            if (isFocusedInTrap)
              emit("focusin", e);
            if (focusLayer.paused)
              return;
            if (props.trapped) {
              if (isFocusedInTrap) {
                lastFocusAfterTrapped = target;
              } else {
                tryFocus(lastFocusAfterTrapped, true);
              }
            }
          };
          const onFocusOut = (e) => {
            const trapContainer = vue.unref(forwardRef);
            if (focusLayer.paused || !trapContainer)
              return;
            if (props.trapped) {
              const relatedTarget = e.relatedTarget;
              if (!isNil(relatedTarget) && !trapContainer.contains(relatedTarget)) {
                setTimeout(() => {
                  if (!focusLayer.paused && props.trapped) {
                    const focusoutPreventedEvent = createFocusOutPreventedEvent({
                      focusReason: focusReason2.value
                    });
                    emit("focusout-prevented", focusoutPreventedEvent);
                    if (!focusoutPreventedEvent.defaultPrevented) {
                      tryFocus(lastFocusAfterTrapped, true);
                    }
                  }
                }, 0);
              }
            } else {
              const target = e.target;
              const isFocusedInTrap = target && trapContainer.contains(target);
              if (!isFocusedInTrap)
                emit("focusout", e);
            }
          };
          async function startTrap() {
            await vue.nextTick();
            const trapContainer = vue.unref(forwardRef);
            if (trapContainer) {
              focusableStack.push(focusLayer);
              const prevFocusedElement = trapContainer.contains(document.activeElement) ? lastFocusBeforeTrapped : document.activeElement;
              lastFocusBeforeTrapped = prevFocusedElement;
              const isPrevFocusContained = trapContainer.contains(prevFocusedElement);
              if (!isPrevFocusContained) {
                const focusEvent = new Event(FOCUS_AFTER_TRAPPED, FOCUS_AFTER_TRAPPED_OPTS);
                trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
                trapContainer.dispatchEvent(focusEvent);
                if (!focusEvent.defaultPrevented) {
                  vue.nextTick(() => {
                    let focusStartEl = props.focusStartEl;
                    if (!isString$1(focusStartEl)) {
                      tryFocus(focusStartEl);
                      if (document.activeElement !== focusStartEl) {
                        focusStartEl = "first";
                      }
                    }
                    if (focusStartEl === "first") {
                      focusFirstDescendant(obtainAllFocusableElements(trapContainer), true);
                    }
                    if (document.activeElement === prevFocusedElement || focusStartEl === "container") {
                      tryFocus(trapContainer);
                    }
                  });
                }
              }
            }
          }
          function stopTrap() {
            const trapContainer = vue.unref(forwardRef);
            if (trapContainer) {
              trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus);
              const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, {
                ...FOCUS_AFTER_TRAPPED_OPTS,
                detail: {
                  focusReason: focusReason2.value
                }
              });
              trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
              trapContainer.dispatchEvent(releasedEvent);
              if (!releasedEvent.defaultPrevented && (focusReason2.value == "keyboard" || !isFocusCausedByUserEvent() || trapContainer.contains(document.activeElement))) {
                tryFocus(lastFocusBeforeTrapped != null ? lastFocusBeforeTrapped : document.body);
              }
              trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus);
              focusableStack.remove(focusLayer);
            }
          }
          vue.onMounted(() => {
            if (props.trapped) {
              startTrap();
            }
            vue.watch(() => props.trapped, (trapped) => {
              if (trapped) {
                startTrap();
              } else {
                stopTrap();
              }
            });
          });
          vue.onBeforeUnmount(() => {
            if (props.trapped) {
              stopTrap();
            }
          });
          return {
            onKeydown
          };
        }
      });
      function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
        return vue.renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
      }
      var ElFocusTrap = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["render", _sfc_render], ["__file", "focus-trap.vue"]]);
      const buttonGroupContextKey = Symbol("buttonGroupContextKey");
      const useButton = (props, emit) => {
        useDeprecated({
          from: "type.text",
          replacement: "link",
          version: "3.0.0",
          scope: "props",
          ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
        }, vue.computed(() => props.type === "text"));
        const buttonGroupContext = vue.inject(buttonGroupContextKey, void 0);
        const globalConfig2 = useGlobalConfig("button");
        const { form } = useFormItem();
        const _size = useFormSize(vue.computed(() => buttonGroupContext == null ? void 0 : buttonGroupContext.size));
        const _disabled = useFormDisabled();
        const _ref = vue.ref();
        const slots = vue.useSlots();
        const _type = vue.computed(() => props.type || (buttonGroupContext == null ? void 0 : buttonGroupContext.type) || "");
        const autoInsertSpace = vue.computed(() => {
          var _a2, _b, _c;
          return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.autoInsertSpace) != null ? _c : false;
        });
        const _props = vue.computed(() => {
          if (props.tag === "button") {
            return {
              ariaDisabled: _disabled.value || props.loading,
              disabled: _disabled.value || props.loading,
              autofocus: props.autofocus,
              type: props.nativeType
            };
          }
          return {};
        });
        const shouldAddSpace = vue.computed(() => {
          var _a2;
          const defaultSlot = (_a2 = slots.default) == null ? void 0 : _a2.call(slots);
          if (autoInsertSpace.value && (defaultSlot == null ? void 0 : defaultSlot.length) === 1) {
            const slot = defaultSlot[0];
            if ((slot == null ? void 0 : slot.type) === vue.Text) {
              const text = slot.children;
              return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(text.trim());
            }
          }
          return false;
        });
        const handleClick = (evt) => {
          if (props.nativeType === "reset") {
            form == null ? void 0 : form.resetFields();
          }
          emit("click", evt);
        };
        return {
          _disabled,
          _size,
          _type,
          _ref,
          _props,
          shouldAddSpace,
          handleClick
        };
      };
      const buttonTypes = [
        "default",
        "primary",
        "success",
        "warning",
        "info",
        "danger",
        "text",
        ""
      ];
      const buttonNativeTypes = ["button", "submit", "reset"];
      const buttonProps = buildProps({
        size: useSizeProp,
        disabled: Boolean,
        type: {
          type: String,
          values: buttonTypes,
          default: ""
        },
        icon: {
          type: iconPropType
        },
        nativeType: {
          type: String,
          values: buttonNativeTypes,
          default: "button"
        },
        loading: Boolean,
        loadingIcon: {
          type: iconPropType,
          default: () => loading_default
        },
        plain: Boolean,
        text: Boolean,
        link: Boolean,
        bg: Boolean,
        autofocus: Boolean,
        round: Boolean,
        circle: Boolean,
        color: String,
        dark: Boolean,
        autoInsertSpace: {
          type: Boolean,
          default: void 0
        },
        tag: {
          type: definePropType([String, Object]),
          default: "button"
        }
      });
      const buttonEmits = {
        click: (evt) => evt instanceof MouseEvent
      };
      function bound01(n, max) {
        if (isOnePointZero(n)) {
          n = "100%";
        }
        var isPercent = isPercentage(n);
        n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
        if (isPercent) {
          n = parseInt(String(n * max), 10) / 100;
        }
        if (Math.abs(n - max) < 1e-6) {
          return 1;
        }
        if (max === 360) {
          n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
        } else {
          n = n % max / parseFloat(String(max));
        }
        return n;
      }
      function clamp01(val) {
        return Math.min(1, Math.max(0, val));
      }
      function isOnePointZero(n) {
        return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
      }
      function isPercentage(n) {
        return typeof n === "string" && n.indexOf("%") !== -1;
      }
      function boundAlpha(a) {
        a = parseFloat(a);
        if (isNaN(a) || a < 0 || a > 1) {
          a = 1;
        }
        return a;
      }
      function convertToPercentage(n) {
        if (n <= 1) {
          return "".concat(Number(n) * 100, "%");
        }
        return n;
      }
      function pad2(c) {
        return c.length === 1 ? "0" + c : String(c);
      }
      function rgbToRgb(r, g, b2) {
        return {
          r: bound01(r, 255) * 255,
          g: bound01(g, 255) * 255,
          b: bound01(b2, 255) * 255
        };
      }
      function rgbToHsl(r, g, b2) {
        r = bound01(r, 255);
        g = bound01(g, 255);
        b2 = bound01(b2, 255);
        var max = Math.max(r, g, b2);
        var min = Math.min(r, g, b2);
        var h2 = 0;
        var s = 0;
        var l = (max + min) / 2;
        if (max === min) {
          s = 0;
          h2 = 0;
        } else {
          var d = max - min;
          s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
          switch (max) {
            case r:
              h2 = (g - b2) / d + (g < b2 ? 6 : 0);
              break;
            case g:
              h2 = (b2 - r) / d + 2;
              break;
            case b2:
              h2 = (r - g) / d + 4;
              break;
          }
          h2 /= 6;
        }
        return { h: h2, s, l };
      }
      function hue2rgb(p, q, t) {
        if (t < 0) {
          t += 1;
        }
        if (t > 1) {
          t -= 1;
        }
        if (t < 1 / 6) {
          return p + (q - p) * (6 * t);
        }
        if (t < 1 / 2) {
          return q;
        }
        if (t < 2 / 3) {
          return p + (q - p) * (2 / 3 - t) * 6;
        }
        return p;
      }
      function hslToRgb(h2, s, l) {
        var r;
        var g;
        var b2;
        h2 = bound01(h2, 360);
        s = bound01(s, 100);
        l = bound01(l, 100);
        if (s === 0) {
          g = l;
          b2 = l;
          r = l;
        } else {
          var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
          var p = 2 * l - q;
          r = hue2rgb(p, q, h2 + 1 / 3);
          g = hue2rgb(p, q, h2);
          b2 = hue2rgb(p, q, h2 - 1 / 3);
        }
        return { r: r * 255, g: g * 255, b: b2 * 255 };
      }
      function rgbToHsv(r, g, b2) {
        r = bound01(r, 255);
        g = bound01(g, 255);
        b2 = bound01(b2, 255);
        var max = Math.max(r, g, b2);
        var min = Math.min(r, g, b2);
        var h2 = 0;
        var v = max;
        var d = max - min;
        var s = max === 0 ? 0 : d / max;
        if (max === min) {
          h2 = 0;
        } else {
          switch (max) {
            case r:
              h2 = (g - b2) / d + (g < b2 ? 6 : 0);
              break;
            case g:
              h2 = (b2 - r) / d + 2;
              break;
            case b2:
              h2 = (r - g) / d + 4;
              break;
          }
          h2 /= 6;
        }
        return { h: h2, s, v };
      }
      function hsvToRgb(h2, s, v) {
        h2 = bound01(h2, 360) * 6;
        s = bound01(s, 100);
        v = bound01(v, 100);
        var i = Math.floor(h2);
        var f2 = h2 - i;
        var p = v * (1 - s);
        var q = v * (1 - f2 * s);
        var t = v * (1 - (1 - f2) * s);
        var mod = i % 6;
        var r = [v, q, p, p, t, v][mod];
        var g = [t, v, v, q, p, p][mod];
        var b2 = [p, p, t, v, v, q][mod];
        return { r: r * 255, g: g * 255, b: b2 * 255 };
      }
      function rgbToHex(r, g, b2, allow3Char) {
        var hex2 = [
          pad2(Math.round(r).toString(16)),
          pad2(Math.round(g).toString(16)),
          pad2(Math.round(b2).toString(16))
        ];
        if (allow3Char && hex2[0].startsWith(hex2[0].charAt(1)) && hex2[1].startsWith(hex2[1].charAt(1)) && hex2[2].startsWith(hex2[2].charAt(1))) {
          return hex2[0].charAt(0) + hex2[1].charAt(0) + hex2[2].charAt(0);
        }
        return hex2.join("");
      }
      function rgbaToHex(r, g, b2, a, allow4Char) {
        var hex2 = [
          pad2(Math.round(r).toString(16)),
          pad2(Math.round(g).toString(16)),
          pad2(Math.round(b2).toString(16)),
          pad2(convertDecimalToHex(a))
        ];
        if (allow4Char && hex2[0].startsWith(hex2[0].charAt(1)) && hex2[1].startsWith(hex2[1].charAt(1)) && hex2[2].startsWith(hex2[2].charAt(1)) && hex2[3].startsWith(hex2[3].charAt(1))) {
          return hex2[0].charAt(0) + hex2[1].charAt(0) + hex2[2].charAt(0) + hex2[3].charAt(0);
        }
        return hex2.join("");
      }
      function convertDecimalToHex(d) {
        return Math.round(parseFloat(d) * 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 a = 1;
        var s = null;
        var v = null;
        var l = 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)) {
            s = convertToPercentage(color.s);
            v = convertToPercentage(color.v);
            rgb = hsvToRgb(color.h, s, v);
            ok = true;
            format2 = "hsv";
          } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
            s = convertToPercentage(color.s);
            l = convertToPercentage(color.l);
            rgb = hslToRgb(color.h, s, l);
            ok = true;
            format2 = "hsl";
          }
          if (Object.prototype.hasOwnProperty.call(color, "a")) {
            a = color.a;
          }
        }
        a = boundAlpha(a);
        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
        };
      }
      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 match = matchers.rgb.exec(color);
        if (match) {
          return { r: match[1], g: match[2], b: match[3] };
        }
        match = matchers.rgba.exec(color);
        if (match) {
          return { r: match[1], g: match[2], b: match[3], a: match[4] };
        }
        match = matchers.hsl.exec(color);
        if (match) {
          return { h: match[1], s: match[2], l: match[3] };
        }
        match = matchers.hsla.exec(color);
        if (match) {
          return { h: match[1], s: match[2], l: match[3], a: match[4] };
        }
        match = matchers.hsv.exec(color);
        if (match) {
          return { h: match[1], s: match[2], v: match[3] };
        }
        match = matchers.hsva.exec(color);
        if (match) {
          return { h: match[1], s: match[2], v: match[3], a: match[4] };
        }
        match = matchers.hex8.exec(color);
        if (match) {
          return {
            r: parseIntFromHex(match[1]),
            g: parseIntFromHex(match[2]),
            b: parseIntFromHex(match[3]),
            a: convertHexToDecimal(match[4]),
            format: named ? "name" : "hex8"
          };
        }
        match = matchers.hex6.exec(color);
        if (match) {
          return {
            r: parseIntFromHex(match[1]),
            g: parseIntFromHex(match[2]),
            b: parseIntFromHex(match[3]),
            format: named ? "name" : "hex"
          };
        }
        match = matchers.hex4.exec(color);
        if (match) {
          return {
            r: parseIntFromHex(match[1] + match[1]),
            g: parseIntFromHex(match[2] + match[2]),
            b: parseIntFromHex(match[3] + match[3]),
            a: convertHexToDecimal(match[4] + match[4]),
            format: named ? "name" : "hex8"
          };
        }
        match = matchers.hex3.exec(color);
        if (match) {
          return {
            r: parseIntFromHex(match[1] + match[1]),
            g: parseIntFromHex(match[2] + match[2]),
            b: parseIntFromHex(match[3] + match[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 _a2;
            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 = (_a2 = opts.format) !== null && _a2 !== void 0 ? _a2 : 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 R;
            var G;
            var B;
            var RsRGB = rgb.r / 255;
            var GsRGB = rgb.g / 255;
            var BsRGB = rgb.b / 255;
            if (RsRGB <= 0.03928) {
              R = RsRGB / 12.92;
            } else {
              R = 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) {
              B = BsRGB / 12.92;
            } else {
              B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
            }
            return 0.2126 * R + 0.7152 * G + 0.0722 * B;
          };
          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 s = this.toHsl().s;
            return s === 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 s = Math.round(hsv.s * 100);
            var v = Math.round(hsv.v * 100);
            return this.a === 1 ? "hsv(".concat(h2, ", ").concat(s, "%, ").concat(v, "%)") : "hsva(".concat(h2, ", ").concat(s, "%, ").concat(v, "%, ").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 s = Math.round(hsl.s * 100);
            var l = Math.round(hsl.l * 100);
            return this.a === 1 ? "hsl(".concat(h2, ", ").concat(s, "%, ").concat(l, "%)") : "hsla(".concat(h2, ", ").concat(s, "%, ").concat(l, "%, ").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 r = Math.round(this.r);
            var g = Math.round(this.g);
            var b2 = Math.round(this.b);
            return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b2, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b2, ", ").concat(this.roundA, ")");
          };
          TinyColor2.prototype.toPercentageRgb = function() {
            var fmt = function(x) {
              return "".concat(Math.round(bound01(x, 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(x) {
              return Math.round(bound01(x, 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 hex2 = "#" + rgbToHex(this.r, this.g, this.b, false);
            for (var _i = 0, _a2 = Object.entries(names); _i < _a2.length; _i++) {
              var _b = _a2[_i], key = _b[0], value = _b[1];
              if (hex2 === value) {
                return key;
              }
            }
            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 p = amount / 100;
            var rgba = {
              r: (rgb2.r - rgb1.r) * p + rgb1.r,
              g: (rgb2.g - rgb1.g) * p + rgb1.g,
              b: (rgb2.b - rgb1.b) * p + rgb1.b,
              a: (rgb2.a - rgb1.a) * p + 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 s = hsv.s;
            var v = hsv.v;
            var res = [];
            var modification = 1 / results;
            while (results--) {
              res.push(new TinyColor2({ h: h2, s, v }));
              v = (v + 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(n) {
            var hsl = this.toHsl();
            var h2 = hsl.h;
            var result = [this];
            var increment = 360 / n;
            for (var i = 1; i < n; i++) {
              result.push(new TinyColor2({ h: (h2 + i * increment) % 360, s: hsl.s, l: hsl.l }));
            }
            return result;
          };
          TinyColor2.prototype.equals = function(color) {
            return this.toRgbString() === new TinyColor2(color).toRgbString();
          };
          return TinyColor2;
        }()
      );
      function darken(color, amount = 20) {
        return color.mix("#141414", amount).toString();
      }
      function useButtonCustomStyle(props) {
        const _disabled = useFormDisabled();
        const ns = useNamespace("button");
        return vue.computed(() => {
          let styles = {};
          const buttonColor = props.color;
          if (buttonColor) {
            const color = new TinyColor(buttonColor);
            const activeBgColor = props.dark ? color.tint(20).toString() : darken(color, 20);
            if (props.plain) {
              styles = ns.cssVarBlock({
                "bg-color": props.dark ? darken(color, 90) : color.tint(90).toString(),
                "text-color": buttonColor,
                "border-color": props.dark ? darken(color, 50) : color.tint(50).toString(),
                "hover-text-color": `var(${ns.cssVarName("color-white")})`,
                "hover-bg-color": buttonColor,
                "hover-border-color": buttonColor,
                "active-bg-color": activeBgColor,
                "active-text-color": `var(${ns.cssVarName("color-white")})`,
                "active-border-color": activeBgColor
              });
              if (_disabled.value) {
                styles[ns.cssVarBlockName("disabled-bg-color")] = props.dark ? darken(color, 90) : color.tint(90).toString();
                styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? darken(color, 50) : color.tint(50).toString();
                styles[ns.cssVarBlockName("disabled-border-color")] = props.dark ? darken(color, 80) : color.tint(80).toString();
              }
            } else {
              const hoverBgColor = props.dark ? darken(color, 30) : color.tint(30).toString();
              const textColor = color.isDark() ? `var(${ns.cssVarName("color-white")})` : `var(${ns.cssVarName("color-black")})`;
              styles = ns.cssVarBlock({
                "bg-color": buttonColor,
                "text-color": textColor,
                "border-color": buttonColor,
                "hover-bg-color": hoverBgColor,
                "hover-text-color": textColor,
                "hover-border-color": hoverBgColor,
                "active-bg-color": activeBgColor,
                "active-border-color": activeBgColor
              });
              if (_disabled.value) {
                const disabledButtonColor = props.dark ? darken(color, 50) : color.tint(50).toString();
                styles[ns.cssVarBlockName("disabled-bg-color")] = disabledButtonColor;
                styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns.cssVarName("color-white")})`;
                styles[ns.cssVarBlockName("disabled-border-color")] = disabledButtonColor;
              }
            }
          }
          return styles;
        });
      }
      const __default__$a = vue.defineComponent({
        name: "ElButton"
      });
      const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
        ...__default__$a,
        props: buttonProps,
        emits: buttonEmits,
        setup(__props, { expose, emit }) {
          const props = __props;
          const buttonStyle = useButtonCustomStyle(props);
          const ns = useNamespace("button");
          const { _ref, _size, _type, _disabled, _props, shouldAddSpace, handleClick } = useButton(props, emit);
          const buttonKls = vue.computed(() => [
            ns.b(),
            ns.m(_type.value),
            ns.m(_size.value),
            ns.is("disabled", _disabled.value),
            ns.is("loading", props.loading),
            ns.is("plain", props.plain),
            ns.is("round", props.round),
            ns.is("circle", props.circle),
            ns.is("text", props.text),
            ns.is("link", props.link),
            ns.is("has-bg", props.bg)
          ]);
          expose({
            ref: _ref,
            size: _size,
            type: _type,
            disabled: _disabled,
            shouldAddSpace
          });
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), vue.mergeProps({
              ref_key: "_ref",
              ref: _ref
            }, vue.unref(_props), {
              class: vue.unref(buttonKls),
              style: vue.unref(buttonStyle),
              onClick: vue.unref(handleClick)
            }), {
              default: vue.withCtx(() => [
                _ctx.loading ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
                  _ctx.$slots.loading ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }) : (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), {
                    key: 1,
                    class: vue.normalizeClass(vue.unref(ns).is("loading"))
                  }, {
                    default: vue.withCtx(() => [
                      (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.loadingIcon)))
                    ]),
                    _: 1
                  }, 8, ["class"]))
                ], 64)) : _ctx.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createBlock(vue.unref(ElIcon), { key: 1 }, {
                  default: vue.withCtx(() => [
                    _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon), { key: 0 })) : vue.renderSlot(_ctx.$slots, "icon", { key: 1 })
                  ]),
                  _: 3
                })) : vue.createCommentVNode("v-if", true),
                _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", {
                  key: 2,
                  class: vue.normalizeClass({ [vue.unref(ns).em("text", "expand")]: vue.unref(shouldAddSpace) })
                }, [
                  vue.renderSlot(_ctx.$slots, "default")
                ], 2)) : vue.createCommentVNode("v-if", true)
              ]),
              _: 3
            }, 16, ["class", "style", "onClick"]);
          };
        }
      });
      var Button = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__file", "button.vue"]]);
      const buttonGroupProps = {
        size: buttonProps.size,
        type: buttonProps.type
      };
      const __default__$9 = vue.defineComponent({
        name: "ElButtonGroup"
      });
      const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
        ...__default__$9,
        props: buttonGroupProps,
        setup(__props) {
          const props = __props;
          vue.provide(buttonGroupContextKey, vue.reactive({
            size: vue.toRef(props, "size"),
            type: vue.toRef(props, "type")
          }));
          const ns = useNamespace("button");
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createElementBlock("div", {
              class: vue.normalizeClass(`${vue.unref(ns).b("group")}`)
            }, [
              vue.renderSlot(_ctx.$slots, "default")
            ], 2);
          };
        }
      });
      var ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "button-group.vue"]]);
      const ElButton = withInstall(Button, {
        ButtonGroup
      });
      withNoopInstall(ButtonGroup);
      var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
      function getDefaultExportFromCjs(x) {
        return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
      }
      const checkboxProps = {
        modelValue: {
          type: [Number, String, Boolean],
          default: void 0
        },
        label: {
          type: [String, Boolean, Number, Object],
          default: void 0
        },
        value: {
          type: [String, Boolean, Number, Object],
          default: void 0
        },
        indeterminate: Boolean,
        disabled: Boolean,
        checked: Boolean,
        name: {
          type: String,
          default: void 0
        },
        trueValue: {
          type: [String, Number],
          default: void 0
        },
        falseValue: {
          type: [String, Number],
          default: void 0
        },
        trueLabel: {
          type: [String, Number],
          default: void 0
        },
        falseLabel: {
          type: [String, Number],
          default: void 0
        },
        id: {
          type: String,
          default: void 0
        },
        controls: {
          type: String,
          default: void 0
        },
        border: Boolean,
        size: useSizeProp,
        tabindex: [String, Number],
        validateEvent: {
          type: Boolean,
          default: true
        },
        ...useAriaProps(["ariaControls"])
      };
      const checkboxEmits = {
        [UPDATE_MODEL_EVENT]: (val) => isString$1(val) || isNumber$1(val) || isBoolean(val),
        change: (val) => isString$1(val) || isNumber$1(val) || isBoolean(val)
      };
      const checkboxGroupContextKey = Symbol("checkboxGroupContextKey");
      const useCheckboxDisabled = ({
        model,
        isChecked
      }) => {
        const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
        const isLimitDisabled = vue.computed(() => {
          var _a2, _b;
          const max = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value;
          const min = (_b = checkboxGroup == null ? void 0 : checkboxGroup.min) == null ? void 0 : _b.value;
          return !isUndefined$1(max) && model.value.length >= max && !isChecked.value || !isUndefined$1(min) && model.value.length <= min && isChecked.value;
        });
        const isDisabled = useFormDisabled(vue.computed(() => (checkboxGroup == null ? void 0 : checkboxGroup.disabled.value) || isLimitDisabled.value));
        return {
          isDisabled,
          isLimitDisabled
        };
      };
      const useCheckboxEvent = (props, {
        model,
        isLimitExceeded,
        hasOwnLabel,
        isDisabled,
        isLabeledByFormItem
      }) => {
        const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
        const { formItem } = useFormItem();
        const { emit } = vue.getCurrentInstance();
        function getLabeledValue(value) {
          var _a2, _b, _c, _d;
          return [true, props.trueValue, props.trueLabel].includes(value) ? (_b = (_a2 = props.trueValue) != null ? _a2 : props.trueLabel) != null ? _b : true : (_d = (_c = props.falseValue) != null ? _c : props.falseLabel) != null ? _d : false;
        }
        function emitChangeEvent(checked, e) {
          emit("change", getLabeledValue(checked), e);
        }
        function handleChange(e) {
          if (isLimitExceeded.value)
            return;
          const target = e.target;
          emit("change", getLabeledValue(target.checked), e);
        }
        async function onClickRoot(e) {
          if (isLimitExceeded.value)
            return;
          if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {
            const eventTargets = e.composedPath();
            const hasLabel = eventTargets.some((item) => item.tagName === "LABEL");
            if (!hasLabel) {
              model.value = getLabeledValue([false, props.falseValue, props.falseLabel].includes(model.value));
              await vue.nextTick();
              emitChangeEvent(model.value, e);
            }
          }
        }
        const validateEvent = vue.computed(() => (checkboxGroup == null ? void 0 : checkboxGroup.validateEvent) || props.validateEvent);
        vue.watch(() => props.modelValue, () => {
          if (validateEvent.value) {
            formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
          }
        });
        return {
          handleChange,
          onClickRoot
        };
      };
      const useCheckboxModel = (props) => {
        const selfModel = vue.ref(false);
        const { emit } = vue.getCurrentInstance();
        const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
        const isGroup = vue.computed(() => isUndefined$1(checkboxGroup) === false);
        const isLimitExceeded = vue.ref(false);
        const model = vue.computed({
          get() {
            var _a2, _b;
            return isGroup.value ? (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.modelValue) == null ? void 0 : _a2.value : (_b = props.modelValue) != null ? _b : selfModel.value;
          },
          set(val) {
            var _a2, _b;
            if (isGroup.value && isArray$1(val)) {
              isLimitExceeded.value = ((_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value) !== void 0 && val.length > (checkboxGroup == null ? void 0 : checkboxGroup.max.value) && val.length > model.value.length;
              isLimitExceeded.value === false && ((_b = checkboxGroup == null ? void 0 : checkboxGroup.changeEvent) == null ? void 0 : _b.call(checkboxGroup, val));
            } else {
              emit(UPDATE_MODEL_EVENT, val);
              selfModel.value = val;
            }
          }
        });
        return {
          model,
          isGroup,
          isLimitExceeded
        };
      };
      const useCheckboxStatus = (props, slots, { model }) => {
        const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
        const isFocused = vue.ref(false);
        const actualValue = vue.computed(() => {
          if (!isPropAbsent(props.value)) {
            return props.value;
          }
          return props.label;
        });
        const isChecked = vue.computed(() => {
          const value = model.value;
          if (isBoolean(value)) {
            return value;
          } else if (isArray$1(value)) {
            if (isObject$2(actualValue.value)) {
              return value.map(vue.toRaw).some((o) => isEqual(o, actualValue.value));
            } else {
              return value.map(vue.toRaw).includes(actualValue.value);
            }
          } else if (value !== null && value !== void 0) {
            return value === props.trueValue || value === props.trueLabel;
          } else {
            return !!value;
          }
        });
        const checkboxButtonSize = useFormSize(vue.computed(() => {
          var _a2;
          return (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a2.value;
        }), {
          prop: true
        });
        const checkboxSize = useFormSize(vue.computed(() => {
          var _a2;
          return (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a2.value;
        }));
        const hasOwnLabel = vue.computed(() => {
          return !!slots.default || !isPropAbsent(actualValue.value);
        });
        return {
          checkboxButtonSize,
          isChecked,
          isFocused,
          checkboxSize,
          hasOwnLabel,
          actualValue
        };
      };
      const useCheckbox = (props, slots) => {
        const { formItem: elFormItem } = useFormItem();
        const { model, isGroup, isLimitExceeded } = useCheckboxModel(props);
        const {
          isFocused,
          isChecked,
          checkboxButtonSize,
          checkboxSize,
          hasOwnLabel,
          actualValue
        } = useCheckboxStatus(props, slots, { model });
        const { isDisabled } = useCheckboxDisabled({ model, isChecked });
        const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
          formItemContext: elFormItem,
          disableIdGeneration: hasOwnLabel,
          disableIdManagement: isGroup
        });
        const { handleChange, onClickRoot } = useCheckboxEvent(props, {
          model,
          isLimitExceeded,
          hasOwnLabel,
          isDisabled,
          isLabeledByFormItem
        });
        const setStoreValue = () => {
          function addToStore() {
            var _a2, _b;
            if (isArray$1(model.value) && !model.value.includes(actualValue.value)) {
              model.value.push(actualValue.value);
            } else {
              model.value = (_b = (_a2 = props.trueValue) != null ? _a2 : props.trueLabel) != null ? _b : true;
            }
          }
          props.checked && addToStore();
        };
        setStoreValue();
        useDeprecated({
          from: "controls",
          replacement: "aria-controls",
          version: "2.8.0",
          scope: "el-checkbox",
          ref: "https://element-plus.org/en-US/component/checkbox.html"
        }, vue.computed(() => !!props.controls));
        useDeprecated({
          from: "label act as value",
          replacement: "value",
          version: "3.0.0",
          scope: "el-checkbox",
          ref: "https://element-plus.org/en-US/component/checkbox.html"
        }, vue.computed(() => isGroup.value && isPropAbsent(props.value)));
        useDeprecated({
          from: "true-label",
          replacement: "true-value",
          version: "3.0.0",
          scope: "el-checkbox",
          ref: "https://element-plus.org/en-US/component/checkbox.html"
        }, vue.computed(() => !!props.trueLabel));
        useDeprecated({
          from: "false-label",
          replacement: "false-value",
          version: "3.0.0",
          scope: "el-checkbox",
          ref: "https://element-plus.org/en-US/component/checkbox.html"
        }, vue.computed(() => !!props.falseLabel));
        return {
          inputId,
          isLabeledByFormItem,
          isChecked,
          isDisabled,
          isFocused,
          checkboxButtonSize,
          checkboxSize,
          hasOwnLabel,
          model,
          actualValue,
          handleChange,
          onClickRoot
        };
      };
      const _hoisted_1$b = ["id", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value"];
      const _hoisted_2$8 = ["id", "indeterminate", "disabled", "value", "name", "tabindex"];
      const __default__$8 = vue.defineComponent({
        name: "ElCheckbox"
      });
      const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
        ...__default__$8,
        props: checkboxProps,
        emits: checkboxEmits,
        setup(__props) {
          const props = __props;
          const slots = vue.useSlots();
          const {
            inputId,
            isLabeledByFormItem,
            isChecked,
            isDisabled,
            isFocused,
            checkboxSize,
            hasOwnLabel,
            model,
            actualValue,
            handleChange,
            onClickRoot
          } = useCheckbox(props, slots);
          const ns = useNamespace("checkbox");
          const compKls = vue.computed(() => {
            return [
              ns.b(),
              ns.m(checkboxSize.value),
              ns.is("disabled", isDisabled.value),
              ns.is("bordered", props.border),
              ns.is("checked", isChecked.value)
            ];
          });
          const spanKls = vue.computed(() => {
            return [
              ns.e("input"),
              ns.is("disabled", isDisabled.value),
              ns.is("checked", isChecked.value),
              ns.is("indeterminate", props.indeterminate),
              ns.is("focus", isFocused.value)
            ];
          });
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(!vue.unref(hasOwnLabel) && vue.unref(isLabeledByFormItem) ? "span" : "label"), {
              class: vue.normalizeClass(vue.unref(compKls)),
              "aria-controls": _ctx.indeterminate ? _ctx.controls || _ctx.ariaControls : null,
              onClick: vue.unref(onClickRoot)
            }, {
              default: vue.withCtx(() => {
                var _a2, _b;
                return [
                  vue.createElementVNode("span", {
                    class: vue.normalizeClass(vue.unref(spanKls))
                  }, [
                    _ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
                      key: 0,
                      id: vue.unref(inputId),
                      "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(model) ? model.value = $event : null),
                      class: vue.normalizeClass(vue.unref(ns).e("original")),
                      type: "checkbox",
                      indeterminate: _ctx.indeterminate,
                      name: _ctx.name,
                      tabindex: _ctx.tabindex,
                      disabled: vue.unref(isDisabled),
                      "true-value": (_a2 = _ctx.trueValue) != null ? _a2 : _ctx.trueLabel,
                      "false-value": (_b = _ctx.falseValue) != null ? _b : _ctx.falseLabel,
                      onChange: _cache[1] || (_cache[1] = (...args) => vue.unref(handleChange) && vue.unref(handleChange)(...args)),
                      onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
                      onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
                      onClick: _cache[4] || (_cache[4] = vue.withModifiers(() => {
                      }, ["stop"]))
                    }, null, 42, _hoisted_1$b)), [
                      [vue.vModelCheckbox, vue.unref(model)]
                    ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
                      key: 1,
                      id: vue.unref(inputId),
                      "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.isRef(model) ? model.value = $event : null),
                      class: vue.normalizeClass(vue.unref(ns).e("original")),
                      type: "checkbox",
                      indeterminate: _ctx.indeterminate,
                      disabled: vue.unref(isDisabled),
                      value: vue.unref(actualValue),
                      name: _ctx.name,
                      tabindex: _ctx.tabindex,
                      onChange: _cache[6] || (_cache[6] = (...args) => vue.unref(handleChange) && vue.unref(handleChange)(...args)),
                      onFocus: _cache[7] || (_cache[7] = ($event) => isFocused.value = true),
                      onBlur: _cache[8] || (_cache[8] = ($event) => isFocused.value = false),
                      onClick: _cache[9] || (_cache[9] = vue.withModifiers(() => {
                      }, ["stop"]))
                    }, null, 42, _hoisted_2$8)), [
                      [vue.vModelCheckbox, vue.unref(model)]
                    ]),
                    vue.createElementVNode("span", {
                      class: vue.normalizeClass(vue.unref(ns).e("inner"))
                    }, null, 2)
                  ], 2),
                  vue.unref(hasOwnLabel) ? (vue.openBlock(), vue.createElementBlock("span", {
                    key: 0,
                    class: vue.normalizeClass(vue.unref(ns).e("label"))
                  }, [
                    vue.renderSlot(_ctx.$slots, "default"),
                    !_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
                      vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
                    ], 64)) : vue.createCommentVNode("v-if", true)
                  ], 2)) : vue.createCommentVNode("v-if", true)
                ];
              }),
              _: 3
            }, 8, ["class", "aria-controls", "onClick"]);
          };
        }
      });
      var Checkbox = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["__file", "checkbox.vue"]]);
      const _hoisted_1$a = ["name", "tabindex", "disabled", "true-value", "false-value"];
      const _hoisted_2$7 = ["name", "tabindex", "disabled", "value"];
      const __default__$7 = vue.defineComponent({
        name: "ElCheckboxButton"
      });
      const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
        ...__default__$7,
        props: checkboxProps,
        emits: checkboxEmits,
        setup(__props) {
          const props = __props;
          const slots = vue.useSlots();
          const {
            isFocused,
            isChecked,
            isDisabled,
            checkboxButtonSize,
            model,
            actualValue,
            handleChange
          } = useCheckbox(props, slots);
          const checkboxGroup = vue.inject(checkboxGroupContextKey, void 0);
          const ns = useNamespace("checkbox");
          const activeStyle = vue.computed(() => {
            var _a2, _b, _c, _d;
            const fillValue = (_b = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.fill) == null ? void 0 : _a2.value) != null ? _b : "";
            return {
              backgroundColor: fillValue,
              borderColor: fillValue,
              color: (_d = (_c = checkboxGroup == null ? void 0 : checkboxGroup.textColor) == null ? void 0 : _c.value) != null ? _d : "",
              boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : void 0
            };
          });
          const labelKls = vue.computed(() => {
            return [
              ns.b("button"),
              ns.bm("button", checkboxButtonSize.value),
              ns.is("disabled", isDisabled.value),
              ns.is("checked", isChecked.value),
              ns.is("focus", isFocused.value)
            ];
          });
          return (_ctx, _cache) => {
            var _a2, _b;
            return vue.openBlock(), vue.createElementBlock("label", {
              class: vue.normalizeClass(vue.unref(labelKls))
            }, [
              _ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
                key: 0,
                "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(model) ? model.value = $event : null),
                class: vue.normalizeClass(vue.unref(ns).be("button", "original")),
                type: "checkbox",
                name: _ctx.name,
                tabindex: _ctx.tabindex,
                disabled: vue.unref(isDisabled),
                "true-value": (_a2 = _ctx.trueValue) != null ? _a2 : _ctx.trueLabel,
                "false-value": (_b = _ctx.falseValue) != null ? _b : _ctx.falseLabel,
                onChange: _cache[1] || (_cache[1] = (...args) => vue.unref(handleChange) && vue.unref(handleChange)(...args)),
                onFocus: _cache[2] || (_cache[2] = ($event) => isFocused.value = true),
                onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
                onClick: _cache[4] || (_cache[4] = vue.withModifiers(() => {
                }, ["stop"]))
              }, null, 42, _hoisted_1$a)), [
                [vue.vModelCheckbox, vue.unref(model)]
              ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
                key: 1,
                "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vue.isRef(model) ? model.value = $event : null),
                class: vue.normalizeClass(vue.unref(ns).be("button", "original")),
                type: "checkbox",
                name: _ctx.name,
                tabindex: _ctx.tabindex,
                disabled: vue.unref(isDisabled),
                value: vue.unref(actualValue),
                onChange: _cache[6] || (_cache[6] = (...args) => vue.unref(handleChange) && vue.unref(handleChange)(...args)),
                onFocus: _cache[7] || (_cache[7] = ($event) => isFocused.value = true),
                onBlur: _cache[8] || (_cache[8] = ($event) => isFocused.value = false),
                onClick: _cache[9] || (_cache[9] = vue.withModifiers(() => {
                }, ["stop"]))
              }, null, 42, _hoisted_2$7)), [
                [vue.vModelCheckbox, vue.unref(model)]
              ]),
              _ctx.$slots.default || _ctx.label ? (vue.openBlock(), vue.createElementBlock("span", {
                key: 2,
                class: vue.normalizeClass(vue.unref(ns).be("button", "inner")),
                style: vue.normalizeStyle(vue.unref(isChecked) ? vue.unref(activeStyle) : void 0)
              }, [
                vue.renderSlot(_ctx.$slots, "default", {}, () => [
                  vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
                ])
              ], 6)) : vue.createCommentVNode("v-if", true)
            ], 2);
          };
        }
      });
      var CheckboxButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "checkbox-button.vue"]]);
      const checkboxGroupProps = buildProps({
        modelValue: {
          type: definePropType(Array),
          default: () => []
        },
        disabled: Boolean,
        min: Number,
        max: Number,
        size: useSizeProp,
        label: String,
        fill: String,
        textColor: String,
        tag: {
          type: String,
          default: "div"
        },
        validateEvent: {
          type: Boolean,
          default: true
        },
        ...useAriaProps(["ariaLabel"])
      });
      const checkboxGroupEmits = {
        [UPDATE_MODEL_EVENT]: (val) => isArray$1(val),
        change: (val) => isArray$1(val)
      };
      const __default__$6 = vue.defineComponent({
        name: "ElCheckboxGroup"
      });
      const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
        ...__default__$6,
        props: checkboxGroupProps,
        emits: checkboxGroupEmits,
        setup(__props, { emit }) {
          const props = __props;
          const ns = useNamespace("checkbox");
          const { formItem } = useFormItem();
          const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
            formItemContext: formItem
          });
          const changeEvent = async (value) => {
            emit(UPDATE_MODEL_EVENT, value);
            await vue.nextTick();
            emit("change", value);
          };
          const modelValue = vue.computed({
            get() {
              return props.modelValue;
            },
            set(val) {
              changeEvent(val);
            }
          });
          vue.provide(checkboxGroupContextKey, {
            ...pick(vue.toRefs(props), [
              "size",
              "min",
              "max",
              "disabled",
              "validateEvent",
              "fill",
              "textColor"
            ]),
            modelValue,
            changeEvent
          });
          useDeprecated({
            from: "label",
            replacement: "aria-label",
            version: "2.8.0",
            scope: "el-checkbox-group",
            ref: "https://element-plus.org/en-US/component/checkbox.html"
          }, vue.computed(() => !!props.label));
          vue.watch(() => props.modelValue, () => {
            if (props.validateEvent) {
              formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
            }
          });
          return (_ctx, _cache) => {
            var _a2;
            return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
              id: vue.unref(groupId),
              class: vue.normalizeClass(vue.unref(ns).b("group")),
              role: "group",
              "aria-label": !vue.unref(isLabeledByFormItem) ? _ctx.label || _ctx.ariaLabel || "checkbox-group" : void 0,
              "aria-labelledby": vue.unref(isLabeledByFormItem) ? (_a2 = vue.unref(formItem)) == null ? void 0 : _a2.labelId : void 0
            }, {
              default: vue.withCtx(() => [
                vue.renderSlot(_ctx.$slots, "default")
              ]),
              _: 3
            }, 8, ["id", "class", "aria-label", "aria-labelledby"]);
          };
        }
      });
      var CheckboxGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "checkbox-group.vue"]]);
      const ElCheckbox = withInstall(Checkbox, {
        CheckboxButton,
        CheckboxGroup
      });
      withNoopInstall(CheckboxButton);
      const ElCheckboxGroup = withNoopInstall(CheckboxGroup);
      const radioPropsBase = buildProps({
        modelValue: {
          type: [String, Number, Boolean],
          default: void 0
        },
        size: useSizeProp,
        disabled: Boolean,
        label: {
          type: [String, Number, Boolean],
          default: void 0
        },
        value: {
          type: [String, Number, Boolean],
          default: void 0
        },
        name: {
          type: String,
          default: void 0
        }
      });
      const radioProps = buildProps({
        ...radioPropsBase,
        border: Boolean
      });
      const radioEmits = {
        [UPDATE_MODEL_EVENT]: (val) => isString$1(val) || isNumber$1(val) || isBoolean(val),
        [CHANGE_EVENT]: (val) => isString$1(val) || isNumber$1(val) || isBoolean(val)
      };
      const radioGroupKey = Symbol("radioGroupKey");
      const useRadio = (props, emit) => {
        const radioRef = vue.ref();
        const radioGroup = vue.inject(radioGroupKey, void 0);
        const isGroup = vue.computed(() => !!radioGroup);
        const actualValue = vue.computed(() => {
          if (!isPropAbsent(props.value)) {
            return props.value;
          }
          return props.label;
        });
        const modelValue = vue.computed({
          get() {
            return isGroup.value ? radioGroup.modelValue : props.modelValue;
          },
          set(val) {
            if (isGroup.value) {
              radioGroup.changeEvent(val);
            } else {
              emit && emit(UPDATE_MODEL_EVENT, val);
            }
            radioRef.value.checked = props.modelValue === actualValue.value;
          }
        });
        const size = useFormSize(vue.computed(() => radioGroup == null ? void 0 : radioGroup.size));
        const disabled = useFormDisabled(vue.computed(() => radioGroup == null ? void 0 : radioGroup.disabled));
        const focus = vue.ref(false);
        const tabIndex = vue.computed(() => {
          return disabled.value || isGroup.value && modelValue.value !== actualValue.value ? -1 : 0;
        });
        useDeprecated({
          from: "label act as value",
          replacement: "value",
          version: "3.0.0",
          scope: "el-radio",
          ref: "https://element-plus.org/en-US/component/radio.html"
        }, vue.computed(() => isGroup.value && isPropAbsent(props.value)));
        return {
          radioRef,
          isGroup,
          radioGroup,
          focus,
          size,
          disabled,
          tabIndex,
          modelValue,
          actualValue
        };
      };
      const _hoisted_1$9 = ["value", "name", "disabled"];
      const __default__$5 = vue.defineComponent({
        name: "ElRadio"
      });
      const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
        ...__default__$5,
        props: radioProps,
        emits: radioEmits,
        setup(__props, { emit }) {
          const props = __props;
          const ns = useNamespace("radio");
          const { radioRef, radioGroup, focus, size, disabled, modelValue, actualValue } = useRadio(props, emit);
          function handleChange() {
            vue.nextTick(() => emit("change", modelValue.value));
          }
          return (_ctx, _cache) => {
            var _a2;
            return vue.openBlock(), vue.createElementBlock("label", {
              class: vue.normalizeClass([
                vue.unref(ns).b(),
                vue.unref(ns).is("disabled", vue.unref(disabled)),
                vue.unref(ns).is("focus", vue.unref(focus)),
                vue.unref(ns).is("bordered", _ctx.border),
                vue.unref(ns).is("checked", vue.unref(modelValue) === vue.unref(actualValue)),
                vue.unref(ns).m(vue.unref(size))
              ])
            }, [
              vue.createElementVNode("span", {
                class: vue.normalizeClass([
                  vue.unref(ns).e("input"),
                  vue.unref(ns).is("disabled", vue.unref(disabled)),
                  vue.unref(ns).is("checked", vue.unref(modelValue) === vue.unref(actualValue))
                ])
              }, [
                vue.withDirectives(vue.createElementVNode("input", {
                  ref_key: "radioRef",
                  ref: radioRef,
                  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null),
                  class: vue.normalizeClass(vue.unref(ns).e("original")),
                  value: vue.unref(actualValue),
                  name: _ctx.name || ((_a2 = vue.unref(radioGroup)) == null ? void 0 : _a2.name),
                  disabled: vue.unref(disabled),
                  type: "radio",
                  onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
                  onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
                  onChange: handleChange,
                  onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
                  }, ["stop"]))
                }, null, 42, _hoisted_1$9), [
                  [vue.vModelRadio, vue.unref(modelValue)]
                ]),
                vue.createElementVNode("span", {
                  class: vue.normalizeClass(vue.unref(ns).e("inner"))
                }, null, 2)
              ], 2),
              vue.createElementVNode("span", {
                class: vue.normalizeClass(vue.unref(ns).e("label")),
                onKeydown: _cache[4] || (_cache[4] = vue.withModifiers(() => {
                }, ["stop"]))
              }, [
                vue.renderSlot(_ctx.$slots, "default", {}, () => [
                  vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
                ])
              ], 34)
            ], 2);
          };
        }
      });
      var Radio = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["__file", "radio.vue"]]);
      const radioButtonProps = buildProps({
        ...radioPropsBase
      });
      const _hoisted_1$8 = ["value", "name", "disabled"];
      const __default__$4 = vue.defineComponent({
        name: "ElRadioButton"
      });
      const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
        ...__default__$4,
        props: radioButtonProps,
        setup(__props) {
          const props = __props;
          const ns = useNamespace("radio");
          const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio(props);
          const activeStyle = vue.computed(() => {
            return {
              backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
              borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
              boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
              color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
            };
          });
          return (_ctx, _cache) => {
            var _a2;
            return vue.openBlock(), vue.createElementBlock("label", {
              class: vue.normalizeClass([
                vue.unref(ns).b("button"),
                vue.unref(ns).is("active", vue.unref(modelValue) === vue.unref(actualValue)),
                vue.unref(ns).is("disabled", vue.unref(disabled)),
                vue.unref(ns).is("focus", vue.unref(focus)),
                vue.unref(ns).bm("button", vue.unref(size))
              ])
            }, [
              vue.withDirectives(vue.createElementVNode("input", {
                ref_key: "radioRef",
                ref: radioRef,
                "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null),
                class: vue.normalizeClass(vue.unref(ns).be("button", "original-radio")),
                value: vue.unref(actualValue),
                type: "radio",
                name: _ctx.name || ((_a2 = vue.unref(radioGroup)) == null ? void 0 : _a2.name),
                disabled: vue.unref(disabled),
                onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
                onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
                onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
                }, ["stop"]))
              }, null, 42, _hoisted_1$8), [
                [vue.vModelRadio, vue.unref(modelValue)]
              ]),
              vue.createElementVNode("span", {
                class: vue.normalizeClass(vue.unref(ns).be("button", "inner")),
                style: vue.normalizeStyle(vue.unref(modelValue) === vue.unref(actualValue) ? vue.unref(activeStyle) : {}),
                onKeydown: _cache[4] || (_cache[4] = vue.withModifiers(() => {
                }, ["stop"]))
              }, [
                vue.renderSlot(_ctx.$slots, "default", {}, () => [
                  vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
                ])
              ], 38)
            ], 2);
          };
        }
      });
      var RadioButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$7, [["__file", "radio-button.vue"]]);
      const radioGroupProps = buildProps({
        id: {
          type: String,
          default: void 0
        },
        size: useSizeProp,
        disabled: Boolean,
        modelValue: {
          type: [String, Number, Boolean],
          default: void 0
        },
        fill: {
          type: String,
          default: ""
        },
        label: {
          type: String,
          default: void 0
        },
        textColor: {
          type: String,
          default: ""
        },
        name: {
          type: String,
          default: void 0
        },
        validateEvent: {
          type: Boolean,
          default: true
        },
        ...useAriaProps(["ariaLabel"])
      });
      const radioGroupEmits = radioEmits;
      const _hoisted_1$7 = ["id", "aria-label", "aria-labelledby"];
      const __default__$3 = vue.defineComponent({
        name: "ElRadioGroup"
      });
      const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
        ...__default__$3,
        props: radioGroupProps,
        emits: radioGroupEmits,
        setup(__props, { emit }) {
          const props = __props;
          const ns = useNamespace("radio");
          const radioId = useId();
          const radioGroupRef = vue.ref();
          const { formItem } = useFormItem();
          const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
            formItemContext: formItem
          });
          const changeEvent = (value) => {
            emit(UPDATE_MODEL_EVENT, value);
            vue.nextTick(() => emit("change", value));
          };
          vue.onMounted(() => {
            const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
            const firstLabel = radios[0];
            if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
              firstLabel.tabIndex = 0;
            }
          });
          const name = vue.computed(() => {
            return props.name || radioId.value;
          });
          vue.provide(radioGroupKey, vue.reactive({
            ...vue.toRefs(props),
            changeEvent,
            name
          }));
          vue.watch(() => props.modelValue, () => {
            if (props.validateEvent) {
              formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
            }
          });
          useDeprecated({
            from: "label",
            replacement: "aria-label",
            version: "2.8.0",
            scope: "el-radio-group",
            ref: "https://element-plus.org/en-US/component/radio.html"
          }, vue.computed(() => !!props.label));
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createElementBlock("div", {
              id: vue.unref(groupId),
              ref_key: "radioGroupRef",
              ref: radioGroupRef,
              class: vue.normalizeClass(vue.unref(ns).b("group")),
              role: "radiogroup",
              "aria-label": !vue.unref(isLabeledByFormItem) ? _ctx.label || _ctx.ariaLabel || "radio-group" : void 0,
              "aria-labelledby": vue.unref(isLabeledByFormItem) ? vue.unref(formItem).labelId : void 0
            }, [
              vue.renderSlot(_ctx.$slots, "default")
            ], 10, _hoisted_1$7);
          };
        }
      });
      var RadioGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__file", "radio-group.vue"]]);
      const ElRadio = withInstall(Radio, {
        RadioButton,
        RadioGroup
      });
      const ElRadioGroup = withNoopInstall(RadioGroup);
      withNoopInstall(RadioButton);
      const overlayProps = buildProps({
        mask: {
          type: Boolean,
          default: true
        },
        customMaskEvent: {
          type: Boolean,
          default: false
        },
        overlayClass: {
          type: definePropType([
            String,
            Array,
            Object
          ])
        },
        zIndex: {
          type: definePropType([String, Number])
        }
      });
      const overlayEmits = {
        click: (evt) => evt instanceof MouseEvent
      };
      const BLOCK = "overlay";
      var Overlay = vue.defineComponent({
        name: "ElOverlay",
        props: overlayProps,
        emits: overlayEmits,
        setup(props, { slots, emit }) {
          const ns = useNamespace(BLOCK);
          const onMaskClick = (e) => {
            emit("click", e);
          };
          const { onClick, onMousedown, onMouseup } = useSameTarget(props.customMaskEvent ? void 0 : onMaskClick);
          return () => {
            return props.mask ? vue.createVNode("div", {
              class: [ns.b(), props.overlayClass],
              style: {
                zIndex: props.zIndex
              },
              onClick,
              onMousedown,
              onMouseup
            }, [vue.renderSlot(slots, "default")], PatchFlags.STYLE | PatchFlags.CLASS | PatchFlags.PROPS, ["onClick", "onMouseup", "onMousedown"]) : vue.h("div", {
              class: props.overlayClass,
              style: {
                zIndex: props.zIndex,
                position: "fixed",
                top: "0px",
                right: "0px",
                bottom: "0px",
                left: "0px"
              }
            }, [vue.renderSlot(slots, "default")]);
          };
        }
      });
      const ElOverlay = Overlay;
      const dialogContentProps = buildProps({
        center: Boolean,
        alignCenter: Boolean,
        closeIcon: {
          type: iconPropType
        },
        draggable: Boolean,
        overflow: Boolean,
        fullscreen: Boolean,
        showClose: {
          type: Boolean,
          default: true
        },
        title: {
          type: String,
          default: ""
        },
        ariaLevel: {
          type: String,
          default: "2"
        }
      });
      const dialogProps = buildProps({
        ...dialogContentProps,
        appendToBody: Boolean,
        appendTo: {
          type: definePropType(String),
          default: "body"
        },
        beforeClose: {
          type: definePropType(Function)
        },
        destroyOnClose: Boolean,
        closeOnClickModal: {
          type: Boolean,
          default: true
        },
        closeOnPressEscape: {
          type: Boolean,
          default: true
        },
        lockScroll: {
          type: Boolean,
          default: true
        },
        modal: {
          type: Boolean,
          default: true
        },
        openDelay: {
          type: Number,
          default: 0
        },
        closeDelay: {
          type: Number,
          default: 0
        },
        top: {
          type: String
        },
        modelValue: Boolean,
        modalClass: String,
        width: {
          type: [String, Number]
        },
        zIndex: {
          type: Number
        },
        trapFocus: {
          type: Boolean,
          default: false
        },
        headerAriaLevel: {
          type: String,
          default: "2"
        }
      });
      const dialogEmits = {
        open: () => true,
        opened: () => true,
        close: () => true,
        closed: () => true,
        [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
        openAutoFocus: () => true,
        closeAutoFocus: () => true
      };
      const useDialog = (props, targetRef) => {
        var _a2;
        const instance = vue.getCurrentInstance();
        const emit = instance.emit;
        const { nextZIndex } = useZIndex();
        let lastPosition = "";
        const titleId = useId();
        const bodyId = useId();
        const visible = vue.ref(false);
        const closed = vue.ref(false);
        const rendered = vue.ref(false);
        const zIndex2 = vue.ref((_a2 = props.zIndex) != null ? _a2 : nextZIndex());
        let openTimer = void 0;
        let closeTimer = void 0;
        const namespace = useGlobalConfig("namespace", defaultNamespace);
        const style = vue.computed(() => {
          const style2 = {};
          const varPrefix = `--${namespace.value}-dialog`;
          if (!props.fullscreen) {
            if (props.top) {
              style2[`${varPrefix}-margin-top`] = props.top;
            }
            if (props.width) {
              style2[`${varPrefix}-width`] = addUnit(props.width);
            }
          }
          return style2;
        });
        const overlayDialogStyle = vue.computed(() => {
          if (props.alignCenter) {
            return { display: "flex" };
          }
          return {};
        });
        function afterEnter() {
          emit("opened");
        }
        function afterLeave() {
          emit("closed");
          emit(UPDATE_MODEL_EVENT, false);
          if (props.destroyOnClose) {
            rendered.value = false;
          }
        }
        function beforeLeave() {
          emit("close");
        }
        function open() {
          closeTimer == null ? void 0 : closeTimer();
          openTimer == null ? void 0 : openTimer();
          if (props.openDelay && props.openDelay > 0) {
            ({ stop: openTimer } = useTimeoutFn(() => doOpen(), props.openDelay));
          } else {
            doOpen();
          }
        }
        function close() {
          openTimer == null ? void 0 : openTimer();
          closeTimer == null ? void 0 : closeTimer();
          if (props.closeDelay && props.closeDelay > 0) {
            ({ stop: closeTimer } = useTimeoutFn(() => doClose(), props.closeDelay));
          } else {
            doClose();
          }
        }
        function handleClose() {
          function hide(shouldCancel) {
            if (shouldCancel)
              return;
            closed.value = true;
            visible.value = false;
          }
          if (props.beforeClose) {
            props.beforeClose(hide);
          } else {
            close();
          }
        }
        function onModalClick() {
          if (props.closeOnClickModal) {
            handleClose();
          }
        }
        function doOpen() {
          if (!isClient)
            return;
          visible.value = true;
        }
        function doClose() {
          visible.value = false;
        }
        function onOpenAutoFocus() {
          emit("openAutoFocus");
        }
        function onCloseAutoFocus() {
          emit("closeAutoFocus");
        }
        function onFocusoutPrevented(event) {
          var _a22;
          if (((_a22 = event.detail) == null ? void 0 : _a22.focusReason) === "pointer") {
            event.preventDefault();
          }
        }
        if (props.lockScroll) {
          useLockscreen(visible);
        }
        function onCloseRequested() {
          if (props.closeOnPressEscape) {
            handleClose();
          }
        }
        vue.watch(() => props.modelValue, (val) => {
          if (val) {
            closed.value = false;
            open();
            rendered.value = true;
            zIndex2.value = isUndefined$2(props.zIndex) ? nextZIndex() : zIndex2.value++;
            vue.nextTick(() => {
              emit("open");
              if (targetRef.value) {
                targetRef.value.scrollTop = 0;
              }
            });
          } else {
            if (visible.value) {
              close();
            }
          }
        });
        vue.watch(() => props.fullscreen, (val) => {
          if (!targetRef.value)
            return;
          if (val) {
            lastPosition = targetRef.value.style.transform;
            targetRef.value.style.transform = "";
          } else {
            targetRef.value.style.transform = lastPosition;
          }
        });
        vue.onMounted(() => {
          if (props.modelValue) {
            visible.value = true;
            rendered.value = true;
            open();
          }
        });
        return {
          afterEnter,
          afterLeave,
          beforeLeave,
          handleClose,
          onModalClick,
          close,
          doClose,
          onOpenAutoFocus,
          onCloseAutoFocus,
          onCloseRequested,
          onFocusoutPrevented,
          titleId,
          bodyId,
          closed,
          style,
          overlayDialogStyle,
          rendered,
          visible,
          zIndex: zIndex2
        };
      };
      const drawerProps = buildProps({
        ...dialogProps,
        direction: {
          type: String,
          default: "rtl",
          values: ["ltr", "rtl", "ttb", "btt"]
        },
        size: {
          type: [String, Number],
          default: "30%"
        },
        withHeader: {
          type: Boolean,
          default: true
        },
        modalFade: {
          type: Boolean,
          default: true
        },
        headerAriaLevel: {
          type: String,
          default: "2"
        }
      });
      const drawerEmits = dialogEmits;
      const _hoisted_1$6 = ["aria-label", "aria-labelledby", "aria-describedby"];
      const _hoisted_2$6 = ["id", "aria-level"];
      const _hoisted_3$4 = ["aria-label"];
      const _hoisted_4$2 = ["id"];
      const __default__$2 = vue.defineComponent({
        name: "ElDrawer",
        inheritAttrs: false
      });
      const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
        ...__default__$2,
        props: drawerProps,
        emits: drawerEmits,
        setup(__props, { expose }) {
          const props = __props;
          const slots = vue.useSlots();
          useDeprecated({
            scope: "el-drawer",
            from: "the title slot",
            replacement: "the header slot",
            version: "3.0.0",
            ref: "https://element-plus.org/en-US/component/drawer.html#slots"
          }, vue.computed(() => !!slots.title));
          const drawerRef = vue.ref();
          const focusStartRef = vue.ref();
          const ns = useNamespace("drawer");
          const { t } = useLocale();
          const {
            afterEnter,
            afterLeave,
            beforeLeave,
            visible,
            rendered,
            titleId,
            bodyId,
            zIndex: zIndex2,
            onModalClick,
            onOpenAutoFocus,
            onCloseAutoFocus,
            onFocusoutPrevented,
            onCloseRequested,
            handleClose
          } = useDialog(props, drawerRef);
          const isHorizontal = vue.computed(() => props.direction === "rtl" || props.direction === "ltr");
          const drawerSize = vue.computed(() => addUnit(props.size));
          expose({
            handleClose,
            afterEnter,
            afterLeave
          });
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createBlock(vue.Teleport, {
              to: "body",
              disabled: !_ctx.appendToBody
            }, [
              vue.createVNode(vue.Transition, {
                name: vue.unref(ns).b("fade"),
                onAfterEnter: vue.unref(afterEnter),
                onAfterLeave: vue.unref(afterLeave),
                onBeforeLeave: vue.unref(beforeLeave),
                persisted: ""
              }, {
                default: vue.withCtx(() => [
                  vue.withDirectives(vue.createVNode(vue.unref(ElOverlay), {
                    mask: _ctx.modal,
                    "overlay-class": _ctx.modalClass,
                    "z-index": vue.unref(zIndex2),
                    onClick: vue.unref(onModalClick)
                  }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(vue.unref(ElFocusTrap), {
                        loop: "",
                        trapped: vue.unref(visible),
                        "focus-trap-el": drawerRef.value,
                        "focus-start-el": focusStartRef.value,
                        onFocusAfterTrapped: vue.unref(onOpenAutoFocus),
                        onFocusAfterReleased: vue.unref(onCloseAutoFocus),
                        onFocusoutPrevented: vue.unref(onFocusoutPrevented),
                        onReleaseRequested: vue.unref(onCloseRequested)
                      }, {
                        default: vue.withCtx(() => [
                          vue.createElementVNode("div", vue.mergeProps({
                            ref_key: "drawerRef",
                            ref: drawerRef,
                            "aria-modal": "true",
                            "aria-label": _ctx.title || void 0,
                            "aria-labelledby": !_ctx.title ? vue.unref(titleId) : void 0,
                            "aria-describedby": vue.unref(bodyId)
                          }, _ctx.$attrs, {
                            class: [vue.unref(ns).b(), _ctx.direction, vue.unref(visible) && "open"],
                            style: vue.unref(isHorizontal) ? "width: " + vue.unref(drawerSize) : "height: " + vue.unref(drawerSize),
                            role: "dialog",
                            onClick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
                            }, ["stop"]))
                          }), [
                            vue.createElementVNode("span", {
                              ref_key: "focusStartRef",
                              ref: focusStartRef,
                              class: vue.normalizeClass(vue.unref(ns).e("sr-focus")),
                              tabindex: "-1"
                            }, null, 2),
                            _ctx.withHeader ? (vue.openBlock(), vue.createElementBlock("header", {
                              key: 0,
                              class: vue.normalizeClass(vue.unref(ns).e("header"))
                            }, [
                              !_ctx.$slots.title ? vue.renderSlot(_ctx.$slots, "header", {
                                key: 0,
                                close: vue.unref(handleClose),
                                titleId: vue.unref(titleId),
                                titleClass: vue.unref(ns).e("title")
                              }, () => [
                                !_ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
                                  key: 0,
                                  id: vue.unref(titleId),
                                  role: "heading",
                                  "aria-level": _ctx.headerAriaLevel,
                                  class: vue.normalizeClass(vue.unref(ns).e("title"))
                                }, vue.toDisplayString(_ctx.title), 11, _hoisted_2$6)) : vue.createCommentVNode("v-if", true)
                              ]) : vue.renderSlot(_ctx.$slots, "title", { key: 1 }, () => [
                                vue.createCommentVNode(" DEPRECATED SLOT ")
                              ]),
                              _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
                                key: 2,
                                "aria-label": vue.unref(t)("el.drawer.close"),
                                class: vue.normalizeClass(vue.unref(ns).e("close-btn")),
                                type: "button",
                                onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleClose) && vue.unref(handleClose)(...args))
                              }, [
                                vue.createVNode(vue.unref(ElIcon), {
                                  class: vue.normalizeClass(vue.unref(ns).e("close"))
                                }, {
                                  default: vue.withCtx(() => [
                                    vue.createVNode(vue.unref(close_default))
                                  ]),
                                  _: 1
                                }, 8, ["class"])
                              ], 10, _hoisted_3$4)) : vue.createCommentVNode("v-if", true)
                            ], 2)) : vue.createCommentVNode("v-if", true),
                            vue.unref(rendered) ? (vue.openBlock(), vue.createElementBlock("div", {
                              key: 1,
                              id: vue.unref(bodyId),
                              class: vue.normalizeClass(vue.unref(ns).e("body"))
                            }, [
                              vue.renderSlot(_ctx.$slots, "default")
                            ], 10, _hoisted_4$2)) : vue.createCommentVNode("v-if", true),
                            _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", {
                              key: 2,
                              class: vue.normalizeClass(vue.unref(ns).e("footer"))
                            }, [
                              vue.renderSlot(_ctx.$slots, "footer")
                            ], 2)) : vue.createCommentVNode("v-if", true)
                          ], 16, _hoisted_1$6)
                        ]),
                        _: 3
                      }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
                    ]),
                    _: 3
                  }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
                    [vue.vShow, vue.unref(visible)]
                  ])
                ]),
                _: 3
              }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
            ], 8, ["disabled"]);
          };
        }
      });
      var Drawer = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["__file", "drawer.vue"]]);
      const ElDrawer = withInstall(Drawer);
      const _hoisted_1$5 = {
        viewBox: "0 0 79 86",
        version: "1.1",
        xmlns: "http://www.w3.org/2000/svg",
        "xmlns:xlink": "http://www.w3.org/1999/xlink"
      };
      const _hoisted_2$5 = ["id"];
      const _hoisted_3$3 = ["stop-color"];
      const _hoisted_4$1 = ["stop-color"];
      const _hoisted_5$1 = ["id"];
      const _hoisted_6$1 = ["stop-color"];
      const _hoisted_7$1 = ["stop-color"];
      const _hoisted_8$1 = ["id"];
      const _hoisted_9$1 = {
        id: "Illustrations",
        stroke: "none",
        "stroke-width": "1",
        fill: "none",
        "fill-rule": "evenodd"
      };
      const _hoisted_10$1 = {
        id: "B-type",
        transform: "translate(-1268.000000, -535.000000)"
      };
      const _hoisted_11$1 = {
        id: "Group-2",
        transform: "translate(1268.000000, 535.000000)"
      };
      const _hoisted_12 = ["fill"];
      const _hoisted_13 = ["fill"];
      const _hoisted_14 = {
        id: "Group-Copy",
        transform: "translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"
      };
      const _hoisted_15 = ["fill"];
      const _hoisted_16 = ["fill"];
      const _hoisted_17 = ["fill"];
      const _hoisted_18 = ["fill"];
      const _hoisted_19 = ["fill"];
      const _hoisted_20 = {
        id: "Rectangle-Copy-17",
        transform: "translate(53.000000, 45.000000)"
      };
      const _hoisted_21 = ["fill", "xlink:href"];
      const _hoisted_22 = ["fill", "mask"];
      const _hoisted_23 = ["fill"];
      const __default__$1 = vue.defineComponent({
        name: "ImgEmpty"
      });
      const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
        ...__default__$1,
        setup(__props) {
          const ns = useNamespace("empty");
          const id = useId();
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$5, [
              vue.createElementVNode("defs", null, [
                vue.createElementVNode("linearGradient", {
                  id: `linearGradient-1-${vue.unref(id)}`,
                  x1: "38.8503086%",
                  y1: "0%",
                  x2: "61.1496914%",
                  y2: "100%"
                }, [
                  vue.createElementVNode("stop", {
                    "stop-color": `var(${vue.unref(ns).cssVarBlockName("fill-color-1")})`,
                    offset: "0%"
                  }, null, 8, _hoisted_3$3),
                  vue.createElementVNode("stop", {
                    "stop-color": `var(${vue.unref(ns).cssVarBlockName("fill-color-4")})`,
                    offset: "100%"
                  }, null, 8, _hoisted_4$1)
                ], 8, _hoisted_2$5),
                vue.createElementVNode("linearGradient", {
                  id: `linearGradient-2-${vue.unref(id)}`,
                  x1: "0%",
                  y1: "9.5%",
                  x2: "100%",
                  y2: "90.5%"
                }, [
                  vue.createElementVNode("stop", {
                    "stop-color": `var(${vue.unref(ns).cssVarBlockName("fill-color-1")})`,
                    offset: "0%"
                  }, null, 8, _hoisted_6$1),
                  vue.createElementVNode("stop", {
                    "stop-color": `var(${vue.unref(ns).cssVarBlockName("fill-color-6")})`,
                    offset: "100%"
                  }, null, 8, _hoisted_7$1)
                ], 8, _hoisted_5$1),
                vue.createElementVNode("rect", {
                  id: `path-3-${vue.unref(id)}`,
                  x: "0",
                  y: "0",
                  width: "17",
                  height: "36"
                }, null, 8, _hoisted_8$1)
              ]),
              vue.createElementVNode("g", _hoisted_9$1, [
                vue.createElementVNode("g", _hoisted_10$1, [
                  vue.createElementVNode("g", _hoisted_11$1, [
                    vue.createElementVNode("path", {
                      id: "Oval-Copy-2",
                      d: "M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",
                      fill: `var(${vue.unref(ns).cssVarBlockName("fill-color-3")})`
                    }, null, 8, _hoisted_12),
                    vue.createElementVNode("polygon", {
                      id: "Rectangle-Copy-14",
                      fill: `var(${vue.unref(ns).cssVarBlockName("fill-color-7")})`,
                      transform: "translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",
                      points: "13 58 53 58 42 45 2 45"
                    }, null, 8, _hoisted_13),
                    vue.createElementVNode("g", _hoisted_14, [
                      vue.createElementVNode("polygon", {
                        id: "Rectangle-Copy-10",
                        fill: `var(${vue.unref(ns).cssVarBlockName("fill-color-7")})`,
                        transform: "translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",
                        points: "2.84078316e-14 3 18 3 23 7 5 7"
                      }, null, 8, _hoisted_15),
                      vue.createElementVNode("polygon", {
                        id: "Rectangle-Copy-11",
                        fill: `var(${vue.unref(ns).cssVarBlockName("fill-color-5")})`,
                        points: "-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"
                      }, null, 8, _hoisted_16),
                      vue.createElementVNode("rect", {
                        id: "Rectangle-Copy-12",
                        fill: `url(#linearGradient-1-${vue.unref(id)})`,
                        transform: "translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",
                        x: "38",
                        y: "7",
                        width: "17",
                        height: "36"
                      }, null, 8, _hoisted_17),
                      vue.createElementVNode("polygon", {
                        id: "Rectangle-Copy-13",
                        fill: `var(${vue.unref(ns).cssVarBlockName("fill-color-2")})`,
                        transform: "translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",
                        points: "24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"
                      }, null, 8, _hoisted_18)
                    ]),
                    vue.createElementVNode("rect", {
                      id: "Rectangle-Copy-15",
                      fill: `url(#linearGradient-2-${vue.unref(id)})`,
                      x: "13",
                      y: "45",
                      width: "40",
                      height: "36"
                    }, null, 8, _hoisted_19),
                    vue.createElementVNode("g", _hoisted_20, [
                      vue.createElementVNode("use", {
                        id: "Mask",
                        fill: `var(${vue.unref(ns).cssVarBlockName("fill-color-8")})`,
                        transform: "translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ",
                        "xlink:href": `#path-3-${vue.unref(id)}`
                      }, null, 8, _hoisted_21),
                      vue.createElementVNode("polygon", {
                        id: "Rectangle-Copy",
                        fill: `var(${vue.unref(ns).cssVarBlockName("fill-color-9")})`,
                        mask: `url(#mask-4-${vue.unref(id)})`,
                        transform: "translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",
                        points: "7 0 24 0 20 18 7 16.5"
                      }, null, 8, _hoisted_22)
                    ]),
                    vue.createElementVNode("polygon", {
                      id: "Rectangle-Copy-18",
                      fill: `var(${vue.unref(ns).cssVarBlockName("fill-color-2")})`,
                      transform: "translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",
                      points: "62 45 79 45 70 58 53 58"
                    }, null, 8, _hoisted_23)
                  ])
                ])
              ])
            ]);
          };
        }
      });
      var ImgEmpty = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__file", "img-empty.vue"]]);
      const emptyProps = buildProps({
        image: {
          type: String,
          default: ""
        },
        imageSize: Number,
        description: {
          type: String,
          default: ""
        }
      });
      const _hoisted_1$4 = ["src"];
      const _hoisted_2$4 = { key: 1 };
      const __default__ = vue.defineComponent({
        name: "ElEmpty"
      });
      const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
        ...__default__,
        props: emptyProps,
        setup(__props) {
          const props = __props;
          const { t } = useLocale();
          const ns = useNamespace("empty");
          const emptyDescription = vue.computed(() => props.description || t("el.table.emptyText"));
          const imageStyle = vue.computed(() => ({
            width: addUnit(props.imageSize)
          }));
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createElementBlock("div", {
              class: vue.normalizeClass(vue.unref(ns).b())
            }, [
              vue.createElementVNode("div", {
                class: vue.normalizeClass(vue.unref(ns).e("image")),
                style: vue.normalizeStyle(vue.unref(imageStyle))
              }, [
                _ctx.image ? (vue.openBlock(), vue.createElementBlock("img", {
                  key: 0,
                  src: _ctx.image,
                  ondragstart: "return false"
                }, null, 8, _hoisted_1$4)) : vue.renderSlot(_ctx.$slots, "image", { key: 1 }, () => [
                  vue.createVNode(ImgEmpty)
                ])
              ], 6),
              vue.createElementVNode("div", {
                class: vue.normalizeClass(vue.unref(ns).e("description"))
              }, [
                _ctx.$slots.description ? vue.renderSlot(_ctx.$slots, "description", { key: 0 }) : (vue.openBlock(), vue.createElementBlock("p", _hoisted_2$4, vue.toDisplayString(vue.unref(emptyDescription)), 1))
              ], 2),
              _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("div", {
                key: 0,
                class: vue.normalizeClass(vue.unref(ns).e("bottom"))
              }, [
                vue.renderSlot(_ctx.$slots, "default")
              ], 2)) : vue.createCommentVNode("v-if", true)
            ], 2);
          };
        }
      });
      var Empty = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["__file", "empty.vue"]]);
      const ElEmpty = withInstall(Empty);
      var zhCn = {
        name: "zh-cn",
        el: {
          breadcrumb: {
            label: "面包屑"
          },
          colorpicker: {
            confirm: "确定",
            clear: "清空"
          },
          datepicker: {
            now: "此刻",
            today: "今天",
            cancel: "取消",
            clear: "清空",
            confirm: "确定",
            selectDate: "选择日期",
            selectTime: "选择时间",
            startDate: "开始日期",
            startTime: "开始时间",
            endDate: "结束日期",
            endTime: "结束时间",
            prevYear: "前一年",
            nextYear: "后一年",
            prevMonth: "上个月",
            nextMonth: "下个月",
            year: "年",
            month1: "1 月",
            month2: "2 月",
            month3: "3 月",
            month4: "4 月",
            month5: "5 月",
            month6: "6 月",
            month7: "7 月",
            month8: "8 月",
            month9: "9 月",
            month10: "10 月",
            month11: "11 月",
            month12: "12 月",
            weeks: {
              sun: "日",
              mon: "一",
              tue: "二",
              wed: "三",
              thu: "四",
              fri: "五",
              sat: "六"
            },
            months: {
              jan: "一月",
              feb: "二月",
              mar: "三月",
              apr: "四月",
              may: "五月",
              jun: "六月",
              jul: "七月",
              aug: "八月",
              sep: "九月",
              oct: "十月",
              nov: "十一月",
              dec: "十二月"
            }
          },
          select: {
            loading: "加载中",
            noMatch: "无匹配数据",
            noData: "无数据",
            placeholder: "请选择"
          },
          cascader: {
            noMatch: "无匹配数据",
            loading: "加载中",
            placeholder: "请选择",
            noData: "暂无数据"
          },
          pagination: {
            goto: "前往",
            pagesize: "条/页",
            total: "共 {total} 条",
            pageClassifier: "页",
            page: "页",
            prev: "上一页",
            next: "下一页",
            currentPage: "第 {pager} 页",
            prevPages: "向前 {pager} 页",
            nextPages: "向后 {pager} 页",
            deprecationWarning: "你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"
          },
          messagebox: {
            title: "提示",
            confirm: "确定",
            cancel: "取消",
            error: "输入的数据不合法!"
          },
          upload: {
            deleteTip: "按 delete 键可删除",
            delete: "删除",
            preview: "查看图片",
            continue: "继续上传"
          },
          table: {
            emptyText: "暂无数据",
            confirmFilter: "筛选",
            resetFilter: "重置",
            clearFilter: "全部",
            sumText: "合计"
          },
          tour: {
            next: "下一步",
            previous: "上一步",
            finish: "结束导览"
          },
          tree: {
            emptyText: "暂无数据"
          },
          transfer: {
            noMatch: "无匹配数据",
            noData: "无数据",
            titles: ["列表 1", "列表 2"],
            filterPlaceholder: "请输入搜索内容",
            noCheckedFormat: "共 {total} 项",
            hasCheckedFormat: "已选 {checked}/{total} 项"
          },
          image: {
            error: "加载失败"
          },
          pageHeader: {
            title: "返回"
          },
          popconfirm: {
            confirmButtonText: "确定",
            cancelButtonText: "取消"
          },
          carousel: {
            leftArrow: "上一张幻灯片",
            rightArrow: "下一张幻灯片",
            indicator: "幻灯片切换至索引 {index}"
          }
        }
      };
      var _GM_getValue = /* @__PURE__ */ (() => typeof GM_getValue != "undefined" ? GM_getValue : void 0)();
      var _GM_setValue = /* @__PURE__ */ (() => typeof GM_setValue != "undefined" ? GM_setValue : void 0)();
      var _unsafeWindow = /* @__PURE__ */ (() => typeof unsafeWindow != "undefined" ? unsafeWindow : void 0)();
      var _monkeyWindow = /* @__PURE__ */ (() => window)();
      const imageServer = [
        "https://sns-img-hw.xhscdn.net/",
        "https://sns-img-bd.xhscdn.com/",
        "https://sns-img-qn.xhscdn.com/",
        "https://sns-img-qc.xhscdn.com/"
      ];
      const videoServer = [
        "https://sns-video-hw.xhscdn.com/",
        "https://sns-video-bd.xhscdn.com/",
        "https://sns-video-al.xhscdn.com/"
      ];
      const script_state_storage_key = "script_state_storage";
      const jpgParams = "imageView2/2/w/format/jpeg";
      const keyReg = new RegExp("(?<=\\/)(spectrum\\/)?[a-z0-9A-Z]+(?=!)");
      const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-83ac9659"), n = n(), vue.popScopeId(), n);
      const _hoisted_1$3 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("svg", {
        t: "1716977925741",
        viewBox: "0 0 1024 1024",
        version: "1.1",
        xmlns: "http://www.w3.org/2000/svg",
        "p-id": "2481",
        width: "20",
        height: "20"
      }, [
        /* @__PURE__ */ vue.createElementVNode("path", {
          d: "M341.333333 640a42.666667 42.666667 0 0 1-42.666666 42.666667H256a170.666667 170.666667 0 0 1-40.277333-336.554667 298.709333 298.709333 0 0 1 570.154666-81.408A213.333333 213.333333 0 0 1 725.333333 682.666667a42.666667 42.666667 0 0 1 0.042667-85.333334 128 128 0 0 0 36.394667-250.794666l-38.144-11.264-15.914667-36.437334a213.376 213.376 0 0 0-407.296 58.026667l-7.381333 58.368-57.173334 13.824A85.418667 85.418667 0 0 0 256 597.333333h42.666667a42.666667 42.666667 0 0 1 42.666666 42.666667z m321.706667 87.338667a42.666667 42.666667 0 0 1 0 60.330666l-120.917333 120.832c-16.682667 16.64-43.690667 16.64-60.373334 0l-120.917333-120.832a42.666667 42.666667 0 0 1 60.330667-60.330666L469.333333 775.509333V426.666667a42.666667 42.666667 0 0 1 85.333334 0v348.714666l48.042666-48.042666a42.666667 42.666667 0 0 1 60.330667 0z",
          fill: "#ffffff",
          "p-id": "2482"
        })
      ], -1));
      const _hoisted_2$3 = [
        _hoisted_1$3
      ];
      const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
        __name: "float-button",
        emits: ["click", "dbClick"],
        setup(__props, { emit: __emit }) {
          const emit = __emit;
          const btnRef = vue.ref();
          const btnState = vue.reactive({
            // 是否有right类
            rightClass: false,
            // 是否激活
            activeClass: false,
            left: "0px",
            top: "45%"
          });
          let maxTop = 0;
          let maxLeft = 0;
          let isMove = false;
          let innerTop = 0;
          let innerLeft = 0;
          let duration = 0;
          let timeOut;
          function initState() {
            var _a2, _b;
            maxTop = window.innerHeight - ((_a2 = btnRef.value) == null ? void 0 : _a2.clientHeight);
            maxLeft = window.innerWidth - ((_b = btnRef.value) == null ? void 0 : _b.clientWidth);
            if (btnState.rightClass) {
              btnState.left = maxLeft + "px";
            }
          }
          function btnHover(flag) {
            if (flag) {
              btnState.activeClass = true;
            } else if (!flag && !isMove) {
              btnState.activeClass = false;
            }
          }
          function handleBtnMousedown(event) {
            var _a2, _b;
            duration = Date.now();
            isMove = true;
            innerTop = event.pageY - ((_a2 = btnRef.value) == null ? void 0 : _a2.offsetTop);
            innerLeft = event.pageX - ((_b = btnRef.value) == null ? void 0 : _b.offsetLeft);
          }
          function handleWindowMouseMove(event) {
            if (!isMove)
              return;
            let top = event.pageY - innerTop;
            let left = event.pageX - innerLeft;
            if (top < 0) {
              top = 0;
            } else if (top > maxTop) {
              top = maxTop;
            }
            if (left < 0) {
              left = 0;
            } else if (left > maxLeft) {
              left = maxLeft;
            }
            btnState.left = left + "px";
            btnState.top = top + "px";
          }
          function handleWindowMouseUp() {
            var _a2;
            if (!isMove)
              return;
            duration = Date.now() - duration;
            isMove = false;
            const left = (_a2 = btnRef.value) == null ? void 0 : _a2.offsetLeft;
            if (!(left == 0 || left == maxLeft)) {
              btnState.activeClass = false;
            }
            if (left > maxLeft / 2) {
              btnState.rightClass = true;
              btnState.left = maxLeft + "px";
            } else {
              btnState.rightClass = false;
              btnState.left = "0px";
            }
            _GM_setValue(script_state_storage_key, btnState);
          }
          function handleBtnClick() {
            if (duration > 300)
              return;
            clearTimeout(timeOut);
            timeOut = setTimeout(() => {
              console.log("单击");
              emit("click");
            }, 300);
          }
          function handleBtnDbClick() {
            clearTimeout(timeOut);
            console.log("双击");
            emit("dbClick");
          }
          vue.onMounted(() => {
            initState();
            window.onresize = () => {
              initState();
              _GM_setValue(script_state_storage_key, btnState);
            };
            window.onmousemove = handleWindowMouseMove;
            window.onmouseup = handleWindowMouseUp;
            const btnData = _GM_getValue(script_state_storage_key);
            if (btnData) {
              Object.assign(btnState, btnData);
            }
          });
          vue.onUnmounted(() => {
            window.onmousemove = null;
            window.onmouseup = null;
          });
          return (_ctx, _cache) => {
            return vue.openBlock(), vue.createElementBlock("div", {
              ref_key: "btnRef",
              ref: btnRef,
              title: "下载媒体",
              class: vue.normalizeClass({
                "xiaohongshu-download-float-btn": true,
                right: vue.unref(btnState).rightClass,
                active: vue.unref(btnState).activeClass
              }),
              style: vue.normalizeStyle({ top: vue.unref(btnState).top, left: vue.unref(btnState).left }),
              onMouseenter: _cache[0] || (_cache[0] = ($event) => btnHover(true)),
              onMouseleave: _cache[1] || (_cache[1] = ($event) => btnHover(false)),
              onMousedown: handleBtnMousedown,
              onClick: handleBtnClick,
              onDblclick: handleBtnDbClick
            }, _hoisted_2$3, 38);
          };
        }
      });
      const _export_sfc = (sfc, props) => {
        const target = sfc.__vccOpts || sfc;
        for (const [key, val] of props) {
          target[key] = val;
        }
        return target;
      };
      const floatButton = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-83ac9659"]]);
      /*!
       * Viewer.js v1.11.6
       * https://fengyuanchen.github.io/viewerjs
       *
       * Copyright 2015-present Chen Fengyuan
       * Released under the MIT license
       *
       * Date: 2023-09-17T03:16:38.052Z
       */
      function ownKeys(e, r) {
        var t = Object.keys(e);
        if (Object.getOwnPropertySymbols) {
          var o = Object.getOwnPropertySymbols(e);
          r && (o = o.filter(function(r2) {
            return Object.getOwnPropertyDescriptor(e, r2).enumerable;
          })), t.push.apply(t, o);
        }
        return t;
      }
      function _objectSpread2(e) {
        for (var r = 1; r < arguments.length; r++) {
          var t = null != arguments[r] ? arguments[r] : {};
          r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
            _defineProperty(e, r2, t[r2]);
          }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
            Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
          });
        }
        return e;
      }
      function _typeof(o) {
        "@babel/helpers - typeof";
        return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
          return typeof o2;
        } : function(o2) {
          return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
        }, _typeof(o);
      }
      function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
          throw new TypeError("Cannot call a class as a function");
        }
      }
      function _defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];
          descriptor.enumerable = descriptor.enumerable || false;
          descriptor.configurable = true;
          if ("value" in descriptor)
            descriptor.writable = true;
          Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
        }
      }
      function _createClass(Constructor, protoProps, staticProps) {
        if (protoProps)
          _defineProperties(Constructor.prototype, protoProps);
        if (staticProps)
          _defineProperties(Constructor, staticProps);
        Object.defineProperty(Constructor, "prototype", {
          writable: false
        });
        return Constructor;
      }
      function _defineProperty(obj, key, value) {
        key = _toPropertyKey(key);
        if (key in obj) {
          Object.defineProperty(obj, key, {
            value,
            enumerable: true,
            configurable: true,
            writable: true
          });
        } else {
          obj[key] = value;
        }
        return obj;
      }
      function _toPrimitive(input, hint) {
        if (typeof input !== "object" || input === null)
          return input;
        var prim = input[Symbol.toPrimitive];
        if (prim !== void 0) {
          var res = prim.call(input, hint || "default");
          if (typeof res !== "object")
            return res;
          throw new TypeError("@@toPrimitive must return a primitive value.");
        }
        return (hint === "string" ? String : Number)(input);
      }
      function _toPropertyKey(arg) {
        var key = _toPrimitive(arg, "string");
        return typeof key === "symbol" ? key : String(key);
      }
      var DEFAULTS = {
        /**
         * Enable a modal backdrop, specify `static` for a backdrop
         * which doesn't close the modal on click.
         * @type {boolean}
         */
        backdrop: true,
        /**
         * Show the button on the top-right of the viewer.
         * @type {boolean}
         */
        button: true,
        /**
         * Show the navbar.
         * @type {boolean | number}
         */
        navbar: true,
        /**
         * Specify the visibility and the content of the title.
         * @type {boolean | number | Function | Array}
         */
        title: true,
        /**
         * Show the toolbar.
         * @type {boolean | number | Object}
         */
        toolbar: true,
        /**
         * Custom class name(s) to add to the viewer's root element.
         * @type {string}
         */
        className: "",
        /**
         * Define where to put the viewer in modal mode.
         * @type {string | Element}
         */
        container: "body",
        /**
         * Filter the images for viewing. Return true if the image is viewable.
         * @type {Function}
         */
        filter: null,
        /**
         * Enable to request fullscreen when play.
         * {@link https://developer.mozilla.org/en-US/docs/Web/API/FullscreenOptions}
         * @type {boolean|FullscreenOptions}
         */
        fullscreen: true,
        /**
         * Define the extra attributes to inherit from the original image.
         * @type {Array}
         */
        inheritedAttributes: ["crossOrigin", "decoding", "isMap", "loading", "referrerPolicy", "sizes", "srcset", "useMap"],
        /**
         * Define the initial coverage of the viewing image.
         * @type {number}
         */
        initialCoverage: 0.9,
        /**
         * Define the initial index of the image for viewing.
         * @type {number}
         */
        initialViewIndex: 0,
        /**
         * Enable inline mode.
         * @type {boolean}
         */
        inline: false,
        /**
         * The amount of time to delay between automatically cycling an image when playing.
         * @type {number}
         */
        interval: 5e3,
        /**
         * Enable keyboard support.
         * @type {boolean}
         */
        keyboard: true,
        /**
         * Focus the viewer when initialized.
         * @type {boolean}
         */
        focus: true,
        /**
         * Indicate if show a loading spinner when load image or not.
         * @type {boolean}
         */
        loading: true,
        /**
         * Indicate if enable loop viewing or not.
         * @type {boolean}
         */
        loop: true,
        /**
         * Min width of the viewer in inline mode.
         * @type {number}
         */
        minWidth: 200,
        /**
         * Min height of the viewer in inline mode.
         * @type {number}
         */
        minHeight: 100,
        /**
         * Enable to move the image.
         * @type {boolean}
         */
        movable: true,
        /**
         * Enable to rotate the image.
         * @type {boolean}
         */
        rotatable: true,
        /**
         * Enable to scale the image.
         * @type {boolean}
         */
        scalable: true,
        /**
         * Enable to zoom the image.
         * @type {boolean}
         */
        zoomable: true,
        /**
         * Enable to zoom the current image by dragging on the touch screen.
         * @type {boolean}
         */
        zoomOnTouch: true,
        /**
         * Enable to zoom the image by wheeling mouse.
         * @type {boolean}
         */
        zoomOnWheel: true,
        /**
         * Enable to slide to the next or previous image by swiping on the touch screen.
         * @type {boolean}
         */
        slideOnTouch: true,
        /**
         * Indicate if toggle the image size between its natural size
         * and initial size when double click on the image or not.
         * @type {boolean}
         */
        toggleOnDblclick: true,
        /**
         * Show the tooltip with image ratio (percentage) when zoom in or zoom out.
         * @type {boolean}
         */
        tooltip: true,
        /**
         * Enable CSS3 Transition for some special elements.
         * @type {boolean}
         */
        transition: true,
        /**
         * Define the CSS `z-index` value of viewer in modal mode.
         * @type {number}
         */
        zIndex: 2015,
        /**
         * Define the CSS `z-index` value of viewer in inline mode.
         * @type {number}
         */
        zIndexInline: 0,
        /**
         * Define the ratio when zoom the image by wheeling mouse.
         * @type {number}
         */
        zoomRatio: 0.1,
        /**
         * Define the min ratio of the image when zoom out.
         * @type {number}
         */
        minZoomRatio: 0.01,
        /**
         * Define the max ratio of the image when zoom in.
         * @type {number}
         */
        maxZoomRatio: 100,
        /**
         * Define where to get the original image URL for viewing.
         * @type {string | Function}
         */
        url: "src",
        /**
         * Event shortcuts.
         * @type {Function}
         */
        ready: null,
        show: null,
        shown: null,
        hide: null,
        hidden: null,
        view: null,
        viewed: null,
        move: null,
        moved: null,
        rotate: null,
        rotated: null,
        scale: null,
        scaled: null,
        zoom: null,
        zoomed: null,
        play: null,
        stop: null
      };
      var TEMPLATE = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>';
      var IS_BROWSER = typeof window !== "undefined" && typeof window.document !== "undefined";
      var WINDOW = IS_BROWSER ? window : {};
      var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? "ontouchstart" in WINDOW.document.documentElement : false;
      var HAS_POINTER_EVENT = IS_BROWSER ? "PointerEvent" in WINDOW : false;
      var NAMESPACE = "viewer";
      var ACTION_MOVE = "move";
      var ACTION_SWITCH = "switch";
      var ACTION_ZOOM = "zoom";
      var CLASS_ACTIVE = "".concat(NAMESPACE, "-active");
      var CLASS_CLOSE = "".concat(NAMESPACE, "-close");
      var CLASS_FADE = "".concat(NAMESPACE, "-fade");
      var CLASS_FIXED = "".concat(NAMESPACE, "-fixed");
      var CLASS_FULLSCREEN = "".concat(NAMESPACE, "-fullscreen");
      var CLASS_FULLSCREEN_EXIT = "".concat(NAMESPACE, "-fullscreen-exit");
      var CLASS_HIDE = "".concat(NAMESPACE, "-hide");
      var CLASS_HIDE_MD_DOWN = "".concat(NAMESPACE, "-hide-md-down");
      var CLASS_HIDE_SM_DOWN = "".concat(NAMESPACE, "-hide-sm-down");
      var CLASS_HIDE_XS_DOWN = "".concat(NAMESPACE, "-hide-xs-down");
      var CLASS_IN = "".concat(NAMESPACE, "-in");
      var CLASS_INVISIBLE = "".concat(NAMESPACE, "-invisible");
      var CLASS_LOADING = "".concat(NAMESPACE, "-loading");
      var CLASS_MOVE = "".concat(NAMESPACE, "-move");
      var CLASS_OPEN = "".concat(NAMESPACE, "-open");
      var CLASS_SHOW = "".concat(NAMESPACE, "-show");
      var CLASS_TRANSITION = "".concat(NAMESPACE, "-transition");
      var EVENT_CLICK = "click";
      var EVENT_DBLCLICK = "dblclick";
      var EVENT_DRAG_START = "dragstart";
      var EVENT_FOCUSIN = "focusin";
      var EVENT_KEY_DOWN = "keydown";
      var EVENT_LOAD = "load";
      var EVENT_ERROR = "error";
      var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? "touchend touchcancel" : "mouseup";
      var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? "touchmove" : "mousemove";
      var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? "touchstart" : "mousedown";
      var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? "pointerdown" : EVENT_TOUCH_START;
      var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? "pointermove" : EVENT_TOUCH_MOVE;
      var EVENT_POINTER_UP = HAS_POINTER_EVENT ? "pointerup pointercancel" : EVENT_TOUCH_END;
      var EVENT_RESIZE = "resize";
      var EVENT_TRANSITION_END = "transitionend";
      var EVENT_WHEEL = "wheel";
      var EVENT_READY = "ready";
      var EVENT_SHOW = "show";
      var EVENT_SHOWN = "shown";
      var EVENT_HIDE = "hide";
      var EVENT_HIDDEN = "hidden";
      var EVENT_VIEW = "view";
      var EVENT_VIEWED = "viewed";
      var EVENT_MOVE = "move";
      var EVENT_MOVED = "moved";
      var EVENT_ROTATE = "rotate";
      var EVENT_ROTATED = "rotated";
      var EVENT_SCALE = "scale";
      var EVENT_SCALED = "scaled";
      var EVENT_ZOOM = "zoom";
      var EVENT_ZOOMED = "zoomed";
      var EVENT_PLAY = "play";
      var EVENT_STOP = "stop";
      var DATA_ACTION = "".concat(NAMESPACE, "Action");
      var REGEXP_SPACES = /\s\s*/;
      var BUTTONS = ["zoom-in", "zoom-out", "one-to-one", "reset", "prev", "play", "next", "rotate-left", "rotate-right", "flip-horizontal", "flip-vertical"];
      function isString(value) {
        return typeof value === "string";
      }
      var isNaN$1 = Number.isNaN || WINDOW.isNaN;
      function isNumber(value) {
        return typeof value === "number" && !isNaN$1(value);
      }
      function isUndefined(value) {
        return typeof value === "undefined";
      }
      function isObject(value) {
        return _typeof(value) === "object" && value !== null;
      }
      var hasOwnProperty = Object.prototype.hasOwnProperty;
      function isPlainObject(value) {
        if (!isObject(value)) {
          return false;
        }
        try {
          var _constructor = value.constructor;
          var prototype = _constructor.prototype;
          return _constructor && prototype && hasOwnProperty.call(prototype, "isPrototypeOf");
        } catch (error) {
          return false;
        }
      }
      function isFunction(value) {
        return typeof value === "function";
      }
      function forEach(data, callback) {
        if (data && isFunction(callback)) {
          if (Array.isArray(data) || isNumber(data.length)) {
            var length = data.length;
            var i;
            for (i = 0; i < length; i += 1) {
              if (callback.call(data, data[i], i, data) === false) {
                break;
              }
            }
          } else if (isObject(data)) {
            Object.keys(data).forEach(function(key) {
              callback.call(data, data[key], key, data);
            });
          }
        }
        return data;
      }
      var assign = Object.assign || function assign2(obj) {
        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          args[_key - 1] = arguments[_key];
        }
        if (isObject(obj) && args.length > 0) {
          args.forEach(function(arg) {
            if (isObject(arg)) {
              Object.keys(arg).forEach(function(key) {
                obj[key] = arg[key];
              });
            }
          });
        }
        return obj;
      };
      var REGEXP_SUFFIX = /^(?:width|height|left|top|marginLeft|marginTop)$/;
      function setStyle(element, styles) {
        var style = element.style;
        forEach(styles, function(value, property) {
          if (REGEXP_SUFFIX.test(property) && isNumber(value)) {
            value += "px";
          }
          style[property] = value;
        });
      }
      function escapeHTMLEntities(value) {
        return isString(value) ? value.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;") : value;
      }
      function hasClass(element, value) {
        if (!element || !value) {
          return false;
        }
        return element.classList ? element.classList.contains(value) : element.className.indexOf(value) > -1;
      }
      function addClass(element, value) {
        if (!element || !value) {
          return;
        }
        if (isNumber(element.length)) {
          forEach(element, function(elem) {
            addClass(elem, value);
          });
          return;
        }
        if (element.classList) {
          element.classList.add(value);
          return;
        }
        var className = element.className.trim();
        if (!className) {
          element.className = value;
        } else if (className.indexOf(value) < 0) {
          element.className = "".concat(className, " ").concat(value);
        }
      }
      function removeClass(element, value) {
        if (!element || !value) {
          return;
        }
        if (isNumber(element.length)) {
          forEach(element, function(elem) {
            removeClass(elem, value);
          });
          return;
        }
        if (element.classList) {
          element.classList.remove(value);
          return;
        }
        if (element.className.indexOf(value) >= 0) {
          element.className = element.className.replace(value, "");
        }
      }
      function toggleClass(element, value, added) {
        if (!value) {
          return;
        }
        if (isNumber(element.length)) {
          forEach(element, function(elem) {
            toggleClass(elem, value, added);
          });
          return;
        }
        if (added) {
          addClass(element, value);
        } else {
          removeClass(element, value);
        }
      }
      var REGEXP_HYPHENATE = /([a-z\d])([A-Z])/g;
      function hyphenate(value) {
        return value.replace(REGEXP_HYPHENATE, "$1-$2").toLowerCase();
      }
      function getData(element, name) {
        if (isObject(element[name])) {
          return element[name];
        }
        if (element.dataset) {
          return element.dataset[name];
        }
        return element.getAttribute("data-".concat(hyphenate(name)));
      }
      function setData(element, name, data) {
        if (isObject(data)) {
          element[name] = data;
        } else if (element.dataset) {
          element.dataset[name] = data;
        } else {
          element.setAttribute("data-".concat(hyphenate(name)), data);
        }
      }
      var onceSupported = function() {
        var supported = false;
        if (IS_BROWSER) {
          var once = false;
          var listener = function listener2() {
          };
          var options = Object.defineProperty({}, "once", {
            get: function get2() {
              supported = true;
              return once;
            },
            /**
             * This setter can fix a `TypeError` in strict mode
             * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}
             * @param {boolean} value - The value to set
             */
            set: function set2(value) {
              once = value;
            }
          });
          WINDOW.addEventListener("test", listener, options);
          WINDOW.removeEventListener("test", listener, options);
        }
        return supported;
      }();
      function removeListener(element, type, listener) {
        var options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
        var handler = listener;
        type.trim().split(REGEXP_SPACES).forEach(function(event) {
          if (!onceSupported) {
            var listeners = element.listeners;
            if (listeners && listeners[event] && listeners[event][listener]) {
              handler = listeners[event][listener];
              delete listeners[event][listener];
              if (Object.keys(listeners[event]).length === 0) {
                delete listeners[event];
              }
              if (Object.keys(listeners).length === 0) {
                delete element.listeners;
              }
            }
          }
          element.removeEventListener(event, handler, options);
        });
      }
      function addListener(element, type, listener) {
        var options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
        var _handler = listener;
        type.trim().split(REGEXP_SPACES).forEach(function(event) {
          if (options.once && !onceSupported) {
            var _element$listeners = element.listeners, listeners = _element$listeners === void 0 ? {} : _element$listeners;
            _handler = function handler() {
              delete listeners[event][listener];
              element.removeEventListener(event, _handler, options);
              for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
                args[_key2] = arguments[_key2];
              }
              listener.apply(element, args);
            };
            if (!listeners[event]) {
              listeners[event] = {};
            }
            if (listeners[event][listener]) {
              element.removeEventListener(event, listeners[event][listener], options);
            }
            listeners[event][listener] = _handler;
            element.listeners = listeners;
          }
          element.addEventListener(event, _handler, options);
        });
      }
      function dispatchEvent(element, type, data, options) {
        var event;
        if (isFunction(Event) && isFunction(CustomEvent)) {
          event = new CustomEvent(type, _objectSpread2({
            bubbles: true,
            cancelable: true,
            detail: data
          }, options));
        } else {
          event = document.createEvent("CustomEvent");
          event.initCustomEvent(type, true, true, data);
        }
        return element.dispatchEvent(event);
      }
      function getOffset(element) {
        var box = element.getBoundingClientRect();
        return {
          left: box.left + (window.pageXOffset - document.documentElement.clientLeft),
          top: box.top + (window.pageYOffset - document.documentElement.clientTop)
        };
      }
      function getTransforms(_ref) {
        var rotate = _ref.rotate, scaleX = _ref.scaleX, scaleY = _ref.scaleY, translateX = _ref.translateX, translateY = _ref.translateY;
        var values = [];
        if (isNumber(translateX) && translateX !== 0) {
          values.push("translateX(".concat(translateX, "px)"));
        }
        if (isNumber(translateY) && translateY !== 0) {
          values.push("translateY(".concat(translateY, "px)"));
        }
        if (isNumber(rotate) && rotate !== 0) {
          values.push("rotate(".concat(rotate, "deg)"));
        }
        if (isNumber(scaleX) && scaleX !== 1) {
          values.push("scaleX(".concat(scaleX, ")"));
        }
        if (isNumber(scaleY) && scaleY !== 1) {
          values.push("scaleY(".concat(scaleY, ")"));
        }
        var transform = values.length ? values.join(" ") : "none";
        return {
          WebkitTransform: transform,
          msTransform: transform,
          transform
        };
      }
      function getImageNameFromURL(url) {
        return isString(url) ? decodeURIComponent(url.replace(/^.*\//, "").replace(/[?&#].*$/, "")) : "";
      }
      var IS_SAFARI = WINDOW.navigator && /Version\/\d+(\.\d+)+?\s+Safari/i.test(WINDOW.navigator.userAgent);
      function getImageNaturalSizes(image, options, callback) {
        var newImage = document.createElement("img");
        if (image.naturalWidth && !IS_SAFARI) {
          callback(image.naturalWidth, image.naturalHeight);
          return newImage;
        }
        var body = document.body || document.documentElement;
        newImage.onload = function() {
          callback(newImage.width, newImage.height);
          if (!IS_SAFARI) {
            body.removeChild(newImage);
          }
        };
        forEach(options.inheritedAttributes, function(name) {
          var value = image.getAttribute(name);
          if (value !== null) {
            newImage.setAttribute(name, value);
          }
        });
        newImage.src = image.src;
        if (!IS_SAFARI) {
          newImage.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;";
          body.appendChild(newImage);
        }
        return newImage;
      }
      function getResponsiveClass(type) {
        switch (type) {
          case 2:
            return CLASS_HIDE_XS_DOWN;
          case 3:
            return CLASS_HIDE_SM_DOWN;
          case 4:
            return CLASS_HIDE_MD_DOWN;
          default:
            return "";
        }
      }
      function getMaxZoomRatio(pointers) {
        var pointers2 = _objectSpread2({}, pointers);
        var ratios = [];
        forEach(pointers, function(pointer, pointerId) {
          delete pointers2[pointerId];
          forEach(pointers2, function(pointer2) {
            var x1 = Math.abs(pointer.startX - pointer2.startX);
            var y1 = Math.abs(pointer.startY - pointer2.startY);
            var x2 = Math.abs(pointer.endX - pointer2.endX);
            var y2 = Math.abs(pointer.endY - pointer2.endY);
            var z1 = Math.sqrt(x1 * x1 + y1 * y1);
            var z2 = Math.sqrt(x2 * x2 + y2 * y2);
            var ratio = (z2 - z1) / z1;
            ratios.push(ratio);
          });
        });
        ratios.sort(function(a, b2) {
          return Math.abs(a) < Math.abs(b2);
        });
        return ratios[0];
      }
      function getPointer(_ref2, endOnly) {
        var pageX = _ref2.pageX, pageY = _ref2.pageY;
        var end = {
          endX: pageX,
          endY: pageY
        };
        return endOnly ? end : _objectSpread2({
          timeStamp: Date.now(),
          startX: pageX,
          startY: pageY
        }, end);
      }
      function getPointersCenter(pointers) {
        var pageX = 0;
        var pageY = 0;
        var count = 0;
        forEach(pointers, function(_ref3) {
          var startX = _ref3.startX, startY = _ref3.startY;
          pageX += startX;
          pageY += startY;
          count += 1;
        });
        pageX /= count;
        pageY /= count;
        return {
          pageX,
          pageY
        };
      }
      var render = {
        render: function render2() {
          this.initContainer();
          this.initViewer();
          this.initList();
          this.renderViewer();
        },
        initBody: function initBody() {
          var ownerDocument = this.element.ownerDocument;
          var body = ownerDocument.body || ownerDocument.documentElement;
          this.body = body;
          this.scrollbarWidth = window.innerWidth - ownerDocument.documentElement.clientWidth;
          this.initialBodyPaddingRight = body.style.paddingRight;
          this.initialBodyComputedPaddingRight = window.getComputedStyle(body).paddingRight;
        },
        initContainer: function initContainer() {
          this.containerData = {
            width: window.innerWidth,
            height: window.innerHeight
          };
        },
        initViewer: function initViewer() {
          var options = this.options, parent = this.parent;
          var viewerData;
          if (options.inline) {
            viewerData = {
              width: Math.max(parent.offsetWidth, options.minWidth),
              height: Math.max(parent.offsetHeight, options.minHeight)
            };
            this.parentData = viewerData;
          }
          if (this.fulled || !viewerData) {
            viewerData = this.containerData;
          }
          this.viewerData = assign({}, viewerData);
        },
        renderViewer: function renderViewer() {
          if (this.options.inline && !this.fulled) {
            setStyle(this.viewer, this.viewerData);
          }
        },
        initList: function initList() {
          var _this = this;
          var element = this.element, options = this.options, list = this.list;
          var items = [];
          list.innerHTML = "";
          forEach(this.images, function(image, index) {
            var src = image.src;
            var alt = image.alt || getImageNameFromURL(src);
            var url = _this.getImageURL(image);
            if (src || url) {
              var item = document.createElement("li");
              var img = document.createElement("img");
              forEach(options.inheritedAttributes, function(name) {
                var value = image.getAttribute(name);
                if (value !== null) {
                  img.setAttribute(name, value);
                }
              });
              if (options.navbar) {
                img.src = src || url;
              }
              img.alt = alt;
              img.setAttribute("data-original-url", url || src);
              item.setAttribute("data-index", index);
              item.setAttribute("data-viewer-action", "view");
              item.setAttribute("role", "button");
              if (options.keyboard) {
                item.setAttribute("tabindex", 0);
              }
              item.appendChild(img);
              list.appendChild(item);
              items.push(item);
            }
          });
          this.items = items;
          forEach(items, function(item) {
            var image = item.firstElementChild;
            var onLoad;
            var onError;
            setData(image, "filled", true);
            if (options.loading) {
              addClass(item, CLASS_LOADING);
            }
            addListener(image, EVENT_LOAD, onLoad = function onLoad2(event) {
              removeListener(image, EVENT_ERROR, onError);
              if (options.loading) {
                removeClass(item, CLASS_LOADING);
              }
              _this.loadImage(event);
            }, {
              once: true
            });
            addListener(image, EVENT_ERROR, onError = function onError2() {
              removeListener(image, EVENT_LOAD, onLoad);
              if (options.loading) {
                removeClass(item, CLASS_LOADING);
              }
            }, {
              once: true
            });
          });
          if (options.transition) {
            addListener(element, EVENT_VIEWED, function() {
              addClass(list, CLASS_TRANSITION);
            }, {
              once: true
            });
          }
        },
        renderList: function renderList2() {
          var index = this.index;
          var item = this.items[index];
          if (!item) {
            return;
          }
          var next = item.nextElementSibling;
          var gutter = parseInt(window.getComputedStyle(next || item).marginLeft, 10);
          var offsetWidth = item.offsetWidth;
          var outerWidth = offsetWidth + gutter;
          setStyle(this.list, assign({
            width: outerWidth * this.length - gutter
          }, getTransforms({
            translateX: (this.viewerData.width - offsetWidth) / 2 - outerWidth * index
          })));
        },
        resetList: function resetList() {
          var list = this.list;
          list.innerHTML = "";
          removeClass(list, CLASS_TRANSITION);
          setStyle(list, getTransforms({
            translateX: 0
          }));
        },
        initImage: function initImage(done) {
          var _this2 = this;
          var options = this.options, image = this.image, viewerData = this.viewerData;
          var footerHeight = this.footer.offsetHeight;
          var viewerWidth = viewerData.width;
          var viewerHeight = Math.max(viewerData.height - footerHeight, footerHeight);
          var oldImageData = this.imageData || {};
          var sizingImage;
          this.imageInitializing = {
            abort: function abort() {
              sizingImage.onload = null;
            }
          };
          sizingImage = getImageNaturalSizes(image, options, function(naturalWidth, naturalHeight) {
            var aspectRatio = naturalWidth / naturalHeight;
            var initialCoverage = Math.max(0, Math.min(1, options.initialCoverage));
            var width = viewerWidth;
            var height = viewerHeight;
            _this2.imageInitializing = false;
            if (viewerHeight * aspectRatio > viewerWidth) {
              height = viewerWidth / aspectRatio;
            } else {
              width = viewerHeight * aspectRatio;
            }
            initialCoverage = isNumber(initialCoverage) ? initialCoverage : 0.9;
            width = Math.min(width * initialCoverage, naturalWidth);
            height = Math.min(height * initialCoverage, naturalHeight);
            var left = (viewerWidth - width) / 2;
            var top = (viewerHeight - height) / 2;
            var imageData = {
              left,
              top,
              x: left,
              y: top,
              width,
              height,
              oldRatio: 1,
              ratio: width / naturalWidth,
              aspectRatio,
              naturalWidth,
              naturalHeight
            };
            var initialImageData = assign({}, imageData);
            if (options.rotatable) {
              imageData.rotate = oldImageData.rotate || 0;
              initialImageData.rotate = 0;
            }
            if (options.scalable) {
              imageData.scaleX = oldImageData.scaleX || 1;
              imageData.scaleY = oldImageData.scaleY || 1;
              initialImageData.scaleX = 1;
              initialImageData.scaleY = 1;
            }
            _this2.imageData = imageData;
            _this2.initialImageData = initialImageData;
            if (done) {
              done();
            }
          });
        },
        renderImage: function renderImage(done) {
          var _this3 = this;
          var image = this.image, imageData = this.imageData;
          setStyle(image, assign({
            width: imageData.width,
            height: imageData.height,
            // XXX: Not to use translateX/Y to avoid image shaking when zooming
            marginLeft: imageData.x,
            marginTop: imageData.y
          }, getTransforms(imageData)));
          if (done) {
            if ((this.viewing || this.moving || this.rotating || this.scaling || this.zooming) && this.options.transition && hasClass(image, CLASS_TRANSITION)) {
              var onTransitionEnd = function onTransitionEnd2() {
                _this3.imageRendering = false;
                done();
              };
              this.imageRendering = {
                abort: function abort() {
                  removeListener(image, EVENT_TRANSITION_END, onTransitionEnd);
                }
              };
              addListener(image, EVENT_TRANSITION_END, onTransitionEnd, {
                once: true
              });
            } else {
              done();
            }
          }
        },
        resetImage: function resetImage() {
          var image = this.image;
          if (image) {
            if (this.viewing) {
              this.viewing.abort();
            }
            image.parentNode.removeChild(image);
            this.image = null;
            this.title.innerHTML = "";
          }
        }
      };
      var events = {
        bind: function bind() {
          var options = this.options, viewer = this.viewer, canvas = this.canvas;
          var document2 = this.element.ownerDocument;
          addListener(viewer, EVENT_CLICK, this.onClick = this.click.bind(this));
          addListener(viewer, EVENT_DRAG_START, this.onDragStart = this.dragstart.bind(this));
          addListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this));
          addListener(document2, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this));
          addListener(document2, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this));
          addListener(document2, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this));
          addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this));
          if (options.zoomable && options.zoomOnWheel) {
            addListener(viewer, EVENT_WHEEL, this.onWheel = this.wheel.bind(this), {
              passive: false,
              capture: true
            });
          }
          if (options.toggleOnDblclick) {
            addListener(canvas, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this));
          }
        },
        unbind: function unbind() {
          var options = this.options, viewer = this.viewer, canvas = this.canvas;
          var document2 = this.element.ownerDocument;
          removeListener(viewer, EVENT_CLICK, this.onClick);
          removeListener(viewer, EVENT_DRAG_START, this.onDragStart);
          removeListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown);
          removeListener(document2, EVENT_POINTER_MOVE, this.onPointerMove);
          removeListener(document2, EVENT_POINTER_UP, this.onPointerUp);
          removeListener(document2, EVENT_KEY_DOWN, this.onKeyDown);
          removeListener(window, EVENT_RESIZE, this.onResize);
          if (options.zoomable && options.zoomOnWheel) {
            removeListener(viewer, EVENT_WHEEL, this.onWheel, {
              passive: false,
              capture: true
            });
          }
          if (options.toggleOnDblclick) {
            removeListener(canvas, EVENT_DBLCLICK, this.onDblclick);
          }
        }
      };
      var handlers = {
        click: function click(event) {
          var options = this.options, imageData = this.imageData;
          var target = event.target;
          var action = getData(target, DATA_ACTION);
          if (!action && target.localName === "img" && target.parentElement.localName === "li") {
            target = target.parentElement;
            action = getData(target, DATA_ACTION);
          }
          if (IS_TOUCH_DEVICE && event.isTrusted && target === this.canvas) {
            clearTimeout(this.clickCanvasTimeout);
          }
          switch (action) {
            case "mix":
              if (this.played) {
                this.stop();
              } else if (options.inline) {
                if (this.fulled) {
                  this.exit();
                } else {
                  this.full();
                }
              } else {
                this.hide();
              }
              break;
            case "hide":
              if (!this.pointerMoved) {
                this.hide();
              }
              break;
            case "view":
              this.view(getData(target, "index"));
              break;
            case "zoom-in":
              this.zoom(0.1, true);
              break;
            case "zoom-out":
              this.zoom(-0.1, true);
              break;
            case "one-to-one":
              this.toggle();
              break;
            case "reset":
              this.reset();
              break;
            case "prev":
              this.prev(options.loop);
              break;
            case "play":
              this.play(options.fullscreen);
              break;
            case "next":
              this.next(options.loop);
              break;
            case "rotate-left":
              this.rotate(-90);
              break;
            case "rotate-right":
              this.rotate(90);
              break;
            case "flip-horizontal":
              this.scaleX(-imageData.scaleX || -1);
              break;
            case "flip-vertical":
              this.scaleY(-imageData.scaleY || -1);
              break;
            default:
              if (this.played) {
                this.stop();
              }
          }
        },
        dblclick: function dblclick(event) {
          event.preventDefault();
          if (this.viewed && event.target === this.image) {
            if (IS_TOUCH_DEVICE && event.isTrusted) {
              clearTimeout(this.doubleClickImageTimeout);
            }
            this.toggle(event.isTrusted ? event : event.detail && event.detail.originalEvent);
          }
        },
        load: function load() {
          var _this = this;
          if (this.timeout) {
            clearTimeout(this.timeout);
            this.timeout = false;
          }
          var element = this.element, options = this.options, image = this.image, index = this.index, viewerData = this.viewerData;
          removeClass(image, CLASS_INVISIBLE);
          if (options.loading) {
            removeClass(this.canvas, CLASS_LOADING);
          }
          image.style.cssText = "height:0;" + "margin-left:".concat(viewerData.width / 2, "px;") + "margin-top:".concat(viewerData.height / 2, "px;") + "max-width:none!important;position:relative;width:0;";
          this.initImage(function() {
            toggleClass(image, CLASS_MOVE, options.movable);
            toggleClass(image, CLASS_TRANSITION, options.transition);
            _this.renderImage(function() {
              _this.viewed = true;
              _this.viewing = false;
              if (isFunction(options.viewed)) {
                addListener(element, EVENT_VIEWED, options.viewed, {
                  once: true
                });
              }
              dispatchEvent(element, EVENT_VIEWED, {
                originalImage: _this.images[index],
                index,
                image
              }, {
                cancelable: false
              });
            });
          });
        },
        loadImage: function loadImage(event) {
          var image = event.target;
          var parent = image.parentNode;
          var parentWidth = parent.offsetWidth || 30;
          var parentHeight = parent.offsetHeight || 50;
          var filled = !!getData(image, "filled");
          getImageNaturalSizes(image, this.options, function(naturalWidth, naturalHeight) {
            var aspectRatio = naturalWidth / naturalHeight;
            var width = parentWidth;
            var height = parentHeight;
            if (parentHeight * aspectRatio > parentWidth) {
              if (filled) {
                width = parentHeight * aspectRatio;
              } else {
                height = parentWidth / aspectRatio;
              }
            } else if (filled) {
              height = parentWidth / aspectRatio;
            } else {
              width = parentHeight * aspectRatio;
            }
            setStyle(image, assign({
              width,
              height
            }, getTransforms({
              translateX: (parentWidth - width) / 2,
              translateY: (parentHeight - height) / 2
            })));
          });
        },
        keydown: function keydown(event) {
          var options = this.options;
          if (!options.keyboard) {
            return;
          }
          var keyCode = event.keyCode || event.which || event.charCode;
          switch (keyCode) {
            case 13:
              if (this.viewer.contains(event.target)) {
                this.click(event);
              }
              break;
          }
          if (!this.fulled) {
            return;
          }
          switch (keyCode) {
            case 27:
              if (this.played) {
                this.stop();
              } else if (options.inline) {
                if (this.fulled) {
                  this.exit();
                }
              } else {
                this.hide();
              }
              break;
            case 32:
              if (this.played) {
                this.stop();
              }
              break;
            case 37:
              if (this.played && this.playing) {
                this.playing.prev();
              } else {
                this.prev(options.loop);
              }
              break;
            case 38:
              event.preventDefault();
              this.zoom(options.zoomRatio, true);
              break;
            case 39:
              if (this.played && this.playing) {
                this.playing.next();
              } else {
                this.next(options.loop);
              }
              break;
            case 40:
              event.preventDefault();
              this.zoom(-options.zoomRatio, true);
              break;
            case 48:
            case 49:
              if (event.ctrlKey) {
                event.preventDefault();
                this.toggle();
              }
              break;
          }
        },
        dragstart: function dragstart(event) {
          if (event.target.localName === "img") {
            event.preventDefault();
          }
        },
        pointerdown: function pointerdown(event) {
          var options = this.options, pointers = this.pointers;
          var buttons = event.buttons, button = event.button;
          this.pointerMoved = false;
          if (!this.viewed || this.showing || this.viewing || this.hiding || (event.type === "mousedown" || event.type === "pointerdown" && event.pointerType === "mouse") && // No primary button (Usually the left button)
          (isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 || event.ctrlKey)) {
            return;
          }
          event.preventDefault();
          if (event.changedTouches) {
            forEach(event.changedTouches, function(touch) {
              pointers[touch.identifier] = getPointer(touch);
            });
          } else {
            pointers[event.pointerId || 0] = getPointer(event);
          }
          var action = options.movable ? ACTION_MOVE : false;
          if (options.zoomOnTouch && options.zoomable && Object.keys(pointers).length > 1) {
            action = ACTION_ZOOM;
          } else if (options.slideOnTouch && (event.pointerType === "touch" || event.type === "touchstart") && this.isSwitchable()) {
            action = ACTION_SWITCH;
          }
          if (options.transition && (action === ACTION_MOVE || action === ACTION_ZOOM)) {
            removeClass(this.image, CLASS_TRANSITION);
          }
          this.action = action;
        },
        pointermove: function pointermove(event) {
          var pointers = this.pointers, action = this.action;
          if (!this.viewed || !action) {
            return;
          }
          event.preventDefault();
          if (event.changedTouches) {
            forEach(event.changedTouches, function(touch) {
              assign(pointers[touch.identifier] || {}, getPointer(touch, true));
            });
          } else {
            assign(pointers[event.pointerId || 0] || {}, getPointer(event, true));
          }
          this.change(event);
        },
        pointerup: function pointerup(event) {
          var _this2 = this;
          var options = this.options, action = this.action, pointers = this.pointers;
          var pointer;
          if (event.changedTouches) {
            forEach(event.changedTouches, function(touch) {
              pointer = pointers[touch.identifier];
              delete pointers[touch.identifier];
            });
          } else {
            pointer = pointers[event.pointerId || 0];
            delete pointers[event.pointerId || 0];
          }
          if (!action) {
            return;
          }
          event.preventDefault();
          if (options.transition && (action === ACTION_MOVE || action === ACTION_ZOOM)) {
            addClass(this.image, CLASS_TRANSITION);
          }
          this.action = false;
          if (IS_TOUCH_DEVICE && action !== ACTION_ZOOM && pointer && Date.now() - pointer.timeStamp < 500) {
            clearTimeout(this.clickCanvasTimeout);
            clearTimeout(this.doubleClickImageTimeout);
            if (options.toggleOnDblclick && this.viewed && event.target === this.image) {
              if (this.imageClicked) {
                this.imageClicked = false;
                this.doubleClickImageTimeout = setTimeout(function() {
                  dispatchEvent(_this2.image, EVENT_DBLCLICK, {
                    originalEvent: event
                  });
                }, 50);
              } else {
                this.imageClicked = true;
                this.doubleClickImageTimeout = setTimeout(function() {
                  _this2.imageClicked = false;
                }, 500);
              }
            } else {
              this.imageClicked = false;
              if (options.backdrop && options.backdrop !== "static" && event.target === this.canvas) {
                this.clickCanvasTimeout = setTimeout(function() {
                  dispatchEvent(_this2.canvas, EVENT_CLICK, {
                    originalEvent: event
                  });
                }, 50);
              }
            }
          }
        },
        resize: function resize() {
          var _this3 = this;
          if (!this.isShown || this.hiding) {
            return;
          }
          if (this.fulled) {
            this.close();
            this.initBody();
            this.open();
          }
          this.initContainer();
          this.initViewer();
          this.renderViewer();
          this.renderList();
          if (this.viewed) {
            this.initImage(function() {
              _this3.renderImage();
            });
          }
          if (this.played) {
            if (this.options.fullscreen && this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) {
              this.stop();
              return;
            }
            forEach(this.player.getElementsByTagName("img"), function(image) {
              addListener(image, EVENT_LOAD, _this3.loadImage.bind(_this3), {
                once: true
              });
              dispatchEvent(image, EVENT_LOAD);
            });
          }
        },
        wheel: function wheel(event) {
          var _this4 = this;
          if (!this.viewed) {
            return;
          }
          event.preventDefault();
          if (this.wheeling) {
            return;
          }
          this.wheeling = true;
          setTimeout(function() {
            _this4.wheeling = false;
          }, 50);
          var ratio = Number(this.options.zoomRatio) || 0.1;
          var delta = 1;
          if (event.deltaY) {
            delta = event.deltaY > 0 ? 1 : -1;
          } else if (event.wheelDelta) {
            delta = -event.wheelDelta / 120;
          } else if (event.detail) {
            delta = event.detail > 0 ? 1 : -1;
          }
          this.zoom(-delta * ratio, true, null, event);
        }
      };
      var methods = {
        /** Show the viewer (only available in modal mode)
         * @param {boolean} [immediate=false] - Indicates if show the viewer immediately or not.
         * @returns {Viewer} this
         */
        show: function show() {
          var immediate = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
          var element = this.element, options = this.options;
          if (options.inline || this.showing || this.isShown || this.showing) {
            return this;
          }
          if (!this.ready) {
            this.build();
            if (this.ready) {
              this.show(immediate);
            }
            return this;
          }
          if (isFunction(options.show)) {
            addListener(element, EVENT_SHOW, options.show, {
              once: true
            });
          }
          if (dispatchEvent(element, EVENT_SHOW) === false || !this.ready) {
            return this;
          }
          if (this.hiding) {
            this.transitioning.abort();
          }
          this.showing = true;
          this.open();
          var viewer = this.viewer;
          removeClass(viewer, CLASS_HIDE);
          viewer.setAttribute("role", "dialog");
          viewer.setAttribute("aria-labelledby", this.title.id);
          viewer.setAttribute("aria-modal", true);
          viewer.removeAttribute("aria-hidden");
          if (options.transition && !immediate) {
            var shown = this.shown.bind(this);
            this.transitioning = {
              abort: function abort() {
                removeListener(viewer, EVENT_TRANSITION_END, shown);
                removeClass(viewer, CLASS_IN);
              }
            };
            addClass(viewer, CLASS_TRANSITION);
            viewer.initialOffsetWidth = viewer.offsetWidth;
            addListener(viewer, EVENT_TRANSITION_END, shown, {
              once: true
            });
            addClass(viewer, CLASS_IN);
          } else {
            addClass(viewer, CLASS_IN);
            this.shown();
          }
          return this;
        },
        /**
         * Hide the viewer (only available in modal mode)
         * @param {boolean} [immediate=false] - Indicates if hide the viewer immediately or not.
         * @returns {Viewer} this
         */
        hide: function hide() {
          var _this = this;
          var immediate = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
          var element = this.element, options = this.options;
          if (options.inline || this.hiding || !(this.isShown || this.showing)) {
            return this;
          }
          if (isFunction(options.hide)) {
            addListener(element, EVENT_HIDE, options.hide, {
              once: true
            });
          }
          if (dispatchEvent(element, EVENT_HIDE) === false) {
            return this;
          }
          if (this.showing) {
            this.transitioning.abort();
          }
          this.hiding = true;
          if (this.played) {
            this.stop();
          } else if (this.viewing) {
            this.viewing.abort();
          }
          var viewer = this.viewer, image = this.image;
          var hideImmediately = function hideImmediately2() {
            removeClass(viewer, CLASS_IN);
            _this.hidden();
          };
          if (options.transition && !immediate) {
            var onViewerTransitionEnd = function onViewerTransitionEnd2(event) {
              if (event && event.target === viewer) {
                removeListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd2);
                _this.hidden();
              }
            };
            var onImageTransitionEnd = function onImageTransitionEnd2() {
              if (hasClass(viewer, CLASS_TRANSITION)) {
                addListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);
                removeClass(viewer, CLASS_IN);
              } else {
                hideImmediately();
              }
            };
            this.transitioning = {
              abort: function abort() {
                if (_this.viewed && hasClass(image, CLASS_TRANSITION)) {
                  removeListener(image, EVENT_TRANSITION_END, onImageTransitionEnd);
                } else if (hasClass(viewer, CLASS_TRANSITION)) {
                  removeListener(viewer, EVENT_TRANSITION_END, onViewerTransitionEnd);
                }
              }
            };
            if (this.viewed && hasClass(image, CLASS_TRANSITION)) {
              addListener(image, EVENT_TRANSITION_END, onImageTransitionEnd, {
                once: true
              });
              this.zoomTo(0, false, null, null, true);
            } else {
              onImageTransitionEnd();
            }
          } else {
            hideImmediately();
          }
          return this;
        },
        /**
         * View one of the images with image's index
         * @param {number} index - The index of the image to view.
         * @returns {Viewer} this
         */
        view: function view() {
          var _this2 = this;
          var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.options.initialViewIndex;
          index = Number(index) || 0;
          if (this.hiding || this.played || index < 0 || index >= this.length || this.viewed && index === this.index) {
            return this;
          }
          if (!this.isShown) {
            this.index = index;
            return this.show();
          }
          if (this.viewing) {
            this.viewing.abort();
          }
          var element = this.element, options = this.options, title = this.title, canvas = this.canvas;
          var item = this.items[index];
          var img = item.querySelector("img");
          var url = getData(img, "originalUrl");
          var alt = img.getAttribute("alt");
          var image = document.createElement("img");
          forEach(options.inheritedAttributes, function(name) {
            var value = img.getAttribute(name);
            if (value !== null) {
              image.setAttribute(name, value);
            }
          });
          image.src = url;
          image.alt = alt;
          if (isFunction(options.view)) {
            addListener(element, EVENT_VIEW, options.view, {
              once: true
            });
          }
          if (dispatchEvent(element, EVENT_VIEW, {
            originalImage: this.images[index],
            index,
            image
          }) === false || !this.isShown || this.hiding || this.played) {
            return this;
          }
          var activeItem = this.items[this.index];
          if (activeItem) {
            removeClass(activeItem, CLASS_ACTIVE);
            activeItem.removeAttribute("aria-selected");
          }
          addClass(item, CLASS_ACTIVE);
          item.setAttribute("aria-selected", true);
          if (options.focus) {
            item.focus();
          }
          this.image = image;
          this.viewed = false;
          this.index = index;
          this.imageData = {};
          addClass(image, CLASS_INVISIBLE);
          if (options.loading) {
            addClass(canvas, CLASS_LOADING);
          }
          canvas.innerHTML = "";
          canvas.appendChild(image);
          this.renderList();
          title.innerHTML = "";
          var onViewed = function onViewed2() {
            var imageData = _this2.imageData;
            var render2 = Array.isArray(options.title) ? options.title[1] : options.title;
            title.innerHTML = escapeHTMLEntities(isFunction(render2) ? render2.call(_this2, image, imageData) : "".concat(alt, " (").concat(imageData.naturalWidth, " × ").concat(imageData.naturalHeight, ")"));
          };
          var onLoad;
          var onError;
          addListener(element, EVENT_VIEWED, onViewed, {
            once: true
          });
          this.viewing = {
            abort: function abort() {
              removeListener(element, EVENT_VIEWED, onViewed);
              if (image.complete) {
                if (_this2.imageRendering) {
                  _this2.imageRendering.abort();
                } else if (_this2.imageInitializing) {
                  _this2.imageInitializing.abort();
                }
              } else {
                image.src = "";
                removeListener(image, EVENT_LOAD, onLoad);
                if (_this2.timeout) {
                  clearTimeout(_this2.timeout);
                }
              }
            }
          };
          if (image.complete) {
            this.load();
          } else {
            addListener(image, EVENT_LOAD, onLoad = function onLoad2() {
              removeListener(image, EVENT_ERROR, onError);
              _this2.load();
            }, {
              once: true
            });
            addListener(image, EVENT_ERROR, onError = function onError2() {
              removeListener(image, EVENT_LOAD, onLoad);
              if (_this2.timeout) {
                clearTimeout(_this2.timeout);
                _this2.timeout = false;
              }
              removeClass(image, CLASS_INVISIBLE);
              if (options.loading) {
                removeClass(_this2.canvas, CLASS_LOADING);
              }
            }, {
              once: true
            });
            if (this.timeout) {
              clearTimeout(this.timeout);
            }
            this.timeout = setTimeout(function() {
              removeClass(image, CLASS_INVISIBLE);
              _this2.timeout = false;
            }, 1e3);
          }
          return this;
        },
        /**
         * View the previous image
         * @param {boolean} [loop=false] - Indicate if view the last one
         * when it is the first one at present.
         * @returns {Viewer} this
         */
        prev: function prev() {
          var loop = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
          var index = this.index - 1;
          if (index < 0) {
            index = loop ? this.length - 1 : 0;
          }
          this.view(index);
          return this;
        },
        /**
         * View the next image
         * @param {boolean} [loop=false] - Indicate if view the first one
         * when it is the last one at present.
         * @returns {Viewer} this
         */
        next: function next() {
          var loop = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
          var maxIndex = this.length - 1;
          var index = this.index + 1;
          if (index > maxIndex) {
            index = loop ? 0 : maxIndex;
          }
          this.view(index);
          return this;
        },
        /**
         * Move the image with relative offsets.
         * @param {number} x - The moving distance in the horizontal direction.
         * @param {number} [y=x] The moving distance in the vertical direction.
         * @returns {Viewer} this
         */
        move: function move(x) {
          var y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : x;
          var imageData = this.imageData;
          this.moveTo(isUndefined(x) ? x : imageData.x + Number(x), isUndefined(y) ? y : imageData.y + Number(y));
          return this;
        },
        /**
         * Move the image to an absolute point.
         * @param {number} x - The new position in the horizontal direction.
         * @param {number} [y=x] - The new position in the vertical direction.
         * @param {Event} [_originalEvent=null] - The original event if any.
         * @returns {Viewer} this
         */
        moveTo: function moveTo(x) {
          var _this3 = this;
          var y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : x;
          var _originalEvent = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
          var element = this.element, options = this.options, imageData = this.imageData;
          x = Number(x);
          y = Number(y);
          if (this.viewed && !this.played && options.movable) {
            var oldX = imageData.x;
            var oldY = imageData.y;
            var changed = false;
            if (isNumber(x)) {
              changed = true;
            } else {
              x = oldX;
            }
            if (isNumber(y)) {
              changed = true;
            } else {
              y = oldY;
            }
            if (changed) {
              if (isFunction(options.move)) {
                addListener(element, EVENT_MOVE, options.move, {
                  once: true
                });
              }
              if (dispatchEvent(element, EVENT_MOVE, {
                x,
                y,
                oldX,
                oldY,
                originalEvent: _originalEvent
              }) === false) {
                return this;
              }
              imageData.x = x;
              imageData.y = y;
              imageData.left = x;
              imageData.top = y;
              this.moving = true;
              this.renderImage(function() {
                _this3.moving = false;
                if (isFunction(options.moved)) {
                  addListener(element, EVENT_MOVED, options.moved, {
                    once: true
                  });
                }
                dispatchEvent(element, EVENT_MOVED, {
                  x,
                  y,
                  oldX,
                  oldY,
                  originalEvent: _originalEvent
                }, {
                  cancelable: false
                });
              });
            }
          }
          return this;
        },
        /**
         * Rotate the image with a relative degree.
         * @param {number} degree - The rotate degree.
         * @returns {Viewer} this
         */
        rotate: function rotate(degree) {
          this.rotateTo((this.imageData.rotate || 0) + Number(degree));
          return this;
        },
        /**
         * Rotate the image to an absolute degree.
         * @param {number} degree - The rotate degree.
         * @returns {Viewer} this
         */
        rotateTo: function rotateTo(degree) {
          var _this4 = this;
          var element = this.element, options = this.options, imageData = this.imageData;
          degree = Number(degree);
          if (isNumber(degree) && this.viewed && !this.played && options.rotatable) {
            var oldDegree = imageData.rotate;
            if (isFunction(options.rotate)) {
              addListener(element, EVENT_ROTATE, options.rotate, {
                once: true
              });
            }
            if (dispatchEvent(element, EVENT_ROTATE, {
              degree,
              oldDegree
            }) === false) {
              return this;
            }
            imageData.rotate = degree;
            this.rotating = true;
            this.renderImage(function() {
              _this4.rotating = false;
              if (isFunction(options.rotated)) {
                addListener(element, EVENT_ROTATED, options.rotated, {
                  once: true
                });
              }
              dispatchEvent(element, EVENT_ROTATED, {
                degree,
                oldDegree
              }, {
                cancelable: false
              });
            });
          }
          return this;
        },
        /**
         * Scale the image on the x-axis.
         * @param {number} scaleX - The scale ratio on the x-axis.
         * @returns {Viewer} this
         */
        scaleX: function scaleX(_scaleX) {
          this.scale(_scaleX, this.imageData.scaleY);
          return this;
        },
        /**
         * Scale the image on the y-axis.
         * @param {number} scaleY - The scale ratio on the y-axis.
         * @returns {Viewer} this
         */
        scaleY: function scaleY(_scaleY) {
          this.scale(this.imageData.scaleX, _scaleY);
          return this;
        },
        /**
         * Scale the image.
         * @param {number} scaleX - The scale ratio on the x-axis.
         * @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
         * @returns {Viewer} this
         */
        scale: function scale(scaleX) {
          var _this5 = this;
          var scaleY = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : scaleX;
          var element = this.element, options = this.options, imageData = this.imageData;
          scaleX = Number(scaleX);
          scaleY = Number(scaleY);
          if (this.viewed && !this.played && options.scalable) {
            var oldScaleX = imageData.scaleX;
            var oldScaleY = imageData.scaleY;
            var changed = false;
            if (isNumber(scaleX)) {
              changed = true;
            } else {
              scaleX = oldScaleX;
            }
            if (isNumber(scaleY)) {
              changed = true;
            } else {
              scaleY = oldScaleY;
            }
            if (changed) {
              if (isFunction(options.scale)) {
                addListener(element, EVENT_SCALE, options.scale, {
                  once: true
                });
              }
              if (dispatchEvent(element, EVENT_SCALE, {
                scaleX,
                scaleY,
                oldScaleX,
                oldScaleY
              }) === false) {
                return this;
              }
              imageData.scaleX = scaleX;
              imageData.scaleY = scaleY;
              this.scaling = true;
              this.renderImage(function() {
                _this5.scaling = false;
                if (isFunction(options.scaled)) {
                  addListener(element, EVENT_SCALED, options.scaled, {
                    once: true
                  });
                }
                dispatchEvent(element, EVENT_SCALED, {
                  scaleX,
                  scaleY,
                  oldScaleX,
                  oldScaleY
                }, {
                  cancelable: false
                });
              });
            }
          }
          return this;
        },
        /**
         * Zoom the image with a relative ratio.
         * @param {number} ratio - The target ratio.
         * @param {boolean} [showTooltip=false] - Indicates whether to show the tooltip.
         * @param {Object} [pivot] - The pivot point coordinate for zooming.
         * @param {Event} [_originalEvent=null] - The original event if any.
         * @returns {Viewer} this
         */
        zoom: function zoom(ratio) {
          var showTooltip = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
          var pivot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
          var _originalEvent = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
          var imageData = this.imageData;
          ratio = Number(ratio);
          if (ratio < 0) {
            ratio = 1 / (1 - ratio);
          } else {
            ratio = 1 + ratio;
          }
          this.zoomTo(imageData.width * ratio / imageData.naturalWidth, showTooltip, pivot, _originalEvent);
          return this;
        },
        /**
         * Zoom the image to an absolute ratio.
         * @param {number} ratio - The target ratio.
         * @param {boolean} [showTooltip] - Indicates whether to show the tooltip.
         * @param {Object} [pivot] - The pivot point coordinate for zooming.
         * @param {Event} [_originalEvent=null] - The original event if any.
         * @param {Event} [_zoomable=false] - Indicates if the current zoom is available or not.
         * @returns {Viewer} this
         */
        zoomTo: function zoomTo(ratio) {
          var _this6 = this;
          var showTooltip = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
          var pivot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
          var _originalEvent = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
          var _zoomable = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;
          var element = this.element, options = this.options, pointers = this.pointers, imageData = this.imageData;
          var x = imageData.x, y = imageData.y, width = imageData.width, height = imageData.height, naturalWidth = imageData.naturalWidth, naturalHeight = imageData.naturalHeight;
          ratio = Math.max(0, ratio);
          if (isNumber(ratio) && this.viewed && !this.played && (_zoomable || options.zoomable)) {
            if (!_zoomable) {
              var minZoomRatio = Math.max(0.01, options.minZoomRatio);
              var maxZoomRatio = Math.min(100, options.maxZoomRatio);
              ratio = Math.min(Math.max(ratio, minZoomRatio), maxZoomRatio);
            }
            if (_originalEvent) {
              switch (_originalEvent.type) {
                case "wheel":
                  if (options.zoomRatio >= 0.055 && ratio > 0.95 && ratio < 1.05) {
                    ratio = 1;
                  }
                  break;
                case "pointermove":
                case "touchmove":
                case "mousemove":
                  if (ratio > 0.99 && ratio < 1.01) {
                    ratio = 1;
                  }
                  break;
              }
            }
            var newWidth = naturalWidth * ratio;
            var newHeight = naturalHeight * ratio;
            var offsetWidth = newWidth - width;
            var offsetHeight = newHeight - height;
            var oldRatio = imageData.ratio;
            if (isFunction(options.zoom)) {
              addListener(element, EVENT_ZOOM, options.zoom, {
                once: true
              });
            }
            if (dispatchEvent(element, EVENT_ZOOM, {
              ratio,
              oldRatio,
              originalEvent: _originalEvent
            }) === false) {
              return this;
            }
            this.zooming = true;
            if (_originalEvent) {
              var offset = getOffset(this.viewer);
              var center = pointers && Object.keys(pointers).length > 0 ? getPointersCenter(pointers) : {
                pageX: _originalEvent.pageX,
                pageY: _originalEvent.pageY
              };
              imageData.x -= offsetWidth * ((center.pageX - offset.left - x) / width);
              imageData.y -= offsetHeight * ((center.pageY - offset.top - y) / height);
            } else if (isPlainObject(pivot) && isNumber(pivot.x) && isNumber(pivot.y)) {
              imageData.x -= offsetWidth * ((pivot.x - x) / width);
              imageData.y -= offsetHeight * ((pivot.y - y) / height);
            } else {
              imageData.x -= offsetWidth / 2;
              imageData.y -= offsetHeight / 2;
            }
            imageData.left = imageData.x;
            imageData.top = imageData.y;
            imageData.width = newWidth;
            imageData.height = newHeight;
            imageData.oldRatio = oldRatio;
            imageData.ratio = ratio;
            this.renderImage(function() {
              _this6.zooming = false;
              if (isFunction(options.zoomed)) {
                addListener(element, EVENT_ZOOMED, options.zoomed, {
                  once: true
                });
              }
              dispatchEvent(element, EVENT_ZOOMED, {
                ratio,
                oldRatio,
                originalEvent: _originalEvent
              }, {
                cancelable: false
              });
            });
            if (showTooltip) {
              this.tooltip();
            }
          }
          return this;
        },
        /**
         * Play the images
         * @param {boolean|FullscreenOptions} [fullscreen=false] - Indicate if request fullscreen or not.
         * @returns {Viewer} this
         */
        play: function play() {
          var _this7 = this;
          var fullscreen = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
          if (!this.isShown || this.played) {
            return this;
          }
          var element = this.element, options = this.options;
          if (isFunction(options.play)) {
            addListener(element, EVENT_PLAY, options.play, {
              once: true
            });
          }
          if (dispatchEvent(element, EVENT_PLAY) === false) {
            return this;
          }
          var player = this.player;
          var onLoad = this.loadImage.bind(this);
          var list = [];
          var total = 0;
          var index = 0;
          this.played = true;
          this.onLoadWhenPlay = onLoad;
          if (fullscreen) {
            this.requestFullscreen(fullscreen);
          }
          addClass(player, CLASS_SHOW);
          forEach(this.items, function(item, i) {
            var img = item.querySelector("img");
            var image = document.createElement("img");
            image.src = getData(img, "originalUrl");
            image.alt = img.getAttribute("alt");
            image.referrerPolicy = img.referrerPolicy;
            total += 1;
            addClass(image, CLASS_FADE);
            toggleClass(image, CLASS_TRANSITION, options.transition);
            if (hasClass(item, CLASS_ACTIVE)) {
              addClass(image, CLASS_IN);
              index = i;
            }
            list.push(image);
            addListener(image, EVENT_LOAD, onLoad, {
              once: true
            });
            player.appendChild(image);
          });
          if (isNumber(options.interval) && options.interval > 0) {
            var prev = function prev2() {
              clearTimeout(_this7.playing.timeout);
              removeClass(list[index], CLASS_IN);
              index -= 1;
              index = index >= 0 ? index : total - 1;
              addClass(list[index], CLASS_IN);
              _this7.playing.timeout = setTimeout(prev2, options.interval);
            };
            var next = function next2() {
              clearTimeout(_this7.playing.timeout);
              removeClass(list[index], CLASS_IN);
              index += 1;
              index = index < total ? index : 0;
              addClass(list[index], CLASS_IN);
              _this7.playing.timeout = setTimeout(next2, options.interval);
            };
            if (total > 1) {
              this.playing = {
                prev,
                next,
                timeout: setTimeout(next, options.interval)
              };
            }
          }
          return this;
        },
        // Stop play
        stop: function stop() {
          var _this8 = this;
          if (!this.played) {
            return this;
          }
          var element = this.element, options = this.options;
          if (isFunction(options.stop)) {
            addListener(element, EVENT_STOP, options.stop, {
              once: true
            });
          }
          if (dispatchEvent(element, EVENT_STOP) === false) {
            return this;
          }
          var player = this.player;
          clearTimeout(this.playing.timeout);
          this.playing = false;
          this.played = false;
          forEach(player.getElementsByTagName("img"), function(image) {
            removeListener(image, EVENT_LOAD, _this8.onLoadWhenPlay);
          });
          removeClass(player, CLASS_SHOW);
          player.innerHTML = "";
          this.exitFullscreen();
          return this;
        },
        // Enter modal mode (only available in inline mode)
        full: function full() {
          var _this9 = this;
          var options = this.options, viewer = this.viewer, image = this.image, list = this.list;
          if (!this.isShown || this.played || this.fulled || !options.inline) {
            return this;
          }
          this.fulled = true;
          this.open();
          addClass(this.button, CLASS_FULLSCREEN_EXIT);
          if (options.transition) {
            removeClass(list, CLASS_TRANSITION);
            if (this.viewed) {
              removeClass(image, CLASS_TRANSITION);
            }
          }
          addClass(viewer, CLASS_FIXED);
          viewer.setAttribute("role", "dialog");
          viewer.setAttribute("aria-labelledby", this.title.id);
          viewer.setAttribute("aria-modal", true);
          viewer.removeAttribute("style");
          setStyle(viewer, {
            zIndex: options.zIndex
          });
          if (options.focus) {
            this.enforceFocus();
          }
          this.initContainer();
          this.viewerData = assign({}, this.containerData);
          this.renderList();
          if (this.viewed) {
            this.initImage(function() {
              _this9.renderImage(function() {
                if (options.transition) {
                  setTimeout(function() {
                    addClass(image, CLASS_TRANSITION);
                    addClass(list, CLASS_TRANSITION);
                  }, 0);
                }
              });
            });
          }
          return this;
        },
        // Exit modal mode (only available in inline mode)
        exit: function exit() {
          var _this10 = this;
          var options = this.options, viewer = this.viewer, image = this.image, list = this.list;
          if (!this.isShown || this.played || !this.fulled || !options.inline) {
            return this;
          }
          this.fulled = false;
          this.close();
          removeClass(this.button, CLASS_FULLSCREEN_EXIT);
          if (options.transition) {
            removeClass(list, CLASS_TRANSITION);
            if (this.viewed) {
              removeClass(image, CLASS_TRANSITION);
            }
          }
          if (options.focus) {
            this.clearEnforceFocus();
          }
          viewer.removeAttribute("role");
          viewer.removeAttribute("aria-labelledby");
          viewer.removeAttribute("aria-modal");
          removeClass(viewer, CLASS_FIXED);
          setStyle(viewer, {
            zIndex: options.zIndexInline
          });
          this.viewerData = assign({}, this.parentData);
          this.renderViewer();
          this.renderList();
          if (this.viewed) {
            this.initImage(function() {
              _this10.renderImage(function() {
                if (options.transition) {
                  setTimeout(function() {
                    addClass(image, CLASS_TRANSITION);
                    addClass(list, CLASS_TRANSITION);
                  }, 0);
                }
              });
            });
          }
          return this;
        },
        // Show the current ratio of the image with percentage
        tooltip: function tooltip() {
          var _this11 = this;
          var options = this.options, tooltipBox = this.tooltipBox, imageData = this.imageData;
          if (!this.viewed || this.played || !options.tooltip) {
            return this;
          }
          tooltipBox.textContent = "".concat(Math.round(imageData.ratio * 100), "%");
          if (!this.tooltipping) {
            if (options.transition) {
              if (this.fading) {
                dispatchEvent(tooltipBox, EVENT_TRANSITION_END);
              }
              addClass(tooltipBox, CLASS_SHOW);
              addClass(tooltipBox, CLASS_FADE);
              addClass(tooltipBox, CLASS_TRANSITION);
              tooltipBox.removeAttribute("aria-hidden");
              tooltipBox.initialOffsetWidth = tooltipBox.offsetWidth;
              addClass(tooltipBox, CLASS_IN);
            } else {
              addClass(tooltipBox, CLASS_SHOW);
              tooltipBox.removeAttribute("aria-hidden");
            }
          } else {
            clearTimeout(this.tooltipping);
          }
          this.tooltipping = setTimeout(function() {
            if (options.transition) {
              addListener(tooltipBox, EVENT_TRANSITION_END, function() {
                removeClass(tooltipBox, CLASS_SHOW);
                removeClass(tooltipBox, CLASS_FADE);
                removeClass(tooltipBox, CLASS_TRANSITION);
                tooltipBox.setAttribute("aria-hidden", true);
                _this11.fading = false;
              }, {
                once: true
              });
              removeClass(tooltipBox, CLASS_IN);
              _this11.fading = true;
            } else {
              removeClass(tooltipBox, CLASS_SHOW);
              tooltipBox.setAttribute("aria-hidden", true);
            }
            _this11.tooltipping = false;
          }, 1e3);
          return this;
        },
        /**
         * Toggle the image size between its current size and natural size
         * @param {Event} [_originalEvent=null] - The original event if any.
         * @returns {Viewer} this
         */
        toggle: function toggle() {
          var _originalEvent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
          if (this.imageData.ratio === 1) {
            this.zoomTo(this.imageData.oldRatio, true, null, _originalEvent);
          } else {
            this.zoomTo(1, true, null, _originalEvent);
          }
          return this;
        },
        // Reset the image to its initial state
        reset: function reset() {
          if (this.viewed && !this.played) {
            this.imageData = assign({}, this.initialImageData);
            this.renderImage();
          }
          return this;
        },
        // Update viewer when images changed
        update: function update() {
          var _this12 = this;
          var element = this.element, options = this.options, isImg = this.isImg;
          if (isImg && !element.parentNode) {
            return this.destroy();
          }
          var images = [];
          forEach(isImg ? [element] : element.querySelectorAll("img"), function(image) {
            if (isFunction(options.filter)) {
              if (options.filter.call(_this12, image)) {
                images.push(image);
              }
            } else if (_this12.getImageURL(image)) {
              images.push(image);
            }
          });
          if (!images.length) {
            return this;
          }
          this.images = images;
          this.length = images.length;
          if (this.ready) {
            var changedIndexes = [];
            forEach(this.items, function(item, i) {
              var img = item.querySelector("img");
              var image = images[i];
              if (image && img) {
                if (image.src !== img.src || image.alt !== img.alt) {
                  changedIndexes.push(i);
                }
              } else {
                changedIndexes.push(i);
              }
            });
            setStyle(this.list, {
              width: "auto"
            });
            this.initList();
            if (this.isShown) {
              if (this.length) {
                if (this.viewed) {
                  var changedIndex = changedIndexes.indexOf(this.index);
                  if (changedIndex >= 0) {
                    this.viewed = false;
                    this.view(Math.max(Math.min(this.index - changedIndex, this.length - 1), 0));
                  } else {
                    var activeItem = this.items[this.index];
                    addClass(activeItem, CLASS_ACTIVE);
                    activeItem.setAttribute("aria-selected", true);
                  }
                }
              } else {
                this.image = null;
                this.viewed = false;
                this.index = 0;
                this.imageData = {};
                this.canvas.innerHTML = "";
                this.title.innerHTML = "";
              }
            }
          } else {
            this.build();
          }
          return this;
        },
        // Destroy the viewer
        destroy: function destroy() {
          var element = this.element, options = this.options;
          if (!element[NAMESPACE]) {
            return this;
          }
          this.destroyed = true;
          if (this.ready) {
            if (this.played) {
              this.stop();
            }
            if (options.inline) {
              if (this.fulled) {
                this.exit();
              }
              this.unbind();
            } else if (this.isShown) {
              if (this.viewing) {
                if (this.imageRendering) {
                  this.imageRendering.abort();
                } else if (this.imageInitializing) {
                  this.imageInitializing.abort();
                }
              }
              if (this.hiding) {
                this.transitioning.abort();
              }
              this.hidden();
            } else if (this.showing) {
              this.transitioning.abort();
              this.hidden();
            }
            this.ready = false;
            this.viewer.parentNode.removeChild(this.viewer);
          } else if (options.inline) {
            if (this.delaying) {
              this.delaying.abort();
            } else if (this.initializing) {
              this.initializing.abort();
            }
          }
          if (!options.inline) {
            removeListener(element, EVENT_CLICK, this.onStart);
          }
          element[NAMESPACE] = void 0;
          return this;
        }
      };
      var others = {
        getImageURL: function getImageURL(image) {
          var url = this.options.url;
          if (isString(url)) {
            url = image.getAttribute(url);
          } else if (isFunction(url)) {
            url = url.call(this, image);
          } else {
            url = "";
          }
          return url;
        },
        enforceFocus: function enforceFocus() {
          var _this = this;
          this.clearEnforceFocus();
          addListener(document, EVENT_FOCUSIN, this.onFocusin = function(event) {
            var viewer = _this.viewer;
            var target = event.target;
            if (target === document || target === viewer || viewer.contains(target)) {
              return;
            }
            while (target) {
              if (target.getAttribute("tabindex") !== null || target.getAttribute("aria-modal") === "true") {
                return;
              }
              target = target.parentElement;
            }
            viewer.focus();
          });
        },
        clearEnforceFocus: function clearEnforceFocus() {
          if (this.onFocusin) {
            removeListener(document, EVENT_FOCUSIN, this.onFocusin);
            this.onFocusin = null;
          }
        },
        open: function open() {
          var body = this.body;
          addClass(body, CLASS_OPEN);
          if (this.scrollbarWidth > 0) {
            body.style.paddingRight = "".concat(this.scrollbarWidth + (parseFloat(this.initialBodyComputedPaddingRight) || 0), "px");
          }
        },
        close: function close() {
          var body = this.body;
          removeClass(body, CLASS_OPEN);
          if (this.scrollbarWidth > 0) {
            body.style.paddingRight = this.initialBodyPaddingRight;
          }
        },
        shown: function shown() {
          var element = this.element, options = this.options, viewer = this.viewer;
          this.fulled = true;
          this.isShown = true;
          this.render();
          this.bind();
          this.showing = false;
          if (options.focus) {
            viewer.focus();
            this.enforceFocus();
          }
          if (isFunction(options.shown)) {
            addListener(element, EVENT_SHOWN, options.shown, {
              once: true
            });
          }
          if (dispatchEvent(element, EVENT_SHOWN) === false) {
            return;
          }
          if (this.ready && this.isShown && !this.hiding) {
            this.view(this.index);
          }
        },
        hidden: function hidden() {
          var element = this.element, options = this.options, viewer = this.viewer;
          if (options.fucus) {
            this.clearEnforceFocus();
          }
          this.close();
          this.unbind();
          addClass(viewer, CLASS_HIDE);
          viewer.removeAttribute("role");
          viewer.removeAttribute("aria-labelledby");
          viewer.removeAttribute("aria-modal");
          viewer.setAttribute("aria-hidden", true);
          this.resetList();
          this.resetImage();
          this.fulled = false;
          this.viewed = false;
          this.isShown = false;
          this.hiding = false;
          if (!this.destroyed) {
            if (isFunction(options.hidden)) {
              addListener(element, EVENT_HIDDEN, options.hidden, {
                once: true
              });
            }
            dispatchEvent(element, EVENT_HIDDEN, null, {
              cancelable: false
            });
          }
        },
        requestFullscreen: function requestFullscreen(options) {
          var document2 = this.element.ownerDocument;
          if (this.fulled && !(document2.fullscreenElement || document2.webkitFullscreenElement || document2.mozFullScreenElement || document2.msFullscreenElement)) {
            var documentElement = document2.documentElement;
            if (documentElement.requestFullscreen) {
              if (isPlainObject(options)) {
                documentElement.requestFullscreen(options);
              } else {
                documentElement.requestFullscreen();
              }
            } else if (documentElement.webkitRequestFullscreen) {
              documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
            } else if (documentElement.mozRequestFullScreen) {
              documentElement.mozRequestFullScreen();
            } else if (documentElement.msRequestFullscreen) {
              documentElement.msRequestFullscreen();
            }
          }
        },
        exitFullscreen: function exitFullscreen() {
          var document2 = this.element.ownerDocument;
          if (this.fulled && (document2.fullscreenElement || document2.webkitFullscreenElement || document2.mozFullScreenElement || document2.msFullscreenElement)) {
            if (document2.exitFullscreen) {
              document2.exitFullscreen();
            } else if (document2.webkitExitFullscreen) {
              document2.webkitExitFullscreen();
            } else if (document2.mozCancelFullScreen) {
              document2.mozCancelFullScreen();
            } else if (document2.msExitFullscreen) {
              document2.msExitFullscreen();
            }
          }
        },
        change: function change(event) {
          var options = this.options, pointers = this.pointers;
          var pointer = pointers[Object.keys(pointers)[0]];
          if (!pointer) {
            return;
          }
          var offsetX = pointer.endX - pointer.startX;
          var offsetY = pointer.endY - pointer.startY;
          switch (this.action) {
            case ACTION_MOVE:
              if (offsetX !== 0 || offsetY !== 0) {
                this.pointerMoved = true;
                this.move(offsetX, offsetY, event);
              }
              break;
            case ACTION_ZOOM:
              this.zoom(getMaxZoomRatio(pointers), false, null, event);
              break;
            case ACTION_SWITCH: {
              this.action = "switched";
              var absoluteOffsetX = Math.abs(offsetX);
              if (absoluteOffsetX > 1 && absoluteOffsetX > Math.abs(offsetY)) {
                this.pointers = {};
                if (offsetX > 1) {
                  this.prev(options.loop);
                } else if (offsetX < -1) {
                  this.next(options.loop);
                }
              }
              break;
            }
          }
          forEach(pointers, function(p) {
            p.startX = p.endX;
            p.startY = p.endY;
          });
        },
        isSwitchable: function isSwitchable() {
          var imageData = this.imageData, viewerData = this.viewerData;
          return this.length > 1 && imageData.x >= 0 && imageData.y >= 0 && imageData.width <= viewerData.width && imageData.height <= viewerData.height;
        }
      };
      var AnotherViewer = WINDOW.Viewer;
      var getUniqueID = /* @__PURE__ */ function(id) {
        return function() {
          id += 1;
          return id;
        };
      }(-1);
      var Viewer = /* @__PURE__ */ function() {
        function Viewer2(element) {
          var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
          _classCallCheck(this, Viewer2);
          if (!element || element.nodeType !== 1) {
            throw new Error("The first argument is required and must be an element.");
          }
          this.element = element;
          this.options = assign({}, DEFAULTS, isPlainObject(options) && options);
          this.action = false;
          this.fading = false;
          this.fulled = false;
          this.hiding = false;
          this.imageClicked = false;
          this.imageData = {};
          this.index = this.options.initialViewIndex;
          this.isImg = false;
          this.isShown = false;
          this.length = 0;
          this.moving = false;
          this.played = false;
          this.playing = false;
          this.pointers = {};
          this.ready = false;
          this.rotating = false;
          this.scaling = false;
          this.showing = false;
          this.timeout = false;
          this.tooltipping = false;
          this.viewed = false;
          this.viewing = false;
          this.wheeling = false;
          this.zooming = false;
          this.pointerMoved = false;
          this.id = getUniqueID();
          this.init();
        }
        _createClass(Viewer2, [{
          key: "init",
          value: function init() {
            var _this = this;
            var element = this.element, options = this.options;
            if (element[NAMESPACE]) {
              return;
            }
            element[NAMESPACE] = this;
            if (options.focus && !options.keyboard) {
              options.focus = false;
            }
            var isImg = element.localName === "img";
            var images = [];
            forEach(isImg ? [element] : element.querySelectorAll("img"), function(image) {
              if (isFunction(options.filter)) {
                if (options.filter.call(_this, image)) {
                  images.push(image);
                }
              } else if (_this.getImageURL(image)) {
                images.push(image);
              }
            });
            this.isImg = isImg;
            this.length = images.length;
            this.images = images;
            this.initBody();
            if (isUndefined(document.createElement(NAMESPACE).style.transition)) {
              options.transition = false;
            }
            if (options.inline) {
              var count = 0;
              var progress = function progress2() {
                count += 1;
                if (count === _this.length) {
                  var timeout;
                  _this.initializing = false;
                  _this.delaying = {
                    abort: function abort() {
                      clearTimeout(timeout);
                    }
                  };
                  timeout = setTimeout(function() {
                    _this.delaying = false;
                    _this.build();
                  }, 0);
                }
              };
              this.initializing = {
                abort: function abort() {
                  forEach(images, function(image) {
                    if (!image.complete) {
                      removeListener(image, EVENT_LOAD, progress);
                      removeListener(image, EVENT_ERROR, progress);
                    }
                  });
                }
              };
              forEach(images, function(image) {
                if (image.complete) {
                  progress();
                } else {
                  var onLoad;
                  var onError;
                  addListener(image, EVENT_LOAD, onLoad = function onLoad2() {
                    removeListener(image, EVENT_ERROR, onError);
                    progress();
                  }, {
                    once: true
                  });
                  addListener(image, EVENT_ERROR, onError = function onError2() {
                    removeListener(image, EVENT_LOAD, onLoad);
                    progress();
                  }, {
                    once: true
                  });
                }
              });
            } else {
              addListener(element, EVENT_CLICK, this.onStart = function(_ref) {
                var target = _ref.target;
                if (target.localName === "img" && (!isFunction(options.filter) || options.filter.call(_this, target))) {
                  _this.view(_this.images.indexOf(target));
                }
              });
            }
          }
        }, {
          key: "build",
          value: function build() {
            if (this.ready) {
              return;
            }
            var element = this.element, options = this.options;
            var parent = element.parentNode;
            var template = document.createElement("div");
            template.innerHTML = TEMPLATE;
            var viewer = template.querySelector(".".concat(NAMESPACE, "-container"));
            var title = viewer.querySelector(".".concat(NAMESPACE, "-title"));
            var toolbar = viewer.querySelector(".".concat(NAMESPACE, "-toolbar"));
            var navbar = viewer.querySelector(".".concat(NAMESPACE, "-navbar"));
            var button = viewer.querySelector(".".concat(NAMESPACE, "-button"));
            var canvas = viewer.querySelector(".".concat(NAMESPACE, "-canvas"));
            this.parent = parent;
            this.viewer = viewer;
            this.title = title;
            this.toolbar = toolbar;
            this.navbar = navbar;
            this.button = button;
            this.canvas = canvas;
            this.footer = viewer.querySelector(".".concat(NAMESPACE, "-footer"));
            this.tooltipBox = viewer.querySelector(".".concat(NAMESPACE, "-tooltip"));
            this.player = viewer.querySelector(".".concat(NAMESPACE, "-player"));
            this.list = viewer.querySelector(".".concat(NAMESPACE, "-list"));
            viewer.id = "".concat(NAMESPACE).concat(this.id);
            title.id = "".concat(NAMESPACE, "Title").concat(this.id);
            addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(Array.isArray(options.title) ? options.title[0] : options.title));
            addClass(navbar, !options.navbar ? CLASS_HIDE : getResponsiveClass(options.navbar));
            toggleClass(button, CLASS_HIDE, !options.button);
            if (options.keyboard) {
              button.setAttribute("tabindex", 0);
            }
            if (options.backdrop) {
              addClass(viewer, "".concat(NAMESPACE, "-backdrop"));
              if (!options.inline && options.backdrop !== "static") {
                setData(canvas, DATA_ACTION, "hide");
              }
            }
            if (isString(options.className) && options.className) {
              options.className.split(REGEXP_SPACES).forEach(function(className) {
                addClass(viewer, className);
              });
            }
            if (options.toolbar) {
              var list = document.createElement("ul");
              var custom = isPlainObject(options.toolbar);
              var zoomButtons = BUTTONS.slice(0, 3);
              var rotateButtons = BUTTONS.slice(7, 9);
              var scaleButtons = BUTTONS.slice(9);
              if (!custom) {
                addClass(toolbar, getResponsiveClass(options.toolbar));
              }
              forEach(custom ? options.toolbar : BUTTONS, function(value, index) {
                var deep = custom && isPlainObject(value);
                var name = custom ? hyphenate(index) : value;
                var show = deep && !isUndefined(value.show) ? value.show : value;
                if (!show || !options.zoomable && zoomButtons.indexOf(name) !== -1 || !options.rotatable && rotateButtons.indexOf(name) !== -1 || !options.scalable && scaleButtons.indexOf(name) !== -1) {
                  return;
                }
                var size = deep && !isUndefined(value.size) ? value.size : value;
                var click = deep && !isUndefined(value.click) ? value.click : value;
                var item = document.createElement("li");
                if (options.keyboard) {
                  item.setAttribute("tabindex", 0);
                }
                item.setAttribute("role", "button");
                addClass(item, "".concat(NAMESPACE, "-").concat(name));
                if (!isFunction(click)) {
                  setData(item, DATA_ACTION, name);
                }
                if (isNumber(show)) {
                  addClass(item, getResponsiveClass(show));
                }
                if (["small", "large"].indexOf(size) !== -1) {
                  addClass(item, "".concat(NAMESPACE, "-").concat(size));
                } else if (name === "play") {
                  addClass(item, "".concat(NAMESPACE, "-large"));
                }
                if (isFunction(click)) {
                  addListener(item, EVENT_CLICK, click);
                }
                list.appendChild(item);
              });
              toolbar.appendChild(list);
            } else {
              addClass(toolbar, CLASS_HIDE);
            }
            if (!options.rotatable) {
              var rotates = toolbar.querySelectorAll('li[class*="rotate"]');
              addClass(rotates, CLASS_INVISIBLE);
              forEach(rotates, function(rotate) {
                toolbar.appendChild(rotate);
              });
            }
            if (options.inline) {
              addClass(button, CLASS_FULLSCREEN);
              setStyle(viewer, {
                zIndex: options.zIndexInline
              });
              if (window.getComputedStyle(parent).position === "static") {
                setStyle(parent, {
                  position: "relative"
                });
              }
              parent.insertBefore(viewer, element.nextSibling);
            } else {
              addClass(button, CLASS_CLOSE);
              addClass(viewer, CLASS_FIXED);
              addClass(viewer, CLASS_FADE);
              addClass(viewer, CLASS_HIDE);
              setStyle(viewer, {
                zIndex: options.zIndex
              });
              var container = options.container;
              if (isString(container)) {
                container = element.ownerDocument.querySelector(container);
              }
              if (!container) {
                container = this.body;
              }
              container.appendChild(viewer);
            }
            if (options.inline) {
              this.render();
              this.bind();
              this.isShown = true;
            }
            this.ready = true;
            if (isFunction(options.ready)) {
              addListener(element, EVENT_READY, options.ready, {
                once: true
              });
            }
            if (dispatchEvent(element, EVENT_READY) === false) {
              this.ready = false;
              return;
            }
            if (this.ready && options.inline) {
              this.view(this.index);
            }
          }
          /**
           * Get the no conflict viewer class.
           * @returns {Viewer} The viewer class.
           */
        }], [{
          key: "noConflict",
          value: function noConflict() {
            window.Viewer = AnotherViewer;
            return Viewer2;
          }
          /**
           * Change the default options.
           * @param {Object} options - The new default options.
           */
        }, {
          key: "setDefaults",
          value: function setDefaults(options) {
            assign(DEFAULTS, isPlainObject(options) && options);
          }
        }]);
        return Viewer2;
      }();
      assign(Viewer.prototype, render, events, handlers, methods, others);
      var je = typeof global == "object" && global && global.Object === Object && global;
      const re = je;
      var _e = typeof self == "object" && self && self.Object === Object && self, Ae = re || _e || Function("return this")();
      const E = Ae;
      var xe = E.Symbol;
      const S = xe;
      var te = Object.prototype, Pe = te.hasOwnProperty, Se = te.toString, O = S ? S.toStringTag : void 0;
      function Ie(e) {
        var r = Pe.call(e, O), t = e[O];
        try {
          e[O] = void 0;
          var n = true;
        } catch {
        }
        var i = Se.call(e);
        return n && (r ? e[O] = t : delete e[O]), i;
      }
      var Ee = Object.prototype, Me = Ee.toString;
      function Ve(e) {
        return Me.call(e);
      }
      var Ce = "[object Null]", Be = "[object Undefined]", H = S ? S.toStringTag : void 0;
      function M(e) {
        return e == null ? e === void 0 ? Be : Ce : H && H in Object(e) ? Ie(e) : Ve(e);
      }
      function V(e) {
        return e != null && typeof e == "object";
      }
      var Ne = Array.isArray;
      const De = Ne;
      function b(e) {
        var r = typeof e;
        return e != null && (r == "object" || r == "function");
      }
      function ne(e) {
        return e;
      }
      var Xe = "[object AsyncFunction]", ze = "[object Function]", Qe = "[object GeneratorFunction]", Ye = "[object Proxy]";
      function ie(e) {
        if (!b(e))
          return false;
        var r = M(e);
        return r == ze || r == Qe || r == Xe || r == Ye;
      }
      var Ze = E["__core-js_shared__"];
      const F = Ze;
      var X = function() {
        var e = /[^.]+$/.exec(F && F.keys && F.keys.IE_PROTO || "");
        return e ? "Symbol(src)_1." + e : "";
      }();
      function ke(e) {
        return !!X && X in e;
      }
      var er = Function.prototype, rr = er.toString;
      function tr(e) {
        if (e != null) {
          try {
            return rr.call(e);
          } catch {
          }
          try {
            return e + "";
          } catch {
          }
        }
        return "";
      }
      var nr = /[\\^$.*+?()[\]{}|]/g, ir = /^\[object .+?Constructor\]$/, or = Function.prototype, ar = Object.prototype, ur = or.toString, sr = ar.hasOwnProperty, cr = RegExp(
        "^" + ur.call(sr).replace(nr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
      );
      function fr(e) {
        if (!b(e) || ke(e))
          return false;
        var r = ie(e) ? cr : ir;
        return r.test(tr(e));
      }
      function dr(e, r) {
        return e == null ? void 0 : e[r];
      }
      function lr(e, r) {
        var t = dr(e, r);
        return fr(t) ? t : void 0;
      }
      function pr(e, r, t) {
        switch (t.length) {
          case 0:
            return e.call(r);
          case 1:
            return e.call(r, t[0]);
          case 2:
            return e.call(r, t[0], t[1]);
          case 3:
            return e.call(r, t[0], t[1], t[2]);
        }
        return e.apply(r, t);
      }
      var gr = 800, vr = 16, yr = Date.now;
      function br(e) {
        var r = 0, t = 0;
        return function() {
          var n = yr(), i = vr - (n - t);
          if (t = n, i > 0) {
            if (++r >= gr)
              return arguments[0];
          } else
            r = 0;
          return e.apply(void 0, arguments);
        };
      }
      function mr(e) {
        return function() {
          return e;
        };
      }
      var hr = function() {
        try {
          var e = lr(Object, "defineProperty");
          return e({}, "", {}), e;
        } catch {
        }
      }();
      const I = hr;
      var wr = I ? function(e, r) {
        return I(e, "toString", {
          configurable: true,
          enumerable: false,
          value: mr(r),
          writable: true
        });
      } : ne;
      const Tr = wr;
      var $r = br(Tr);
      const Or = $r;
      var jr = 9007199254740991, _r = /^(?:0|[1-9]\d*)$/;
      function oe(e, r) {
        var t = typeof e;
        return r = r == null ? jr : r, !!r && (t == "number" || t != "symbol" && _r.test(e)) && e > -1 && e % 1 == 0 && e < r;
      }
      function ae(e, r, t) {
        r == "__proto__" && I ? I(e, r, {
          configurable: true,
          enumerable: true,
          value: t,
          writable: true
        }) : e[r] = t;
      }
      function W(e, r) {
        return e === r || e !== e && r !== r;
      }
      var Ar = Object.prototype, xr = Ar.hasOwnProperty;
      function ue(e, r, t) {
        var n = e[r];
        (!(xr.call(e, r) && W(n, t)) || t === void 0 && !(r in e)) && ae(e, r, t);
      }
      function Pr(e, r, t, n) {
        var i = !t;
        t || (t = {});
        for (var u = -1, c = r.length; ++u < c; ) {
          var a = r[u], d = void 0;
          d === void 0 && (d = e[a]), i ? ae(t, a, d) : ue(t, a, d);
        }
        return t;
      }
      var z = Math.max;
      function Sr(e, r, t) {
        return r = z(r === void 0 ? e.length - 1 : r, 0), function() {
          for (var n = arguments, i = -1, u = z(n.length - r, 0), c = Array(u); ++i < u; )
            c[i] = n[r + i];
          i = -1;
          for (var a = Array(r + 1); ++i < r; )
            a[i] = n[i];
          return a[r] = t(c), pr(e, this, a);
        };
      }
      function se(e, r) {
        return Or(Sr(e, r, ne), e + "");
      }
      var Ir = 9007199254740991;
      function ce(e) {
        return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Ir;
      }
      function C(e) {
        return e != null && ce(e.length) && !ie(e);
      }
      function fe(e, r, t) {
        if (!b(t))
          return false;
        var n = typeof r;
        return (n == "number" ? C(t) && oe(r, t.length) : n == "string" && r in t) ? W(t[r], e) : false;
      }
      function Er(e) {
        return se(function(r, t) {
          var n = -1, i = t.length, u = i > 1 ? t[i - 1] : void 0, c = i > 2 ? t[2] : void 0;
          for (u = e.length > 3 && typeof u == "function" ? (i--, u) : void 0, c && fe(t[0], t[1], c) && (u = i < 3 ? void 0 : u, i = 1), r = Object(r); ++n < i; ) {
            var a = t[n];
            a && e(r, a, n, u);
          }
          return r;
        });
      }
      var Mr = Object.prototype;
      function L(e) {
        var r = e && e.constructor, t = typeof r == "function" && r.prototype || Mr;
        return e === t;
      }
      function Vr(e, r) {
        for (var t = -1, n = Array(e); ++t < e; )
          n[t] = r(t);
        return n;
      }
      var Cr = "[object Arguments]";
      function Q(e) {
        return V(e) && M(e) == Cr;
      }
      var de = Object.prototype, Br = de.hasOwnProperty, Ur = de.propertyIsEnumerable, Fr = Q(/* @__PURE__ */ function() {
        return arguments;
      }()) ? Q : function(e) {
        return V(e) && Br.call(e, "callee") && !Ur.call(e, "callee");
      };
      const Nr = Fr;
      function Dr() {
        return false;
      }
      var le = typeof exports == "object" && exports && !exports.nodeType && exports, Y = le && typeof module == "object" && module && !module.nodeType && module, Wr = Y && Y.exports === le, Z = Wr ? E.Buffer : void 0, Lr = Z ? Z.isBuffer : void 0, Rr = Lr || Dr;
      const Kr = Rr;
      var Gr = "[object Arguments]", Hr = "[object Array]", qr = "[object Boolean]", Jr = "[object Date]", Xr = "[object Error]", zr = "[object Function]", Qr = "[object Map]", Yr = "[object Number]", Zr = "[object Object]", kr = "[object RegExp]", et = "[object Set]", rt = "[object String]", tt = "[object WeakMap]", nt = "[object ArrayBuffer]", it = "[object DataView]", ot = "[object Float32Array]", at = "[object Float64Array]", ut = "[object Int8Array]", st = "[object Int16Array]", ct = "[object Int32Array]", ft = "[object Uint8Array]", dt = "[object Uint8ClampedArray]", lt = "[object Uint16Array]", pt = "[object Uint32Array]", f = {};
      f[ot] = f[at] = f[ut] = f[st] = f[ct] = f[ft] = f[dt] = f[lt] = f[pt] = true;
      f[Gr] = f[Hr] = f[nt] = f[qr] = f[it] = f[Jr] = f[Xr] = f[zr] = f[Qr] = f[Yr] = f[Zr] = f[kr] = f[et] = f[rt] = f[tt] = false;
      function gt(e) {
        return V(e) && ce(e.length) && !!f[M(e)];
      }
      function vt(e) {
        return function(r) {
          return e(r);
        };
      }
      var pe = typeof exports == "object" && exports && !exports.nodeType && exports, j = pe && typeof module == "object" && module && !module.nodeType && module, yt = j && j.exports === pe, N = yt && re.process, bt = function() {
        try {
          var e = j && j.require && j.require("util").types;
          return e || N && N.binding && N.binding("util");
        } catch {
        }
      }();
      const k = bt;
      var ee = k && k.isTypedArray, mt = ee ? vt(ee) : gt;
      const ht = mt;
      var wt = Object.prototype, Tt = wt.hasOwnProperty;
      function ge(e, r) {
        var t = De(e), n = !t && Nr(e), i = !t && !n && Kr(e), u = !t && !n && !i && ht(e), c = t || n || i || u, a = c ? Vr(e.length, String) : [], d = a.length;
        for (var s in e)
          (r || Tt.call(e, s)) && !(c && (s == "length" || i && (s == "offset" || s == "parent") || u && (s == "buffer" || s == "byteLength" || s == "byteOffset") || oe(s, d))) && a.push(s);
        return a;
      }
      function $t(e, r) {
        return function(t) {
          return e(r(t));
        };
      }
      var Ot = $t(Object.keys, Object);
      const jt = Ot;
      var _t = Object.prototype, At = _t.hasOwnProperty;
      function xt(e) {
        if (!L(e))
          return jt(e);
        var r = [];
        for (var t in Object(e))
          At.call(e, t) && t != "constructor" && r.push(t);
        return r;
      }
      function Pt(e) {
        return C(e) ? ge(e) : xt(e);
      }
      var St = Object.prototype, It = St.hasOwnProperty, Et = Er(function(e, r) {
        if (L(r) || C(r)) {
          Pr(r, Pt(r), e);
          return;
        }
        for (var t in r)
          It.call(r, t) && ue(e, t, r[t]);
      });
      const Mt = Et;
      function Vt(e) {
        var r = [];
        if (e != null)
          for (var t in Object(e))
            r.push(t);
        return r;
      }
      var Ct = Object.prototype, Bt = Ct.hasOwnProperty;
      function Ut(e) {
        if (!b(e))
          return Vt(e);
        var r = L(e), t = [];
        for (var n in e)
          n == "constructor" && (r || !Bt.call(e, n)) || t.push(n);
        return t;
      }
      function Ft(e) {
        return C(e) ? ge(e, true) : Ut(e);
      }
      var ve = Object.prototype, Kt = ve.hasOwnProperty;
      se(function(e, r) {
        e = Object(e);
        var t = -1, n = r.length, i = n > 2 ? r[2] : void 0;
        for (i && fe(r[0], r[1], i) && (n = 1); ++t < n; )
          for (var u = r[t], c = Ft(u), a = -1, d = c.length; ++a < d; ) {
            var s = c[a], m = e[s];
            (m === void 0 || W(m, ve[s]) && !Kt.call(e, s)) && (e[s] = u[s]);
          }
        return e;
      });
      const qt = ({ images: e = [], options: r }) => {
        r = Mt(r, {
          inline: false
        });
        const t = document.createElement("div"), n = vue.h(
          "div",
          {
            style: {
              display: "none"
            },
            class: ["__viewer-token"]
          },
          e.map((a) => vue.h(
            "img",
            typeof a == "string" ? { src: a } : a
          ))
        );
        vue.render(n, t);
        const i = t.firstElementChild;
        document.body.appendChild(i);
        const u = new Viewer(i, r), c = u.destroy.bind(u);
        return u.destroy = function() {
          return c(), vue.render(null, t), u;
        }, u.show(), i.addEventListener("hidden", function() {
          this.viewer === u && u.destroy();
        }), u;
      };
      vue.defineComponent({
        name: "Viewer",
        props: {
          images: {
            type: Array,
            default: () => []
          },
          rebuild: {
            type: Boolean,
            default: false
          },
          trigger: {
            type: Object,
            default: null
          },
          options: {
            type: Object,
            default: () => null
          }
        },
        emits: ["inited"],
        setup(e, { emit: r }) {
          let t;
          const n = vue.ref();
          function i() {
            t = new Viewer(n.value, e.options), r("inited", t);
          }
          function u() {
            t && t.destroy();
          }
          function c() {
            u(), i();
          }
          function a() {
            t ? (t.update(), r("inited", t)) : i();
          }
          function d() {
            e.rebuild ? c() : a();
          }
          const s = { deep: true };
          return vue.watch(() => e.images, () => {
            vue.nextTick(() => {
              d();
            });
          }, s), vue.watch(() => e.trigger, () => {
            vue.nextTick(() => {
              d();
            });
          }, s), vue.watch(() => e.options, () => {
            vue.nextTick(() => {
              c();
            });
          }, s), vue.onMounted(() => i()), vue.onUnmounted(() => u()), {
            root: n,
            createViewer: i,
            rebuildViewer: c,
            updateViewer: a,
            destroyViewer: u
          };
        }
      });
      const _hoisted_1$2 = {
        xmlns: "http://www.w3.org/2000/svg",
        "xmlns:xlink": "http://www.w3.org/1999/xlink",
        viewBox: "0 0 24 24"
      };
      const _hoisted_2$2 = /* @__PURE__ */ vue.createElementVNode(
        "g",
        {
          fill: "none"
        },
        [
          /* @__PURE__ */ vue.createElementVNode("path", {
            d: "M4.5 5.75c0-.69.56-1.25 1.25-1.25h2a.75.75 0 0 0 0-1.5h-2A2.75 2.75 0 0 0 3 5.75v2a.75.75 0 0 0 1.5 0v-2zm0 12.5c0 .69.56 1.25 1.25 1.25h2a.75.75 0 0 1 0 1.5h-2A2.75 2.75 0 0 1 3 18.25v-2a.75.75 0 0 1 1.5 0v2zM18.25 4.5c.69 0 1.25.56 1.25 1.25v2a.75.75 0 0 0 1.5 0v-2A2.75 2.75 0 0 0 18.25 3h-2a.75.75 0 0 0 0 1.5h2zm1.25 13.75c0 .69-.56 1.25-1.25 1.25h-2a.75.75 0 0 0 0 1.5h2A2.75 2.75 0 0 0 21 18.25v-2a.75.75 0 0 0-1.5 0v2z",
            fill: "currentColor"
          })
        ],
        -1
        /* HOISTED */
      );
      const _hoisted_3$2 = [_hoisted_2$2];
      const FullScreenMaximize24Regular = vue.defineComponent({
        name: "FullScreenMaximize24Regular",
        render: function render2(_ctx, _cache) {
          return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _hoisted_3$2);
        }
      });
      const _hoisted_1$1 = {
        xmlns: "http://www.w3.org/2000/svg",
        "xmlns:xlink": "http://www.w3.org/1999/xlink",
        viewBox: "0 0 24 24"
      };
      const _hoisted_2$1 = /* @__PURE__ */ vue.createElementVNode(
        "g",
        {
          fill: "none"
        },
        [
          /* @__PURE__ */ vue.createElementVNode("path", {
            d: "M9 4a1 1 0 0 0-2 0v2.5a.5.5 0 0 1-.5.5H4a1 1 0 0 0 0 2h2.5A2.5 2.5 0 0 0 9 6.5V4zm0 16a1 1 0 1 1-2 0v-2.5a.5.5 0 0 0-.5-.5H4a1 1 0 1 1 0-2h2.5A2.5 2.5 0 0 1 9 17.5V20zm7-17a1 1 0 0 0-1 1v2.5A2.5 2.5 0 0 0 17.5 9H20a1 1 0 1 0 0-2h-2.5a.5.5 0 0 1-.5-.5V4a1 1 0 0 0-1-1zm-1 17a1 1 0 1 0 2 0v-2.5a.5.5 0 0 1 .5-.5H20a1 1 0 1 0 0-2h-2.5a2.5 2.5 0 0 0-2.5 2.5V20z",
            fill: "currentColor"
          })
        ],
        -1
        /* HOISTED */
      );
      const _hoisted_3$1 = [_hoisted_2$1];
      const FullScreenMinimize24Filled = vue.defineComponent({
        name: "FullScreenMinimize24Filled",
        render: function render2(_ctx, _cache) {
          return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$1, _hoisted_3$1);
        }
      });
      var dist = {};
      var patternTree = {};
      var toHex$1 = {};
      Object.defineProperty(toHex$1, "__esModule", { value: true });
      toHex$1.fromHex = toHex$1.toHex = void 0;
      const hex = (num) => new Number(num).toString(16).toLowerCase();
      const toHex = (num) => `0x${hex(num).length === 1 ? "0" + hex(num) : hex(num)}`;
      toHex$1.toHex = toHex;
      const fromHex = (hex2) => new Number(hex2);
      toHex$1.fromHex = fromHex;
      var tree$1 = {};
      (function(exports2) {
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.createComplexNode = exports2.createNode = exports2.merge = void 0;
        const createMatch = (leaf) => ({
          typename: leaf.typename,
          mime: leaf.info.mime,
          extension: leaf.info.extension
        });
        const isMatchingNode = (tree2, path) => tree2 && path.length === 0;
        const head = (arr) => arr[0];
        const tail = (arr) => arr.slice(1, arr.length);
        const merge = (node, tree2) => {
          if (node.bytes.length === 0)
            return tree2;
          const currentByte = head(node.bytes);
          const path = tail(node.bytes);
          const currentTree = tree2.bytes[currentByte];
          if (isMatchingNode(currentTree, path)) {
            const matchingNode = tree2.bytes[currentByte];
            tree2.bytes[currentByte] = {
              ...matchingNode,
              matches: [
                ...matchingNode.matches ? matchingNode.matches : [],
                createMatch(node)
              ]
            };
            return tree2;
          }
          if (tree2.bytes[currentByte]) {
            tree2.bytes[currentByte] = exports2.merge(exports2.createNode(node.typename, path, node.info), tree2.bytes[currentByte]);
            return tree2;
          }
          if (!tree2.bytes[currentByte]) {
            tree2.bytes[currentByte] = {
              ...tree2.bytes[currentByte],
              ...exports2.createComplexNode(node.typename, path, node.info)
            };
          }
          return tree2;
        };
        exports2.merge = merge;
        const createNode = (typename, bytes, info) => {
          return { typename, bytes, info: info ? info : {} };
        };
        exports2.createNode = createNode;
        const createComplexNode = (typename, bytes, info) => {
          let obj = {
            bytes: {},
            matches: void 0
          };
          const currentKey = head(bytes);
          const path = tail(bytes);
          if (bytes.length === 0) {
            return {
              matches: [
                createMatch({
                  typename,
                  info: info ? { extension: info.extension, mime: info.mime } : {}
                })
              ],
              bytes: {}
            };
          }
          obj.bytes[currentKey] = exports2.createComplexNode(typename, path, info);
          return obj;
        };
        exports2.createComplexNode = createComplexNode;
      })(tree$1);
      Object.defineProperty(patternTree, "__esModule", { value: true });
      const toHex_1 = toHex$1;
      const tree_1 = tree$1;
      let tree = {
        noOffset: null,
        offset: {}
      };
      const add = (typename, signature, additionalInfo, offset) => {
        if (offset) {
          const existing = tree.offset[toHex_1.toHex(offset)];
          if (!existing) {
            tree.offset[toHex_1.toHex(offset)] = tree_1.createComplexNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo);
          } else {
            const merged = tree_1.merge(tree_1.createNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo), { ...existing });
            tree.offset[toHex_1.toHex(offset)] = merged;
          }
        } else {
          if (tree.noOffset === null) {
            tree.noOffset = tree_1.createComplexNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo);
          } else {
            tree.noOffset = tree_1.merge(tree_1.createNode(typename, signature.map((e) => e.toLowerCase()), additionalInfo), tree.noOffset);
          }
        }
      };
      add("gif", ["0x47", "0x49", "0x46", "0x38", "0x37", "0x61"], {
        mime: "image/gif",
        extension: "gif"
      });
      add("gif", ["0x47", "0x49", "0x46", "0x38", "0x39", "0x61"], {
        mime: "image/gif",
        extension: "gif"
      });
      add("jpg", ["0xFF", "0xD8", "0xFF"], {
        mime: "image/jpeg",
        extension: "jpeg"
      });
      add("webp", [
        "0x52",
        "0x49",
        "0x46",
        "0x46",
        "?",
        "?",
        "?",
        "?",
        "0x57",
        "0x45",
        "0x42",
        "0x50"
      ], { mime: "image/webp", extension: "webp" });
      add("heif", ["0x66", "0x74", "0x79", "0x70", "0x6D", "0x69", "0x66", "0x31"], { mime: "image/heif", extension: "heif" }, 4);
      add("heif", ["0x66", "0x74", "0x79", "0x70", "0x68", "0x65", "0x69", "0x63"], { mime: "image/heif", extension: "heic" }, 4);
      add("rpm", ["0xed", "0xab", "0xee", "0xdb"]);
      add("bin", ["0x53", "0x50", "0x30", "0x31"], {
        mime: "application/octet-stream",
        extension: "bin"
      });
      add("pic", ["0x00"]);
      add("pif", ["0x00"]);
      add("sea", ["0x00"]);
      add("ytr", ["0x00"]);
      add("mp4", ["0x66", "0x74", "0x79", "0x70"], { mime: "video/mp4", extension: "mp4" }, 4);
      add("ttf", ["0x00", "0x01", "0x00", "0x00", "0x00"], {
        mime: "font/ttf",
        extension: "ttf"
      });
      add("otf", ["0x4F", "0x54", "0x54", "0x4F"], {
        mime: "font/otf",
        extension: "otf"
      });
      add("eot", ["0x50", "0x4C"], {
        mime: "application/vnd.ms-fontobject",
        extension: "eot"
      });
      add("woff", ["0x77", "0x4F", "0x46", "0x46"], {
        mime: "font/woff",
        extension: "woff"
      });
      add("woff2", ["0x77", "0x4F", "0x46", "0x32"], {
        mime: "font/woff2",
        extension: "woff2"
      });
      add("pdb", [
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00"
      ]);
      add("dba", ["0xBE", "0xBA", "0xFE", "0xCA"]);
      add("dba2", ["0x00", "0x01", "0x42", "0x44"]);
      add("tda", ["0x00", "0x01", "0x44", "0x54"]);
      add("tda2", ["0x00", "0x01", "0x00", "0x00"]);
      add("ico", ["0x00", "0x00", "0x01", "0x00"], {
        mime: "image/x-icon",
        extension: "ico"
      });
      add("3gp", ["0x66", "0x74", "0x79", "0x70", "0x33", "0x67"]);
      add("z", ["0x1F", "0x9D"]);
      add("tar.z", ["0x1F", "0xA0"]);
      add("bac", [
        "0x42",
        "0x41",
        "0x43",
        "0x4B",
        "0x4D",
        "0x49",
        "0x4B",
        "0x45",
        "0x44",
        "0x49",
        "0x53",
        "0x4B"
      ]);
      add("bz2", ["0x42", "0x5A", "0x68"], {
        mime: "application/x-bzip2",
        extension: "bz2"
      });
      add("tif", ["0x49", "0x49", "0x2A", "0x00"], {
        mime: "image/tiff",
        extension: "tif"
      });
      add("tiff", ["0x4D", "0x4D", "0x00", "0x2A"], {
        mime: "image/tiff",
        extension: "tiff"
      });
      add("cr2", [
        "0x49",
        "0x49",
        "0x2A",
        "0x00",
        "0x10",
        "0x00",
        "0x00",
        "0x00",
        "0x43",
        "0x52"
      ]);
      add("cin", ["0x80", "0x2A", "0x5F", "0xD7"]);
      add("cin1", ["0x52", "0x4E", "0x43", "0x01"]);
      add("cin2", ["0x52", "0x4E", "0x43", "0x02"]);
      add("dpx", ["0x53", "0x44", "0x50", "0x58"]);
      add("dpx2", ["0x58", "0x50", "0x44", "0x53"]);
      add("exr", ["0x76", "0x2F", "0x31", "0x01"]);
      add("bpg", ["0x42", "0x50", "0x47", "0xFB"]);
      add("ilbm", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x49",
        "0x4C",
        "0x42",
        "0x4D"
      ]);
      add("8svx", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x38",
        "0x53",
        "0x56",
        "0x58"
      ]);
      add("acbm", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x41",
        "0x43",
        "0x42",
        "0x4D"
      ]);
      add("anbm", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x41",
        "0x4E",
        "0x42",
        "0x4D"
      ]);
      add("anim", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x41",
        "0x4E",
        "0x49",
        "0x4D"
      ]);
      add("faxx", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x46",
        "0x41",
        "0x58",
        "0x58"
      ]);
      add("ftxt", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x46",
        "0x54",
        "0x58",
        "0x54"
      ]);
      add("smus", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x53",
        "0x4D",
        "0x55",
        "0x53"
      ]);
      add("cmus", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x43",
        "0x4D",
        "0x55",
        "0x53"
      ]);
      add("yuvn", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x59",
        "0x55",
        "0x56",
        "0x4E"
      ]);
      add("iff", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x46",
        "0x41",
        "0x4E",
        "0x54"
      ]);
      add("aiff", [
        "0x46",
        "0x4F",
        "0x52",
        "0x4D",
        "?",
        "?",
        "?",
        "?",
        "0x41",
        "0x49",
        "0x46",
        "0x46"
      ], { mime: "audio/x-aiff", extension: "aiff" });
      add("idx", ["0x49", "0x4E", "0x44", "0x58"]);
      add("lz", ["0x4C", "0x5A", "0x49", "0x50"]);
      add("exe", ["0x4D", "0x5A"]);
      add("zip", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/zip",
        extension: "zip"
      });
      add("zip", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/zip",
        extension: "zip"
      });
      add("zip", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/zip",
        extension: "zip"
      });
      add("jar", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/java-archive",
        extension: "jar"
      });
      add("jar", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/java-archive",
        extension: "jar"
      });
      add("jar", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/java-archive",
        extension: "jar"
      });
      add("odt", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/vnd.oasis.opendocument.text",
        extension: "odt"
      });
      add("odt", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/vnd.oasis.opendocument.text",
        extension: "odt"
      });
      add("odt", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/vnd.oasis.opendocument.text",
        extension: "odt"
      });
      add("ods", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/vnd.oasis.opendocument.spreadsheet",
        extension: "ods"
      });
      add("ods", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/vnd.oasis.opendocument.spreadsheet",
        extension: "ods"
      });
      add("ods", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/vnd.oasis.opendocument.spreadsheet",
        extension: "ods"
      });
      add("odp", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/vnd.oasis.opendocument.presentation",
        extension: "odp"
      });
      add("odp", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/vnd.oasis.opendocument.presentation",
        extension: "odp"
      });
      add("odp", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/vnd.oasis.opendocument.presentation",
        extension: "odp"
      });
      add("docx", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        extension: "docx"
      });
      add("docx", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        extension: "docx"
      });
      add("docx", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        extension: "docx"
      });
      add("xlsx", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        extension: "xlsx"
      });
      add("xlsx", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        extension: "xlsx"
      });
      add("xlsx", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        extension: "xlsx"
      });
      add("pptx", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
        extension: "pptx"
      });
      add("pptx", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
        extension: "pptx"
      });
      add("pptx", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
        extension: "pptx"
      });
      add("vsdx", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/vnd.ms-visio.drawing",
        extension: "vsdx"
      });
      add("vsdx", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/vnd.ms-visio.drawing",
        extension: "vsdx"
      });
      add("vsdx", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/vnd.ms-visio.drawing",
        extension: "vsdx"
      });
      add("apk", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/vnd.android.package-archive",
        extension: "apk"
      });
      add("apk", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/vnd.android.package-archive",
        extension: "apk"
      });
      add("apk", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/vnd.android.package-archive",
        extension: "apk"
      });
      add("aar", ["0x50", "0x4B", "0x03", "0x04"], {
        mime: "application/vnd.android.package-archive",
        extension: "aar"
      });
      add("aar", ["0x50", "0x4B", "0x05", "0x06"], {
        mime: "application/vnd.android.package-archive",
        extension: "aar"
      });
      add("aar", ["0x50", "0x4B", "0x07", "0x08"], {
        mime: "application/vnd.android.package-archive",
        extension: "aar"
      });
      add("rar", ["0x52", "0x61", "0x72", "0x21", "0x1A", "0x07", "0x00"], {
        mime: "application/vnd.rar",
        extension: "rar"
      });
      add("rar", ["0x52", "0x61", "0x72", "0x21", "0x1A", "0x07", "0x01", "0x00"], {
        mime: "application/vnd.rar",
        extension: "rar"
      });
      add("rar", ["0x7F", "0x45", "0x4C", "0x46"], {
        mime: "application/vnd.rar",
        extension: "rar"
      });
      add("png", ["0x89", "0x50", "0x4E", "0x47", "0x0D", "0x0A", "0x1A", "0x0A"], {
        mime: "image/png",
        extension: "png"
      });
      add("apng", ["0x89", "0x50", "0x4E", "0x47", "0x0D", "0x0A", "0x1A", "0x0A"], {
        mime: "image/apng",
        extension: "apng"
      });
      add("class", ["0xCA", "0xFE", "0xBA", "0xBE"]);
      add("class", ["0xEF", "0xBB", "0xBF"]);
      add("class", ["0xFE", "0xed", "0xFA", "0xCE"], void 0, 4096);
      add("class", ["0xFE", "0xed", "0xFA", "0xCF"], void 0, 4096);
      add("class", ["0xCE", "0xFA", "0xed", "0xFE"]);
      add("class", ["0xCF", "0xFA", "0xed", "0xFE"]);
      add("class", ["0xFF", "0xFE"]);
      add("class", ["0xFF", "0xFE"]);
      add("class", ["0xFF", "0xFE", "0x00", "0x00"]);
      add("ps", ["0x25", "0x21", "0x50", "0x53"], {
        mime: "application/postscript",
        extension: ".ps"
      });
      add("pdf", ["0x25", "0x50", "0x44", "0x46"], {
        mime: "application/pdf",
        extension: "pdf"
      });
      add("asf", [
        "0x30",
        "0x26",
        "0xB2",
        "0x75",
        "0x8E",
        "0x66",
        "0xCF",
        "0x11",
        "0xA6",
        "0xD9",
        "0x00",
        "0xAA",
        "0x00",
        "0x62",
        "0xCE",
        "0x6C"
      ]);
      add("wma", [
        "0x30",
        "0x26",
        "0xB2",
        "0x75",
        "0x8E",
        "0x66",
        "0xCF",
        "0x11",
        "0xA6",
        "0xD9",
        "0x00",
        "0xAA",
        "0x00",
        "0x62",
        "0xCE",
        "0x6C"
      ]);
      add("wmv", [
        "0x30",
        "0x26",
        "0xB2",
        "0x75",
        "0x8E",
        "0x66",
        "0xCF",
        "0x11",
        "0xA6",
        "0xD9",
        "0x00",
        "0xAA",
        "0x00",
        "0x62",
        "0xCE",
        "0x6C"
      ]);
      add("deploymentimage", [
        "0x24",
        "0x53",
        "0x44",
        "0x49",
        "0x30",
        "0x30",
        "0x30",
        "0x31"
      ]);
      add("ogv", [
        "0x4F",
        "0x67",
        "0x67",
        "0x53",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "0x80",
        "0x74",
        "0x68",
        "0x65",
        "0x6F",
        "0x72",
        "0x61"
      ], {
        mime: "video/ogg",
        extension: "ogv"
      });
      add("ogm", [
        "0x4F",
        "0x67",
        "0x67",
        "0x53",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "0x01",
        "0x76",
        "0x69",
        "0x64",
        "0x65",
        "0x6F",
        "0x00"
      ], {
        mime: "video/ogg",
        extension: "ogm"
      });
      add("oga", [
        "0x4F",
        "0x67",
        "0x67",
        "0x53",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "0x7F",
        "0x46",
        "0x4C",
        "0x41",
        "0x43"
      ], {
        mime: "audio/ogg",
        extension: "oga"
      });
      add("spx", [
        "0x4F",
        "0x67",
        "0x67",
        "0x53",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "0x53",
        "0x70",
        "0x65",
        "0x65",
        "0x78",
        "0x20",
        "0x20"
      ], {
        mime: "audio/ogg",
        extension: "spx"
      });
      add("ogg", [
        "0x4F",
        "0x67",
        "0x67",
        "0x53",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "?",
        "0x01",
        "0x76",
        "0x6F",
        "0x72",
        "0x62",
        "0x69",
        "0x73"
      ], {
        mime: "audio/ogg",
        extension: "ogg"
      });
      add("ogx", ["0x4F", "0x67", "0x67", "0x53"], {
        mime: "application/ogg",
        extension: "ogx"
      });
      add("psd", ["0x38", "0x42", "0x50", "0x53"], {
        mime: "application/x-photoshop",
        extension: "psd"
      });
      add("clip", ["0x43", "0x53", "0x46", "0x43", "0x48", "0x55", "0x4e", "0x4b"]);
      add("wav", [
        "0x52",
        "0x49",
        "0x46",
        "0x46",
        "?",
        "?",
        "?",
        "?",
        "0x57",
        "0x41",
        "0x56",
        "0x45"
      ], { mime: "audio/x-wav", extension: "wav" });
      add("avi", [
        "0x52",
        "0x49",
        "0x46",
        "0x46",
        "?",
        "?",
        "?",
        "?",
        "0x41",
        "0x56",
        "0x49",
        "0x20"
      ], { mime: "video/x-msvideo", extension: "avi" });
      add("mp3", ["0xFF", "0xFB"], { mime: "audio/mpeg", extension: "mp3" });
      add("mp3", ["0xFF", "0xF3"], { mime: "audio/mpeg", extension: "mp3" });
      add("mp3", ["0xFF", "0xF2"], { mime: "audio/mpeg", extension: "mp3" });
      add("mp3", ["0x49", "0x44", "0x33"], { mime: "audio/mpeg", extension: "mp3" });
      add("bmp", ["0x42", "0x4D"], { mime: "image/bmp", extension: "bmp" });
      add("iso", ["0x43", "0x44", "0x30", "0x30", "0x31"]);
      add("flac", ["0x66", "0x4C", "0x61", "0x43"]);
      add("mid", ["0x4D", "0x54", "0x68", "0x64"], {
        mime: "audio/midi",
        extension: "mid"
      });
      add("midi", ["0x4D", "0x54", "0x68", "0x64"], {
        mime: "audio/midi",
        extension: "midi"
      });
      add("doc", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"], {
        mime: "application/msword",
        extension: "doc"
      });
      add("xls", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"], {
        mime: "application/vnd.ms-excel",
        extension: "xls"
      });
      add("ppt", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"], {
        mime: "application/vnd.ms-powerpoint",
        extension: "ppt"
      });
      add("msg", ["0xD0", "0xCF", "0x11", "0xE0", "0xA1", "0xB1", "0x1A", "0xE1"]);
      add("dex", ["0x64", "0x65", "0x78", "0x0A", "0x30", "0x33", "0x35", "0x00"]);
      add("vmdk", ["0x4B", "0x44", "0x4D"]);
      add("crx", ["0x43", "0x72", "0x32", "0x34"]);
      add("fh8", ["0x41", "0x47", "0x44", "0x33"]);
      add("cwk", [
        "0x05",
        "0x07",
        "0x00",
        "0x00",
        "0x42",
        "0x4F",
        "0x42",
        "0x4F",
        "0x05",
        "0x07",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x01"
      ]);
      add("cwk", [
        "0x06",
        "0x07",
        "0xE1",
        "0x00",
        "0x42",
        "0x4F",
        "0x42",
        "0x4F",
        "0x06",
        "0x07",
        "0xE1",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x00",
        "0x01"
      ]);
      add("toast", ["0x45", "0x52", "0x02", "0x00", "0x00", "0x00"]);
      add("toast", ["0x8B", "0x45", "0x52", "0x02", "0x00", "0x00", "0x00"]);
      add("dmg", ["0x78", "0x01", "0x73", "0x0D", "0x62", "0x62", "0x60"]);
      add("xar", ["0x78", "0x61", "0x72", "0x21"]);
      add("dat", ["0x50", "0x4D", "0x4F", "0x43", "0x43", "0x4D", "0x4F", "0x43"]);
      add("nes", ["0x4E", "0x45", "0x53", "0x1A"]);
      add("tar", ["0x75", "0x73", "0x74", "0x61", "0x72", "0x00", "0x30", "0x30"], {
        // As per Mozilla documentation available at:
        // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
        // or wikipedia page:
        // https://en.wikipedia.org/wiki/List_of_archive_formats
        mime: "application/x-tar",
        extension: "tar"
      }, 257);
      add("tar", ["0x75", "0x73", "0x74", "0x61", "0x72", "0x20", "0x20", "0x00"], {
        mime: "application/x-tar",
        extension: "tar"
      }, 257);
      add("tox", ["0x74", "0x6F", "0x78", "0x33"]);
      add("mlv", ["0x4D", "0x4C", "0x56", "0x49"]);
      add("windowsupdate", [
        "0x44",
        "0x43",
        "0x4D",
        "0x01",
        "0x50",
        "0x41",
        "0x33",
        "0x30"
      ]);
      add("7z", ["0x37", "0x7A", "0xBC", "0xAF", "0x27", "0x1C"], {
        mime: "application/x-7z-compressed",
        extension: "7z"
      });
      add("gz", ["0x1F", "0x8B"], { mime: "application/gzip", extension: "gz" });
      add("tar.gz", ["0x1F", "0x8B"], {
        mime: "application/gzip",
        extension: "tar.gz"
      });
      add("xz", ["0xFD", "0x37", "0x7A", "0x58", "0x5A", "0x00", "0x00"], {
        mime: "application/gzip",
        extension: "xz"
      });
      add("tar.xz", ["0xFD", "0x37", "0x7A", "0x58", "0x5A", "0x00", "0x00"], {
        mime: "application/gzip",
        extension: "tar.xz"
      });
      add("lz2", ["0x04", "0x22", "0x4D", "0x18"]);
      add("cab", ["0x4D", "0x53", "0x43", "0x46"]);
      add("mkv", ["0x1A", "0x45", "0xDF", "0xA3"], {
        mime: "video/x-matroska",
        extension: "mkv"
      });
      add("mka", ["0x1A", "0x45", "0xDF", "0xA3"], {
        mime: "audio/x-matroska",
        extension: "mka"
      });
      add("mks", ["0x1A", "0x45", "0xDF", "0xA3"], {
        mime: "video/x-matroska",
        extension: "mks"
      });
      add("mk3d", ["0x1A", "0x45", "0xDF", "0xA3"]);
      add("webm", ["0x1A", "0x45", "0xDF", "0xA3"], {
        mime: "audio/webm",
        extension: "webm"
      });
      add("dcm", ["0x44", "0x49", "0x43", "0x4D"], void 0, 128);
      add("xml", ["0x3C", "0x3f", "0x78", "0x6d", "0x6C", "0x20"], {
        mime: "application/xml",
        extension: "xml"
      });
      add("wasm", ["0x00", "0x61", "0x73", "0x6d"], {
        mime: "application/wasm",
        extension: "wasm"
      });
      add("lep", ["0xCF", "0x84", "0x01"]);
      add("swf", ["0x43", "0x57", "0x53"], {
        mime: "application/x-shockwave-flash",
        extension: "swf"
      });
      add("swf", ["0x46", "0x57", "0x53"], {
        mime: "application/x-shockwave-flash",
        extension: "swf"
      });
      add("deb", ["0x21", "0x3C", "0x61", "0x72", "0x63", "0x68", "0x3E"]);
      add("rtf", ["0x7B", "0x5C", "0x72", "0x74", "0x66", "0x31"], {
        mime: "application/rtf",
        extension: "rtf"
      });
      add("m2p", ["0x00", "0x00", "0x01", "0xBA"]);
      add("vob", ["0x00", "0x00", "0x01", "0xBA"]);
      add("mpg", ["0x00", "0x00", "0x01", "0xBA"], {
        mime: "video/mpeg",
        extension: "mpg"
      });
      add("mpeg", ["0x00", "0x00", "0x01", "0xBA"], {
        mime: "video/mpeg",
        extension: "mpeg"
      });
      add("mpeg", ["0x47"], { mime: "video/mpeg", extension: "mpeg" });
      add("mpeg", ["0x00", "0x00", "0x01", "0xB3"], {
        mime: "video/mpeg",
        extension: "mpeg"
      });
      add("mov", ["0x66", "0x72", "0x65", "0x65"], {
        mime: "video/quicktime",
        extension: "mov"
      }, 4);
      add("mov", ["0x6D", "0x64", "0x61", "0x74"], {
        mime: "video/quicktime",
        extension: "mov"
      }, 4);
      add("mov", ["0x6D", "0x6F", "0x6F", "0x76"], {
        mime: "video/quicktime",
        extension: "mov"
      }, 4);
      add("mov", ["0x77", "0x69", "0x64", "0x65"], {
        mime: "video/quicktime",
        extension: "mov"
      }, 4);
      add("mov", ["0x66", "0x74", "0x79", "0x70", "0x71", "0x74"], {
        mime: "video/quicktime",
        extension: "mov"
      }, 4);
      add("hl2demo", ["0x48", "0x4C", "0x32", "0x44", "0x45", "0x4D", "0x4F"]);
      add("txt", ["0xEF", "0xBB", "0xBF"], {
        mime: "text/plain; charset=UTF-8",
        extension: "txt"
      });
      add("txt", ["0xFF", "0xFE"], {
        mime: "text/plain; charset=UTF-16LE",
        extension: "txt"
      });
      add("txt", ["0xFE", "0xFF"], {
        mime: "text/plain; charset=UTF-16BE",
        extension: "txt"
      });
      add("txt", ["0xFF", "0xFE", "0x00", "0x00"], {
        mime: "text/plain; charset=UTF-32LE",
        extension: "txt"
      });
      add("txt", ["0x00", "0x00", "0xFE", "0xFF"], {
        mime: "text/plain; charset=UTF-32BE",
        extension: "txt"
      });
      add("SubRip", ["0x31", "0x0D", "0x0A", "0x30", "0x30", "0x3A"], {
        mime: "application/x-subrip",
        extension: "srt"
      });
      add("WebVTT", [
        "0xEF",
        "0xBB",
        "0xBF",
        "0x57",
        "0x45",
        "0x42",
        "0x56",
        "0x54",
        "0x54",
        "0x0A"
      ], {
        mime: "text/vtt",
        extension: "vtt"
      });
      add("WebVTT", [
        "0xEF",
        "0xBB",
        "0xBF",
        "0x57",
        "0x45",
        "0x42",
        "0x56",
        "0x54",
        "0x54",
        "0x0D"
      ], {
        mime: "text/vtt",
        extension: "vtt"
      });
      add("WebVTT", [
        "0xEF",
        "0xBB",
        "0xBF",
        "0x57",
        "0x45",
        "0x42",
        "0x56",
        "0x54",
        "0x54",
        "0x20"
      ], {
        mime: "text/vtt",
        extension: "vtt"
      });
      add("WebVTT", [
        "0xEF",
        "0xBB",
        "0xBF",
        "0x57",
        "0x45",
        "0x42",
        "0x56",
        "0x54",
        "0x54",
        "0x09"
      ], {
        mime: "text/vtt",
        extension: "vtt"
      });
      add("WebVTT", ["0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x0A"], {
        mime: "text/vtt",
        extension: "vtt"
      });
      add("WebVTT", ["0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x0D"], {
        mime: "text/vtt",
        extension: "vtt"
      });
      add("WebVTT", ["0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x20"], {
        mime: "text/vtt",
        extension: "vtt"
      });
      add("WebVTT", ["0x57", "0x45", "0x42", "0x56", "0x54", "0x54", "0x09"], {
        mime: "text/vtt",
        extension: "vtt"
      });
      add("Json", ["0x7B"], {
        mime: "application/json",
        extension: ".json"
      });
      add("Json", ["0x5B"], {
        mime: "application/json",
        extension: ".json"
      });
      add("ELF", ["0x7F", "0x45", "0x4C", "0x46"], {
        mime: "application/x-executable",
        extension: ".elf"
      });
      add("Mach-O", ["0xFE", "0xED", "0xFA", "0xC"], {
        mime: "application/x-mach-binary",
        extension: ".o"
      });
      add("Mach-O", ["0xFE", "0xED", "0xFA", "0xCF"], {
        mime: "application/x-executable",
        extension: "elf"
      });
      add("EML", ["0x52", "0x65", "0x63", "0x65", "0x69", "0x76", "0x65", "0x64", "0x3A"], {
        mime: "message/rfc822",
        extension: ".eml"
      });
      add("SVG", ["0x3c", "0x73", "0x76", "0x67"], {
        mime: "image/svg+xml",
        extension: "svg"
      });
      patternTree.default = () => tree;
      (function(exports2) {
        var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
          return mod && mod.__esModule ? mod : { "default": mod };
        };
        Object.defineProperty(exports2, "__esModule", { value: true });
        exports2.filetypeextension = exports2.filetypemime = exports2.filetypename = exports2.filetypeinfo = void 0;
        const pattern_tree_1 = __importDefault(patternTree);
        const toHex_12 = toHex$1;
        const patternTree$1 = pattern_tree_1.default();
        const filetypeinfo2 = (bytes) => {
          let tree2 = patternTree$1;
          for (const k2 of Object.keys(tree2.offset)) {
            const offset = toHex_12.fromHex(k2);
            const offsetExceedsFile = offset >= bytes.length;
            if (offsetExceedsFile) {
              continue;
            }
            const node = patternTree$1.offset[k2];
            const guessed = walkTree(offset, bytes, node);
            if (guessed.length > 0) {
              return guessed;
            }
          }
          if (tree2.noOffset === null) {
            return [];
          }
          return walkTree(0, bytes, tree2.noOffset);
        };
        exports2.filetypeinfo = filetypeinfo2;
        const walkTree = (index, bytes, node) => {
          let step = node;
          let guessFile = [];
          while (true) {
            const currentByte = toHex_12.toHex(bytes[index]);
            if (step.bytes["?"] && !step.bytes[currentByte]) {
              step = step.bytes["?"];
            } else {
              step = step.bytes[currentByte];
            }
            if (!step) {
              return guessFile;
            }
            if (step && step.matches) {
              guessFile = step.matches.slice(0);
            }
            index += 1;
          }
        };
        exports2.default = exports2.filetypeinfo;
        const filetypename = (bytes) => exports2.filetypeinfo(bytes).map((e) => e.typename);
        exports2.filetypename = filetypename;
        const filetypemime = (bytes) => exports2.filetypeinfo(bytes).map((e) => e.mime ? e.mime : null).filter((x) => x !== null);
        exports2.filetypemime = filetypemime;
        const filetypeextension = (bytes) => exports2.filetypeinfo(bytes).map((e) => e.extension ? e.extension : null).filter((x) => x !== null);
        exports2.filetypeextension = filetypeextension;
      })(dist);
      const filetypeinfo = /* @__PURE__ */ getDefaultExportFromCjs(dist);
      function downloadFileWithXhr(url, fileName) {
        console.log(url);
        console.log(fileName);
        const xhr = new XMLHttpRequest();
        xhr.open("GET", url, true);
        xhr.responseType = "blob";
        xhr.onload = async function() {
          if (xhr.status === 200) {
            const blob = xhr.response;
            let sub;
            const buffer = await blob.arrayBuffer();
            const fileType = filetypeinfo(new Uint8Array(buffer));
            sub = "." + fileType[0].extension;
            fileName += sub;
            console.log("推断的文件类型", fileType);
            console.log("文件名:", fileName);
            const link = document.createElement("a");
            const href = URL.createObjectURL(blob);
            link.href = href;
            link.download = fileName;
            link.click();
            URL.revokeObjectURL(href);
          }
        };
        xhr.onerror = (error) => {
          console.log("下载出错", error);
        };
        xhr.send();
        return xhr;
      }
      function camelToSnake(obj) {
        function toSnakeCase(str) {
          return str.replace(/[A-Z]/g, (match) => "_" + match.toLowerCase());
        }
        function convertKeys(obj2) {
          const converted = {};
          for (const key in obj2) {
            if (Object.prototype.hasOwnProperty.call(obj2, key)) {
              const snakeCaseKey = toSnakeCase(key);
              if (typeof obj2[key] === "object" && !Array.isArray(obj2[key])) {
                converted[snakeCaseKey] = convertKeys(obj2[key]);
              } else if (Array.isArray(obj2[key])) {
                converted[snakeCaseKey] = obj2[key].map((item) => {
                  if (typeof item === "object" && !Array.isArray(item)) {
                    return convertKeys(item);
                  } else {
                    return item;
                  }
                });
              } else {
                converted[snakeCaseKey] = obj2[key];
              }
            }
          }
          return converted;
        }
        return convertKeys(obj);
      }
      function getRandomItemFromArray(array) {
        const randomIndex = Math.floor(Math.random() * array.length);
        return array[randomIndex];
      }
      async function getFileExtensionFromPartialContent(url) {
        try {
          const response = await fetch(url, {
            headers: {
              Range: "bytes=0-1024"
              // 只请求前 1024 字节
            }
          });
          const buffer = await response.arrayBuffer();
          const fileType = filetypeinfo(new Uint8Array(buffer));
          const sub = "." + fileType[0].extension;
          return sub;
        } catch (error) {
          console.log("文件名推断请求出错", error);
          return "";
        }
      }
      var downLoadType = /* @__PURE__ */ ((downLoadType2) => {
        downLoadType2[downLoadType2["default"] = 0] = "default";
        downLoadType2[downLoadType2["origin"] = 1] = "origin";
        downLoadType2[downLoadType2["jpg"] = 2] = "jpg";
        downLoadType2[downLoadType2["live"] = 3] = "live";
        return downLoadType2;
      })(downLoadType || {});
      var noteType = /* @__PURE__ */ ((noteType2) => {
        noteType2[noteType2["video"] = 0] = "video";
        noteType2[noteType2["img"] = 1] = "img";
        return noteType2;
      })(noteType || {});
      const _withScopeId = (n) => (vue.pushScopeId("data-v-b4044390"), n = n(), vue.popScopeId(), n);
      const _hoisted_1 = { class: "header" };
      const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "下载", -1));
      const _hoisted_3 = { class: "img-list" };
      const _hoisted_4 = { class: "item" };
      const _hoisted_5 = ["src"];
      const _hoisted_6 = { class: "progress" };
      const _hoisted_7 = { key: 1 };
      const _hoisted_8 = { class: "btns" };
      const _hoisted_9 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, " 1. 原图地址无法访问或未知原因:尝试重新下载或下载类型选择为普通后再下载 ", -1));
      const _hoisted_10 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, [
        /* @__PURE__ */ vue.createTextVNode(" 2. 浏览器判定为不安全的下载:请参考 "),
        /* @__PURE__ */ vue.createElementVNode("a", {
          href: "https://blog.csdn.net/qq_34626094/article/details/136965312",
          target: "_blank"
        }, ' 谷歌浏览器下载提示"已阻止不安全的下载" '),
        /* @__PURE__ */ vue.createTextVNode("进行处理 ")
      ], -1));
      const _hoisted_11 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("p", null, [
        /* @__PURE__ */ vue.createTextVNode(" 3. 如还是不能正常下载:请点击 "),
        /* @__PURE__ */ vue.createElementVNode("a", {
          href: "https://greasyfork.org/zh-CN/scripts/495790-%E5%B0%8F%E7%BA%A2%E4%B9%A6%E5%9B%BE%E7%89%87-%E8%A7%86%E9%A2%91%E4%B8%8B%E8%BD%BD-%E5%9B%BE%E7%89%87%E9%A2%84%E8%A7%88/feedback",
          target: "_blank"
        }, " greasyfork feedback "),
        /* @__PURE__ */ vue.createTextVNode("进行反馈 ")
      ], -1));
      const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
        __name: "main",
        setup(__props) {
          const getInitState = () => {
            return {
              title: "",
              // 文件列表
              list: [],
              // 下载链接
              showDowloadDrawer: false,
              // 下载类型
              downLoadType: downLoadType.origin,
              // 要下载的文件
              selection: [],
              // 加载
              isLoading: false,
              // 是否显示提示
              showNotice: false,
              // 放大
              showMaxDowloadDrawer: false,
              // 缩小
              noteType: noteType.img,
              // 实况
              isLivePhoto: false
            };
          };
          const state = vue.reactive(getInitState());
          vue.watch(
            () => state.downLoadType,
            () => {
              state.list.forEach((item, index) => {
                Object.assign(item, {
                  downloadProgress: 0
                });
              });
            }
          );
          vue.watch(
            () => state.selection,
            (val) => {
              checkAllindeterminate.value = val.length > 0 && val.length < state.list.length;
              checkAll.value = val.length == state.list.length;
            }
          );
          function handleCheckAllChange(val) {
            if (val) {
              state.selection = state.list;
            } else {
              state.selection = [];
            }
          }
          function getDownloadUrl(file) {
            let url = "";
            if (state.downLoadType == downLoadType.default) {
              url = file.url;
            } else if (state.downLoadType == downLoadType.origin) {
              url = file.downloadUrl;
            } else if (state.downLoadType == downLoadType.jpg) {
              url = file.downloadUrl += "?" + jpgParams;
            } else if (state.downLoadType == downLoadType.live) {
              url = file.liveUrl || file.downloadUrl;
            }
            return url;
          }
          async function downloadFile(file, name) {
            state.isLoading = true;
            const url = getDownloadUrl(file);
            const xhr = downloadFileWithXhr(url, name);
            xhr.onerror = (e) => {
              console.log("出错啦", e);
              state.showNotice = true;
            };
            xhr.onprogress = (event) => {
              const p = event.loaded / event.total * 100;
              file.downloadProgress = +p.toFixed(2);
            };
            xhr.onreadystatechange = () => {
              if (xhr.readyState == 4 && xhr.status == 404) {
                state.showNotice = true;
              }
            };
            file.xhr = xhr;
            state.isLoading = false;
          }
          async function batchDownload(useThunder) {
            var _a2, _b;
            console.log("批量下载");
            if (useThunder) {
              const tasks = await Promise.all(
                state.selection.map(async (item, index) => {
                  const url = getDownloadUrl(item);
                  const sub = await getFileExtensionFromPartialContent(url);
                  console.log(sub);
                  return {
                    name: (state.selection.length > 1 ? state.title + "_" + (index + 1) : state.title) + sub,
                    url
                    // 指定下载地址【必填项】
                  };
                })
              );
              _monkeyWindow.thunderLink.newTask({
                taskGroupName: ((_b = (_a2 = document.title.split("-").map((str) => {
                  return str.trim();
                })) == null ? void 0 : _a2.reverse()) == null ? void 0 : _b.join("-")) || "小红书网页下载",
                tasks
              });
            } else {
              if (state.selection.length == 1) {
                const title = state.title;
                downloadFile(state.selection[0], title);
              } else {
                state.selection.forEach((item, index) => {
                  downloadFile(item, state.title + "_" + (index + 1));
                });
              }
            }
          }
          vue.onMounted(() => {
            initEventListener();
          });
          function handleFloatBtnClick(isDb = false) {
            console.log("点击下载按钮了");
            let title = document.title.split("-")[0].trim();
            if (title.length > 50) {
              title = title.substring(0, 50);
            }
            state.title = title;
            if (!isDb) {
              state.showDowloadDrawer = true;
            } else {
              batchDownload();
            }
          }
          async function initEventListener() {
            const originalXhrSend = window.XMLHttpRequest.prototype.send;
            window.XMLHttpRequest.prototype.send = function() {
              this.addEventListener("load", function() {
                var _a2, _b;
                if (this.responseURL.includes("/api/sns/web/v1/feed")) {
                  Object.assign(state, getInitState());
                  console.log(state);
                  const resData = JSON.parse(this.responseText);
                  const note = (_b = (_a2 = resData.data) == null ? void 0 : _a2.items[0]) == null ? void 0 : _b.note_card;
                  filterData(note);
                  initPreviewImg();
                }
              });
              return originalXhrSend.apply(this, arguments);
            };
            const { href, pathname } = window.location;
            if (href.startsWith("https://www.xiaohongshu.com/explore/")) {
              const id = pathname.split("/").at(-1);
              const note = _unsafeWindow.__INITIAL_STATE__.note.noteDetailMap[id].note;
              const res = camelToSnake(note);
              filterData(res);
              initPreviewImg();
            }
          }
          function filterData(note) {
            if (note.type == "normal") {
              state.noteType = noteType.img;
              const imageList = note.image_list;
              state.list = imageList.map((item, index) => {
                var _a2, _b;
                if (item.live_photo) {
                  state.isLivePhoto = true;
                }
                const url = item.url_default;
                const key = url.match(keyReg)[0];
                return {
                  url,
                  downloadUrl: getRandomItemFromArray(imageServer) + key,
                  liveUrl: (item == null ? void 0 : item.live_photo) ? (_b = (_a2 = item.stream) == null ? void 0 : _a2.h264[0]) == null ? void 0 : _b.master_url : "",
                  cover: "",
                  downloadProgress: 0
                };
              });
            } else {
              state.noteType = noteType.video;
              state.list = [
                {
                  url: note.video.media.stream.h264[0].master_url,
                  downloadUrl: getRandomItemFromArray(videoServer) + note.video.consumer.origin_video_key,
                  cover: note.image_list[0].url_default,
                  downloadProgress: 0
                }
              ];
            }
            state.selection = state.list;
          }
          function handleCancel() {
            var _a2;
            (_a2 = state.selection[0].xhr) == null ? void 0 : _a2.abort();
            state.selection[0].downloadProgress = 0;
          }
          function initPreviewImg() {
            const swiperWrapper = document.querySelector(".swiper-wrapper");
            if (!swiperWrapper)
              return;
            swiperWrapper.addEventListener(
              "click",
              (e) => {
                const swiperElement = document.querySelector(".swiper");
                const index = swiperElement.swiper.activeIndex;
                console.log("点击", index);
                previewImg(index - 1);
                e.stopPropagation();
              },
              true
            );
          }
          function previewImg(index) {
            qt({
              options: {
                url: "url",
                initialViewIndex: index,
                title: false
              },
              images: state.list
            });
          }
          const checkAll = vue.ref(true);
          const checkAllindeterminate = vue.ref(false);
          function changeSize() {
            state.showMaxDowloadDrawer = !state.showMaxDowloadDrawer;
          }
          return (_ctx, _cache) => {
            const _component_el_checkbox = ElCheckbox;
            const _component_el_checkbox_group = ElCheckboxGroup;
            const _component_el_empty = ElEmpty;
            const _component_el_input = ElInput;
            const _component_el_form_item = ElFormItem;
            const _component_el_radio = ElRadio;
            const _component_el_radio_group = ElRadioGroup;
            const _component_el_form = ElForm;
            const _component_el_button = ElButton;
            const _component_el_drawer = ElDrawer;
            return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
              vue.createVNode(_component_el_drawer, {
                modelValue: vue.unref(state).showDowloadDrawer,
                "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => vue.unref(state).showDowloadDrawer = $event),
                size: vue.unref(state).showMaxDowloadDrawer ? "100%" : "50%"
              }, {
                header: vue.withCtx(() => [
                  vue.createElementVNode("div", _hoisted_1, [
                    _hoisted_2,
                    vue.createElementVNode("div", {
                      class: "icon",
                      onClick: changeSize
                    }, [
                      vue.unref(state).showMaxDowloadDrawer ? (vue.openBlock(), vue.createBlock(vue.unref(FullScreenMinimize24Filled), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(FullScreenMaximize24Regular), { key: 1 }))
                    ])
                  ])
                ]),
                footer: vue.withCtx(() => {
                  var _a2, _b;
                  return [
                    vue.createVNode(_component_el_form, { "label-position": "left" }, {
                      default: vue.withCtx(() => [
                        vue.createVNode(_component_el_form_item, {
                          label: "文件名前缀",
                          "label-width": "6rem"
                        }, {
                          default: vue.withCtx(() => [
                            vue.createVNode(_component_el_input, {
                              modelValue: vue.unref(state).title,
                              "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.unref(state).title = $event),
                              autocomplete: "off"
                            }, null, 8, ["modelValue"])
                          ]),
                          _: 1
                        }),
                        vue.createVNode(_component_el_form_item, {
                          label: "下载类型",
                          "label-width": "6rem"
                        }, {
                          default: vue.withCtx(() => [
                            vue.createVNode(_component_el_radio_group, {
                              modelValue: vue.unref(state).downLoadType,
                              "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vue.unref(state).downLoadType = $event)
                            }, {
                              default: vue.withCtx(() => [
                                vue.createVNode(_component_el_radio, {
                                  value: vue.unref(downLoadType).default
                                }, {
                                  default: vue.withCtx(() => [
                                    vue.createTextVNode("普通")
                                  ]),
                                  _: 1
                                }, 8, ["value"]),
                                vue.createVNode(_component_el_radio, {
                                  value: vue.unref(downLoadType).origin
                                }, {
                                  default: vue.withCtx(() => [
                                    vue.createTextVNode("原图")
                                  ]),
                                  _: 1
                                }, 8, ["value"]),
                                vue.unref(state).noteType == vue.unref(noteType).img ? (vue.openBlock(), vue.createBlock(_component_el_radio, {
                                  key: 0,
                                  value: vue.unref(downLoadType).jpg
                                }, {
                                  default: vue.withCtx(() => [
                                    vue.createTextVNode("jpg格式(图片)")
                                  ]),
                                  _: 1
                                }, 8, ["value"])) : vue.createCommentVNode("", true),
                                vue.unref(state).isLivePhoto ? (vue.openBlock(), vue.createBlock(_component_el_radio, {
                                  key: 1,
                                  value: vue.unref(downLoadType).live
                                }, {
                                  default: vue.withCtx(() => [
                                    vue.createTextVNode("实况(图片)")
                                  ]),
                                  _: 1
                                }, 8, ["value"])) : vue.createCommentVNode("", true)
                              ]),
                              _: 1
                            }, 8, ["modelValue"])
                          ]),
                          _: 1
                        })
                      ]),
                      _: 1
                    }),
                    vue.createElementVNode("div", _hoisted_8, [
                      vue.createVNode(_component_el_button, {
                        onClick: _cache[3] || (_cache[3] = ($event) => vue.unref(state).showDowloadDrawer = false)
                      }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode("返回")
                        ]),
                        _: 1
                      }),
                      vue.unref(state).noteType == vue.unref(noteType).video ? (vue.openBlock(), vue.createBlock(_component_el_button, {
                        key: 0,
                        type: "info",
                        onClick: handleCancel,
                        disabled: vue.unref(state).selection.length == 0 || ((_a2 = vue.unref(state).selection[0]) == null ? void 0 : _a2.downloadProgress) == 0 || ((_b = vue.unref(state).selection[0]) == null ? void 0 : _b.downloadProgress) == 100
                      }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode(" 取消下载 ")
                        ]),
                        _: 1
                      }, 8, ["disabled"])) : vue.createCommentVNode("", true),
                      vue.createVNode(_component_el_button, { type: "text" }, {
                        default: vue.withCtx(() => [
                          vue.createVNode(_component_el_checkbox, {
                            border: "",
                            onChange: handleCheckAllChange,
                            modelValue: vue.unref(checkAll),
                            "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => vue.isRef(checkAll) ? checkAll.value = $event : null),
                            indeterminate: vue.unref(checkAllindeterminate),
                            disabled: !vue.unref(state).list.length
                          }, {
                            default: vue.withCtx(() => [
                              vue.createTextVNode(" 全选" + vue.toDisplayString(vue.unref(state).selection.length > 0 ? `(${vue.unref(state).selection.length})` : ""), 1)
                            ]),
                            _: 1
                          }, 8, ["modelValue", "indeterminate", "disabled"])
                        ]),
                        _: 1
                      }),
                      vue.createVNode(_component_el_button, {
                        type: "primary",
                        onClick: _cache[5] || (_cache[5] = ($event) => batchDownload()),
                        disabled: vue.unref(state).selection.length == 0 || vue.unref(state).isLoading
                      }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode(" 浏览器下载 ")
                        ]),
                        _: 1
                      }, 8, ["disabled"]),
                      vue.createVNode(_component_el_button, {
                        color: "#3f85ff",
                        onClick: _cache[6] || (_cache[6] = ($event) => batchDownload(true)),
                        disabled: vue.unref(state).selection.length == 0 || vue.unref(state).isLoading
                      }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode(" 迅雷下载 ")
                        ]),
                        _: 1
                      }, 8, ["disabled"])
                    ])
                  ];
                }),
                default: vue.withCtx(() => [
                  vue.unref(state).list.length ? (vue.openBlock(), vue.createBlock(_component_el_checkbox_group, {
                    key: 0,
                    modelValue: vue.unref(state).selection,
                    "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(state).selection = $event)
                  }, {
                    default: vue.withCtx(() => [
                      vue.createElementVNode("div", _hoisted_3, [
                        (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(state).list, (item) => {
                          return vue.openBlock(), vue.createBlock(_component_el_checkbox, {
                            value: item,
                            size: "large",
                            key: item.url
                          }, {
                            default: vue.withCtx(() => [
                              vue.createElementVNode("div", _hoisted_4, [
                                vue.createElementVNode("img", {
                                  src: vue.unref(state).noteType == vue.unref(noteType).img ? item.url : item.cover
                                }, null, 8, _hoisted_5),
                                vue.createElementVNode("div", _hoisted_6, vue.toDisplayString(item.downloadProgress.toFixed(2)) + "%", 1)
                              ])
                            ]),
                            _: 2
                          }, 1032, ["value"]);
                        }), 128))
                      ])
                    ]),
                    _: 1
                  }, 8, ["modelValue"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
                    vue.createVNode(_component_el_empty)
                  ])),
                  vue.createVNode(_component_el_drawer, {
                    modelValue: vue.unref(state).showNotice,
                    "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => vue.unref(state).showNotice = $event),
                    size: "50%",
                    title: "提示"
                  }, {
                    footer: vue.withCtx(() => [
                      vue.createVNode(_component_el_button, {
                        type: "primary",
                        onClick: _cache[7] || (_cache[7] = ($event) => vue.unref(state).showNotice = false)
                      }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode(" 我知道啦 ")
                        ]),
                        _: 1
                      })
                    ]),
                    default: vue.withCtx(() => [
                      vue.createTextVNode(" 下载错误,请参考: "),
                      _hoisted_9,
                      _hoisted_10,
                      _hoisted_11
                    ]),
                    _: 1
                  }, 8, ["modelValue"])
                ]),
                _: 1
              }, 8, ["modelValue", "size"]),
              vue.createVNode(floatButton, {
                onClick: handleFloatBtnClick,
                onDbClick: _cache[10] || (_cache[10] = ($event) => handleFloatBtnClick(true))
              })
            ], 64);
          };
        }
      });
      const Main = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b4044390"]]);
      const _sfc_main = /* @__PURE__ */ vue.defineComponent({
        __name: "App",
        setup(__props) {
          return (_ctx, _cache) => {
            const _component_el_config_provider = ElConfigProvider;
            return vue.openBlock(), vue.createBlock(_component_el_config_provider, { locale: vue.unref(zhCn) }, {
              default: vue.withCtx(() => [
                vue.createVNode(Main)
              ]),
              _: 1
            }, 8, ["locale"]);
          };
        }
      });
      const cssLoader = (e) => {
        const t = GM_getResourceText(e);
        return GM_addStyle(t), t;
      };
      cssLoader("viewerjs/dist/viewer.css");
      const app = vue.createApp(_sfc_main);
      app.mount(
        (() => {
          const app2 = document.createElement("div");
          document.body.append(app2);
          return app2;
        })()
      );
    }
  });
  require_main_001();

})(Vue);